NEWS 514 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793
  1. Guile NEWS --- history of user-visible changes.
  2. Copyright (C) 1996-2021 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.6 (since 3.0.5)
  6. * Notable changes
  7. ** Reimplement dynamic library loading ("dlopening") without libltdl
  8. Guile used to load dynamic libraries with libltdl, a library provided by
  9. the Libtool project.
  10. Libltdl provided some compatibility benefits when loading shared
  11. libraries made with older toolchains on older operating systems.
  12. However, no system from the last 10 years or so appears to need such a
  13. thick compatibility layer.
  14. Besides being an unmaintained dependency of limited utility, libltdl
  15. also has the negative aspect that in its search for libraries to load,
  16. it could swallow useful errors for libraries that are found but not
  17. loadable, instead showing just errors for search path candidates that
  18. are not found.
  19. Guile now implements dynamic library loading directly in terms of the
  20. standard "dlopen" interface, providing a limited shim for platforms with
  21. similar functionality exposed under different names (MinGW).
  22. This change has a few practical impacts to Guile users. There is a new
  23. library search path variable, `GUILE_EXTENSIONS_DIR'. Also, errors when
  24. loading a library fails now have better errors. And Guile no longer has
  25. a libltdl dependency.
  26. Although Guile no longer uses libltdl, for backwards compatibility Guile
  27. still adds `LTDL_LIBRARY_PATH' to the loadable library search path, and
  28. includes ad-hoc logic to support uninstalled dynamically loadable
  29. libraries via also adding the ".libs" subdirectories of
  30. `LTDL_LIBRARY_PATH' elements. See "Foreign Libraries" in the
  31. documentation for a full discussion.
  32. ** Updated Gnulib
  33. The Gnulib compatibility library has been updated, for the first time
  34. since 2017 or so. We expect no functional change but look forward to
  35. any bug reports.
  36. * New interfaces and functionality
  37. ** `call-with-port'
  38. See "Ports" in the manual.
  39. ** `call-with-input-bytevector', `call-with-output-bytevector'
  40. See "Bytevector Ports" in the manual.
  41. ** `GUILE_EXTENSIONS_DIR' environment variable.
  42. ** `(system foreign-library)' module
  43. See the newly reorganized "Foreign Function Interface", for details.
  44. These new interfaces replace `dynamic-link', `dynamic-pointer' and
  45. similar, which will eventually be deprecated.
  46. * New deprecations
  47. ** `dynamic-unlink'
  48. This function now has no effect; Guile will not unload dynamically
  49. linked modules, as that can destabilize the system.
  50. * Incompatible changes
  51. ** `call-with-output-string' closes port on normal exit
  52. This procedure used to leave the port open, even though there was no
  53. useful way to access it. Now we clean it up more promptly, disposing
  54. any possible associated iconv descriptor.
  55. Changes in 3.0.5 (since 3.0.4)
  56. * New interfaces and functionality
  57. ** O(1) compilation of `case' and related expressions
  58. Guile now optimizes chains of eq? comparisons to constants, resulting in
  59. O(1) dispatch time, regardless of the length of the chain. This
  60. optimization is also unlocked in many cases for `match' expressions with
  61. many similar clauses whose first differentiator are constants.
  62. ** New (ice-9 copy-tree) module
  63. This module includes the `copy-tree' procedure that was previously
  64. implemented in C and present in the default `(guile)' module. See
  65. "Copying" in the manual.
  66. ** New warning: use-before-definition
  67. This analysis, enabled at `-W1', issues warnings for programs that use
  68. top-level variables before they are defined.
  69. ** New warning: non-idempotent-definition
  70. This analysis, enabled at `-W1', issues warnings for programs that whose
  71. use of a variable is ambiguous. For example, in the program:
  72. (define saved-add +)
  73. (define + error)
  74. The intention would seem to be to "save" the value of the base `+'
  75. procedure, then override it locally. However if this program is ever
  76. loaded twice, then the second time it is loaded, `+' will be taken from
  77. the local binding instead of the import. Users that want this kind of
  78. behavior should either use lexical bindings instead of top-level
  79. bindings, or otherwise rename important clobbered bindings via modules.
  80. * New deprecations
  81. ** `copy-tree' in the default environment, and `scm_copy_tree' from C
  82. Import the `(ice-9 copy-tree)' module instead.
  83. ** `unbound-variable-analysis`, `macro-use-before-definition-analysis`
  84. These bindings from `(language tree-il analyze)' are replaced by the
  85. use-before-definition analysis, which powers a number of warnings. Use
  86. `make-use-before-definition-analysis', but note that these interfaces
  87. are quite intimate parts of the compiler!
  88. * Incompatible changes
  89. ** `copy' read-option removed
  90. This read option would include a copy of the source expression in the
  91. source-properties of each subexpression. This option has always been
  92. off by default and lost most of its use value with the switch to a
  93. compiler in Guile 2.0.
  94. Changes in 3.0.4 (since 3.0.3)
  95. This release fixes the SONAME of libguile-3.0.so, which was erroneously
  96. bumped in 3.0.3 compared to 3.0.2. Distributions are strongly
  97. encouraged to use 3.0.4 instead of 3.0.3.
  98. Thanks to Chris Vine for reporting the issue.
  99. Changes in 3.0.3 (since 3.0.2)
  100. * New interfaces and functionality
  101. ** New baseline compiler
  102. Guile's CPS-based compiler generates good code, but it takes time and
  103. memory to do so. For users that prioritize speed of compilation over
  104. speed of generated code, Guile now has a new baseline compiler that goes
  105. directly from the high-level Tree-IL to bytecode, skipping CPS and all
  106. of its optimizations. This compiler is used for `guild compile -O0',
  107. and generally runs around ten times as fast as the CPS compiler.
  108. *** New VM intrinsics to support baseline compiler
  109. See "Intrinsic Call Instructions" in the manual.
  110. *** Compiler support for warning and lowering passes
  111. *** Compiler support for choosing different compilation orders
  112. See "Compiler Tower" in the manual. The new per-language "compiler
  113. chooser" facility can choose different compilers based on optimization
  114. level.
  115. *** Better support for specifying optimization and warning levels
  116. The procedural compilation interfaces (`compile', `compile-file', and so
  117. on) now have #:optimization-level and #:warning-level keyword arguments,
  118. which default to corresponding `default-optimization-level' and
  119. `default-warning-level' parameters. You can still specify warning and
  120. optimization passes manually, but we think most users will find the
  121. higher-level interfaces more robust to use.
  122. ** Faster Guile build from source
  123. Guile now uses the baseline compiler for its bootstrap, when building
  124. the first Scheme compiler. Because the baseline compiler runs faster
  125. and includes less code than the CPS compiler, Guile takes less time to
  126. build.
  127. ** New 'pipeline' procedure in (ice-9 popen)
  128. The 'pipeline' procedure provides a simple way to spawn command pipeline
  129. as one would do in a shell.
  130. ** Refreshed bitvector facility
  131. See "Bit Vectors" in the manual, for more on all of these.
  132. *** New bitvector-count, bitvector-count-bits, bitvector-position
  133. procedures
  134. These replace the wonky "bit-count", "bit-count*", and "bit-position"
  135. procedures.
  136. *** New bitvector-bit-set?, bitvector-bit-clear? procedures
  137. These replace bitvector-ref. The reason to migrate is that it's an
  138. opportunity be more efficient in 3.0 (because the new procedures only
  139. work on true bitvectors, and not generic bit arrays), easier to read (no
  140. need for 'not' when checking for false bits), and more consistent with
  141. other bitvector procedures.
  142. *** New bitvector-set-bit!, bitvector-clear-bit! procedures
  143. These replace bitvector-set!, for similar reasons as the bitvector-ref
  144. replacement above.
  145. *** New bitvector-set-all-bits!, bitvector-clear-all-bits! procedures
  146. These replace bitvector-fill!.
  147. *** New bitvector-flip-all-bits! procedure
  148. This replaces bit-invert!.
  149. *** New bitvector-set-bits!, bitvector-clear-bits! procedures
  150. These replace the wonky "bit-set*!" procedure.
  151. * Bug fixes
  152. ** statprof reports the names of primitives
  153. Previously statprof would show strings like "anon #x1234" for primitives
  154. written in C.
  155. ** Compiler reduces 'equal?' when passed a character literal
  156. The compiler now properly reduces expressions such as (equal? c #\x) to
  157. (eq? c #\x). This was not the case in 3.0.2, which could lead to slower
  158. code, especially in 'match' expressions with many clauses with with
  159. character literals.
  160. ** JIT bugs on ARMv7 have been fixed
  161. (<https://bugs.gnu.org/40737>,
  162. <https://gitlab.com/wingo/lightening/-/issues/12>)
  163. ** 'http-get', 'http-post', etc. now honor #:verify-certificates?
  164. (<https://bugs.gnu.org/40486>)
  165. ** web: Accept URI host names consisting only of hex digits
  166. (<https://bugs.gnu.org/40582>)
  167. ** (web http) parser recognizes the CONNECT and PATCH methods
  168. ** Initial revealed count of file ports is now zero
  169. (<https://bugs.gnu.org/41204>)
  170. * New deprecations
  171. ** Old bitvector interfaces deprecated
  172. See "Bit Vectors" in the manual, for details on all of these
  173. replacements.
  174. *** bit-count, bit-position
  175. Use bitvector-count or bitvector-position instead.
  176. *** bitvector-ref
  177. Use 'bitvector-bit-set?' or 'bitvector-bit-clear?' instead.
  178. *** bitvector-set!
  179. Use 'bitvector-set-bit!' or 'bitvector-clear-bit!' instead.
  180. *** bitvector-fill!
  181. Use 'bitvector-set-all-bits!' or 'bitvector-clear-all-bits!' instead.
  182. *** bit-invert!
  183. Use 'bitvector-flip-all-bits! instead.
  184. *** bit-set*!
  185. Use 'bitvector-set-bits!' or 'bitvector-clear-bits!' instead.
  186. *** bit-count*
  187. Use 'bitvector-count-bits' instead, subtracting from 'bitvector-count'
  188. on the mask bitvector if you are counting unset bits.
  189. *** Accessing generic arrays using the bitvector procedures
  190. For the same efficiency reasons that use of 'vector-ref' on generic
  191. arrays was deprecated in Guile 2.0.10, using 'bitvector->list' and
  192. similar procedures on 1-dimensional boolean-typed arrays is now
  193. deprecated. Use 'array-ref' and similar procedures on arrays.
  194. *** scm_istr2bve
  195. This C-only procedure to parse a bitvector from a string should be
  196. replaced by calling `read' on a string port instead, if needed.
  197. Changes in 3.0.2 (since 3.0.1)
  198. * New interfaces and functionality
  199. ** New (srfi srfi-171) module
  200. This module implements "tranducers" as specified in
  201. <https://srfi.schemers.org/srfi-171/srfi-171.html>.
  202. Thanks to Linus Björnstam for this new API!
  203. ** SRFI-14 character data set upgraded to Unicode 13.0.0
  204. * Bug fixes
  205. ** Fix heap corruption when allocating structs
  206. (<https://bugs.gnu.org/39266>)
  207. This bug would cause random crashes; users are invited to upgrade.
  208. Thanks to rr (<https://rr-project.org/>) for being instrumental in
  209. finding this bug!
  210. ** Fix race condition between 'abort-to-prompt' and stack marking
  211. (<https://bugs.gnu.org/28211>)
  212. This bug could occasionally cause crashes in multi-threaded Guile
  213. programs using delimited continuations or exceptions.
  214. ** Ensure weak sets are occasionally vacuumed
  215. (<https://bugs.gnu.org/40194>)
  216. Previously, weak sets, which are used internally for interned symbols
  217. and for ports with SCM_PORT_TYPE_NEEDS_CLOSE_ON_GC, could grow seemingly
  218. indefinitely without being vacuumed.
  219. ** Interpret dynamic library name as literal file name first
  220. (<https://bugs.gnu.org/21076>)
  221. Until now, 'dynamic-link' would always append an extension, such as
  222. ".so", to the user-provided file names. Now, 'dynamic-link' first tries
  223. the file name literally, and only then falls back to adding the OS
  224. shared library file name extension.
  225. This allows users to refer to "libsomething.so.1.2.3" instead of
  226. "libsomething.so", the latter being usually provided by "-dev" packages
  227. of GNU/Linux distributions, unlike the former.
  228. ** <libguile.h> includes <libguile/hooks.h> again
  229. This fixes an omission in Guile 3.0.
  230. ** Fix fixpoint computation in compute-significant-bits
  231. (<https://bugs.gnu.org/38486>)
  232. ** Fix compilation '--without-threads'
  233. (<https://bugs.gnu.org/40075>)
  234. * New deprecations
  235. ** 'tmpnam' is now deprecated
  236. The 'tmpnam' function in the C library has been deprecated for years due
  237. to security concerns; the Scheme procedure 'tmpnam' is now deprecated as
  238. well, in favor of 'mkstemp!'. In addition, a new '--disable-tmpnam'
  239. option has been added to 'configure' for users who would like to disable
  240. it right away.
  241. Changes in 3.0.1 (since 3.0.0):
  242. * New interfaces and functionality
  243. ** Export constructor and predicate for '&quit-exception'
  244. The (ice-9 exceptions) module, new in 3.0.0, now exports
  245. 'quit-exception?' and 'make-quit-exception', which is consistent with
  246. other exception types.
  247. ** (texinfo plain-text) now exports '*line-width*' fluid
  248. The new '*line-width*' fluid allows users to specify the width of a line
  249. for the purposes of line wrapping. See "texinfo plain-text" in the
  250. manual.
  251. ** R7RS support recognizes the '.sld' extension
  252. The '.sld' is what the R7RS suggests as a source file name extension.
  253. It is now recognized when running "guile --r7rs", as well as
  254. the '.guile.sld' extension.
  255. * Bug fixes
  256. ** 'hash' correctly handles keywords, ports, hash tables, etc.
  257. (<https://bugs.gnu.org/39634>)
  258. It used to be that the 'hash' procedure would return the same value for
  259. all keyword objects, the same value for all hash tables, the same value
  260. for all input ports, etc.
  261. ** 'include' no longer rejects relative file names
  262. A bug in 3.0.0 would lead 'include' to error out when passed a relative
  263. file name.
  264. ** Reduce GC pressure when using bignums
  265. Guile no longer installs a finalizer on each bignum (large integer) it
  266. creates. This significantly improves speed and memory usage on
  267. applications that make heavy use of bignums, such as the compiler
  268. itself.
  269. ** Fix expansion of 'error' calls with a non-constant argument
  270. (<https://bugs.gnu.org/39509>)
  271. Calls to the 'error' primitive with a non-constant argument, as in
  272. (error message), would be incorrectly expanded by the compiler, leading
  273. to non-printable errors ("Error while printing exception").
  274. ** Improve source location information for top-level references
  275. (<https://bugs.gnu.org/38388>)
  276. Source location information, as is visible upon "unbound variable"
  277. errors, is now more accurate.
  278. ** Web client treats TLS "premature termination" error as EOF
  279. (<https://bugs.gnu.org/39800>)
  280. This allows 'http-request' from (web client) to gracefully handle
  281. servers that terminate connections abruptly after responding to a
  282. "Connection: close" request.
  283. ** Fix bug restoring a JIT continuation from the interpreter
  284. ** Export C symbols 'scm_sym_lambda', 'scm_sym_quote', etc. again
  285. Those C symbols were inadvertently made private in 3.0.0.
  286. ** Fix build on IA64 and on platforms where the stack grows upwards
  287. ** Fix JIT compilation on 64-bit Cygwin
  288. (<https://bugs.gnu.org/39118>)
  289. ** texinfo properly renders @acronym in plain text
  290. (<https://bugs.gnu.org/37846>)
  291. ** Compiler now optimizes (logior 0 INT)
  292. (<https://bugs.gnu.org/39573>)
  293. ** Fix Readline configure check for the sake of libedit
  294. This fixes builds on macOS against the system-provided libedit.
  295. ** Provided 'GUILE_PKG' Autoconf macro now detects Guile 3.0
  296. (<https://bugs.gnu.org/39437>)
  297. Changes in 3.0.0 (since the stable 2.2 series):
  298. * Notable changes
  299. ** Just-in-time code generation
  300. Guile programs now run up to 4 times faster, relative to Guile 2.2,
  301. thanks to just-in-time (JIT) native code generation. Notably, this
  302. brings the performance of "eval" as written in Scheme back to the level
  303. of "eval" written in C, as in the days of Guile 1.8.
  304. See "Just-In-Time Native Code" in the manual, for more information. JIT
  305. compilation will be enabled automatically and transparently. To disable
  306. JIT compilation, configure Guile with `--enable-jit=no' or
  307. `--disable-jit'. The default is `--enable-jit=auto', which enables the
  308. JIT if it is available. See `./configure --help' for more.
  309. JIT compilation is enabled by default on x86-64, i686, ARMv7, and
  310. AArch64 targets.
  311. ** Lower-level bytecode
  312. Relative to the virtual machine in Guile 2.2, Guile's VM instruction set
  313. is now more low-level. This allows it to express more advanced
  314. optimizations, for example type check elision or integer
  315. devirtualization, and makes the task of JIT code generation easier.
  316. Note that this change can mean that for a given function, the
  317. corresponding number of instructions in Guile 3.0 may be higher than
  318. Guile 2.2, which can lead to slowdowns when the function is interpreted.
  319. We hope that JIT compilation more than makes up for this slight
  320. slowdown.
  321. ** Interleaved internal definitions and expressions allowed
  322. It used to be that internal definitions had to precede all expressions
  323. in their bodies. This restriction has been relaxed. If an expression
  324. precedes an internal definition, it is treated as if it were a
  325. definition of an unreferenced variable. For example, the expression
  326. `(foo)' transforms to the equivalent of `(define _ (begin (foo) #f))',
  327. if it precedes other definitions.
  328. This change improves the readability of Guile programs, as it used to be
  329. that program indentation tended to increase needlessly to allow nested
  330. `let' and `letrec' to re-establish definition contexts after initial
  331. expressions, for example for type-checks on procedure arguments.
  332. ** Record unification
  333. Guile used to have a number of implementations of structured data types
  334. in the form of "records": a core facility, SRFI-9 (records), SRFI-35
  335. (condition types -- a form of records) and R6RS records. These
  336. facilities were not compatible, as they all were built in different
  337. ways. This had the unfortunate corollary that SRFI-35 conditions were
  338. not compatible with R6RS conditions. To fix this problem, we have now
  339. added the union of functionality from all of these record types into
  340. core records: single-inheritance subtyping, mutable and immutable
  341. fields, and so on. See "Records" in the manual, for full details.
  342. R6RS records, SRFI-9 records, and the SRFI-35 and R6RS exception types
  343. have been accordingly "rebased" on top of core records.
  344. ** Reimplementation of exceptions
  345. Since Guile's origins 25 years ago, `throw' and `catch' have been the
  346. primary exception-handling primitives. However these primitives have
  347. two problems. One is that it's hard to handle exceptions in a
  348. structured way using `catch'. Few people remember what the
  349. corresponding `key' and `args' are that an exception handler would see
  350. in response to a call to `error', for example. In practice, this
  351. results in more generic catch-all exception handling than one might
  352. like.
  353. The other problem is that `throw', `catch', and especially
  354. `with-throw-handler' are quite unlike what the rest of the Scheme world
  355. uses. R6RS and R7RS, for example, have mostly converged on
  356. SRFI-34-style `with-exception-handler' and `raise' primitives, and
  357. encourage the use of SRFI-35-style structured exception objects to
  358. describe the error. Guile's R6RS layer incorporates an adapter between
  359. `throw'/`catch' and structured exception handling, but it didn't apply
  360. to SRFI-34/SRFI-35, and we would have to duplicate it for R7RS.
  361. In light of these considerations, Guile has now changed to make
  362. `with-exception-handler' and `raise-exception' its primitives for
  363. exception handling and defined a hierarchy of R6RS-style exception types
  364. in its core. SRFI-34/35, R6RS, and the exception-handling components of
  365. SRFI-18 (threads) have been re-implemented in terms of this core
  366. functionality. There is also a a compatibility layer that makes it so
  367. that exceptions originating in `throw' can be handled by
  368. `with-exception-hander', and vice-versa for `raise-exception' and
  369. `catch'.
  370. Generally speaking, users will see no difference. The one significant
  371. difference is that users of SRFI-34 will see more exceptions flowing
  372. through their `with-exception-handler'/`guard' forms, because whereas
  373. before they would only see exceptions thrown by SRFI-34, now they will
  374. see exceptions thrown by R6RS, R7RS, or indeed `throw'.
  375. Guile's situation is transitional. Most exceptions are still signalled
  376. via `throw'. These will probably migrate over time to
  377. `raise-exception', while preserving compatibility of course.
  378. See "Exceptions" in the manual, for full details on the new API.
  379. ** `guard' no longer unwinds the stack for clause tests
  380. SRFI-34, and then R6RS and R7RS, defines a `guard' form that is a
  381. shorthand for `with-exception-handler'. The cond-like clauses for the
  382. exception handling are specified to run with the continuation of the
  383. `guard', while any re-propagation of the exception happens with the
  384. continuation of the original `raise'.
  385. In practice, this means that one needs full `call-with-continuation' to
  386. implement the specified semantics, to be able to unwind the stack to the
  387. cond clauses, then rewind if none match. This is not only quite
  388. expensive, it is also error-prone as one usually doesn't want to rewind
  389. dynamic-wind guards in an exceptional situation. Additionally, as
  390. continuations bind tightly to the current thread, it makes it impossible
  391. to migrate a subcomputation with a different thread if a `guard' is live
  392. on the stack, as is done in Fibers.
  393. Guile now works around these issues by running the test portion of the
  394. guard expressions within the original `raise' continuation, and only
  395. unwinding once a test matches. This is an incompatible semantic change
  396. but we think the situation is globally much better, and we expect that
  397. very few people will be affected by the change.
  398. ** Optimization of top-level bindings within a compilation unit
  399. At optimization level 2 and above, Guile's compiler is now allowed to
  400. inline top-level definitions within a compilation unit. See
  401. "Declarative Modules" in the manual, for full details. This change can
  402. improve the performance of programs with many small top-level
  403. definitions by quite a bit!
  404. At optimization level 3 and above, Guile will assume that any top-level
  405. binding in a declarative compilation unit that isn't exported from a
  406. module can be completely inlined into its uses. (Prior to this change,
  407. -O3 was the same as -O2.) Note that with this new
  408. `seal-private-bindings' pass, private declarative bindings are no longer
  409. available for access from the first-class module reflection API. The
  410. optimizations afforded by this pass can be useful when you need a speed
  411. boost, but having them enabled at optimization level 3 means they are
  412. not on by default, as they change Guile's behavior in ways that users
  413. might not expect.
  414. ** By default, GOOPS classes are not redefinable
  415. It used to be that all GOOPS classes were redefinable, at least in
  416. theory. This facility was supported by an indirection in all "struct"
  417. instances, even though only a subset of structs would need redefinition.
  418. We wanted to remove this indirection, in order to speed up Guile
  419. records, allow immutable Guile records to eventually be described by
  420. classes, and allow for some optimizations in core GOOPS classes that
  421. shouldn't be redefined anyway.
  422. Thus in GOOPS now there are classes that are redefinable and classes
  423. that aren't. By default, classes created with GOOPS are not
  424. redefinable. To make a class redefinable, it should be an instance of
  425. `<redefinable-class>'. See "Redefining a Class" in the manual for more
  426. information.
  427. ** Define top-level bindings for aux syntax: `else', `=>', `...', `_'
  428. These auxiliary syntax definitions are specified to be defined in the
  429. R6RS and the R7RS. They were previously unbound, even in the R6RS
  430. modules. This change is not anticipated to cause any incompatibility
  431. with existing Guile code, and improves things for R6RS and R7RS users.
  432. ** Conventional gettext alias is now `G_'
  433. Related to the last point, since the "Fix literal matching for
  434. module-bound literals" change in the 2.2 series, it was no longer
  435. possible to use the conventional `_' binding as an alias for `gettext',
  436. because a local `_' definition would prevent `_' from being recognized
  437. as auxiliary syntax for `match', `syntax-rules', and similar. The new
  438. recommended conventional alias for `gettext' is `G_'.
  439. ** Add --r6rs command-line option
  440. The new `install-r6rs!' procedure adapts Guile's defaults to be more
  441. R6RS-compatible. This procedure is called if the user passes `--r6rs'
  442. as a command-line argument. See "R6RS Incompatibilities" in the manual,
  443. for full details.
  444. ** Add support for R7RS
  445. Thanks to Göran Weinholt and OKUMURA Yuki, Guile now implements the R7RS
  446. modules. As the R7RS library syntax is a subset of R6RS, to use R7RS
  447. you just `(import (scheme base))' and off you go. As with R6RS also,
  448. there are some small lexical incompatibilities regarding hex escapes;
  449. see "R6RS Support" in the manual, for full details.
  450. Also as with R6RS, there is an `install-r7rs!' procedure and a `--r7rs'
  451. command-line option.
  452. ** Add #:re-export-and-replace argument to `define-module'
  453. This new keyword specifies a set of bindings to re-export, but also
  454. marks them as intended to replace core bindings. See "Creating Guile
  455. Modules" in the manual, for full details.
  456. Note to make this change, we had to change the way replacement flags are
  457. stored, to being associated with modules instead of individual variable
  458. objects. This means that users who #:re-export an imported binding that
  459. was already marked as #:replace by another module will now see warnings,
  460. as they need to use #:re-export-and-replace instead.
  461. ** `define-module' #:autoload no longer pulls in the whole module
  462. One of the ways that a module can use another is "autoloads". For
  463. example:
  464. (define-module (a) #:autoload (b) (make-b))
  465. In this example, module `(b)' will only be imported when the `make-b'
  466. identifier is referenced. However besides the imprecision about when a
  467. given binding is actually referenced, this mechanism used to cause the
  468. whole imported module to become available, not just the specified
  469. bindings. This has now been changed to only import the specified bindings.
  470. This is a backward-incompatible change. The fix is to mention all
  471. bindings of interest in the autoload clause. Feedback is welcome.
  472. ** Improve SRFI-43 vector-fill!
  473. SRFI-43 vector-fill! now has the same performance whether an optional
  474. range is provided or not, and is also provided in core. As a side
  475. effect, vector-fill! and vector_fill_x no longer work on non-vector
  476. rank-1 arrays. Such cases were handled incorrectly before; for example,
  477. prior to this change:
  478. (define a (make-vector 10 'x))
  479. (define b (make-shared-array a (lambda (i) (list (* 2 i))) 5))
  480. (vector-fill! b 'y)
  481. => #1(y y y x x)
  482. This is now an error. Instead, use array-fill!.
  483. ** `iota' in core and SRFI-1 `iota' are the same
  484. Previously, `iota' in core would not accept start and step arguments and
  485. would return an empty list for negative count. Now there is only one
  486. `iota' function with the extended semantics of SRFI-1. Note that as an
  487. incompatible change, core `iota' no longer accepts a negative count.
  488. ** Improved Transport Layer Security (TLS) support in (web client)
  489. `http-request', `http-get', and related procedures from (web client) are
  490. able to access content over TLS ("HTTPS") since Guile 2.2. However,
  491. that support lacked important facilities, which are now available.
  492. First, these procedures now have a #:verify-certificates? parameter to
  493. enable or disable the verification of X.509 server certificates. The
  494. new `x509-certificate-directory' SRFI-39 parameter specifies X.509
  495. certificates are searched for. Second, HTTPS proxies are now supported
  496. (in addition to HTTP proxies) and the new `current-https-proxy'
  497. parameter controls that. See "Web Client" in the manual for details.
  498. * New deprecations
  499. ** scm_t_uint8, etc deprecated in favor of C99 stdint.h
  500. It used to be that Guile defined its own `scm_t_uint8' because C99
  501. `uint8_t' wasn't widely enough available. Now Guile finally made the
  502. change to use C99 types, both internally and in Guile's public headers.
  503. Note that this also applies to SCM_T_UINT8_MAX, SCM_T_INT8_MIN, for intN
  504. and uintN for N in 8, 16, 32, and 64. Guile also now uses ptrdiff_t
  505. instead of scm_t_ptrdiff, and similarly for intmax_t, uintmax_t,
  506. intptr_t, and uintptr_t.
  507. ** The two-argument form of `record-constructor'
  508. Calling `record-constructor' with two arguments (the record type and a
  509. list of field names) is deprecated. Instead, call with just one
  510. argument, and provide a wrapper around that constructor if needed.
  511. * Incompatible changes
  512. ** All deprecated code removed
  513. All code deprecated in Guile 2.2 has been removed. See older NEWS, and
  514. check that your programs can compile without linker warnings and run
  515. without runtime warnings. See "Deprecation" in the manual.
  516. In particular, the function `scm_generalized_vector_get_handle' which
  517. was deprecated in 2.0.9 but remained in 2.2, has now finally been
  518. removed. As a replacement, use `scm_array_get_handle' to get a handle
  519. and `scm_array_handle_rank' to check the rank.
  520. ** Remove "self" field from vtables and "redefined" field from classes
  521. These fields were used as part of the machinery for class redefinition
  522. and is no longer needed.
  523. ** VM hook manipulation simplified
  524. The low-level mechanism to instrument a running virtual machine for
  525. debugging and tracing has been simplified. See "VM Hooks" in the
  526. manual, for more.
  527. * Changes to the distribution
  528. ** New effective version
  529. The "effective version" of Guile is now 3.0, which allows parallel
  530. installation with other effective versions (for example, the older Guile
  531. 2.2). See "Parallel Installations" in the manual for full details.
  532. Notably, the `pkg-config' file is now `guile-3.0', and there are new
  533. `guile-3' and `guile-3.0' features for `cond-expand'.
  534. Changes in 2.2.6 (since 2.2.5):
  535. * Bug fixes
  536. ** Fix regression introduced in 2.2.5 that would break HTTP servers
  537. Guile 2.2.5 introduced a bug that would break the built-in HTTP server
  538. provided by the (web server) module. Specifically, HTTP servers would
  539. hang while reading requests. See <https://bugs.gnu.org/36350>.
  540. ** 'strftime' and 'strptime' honor the current locale encoding
  541. Until now these procedures would wrongfully assume that the locale
  542. encoding is always UTF-8. See <https://bugs.gnu.org/35920>.
  543. ** Re-export 'current-load-port'
  544. This procedure was erroneously removed in the 2.2 series but was still
  545. documented.
  546. ** Minor documentation mistakes were fixed
  547. Changes in 2.2.5 (since 2.2.4):
  548. * Notable improvements
  549. ** Greatly improved performance of bidirectional pipes.
  550. The performance of bidirectional pipes, as created using 'open-pipe' or
  551. 'open-pipe*' in OPEN_BOTH mode, has been greatly improved. When reading
  552. large blocks of binary data from a bidirectional pipe, the maximum
  553. bandwidth has been increased by a factor of ~10^3 in some cases.
  554. ** New 'get-bytevector-some!' I/O primitive.
  555. This new I/O primitive is similar to 'get-bytevector-some' from the
  556. R6RS, except that it writes its data to a user-specified range of
  557. indices in an existing bytevector. As a corollary, it is also now
  558. possible to specify a maximum number of bytes to read. Note that
  559. 'get-bytevector-some', and now 'get-bytevector-some!', are unique among
  560. Guile's I/O primitives in their support of efficient binary reads of
  561. potentially large blocks while also allowing for short reads, to avoid
  562. undesired blocking. Now these operations can be performed while also
  563. avoiding heap-allocation.
  564. 'get-bytevector-some!' is needed to efficiently implement the new
  565. bidirectional pipes, which are built upon R6RS custom binary
  566. input/output ports.
  567. ** get-bytevector-{n!,some,some!} now support suspendable I/O.
  568. Scheme implementations of 'get-bytevector-n!', 'get-bytevector-some',
  569. and 'get-bytevector-some!' have been added to (ice-9 suspendable-ports).
  570. As a result, these I/O operations now support suspendable I/O.
  571. * Compiler improvements
  572. ** guild compile: Add -Wshadowed-toplevel.
  573. Top-level definitions that shadow previous top-level definitions from
  574. the same compilation unit will now trigger a compile-time warning, if
  575. -Wshadowed-toplevel is enabled. It is enabled by default.
  576. ** guild compile: Add '-x' flag.
  577. Passing "-x EXT" to 'guild compile' will now cause EXT to be recognized
  578. as a valid source file name extension. For example, to compile R6RS
  579. code, you might want to pass "-x .sls" so that files ending in ".sls"
  580. can be found.
  581. * Miscellaneous improvements
  582. ** Bootstrap optimization
  583. eval.go and psyntax-pp.go are now built before the rest of the .go files
  584. so that they are processed by a fast macro expander. This saves time
  585. when using parallel builds.
  586. ** put-u8 now always writes a single byte, regardless of the port encoding.
  587. Previously, (put-u8 PORT OCTET) worked as expected only when writing to
  588. binary ports, i.e. those with port encoding "ISO-8859-1" a.k.a. Latin-1.
  589. Strictly speaking, this meets the requirements of the R6RS 'put-u8',
  590. which need only support binary ports. However, Guile in fact allows
  591. binary I/O to be performed on any port, and yet 'put-u8' behaved in a
  592. surprising way with other port encodings: it would perform a _textual_
  593. I/O operation, writing the character with Unicode scalar value OCTET.
  594. Now, 'put-u8' always writes a single byte with value OCTET, regardless
  595. of the port encoding.
  596. ** Optimize fixnum exact integer square roots.
  597. 'exact-integer-sqrt' now avoids heap allocation when applied to a
  598. fixnum. 'sqrt' now avoids heap allocation when applied to a fixnum
  599. that's a perfect square. Fewer heap allocations are now required when
  600. applying 'sqrt' to a square of an exact rational whose numerator or
  601. denominator are fixnums.
  602. ** scm_mkstrport: Optimize the POS -> BYTE_POS conversion.
  603. scm_mkstrport now avoids an unnecessary heap allocation and conversion
  604. to UTF-8, when STR is provided and POS is non-zero.
  605. ** SRFI-19: Support ~N in string->date.
  606. Support for the ~N escape, which allows fractions of a second to be
  607. parsed, is now supported in SRFI-19 'string->date'.
  608. ** SRFI-19: Update the leap second table.
  609. The leap on 1 January 2017 was added to SRFI-19's leap second table.
  610. ** stexi->shtml: Add support for @i, @math, @tie and @dots.
  611. stexi->shtml is now able to convert @i, @math, @tie and @dots to HTML.
  612. ** Define AT_SYMLINK_NOFOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH.
  613. AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH are now available
  614. from Scheme, if supported on the platform.
  615. ** Improvements to the 'time' macro from (ice-9 time).
  616. The 'time' macro now supports expressions that return multiple values.
  617. It has also been rewritten as a hygienic 'syntax-rules' macro.
  618. Previously, it was built using 'define-macro', and was therefore
  619. unhygienic. This is not merely an internal implementation detail, but
  620. is potentially relevant to any user of the 'time' macro, since it could
  621. lead to unintended variable capture and other problems.
  622. ** Clarify the documentation for 'nil?'.
  623. See commit b44f505f1571fc9c42e58982f161a9cfc81fb7f4.
  624. ** Clarify the manual's "Processes" section.
  625. See commit 8cdd3a0773930ca872a13aada7a1344f03bb382b.
  626. ** Avoid 'with-latin1-locale' in binary I/O tests.
  627. See commit 162a031e5f2c64cd23fcf069fb7b5071196f9527.
  628. ** Update user-visible copyright years.
  629. * Bug fixes
  630. ** Avoid regexp ranges in HTTP inter-protocol exploitation check.
  631. The regular expression used to check for HTTP inter-protocol
  632. exploitation attacks previously used a character range '0-9', whose
  633. meaning depends on the current locale. This has now been fixed.
  634. ** Fixes to the SRFI-19 time/date library.
  635. *** TAI-to-UTC conversion leaps at the wrong time.
  636. <https://bugs.gnu.org/21911>
  637. *** time-utc->date shows bogus zone-dependent leap second.
  638. <https://bugs.gnu.org/22034>
  639. *** Manual incorrectly describes Julian Date.
  640. <https://bugs.gnu.org/21902>
  641. *** date->string duff ISO 8601 negative years.
  642. <https://bugs.gnu.org/21903>
  643. *** date->string duff ISO 8601 format for non-4-digit years.
  644. <https://bugs.gnu.org/21904>
  645. *** julian-day->date negative input breakage.
  646. <https://bugs.gnu.org/21906>
  647. *** time-duration screws up negative durations.
  648. <https://bugs.gnu.org/26162>
  649. *** time-difference doesn't detect error of differing time types.
  650. <https://bugs.gnu.org/26163>
  651. ** Improve overflow checks in bytevector, string, and I/O operations.
  652. Several numerical computations, performed using primitive C arithmetic
  653. in Guile's core bytevector, string, and I/O operations, have been
  654. rewritten to avoid overflows.
  655. ** Fix type inferencing for 'nil?' and 'null?' predicates.
  656. Previously, the compiler would sometimes miscompile certain combinations
  657. of 'nil?' and 'null?' predicates present within the same top-level form.
  658. See <https://bugs.gnu.org/33036>.
  659. ** Fix 'atomic-box-compare-and-swap!'.
  660. Previously, 'atomic-box-compare-and-swap!' would sometimes spuriously
  661. fail on architectures based on Load-Linked/Store-Conditional (LL/SC)
  662. synchronication primitives (e.g. ARM, PowerPC, and MIPS) in a way that
  663. was undetectable by the caller. See <https://bugs.gnu.org/32786>.
  664. ** Make URI handling locale independent.
  665. Previously, procedures in (web uri) would misbehave in some locales
  666. including sv_SE. See <https://bugs.gnu.org/35785>.
  667. ** Strings, i18n: Limit the use of alloca to approximately 8 kilobytes.
  668. Previously, 'string-locale-ci=?', 'string-locale-ci<?',
  669. 'string-locale<?', 'string-locale-{downcase,upcase,titlecase}' and
  670. 'string-normalize-{nfd,nfc,nfkd,nfkc}' would overflow the C stack when
  671. applied to very large strings.
  672. ** Fix documentation of R6RS 'binary-port?' to reflect reality.
  673. Previously, the documentation incorrectly stated that 'binary-port?'
  674. always returns #t. In fact, it returns #t if and only if the port
  675. encoding is "ISO-8859-1". The documentation for 'binary-port?' and
  676. 'textual-port?' has been rewritten to reflect the current reality, and
  677. also to leave open the possibility of changing the behavior of these
  678. predicates in a future version of Guile.
  679. ** Avoid passing NULL to 'memcpy' and 'memcmp'.
  680. Previously, NULL was sometimes passed to 'memcpy' or 'memcmp' when the
  681. size argument was 0.
  682. ** Save and restore errno in the signal handler.
  683. Previously, Guile's synchronous C signal handler failed to save and
  684. restore 'errno', although it might change its value. This could
  685. potentially lead to spurious corruptions of 'errno' within threads
  686. interrupted by signals.
  687. ** scm_to_stringn: Avoid passing NULL to c_strcasecmp.
  688. <https://lists.gnu.org/archive/html/guile-user/2019-05/msg00070.html>
  689. ** r6rs-ports: Accept 'port-position' values greater than 2^32.
  690. <https://bugs.gnu.org/32161>
  691. ** r6rs-ports: 'put-bytevector' accepts 64-bit integers.
  692. Fixed in commit 741c45458da0831a12a4f8d729814bf9f2cb6571.
  693. ** Fix R6RS call-with-{input,output}-file to open textual ports.
  694. <https://bugs.gnu.org/32329>
  695. ** Update (ice-9 match) to include selected bug fixes from upstream.
  696. *** ice-9/match named match-let is not working
  697. <https://bugs.gnu.org/22925>
  698. ** open-process: Fix dup(2) and execvp(2) error handling.
  699. Fixed in commit 521f1ab4709217407496004019c00005d2a82f78.
  700. ** bytevectors: Support large indices in integer accessors.
  701. Fixed in commit b9cf3517efd4643670d970d2692bc7bede9a85e8.
  702. ** bytevectors: Fix list validation of *list->bytevector procedures.
  703. <https://bugs.gnu.org/32938>
  704. ** Gracefully handle huge shift counts in 'ash' and 'round-ash'.
  705. <https://bugs.gnu.org/32644>
  706. ** In 'ash' and 'round-ash', handle right shift count of LONG_MIN.
  707. <https://bugs.gnu.org/21901>
  708. ** Use 'scm_from_utf8_{string,symbol,keyword}' for C string literals.
  709. <https://bugs.gnu.org/33044>
  710. ** web: Add support for HTTP header continuation lines.
  711. Fixed in commit 73cde5ed7218a090ecee888870908af5445796f0.
  712. ** scm_seed_to_random_state: Support wide string arguments.
  713. <https://bugs.gnu.org/33044>
  714. ** Do not warn the user when 'madvise' returns ENOSYS.
  715. Fixed in commit 45e4ace6603e00b297e6542362273041aebe7305.
  716. ** Add 'texinfo' as a dependency in the README.
  717. Fixed in commit 1bbce71501198c3c7abdf07941f5cdc1434858c2.
  718. ** Don't mutate read-only string in ports test.
  719. Fixed in commit 552f007e91a97f136aad1b22918688b61d03a4a3.
  720. ** Remove redefinition of when & unless in snarf-check-and-output-texi.
  721. Fixed in commit 1ba5d6f47a54dceee4452a1e7726d2635e5b3449.
  722. ** Fix strftime when Guile is built without threading support.
  723. Fixed in commit 139c702fc8b61fdeb813c3428fef3701ea8677f9.
  724. ** Avoid leaking a file descriptor in test-unwind.
  725. Fixed in commit 1437b76777e576b3d000e2f80c5ecdb33a74ac33.
  726. ** Fix binary output on files created by mkstemp!.
  727. Fixed in commit 78468baa118d316050a27e43250966e52ffd3d54.
  728. ** Fix crypt-on-glibc test error.
  729. Fixed in commit 27ffbfb0235de466016ea5a6421508f6548971b6.
  730. ** Fix race when expanding syntax-parameterize and define-syntax-parameter.
  731. <https://bugs.gnu.org/27476#102>
  732. ** Add a fallback value for the locale-monetary-decimal-point.
  733. Fixed in commit 9ba449643d4c2ac1d2174befca7d765af222bcc0.
  734. ** Handle newlib C library's langinfo constant names.
  735. Fixed in commit 92105d13ad1363b511214589b7d62d95304beb17.
  736. ** Make locale monetary conversion tests be less strict on terminal whitespace.
  737. Fixed in commit 2a3ccfb66714efc1c081ea6e921336f80b756d3c.
  738. ** Disable test for current value of setitimer on Cygwin.
  739. Fixed in commit 3a64c504caaf83e9faf2ec9b7d0e031e1a6a09b9.
  740. ** Fix gc.test "after-gc-hook gets called" failures.
  741. <https://bugs.gnu.org/31776#17>
  742. ** Update iconv.m4 from gnulib, to fix an iconv leak during configure.
  743. <https://lists.gnu.org/archive/html/guile-devel/2019-05/msg00011.html>
  744. ** guild compile: Add missing newline in "unrecognized option" error message.
  745. Fixed in commit 85c5bae4fd94f8686d26fd792b7c0f588c23bd94.
  746. ** 'basename' now correctly handles "/" and "//".
  747. Fixed in commit 36ad1d24b3d2c174a64c445502a36f19605dbd65.
  748. ** Make srfi-71 visible through 'cond-expand'.
  749. Fixed in commit 59a06d8392234fbec8b3605cec266a7a0a7b7a56.
  750. Changes in 2.2.4 (since 2.2.3):
  751. * New interfaces and functionality
  752. ** SRFI-71 (Extended LET-syntax for multiple values)
  753. Guile now includes SRFI-71, which extends let, let*, and letrec to
  754. support assigning multiple values. See "SRFI-71" in the manual for
  755. details.
  756. ** (web client) export 'http-request' procedure
  757. The 'http-request' procedure is the generalized procedure underneath
  758. 'http-get', 'http-post', etc.
  759. ** GDB support now registers the 'guile-backtrace' GDB command
  760. The 'guile-backtrace' GDB command displays a backtrace of the VM stack
  761. for the current thread.
  762. ** Recognize RISC-V compilation targets in (system base target)
  763. * Bug fixes
  764. ** Fix stack-marking bug affecting multi-threaded programs
  765. (<https://bugs.gnu.org/28211>)
  766. ** Add missing SYNC_IP calls in the VM
  767. These could cause multi-threaded code to crash.
  768. ** Fix multi-threaded access to modules
  769. (<https://bugs.gnu.org/30602>, <https://bugs.gnu.org/31879>,
  770. and <https://bugs.gnu.org/31878>)
  771. ** (ice-9 match) now has better documentation
  772. ** 'get-bytevector-n' and 'get-bytevector-n!' can now read more than 4 GB
  773. ** Fix cross-compilation support for elisp
  774. ** Fix error reporting in 'load-thunk-from-memory'
  775. ** Fix GOOPS 'instance?' to work on objects that aren't structs
  776. (<https://bugs.gnu.org/31606>)
  777. ** Fix type inference for bitwise logical operators
  778. (<https://bugs.gnu.org/31474>)
  779. ** Avoid inexact arithmetic in the type inferrer for 'sqrt'
  780. ** Fix floating point unboxing regression in 2.2.3
  781. (<https://bugs.gnu.org/30020>)
  782. ** Fix eta-conversion edge cases in peval (<https://bugs.gnu.org/29520>)
  783. ** Correctly interpret SRFI-18 timeout parameters
  784. (<https://bugs.gnu.org/29704>)
  785. ** 'select' returns empty sets upon EINTR and EAGAIN
  786. (<https://bugs.gnu.org/30368>)
  787. ** Restore pre-2.2.3 '%fresh-auto-compile' behavior
  788. This reverts an incorrect fix for <https://bugs.gnu.org/29226>.
  789. Changes in 2.2.3 (since 2.2.2):
  790. * New interfaces and functionality
  791. ** (web uri) module has better support for RFC 3986
  792. The URI standard, RFC 3986, defines additional "relative-ref" and
  793. "URI-reference" data types. Thanks to Daniel Hartwig, Guile's support
  794. for these URI subtypes has been improved. See "Universal Resource
  795. Identifiers" in the manual, for more.
  796. ** `struct-ref/unboxed' and `struct-set!/unboxed'
  797. These procedures should be used when accessing struct fields with type
  798. `u' (unboxed). See "Structure Basics" in the manual, for full details.
  799. ** Improved support for arrays with non-zero lower bounds
  800. Thanks to work by Daniel Llorens, Guile no longer exhibits buggy
  801. behavior in "sort" or "sort!" on arrays with non-zero lower dimension
  802. bounds. Arrays with non-zero lower dimension bounds are now allowed for
  803. array-slice-for-each, and truncated-print now supports bitvectors and
  804. arrays with non-zero lower bounds. General arrays are now supported as
  805. well for random:hollow-sphere!.
  806. ** Add `uintptr_t' and `intptr_t' to FFI types.
  807. See "Foreign Types" in the manual for full details.
  808. * Compiler improvements
  809. ** Improve speed of compiler backend for functions without loops
  810. This is a marginal speed improvement, especially for code compiled with
  811. optimization level "-O1" or below.
  812. ** Disable slot pre-coloring for optimization level "-O1" or below
  813. This improves the speed of the compiler backend.
  814. ** Improve complexity of constant subexpression elimination pass
  815. This is a large speed improvement when compiling large files with the
  816. default "-O2" pass.
  817. ** CPS conversion avoids generating return arity adapters if possible
  818. In Guile, the expression in (define a EXP) may return 1 or more values.
  819. This value elision in "value" context is implicit earlier in the Guile
  820. compiler, in Tree-IL, but is made explicit in the CPS middle-end
  821. language by the addition of the equivalent of explicit call-with-values
  822. continuations that ignore additional values. However in many cases we
  823. can avoid generating these extra continuations if we know that EXP is
  824. single-valued, as is the case for example for constants or variable
  825. references or the like.
  826. Although these "arity-adapting continuations" would be removed by dead
  827. code elimination at optimization level "-O2" or above, they were still
  828. being needlessly generated in the first place. Guile now avoids
  829. generating them, speeding up not only the optimizer at -O2 but also the
  830. entire compiler pipeline at -O1 or below, as well as improving the
  831. residual code at -O1 or below.
  832. * New deprecations
  833. ** Using `uri?' as a predicate on relative-refs deprecated
  834. If you don't care whether the URI is a relative-ref or not, use
  835. `uri-reference?'. If you do, use `uri-reference?' and `relative-ref?'.
  836. In the future `uri?' will return a true value only for URIs that specify
  837. a scheme.
  838. ** Struct tail arrays deprecated
  839. Guile's structures used to have a facility whereby each instance of a
  840. vtable can contain a variable-length tail array of values. The length
  841. of the tail array was stored in the structure. This facility was
  842. originally intended to allow C code to expose raw C structures with
  843. word-sized tail arrays to Scheme.
  844. However, the tail array facility was confusing and doesn't work very
  845. well. It was very rarely used, but it insinuates itself into all
  846. invocations of `make-struct'. For this reason the clumsily-named
  847. `make-struct/no-tail' procedure can actually be more elegant in actual
  848. use, because it doesn't have a random `0' argument stuck in the middle.
  849. Tail arrays also inhibit optimization by allowing instances to affect
  850. their shapes. In the absence of tail arrays, all instances of a given
  851. vtable have the same number and kinds of fields. This uniformity can be
  852. exploited by the runtime and the optimizer. The presence of tail arrays
  853. make some of these optimizations more difficult.
  854. Finally, the tail array facility is ad-hoc and does not compose with the
  855. rest of Guile. If a Guile user wants an array with user-specified
  856. length, it's best to use a vector. It is more clear in the code, and
  857. the standard optimization techniques will do a good job with it.
  858. For all of these reasons, tail arrays are deprecated in Guile 2.2 and
  859. will be removed from Guile 3.0. Likewise, `make-struct' /
  860. `scm_make_struct' is deprecated in favor of `make-struct/no-tail' /
  861. `scm_make_struct_no_tail'. Perhaps one day we will be able to reclaim
  862. the `make-struct' name!
  863. ** Struct "self" slots deprecated
  864. It used to be that you could make a structure vtable that had "self"
  865. slots. Instances of that vtable would have those slots initialized to
  866. the instance itself. This can be useful in C code where you might have
  867. a pointer to the data array, and want to get the `SCM' handle for the
  868. structure. However this was a little used complication without any use
  869. in Scheme code. To replace it, just use "p" slots and initialize the
  870. slot values manually on initialization.
  871. ** Struct fields with opaque ("o") protection deprecated
  872. Struct fields are declared with a "protection", meaning read-only ('r'),
  873. read-write ('w'), or opaque ('o'). There is also "hidden" ('h') which
  874. is read-write but which isn't initialized by arguments passed to
  875. `make-struct/no-tail', but that's a detail. Opaque struct fields were
  876. used to allocate storage in a struct that could only be accessed by C.
  877. This facility was very rarely used (unused in Guile itself) but now that
  878. we are implementing more and more in Scheme, it is completely useless.
  879. To enforce permissions on struct fields, instead layer on an abstraction
  880. at a higher level, in the same way that immutable record fields are
  881. simply those which don't have an accessor.
  882. ** Using `struct-ref' and `struct-set!' on unboxed fields is deprecated
  883. Use the new `struct-ref/unboxed' and `struct-set!/unboxed' instead.
  884. * Bug fixes
  885. ** guile.m4 now checks for Guile 2.2 by default
  886. Before, it was still preferring Guile 2.0. It now also supports the
  887. Guile 3.0 prereleases.
  888. ** Fix setting breakpoints from the REPL
  889. ** Allow GDB support to be used with GDB linked against Guile 2.0.
  890. ** Fix deadlock in `readdir' on error.
  891. ** Fix crash on ia64 during thread switches.
  892. ** Fix bug inferring range of `logand' computations with negative numbers
  893. ** Fix bug when issuing HTTP requests through proxies.
  894. ** Refactor weak hash table implementation to be more robust
  895. Guile 2.2's weak hash table implementation had three big problems. The
  896. first was a bug causing these tables to leak memory when they would be
  897. resized. The second was that the implementation was designed so that
  898. tables should be visited by the mark phase of the garbage collector in
  899. one big piece. This could cause the garbage collector to see too many
  900. newly marked objects at once, causing inefficies in garbage collection.
  901. Finally, the way in which lost weak references were ultimately removed
  902. from weak tables caused a race between the finalizer threads and the
  903. mutator threads, leading to unbounded excess space retention in
  904. pathological cases. All of this problems have been fixed.
  905. ** Allow garbage collection of revealed file ports
  906. Guile can mark a file port as "revealed" if Scheme has been given access
  907. to the file descriptor. In that case, the file descriptor will not be
  908. closed when the port is garbage-collected. However we had a bug that
  909. for revealed ports prevented the port from ever being garbage-collected,
  910. leading to memory leaks of Guile's internal port buffers. This is now
  911. fixed.
  912. ** Fix put-bytevector, unget-bytevector with start == bytevector length
  913. ** Enable GNU Readline 7.0's support for "bracketed paste".
  914. Before, when pasting an expression that contained TAB characters into
  915. Guile's REPL with GNU Readline support enabled, the pasted TAB
  916. characters would trigger autocompletion in Readline. This was never
  917. what you wanted. Guile now sets the new "bracketed-paste" option in GNU
  918. Readline 7.0 to on by default, making readline treat pastes into the
  919. terminal as atomic units without control characters. See "Readline
  920. Options" in the manual for full details.
  921. ** Fix time-monotonic from SRFI-19; broken in 2.2.1.
  922. Changes in 2.2.2 (since 2.2.1):
  923. * Bug fixes
  924. ** Syntax objects are once more comparable with 'equal?'
  925. The syntax object change in 2.2.1 had the unintended effect of making
  926. syntax objects no longer comparable with equal?. This release restores
  927. the previous behavior.
  928. ** Restore libgc dependency
  929. The change to throw exceptions when mutating literal constants partly
  930. relied on an interface that was added to our garbage collector (BDW-GC)
  931. after its 7.2 release. Guile 2.2.2 adds a workaround to allow Guile to
  932. continue be used with libgc as old as 7.2.
  933. ** SRFI-37 bug fix to not error on empty-string arguments.
  934. Thanks to Thomas Danckaert for fixing this long-standing bug.
  935. Changes in 2.2.1 (since 2.2.0):
  936. * Notable changes
  937. ** New sandboxed evaluation facility
  938. Guile now has a way to execute untrusted code in a safe way. See
  939. "Sandboxed Evaluation" in the manual for full details, including some
  940. important notes on limitations on the sandbox's ability to prevent
  941. resource exhaustion.
  942. ** All literal constants are read-only
  943. According to the Scheme language definition, it is an error to attempt
  944. to mutate a "constant literal". A constant literal is data that is a
  945. literal quoted part of a program. For example, all of these are errors:
  946. (set-car! '(1 . 2) 42)
  947. (append! '(1 2 3) '(4 5 6))
  948. (vector-set! '#(a b c) 1 'B)
  949. Guile takes advantage of this provision of Scheme to deduplicate shared
  950. structure in constant literals within a compilation unit, and to
  951. allocate constant data directly in the compiled object file. If the
  952. data needs no relocation at run-time, as is the case for pairs or
  953. vectors that only contain immediate values, then the data can actually
  954. be shared between different Guile processes, using the operating
  955. system's virtual memory facilities.
  956. However, in Guile 2.2.0, constants that needed relocation were actually
  957. mutable -- though (vector-set! '#(a b c) 1 'B) was an error, Guile
  958. wouldn't actually cause an exception to be raised, silently allowing the
  959. mutation. This could affect future users of this constant, or indeed of
  960. any constant in the compilation unit that shared structure with the
  961. original vector.
  962. Additionally, attempting to mutate constant literals mapped in the
  963. read-only section of files would actually cause a segmentation fault, as
  964. the operating system prohibits writes to read-only memory. "Don't do
  965. that" isn't a very nice solution :)
  966. Both of these problems have been fixed. Any attempt to mutate a
  967. constant literal will now raise an exception, whether the constant needs
  968. relocation or not.
  969. ** Syntax objects are now a distinct type
  970. It used to be that syntax objects were represented as a tagged vector.
  971. These values could be forged by users to break scoping abstractions,
  972. preventing the implementation of sandboxing facilities in Guile. We are
  973. as embarrassed about the previous situation as we pleased are about the
  974. fact that we've fixed it.
  975. Unfortunately, during the 2.2 stable series (or at least during part of
  976. it), we need to support files compiled with Guile 2.2.0. These files
  977. may contain macros that contain legacy syntax object constants. See the
  978. discussion of "allow-legacy-syntax-objects?" in "Syntax Transformer
  979. Helpers" in the manual for full details.
  980. * Bug fixes
  981. *** Fix snarfing with -ggdb3 (#25803)
  982. *** Fix spurious snarf warnings for net_db.c
  983. *** Output statprof flat display to correct port
  984. *** Document guile-2.2 cond-expand feature
  985. *** Add --with-bdw-gc for BSDs that use bdw-gc-threaded (see README)
  986. *** Documentation typo fixes (#26188)
  987. *** Fix SRFI-9 date->string bugs with ~N and ~F (#26261, #26260, #26259)
  988. *** SRFI-19 current-time-monotonic returns time of right type (#26329)
  989. *** Avoid causing GC when looking up exception handler
  990. *** Increment objcode version, in a compatible way
  991. *** Fix compile warning in (system base types)
  992. *** Only run tests that require fork if it is provided
  993. *** Speed up procedure-minimum-arity for fixed arity
  994. *** REPL server tests catch ECONNABORTED
  995. *** Avoid deprecated argument to setvbuf in (web client)
  996. *** Remove non-existent 'open-connection-for-uri' export from (web client)
  997. Changes in 2.2.0 (changes since the 2.0.x stable release series):
  998. * Notable changes
  999. ** Speed
  1000. The biggest change in Guile 2.2 is a complete rewrite of its virtual
  1001. machine and compiler internals. The result is faster startup time,
  1002. better memory usage, and faster execution of user code. See the
  1003. "Performance improvements" section below for more details.
  1004. ** Better thread-safety
  1005. This new release series takes the ABI-break opportunity to fix some
  1006. interfaces that were difficult to use correctly from multiple threads.
  1007. Notably, weak hash tables and ports are now transparently thread-safe.
  1008. See "Scheduling" in the manual, for updated documentation on threads and
  1009. communications primitives.
  1010. ** Better space-safety
  1011. It used to be the case that, when calling a Scheme procedure, the
  1012. procedure and arguments were always preserved against garbage
  1013. collection. This is no longer the case; Guile is free to collect the
  1014. procedure and arguments if they become unreachable, or to re-use their
  1015. slots for other local variables. Guile still offers good-quality
  1016. backtraces by determining the procedure being called from the
  1017. instruction pointer instead of from the value in slot 0 of an
  1018. application frame, and by using a live variable map that allows the
  1019. debugger to know which locals are live at all points in a frame.
  1020. ** Off-main-thread finalization
  1021. Following Guile 2.0.6's change to invoke finalizers via asyncs, Guile
  1022. 2.2 takes the additional step of invoking finalizers from a dedicated
  1023. finalizer thread, if threads are enabled. This avoids concurrency
  1024. issues between finalizers and application code, and also speeds up
  1025. finalization. If your application's finalizers are not robust to the
  1026. presence of threads, see "Foreign Objects" in the manual for information
  1027. on how to disable automatic finalization and instead run finalizers
  1028. manually.
  1029. ** Better locale support in Guile scripts
  1030. When Guile is invoked directly, either from the command line or via a
  1031. hash-bang line (e.g. "#!/usr/bin/guile"), it now installs the current
  1032. locale via a call to `(setlocale LC_ALL "")'. For users with a unicode
  1033. locale, this makes all ports unicode-capable by default, without the
  1034. need to call `setlocale' in your program. This behavior may be
  1035. controlled via the GUILE_INSTALL_LOCALE environment variable; see
  1036. "Environment Variables" in the manual, for more.
  1037. ** Complete Emacs-compatible Elisp implementation
  1038. Thanks to the work of Robin Templeton, Guile's Elisp implementation is
  1039. now fully Emacs-compatible, implementing all of Elisp's features and
  1040. quirks in the same way as the editor we know and love.
  1041. ** Dynamically expandable stacks
  1042. Instead of allocating fixed stack sizes for running Scheme code, Guile
  1043. now starts off each thread with only one page of stack, and expands and
  1044. shrinks it dynamically as needed. Guile will throw an exception for
  1045. stack overflows if growing the stack fails. It is also possible to
  1046. impose a stack limit during the extent of a function call. See "Stack
  1047. Overflow" in the manual, for more.
  1048. This change allows users to write programs that use the stack as a data
  1049. structure for pending computations, as it was meant to be, without
  1050. reifying that data out to the heap. Where you would previously make a
  1051. loop that collect its results in reverse order only to re-reverse them
  1052. at the end, now you can just recurse without worrying about stack
  1053. overflows.
  1054. Using the stack also allows more code to be continuation-safe. For
  1055. example, returning multiple times from a `map' procedure in Guile 2.0
  1056. would change the value of previously returned result lists, because
  1057. `map' built its result list in reverse order then used `reverse!' to
  1058. return the proper result. Now in Guile 2.2, `map' is implemented using
  1059. straightforward recursion, which eliminates this bug while maintaining
  1060. good performance as well as good space complexity.
  1061. ** Out-of-memory improvements
  1062. Instead of aborting, failures to allocate memory will now raise an
  1063. unwind-only `out-of-memory' exception, and cause the corresponding
  1064. `catch' expression to run garbage collection in order to free up memory.
  1065. ** GOOPS core reimplemented in Scheme
  1066. Guile's object orientation system, GOOPS, has been mostly reimplemented
  1067. in Scheme. This decreases its maintenance burden on the rest of Guile,
  1068. while also makes it possible to implement new features in the future,
  1069. such as method combinations or `eqv?' specializers.
  1070. ** Better handling of GUILE_LOAD_COMPILED_PATH
  1071. It used to be that Guile would stop at the first .go file it found in
  1072. the GUILE_LOAD_COMPILED_PATH. If that file turned out to be out of
  1073. date, then no .go file would be loaded. Now Guile will continue to
  1074. search the path for a file which is both present and up-to-date, with
  1075. respect to the .scm file.
  1076. ** C99 required
  1077. Following Emacs, you must use a C99-capable compiler when building
  1078. Guile. In the future we also expect require C99 to use Guile's C
  1079. interface, at least for `stdint' support.
  1080. ** Lightweight pre-emptive threading primitives
  1081. The compiler now inserts special "handle-interrupts" opcodes before each
  1082. call, return, and backwards jump target. This allows the user to
  1083. interrupt any computation and to accurately profile code using
  1084. interrupts. It used to be that interrupts were run by calling a C
  1085. function from the VM; now interrupt thunks are run directly from the VM.
  1086. This allows interrupts to save a delimited continuation and, if the
  1087. continuation was established from the same VM invocation (the usual
  1088. restriction), that continuation can then be resumed. In this way users
  1089. can implement lightweight pre-emptive threading facilities.
  1090. ** with-dynamic-state in VM
  1091. Similarly, `with-dynamic-state' no longer recurses out of the VM,
  1092. allowing captured delimited continuations that include a
  1093. `with-dynamic-state' invocation to be resumed. This is a precondition
  1094. to allow lightweight threading libraries to establish a dynamic state
  1095. per lightweight fiber.
  1096. * Performance improvements
  1097. ** Faster programs via new virtual machine
  1098. Guile now compiles programs to instructions for a new virtual machine.
  1099. The new virtual machine's instructions can address their source and
  1100. destination operands by "name" (slot). This makes access to named
  1101. temporary values much faster than in Guile 2.0, and removes a lot of
  1102. value-shuffling that the old virtual machine had to do. The end result
  1103. is that loop-heavy code can be two or three times as fast with Guile 2.2
  1104. as in 2.0. Your mileage may vary, of course; see "A Virtual Machine for
  1105. Guile" in the manual for the nitties and the gritties.
  1106. ** Better startup time, memory usage with ELF object file format
  1107. Guile now uses the standard ELF format for its compiled code. (Guile
  1108. has its own loader and linker, so this does not imply a dependency on
  1109. any particular platform's ELF toolchain.) The benefit is that Guile is
  1110. now able to statically allocate more data in the object files. ELF also
  1111. enables more sharing of data between processes, and decreases startup
  1112. time (about 40% faster than the already fast startup of the Guile 2.0
  1113. series). Guile also uses DWARF for some of its debugging information.
  1114. Much of the debugging information can be stripped from the object files
  1115. as well. See "Object File Format" in the manual, for full details.
  1116. ** Better optimizations via compiler rewrite
  1117. Guile's compiler now uses a Continuation-Passing Style (CPS)
  1118. intermediate language, allowing it to reason easily about temporary
  1119. values and control flow. Examples of optimizations that this permits
  1120. are optimal contification, optimal common subexpression elimination,
  1121. dead code elimination, loop-invariant code motion, loop peeling, loop
  1122. inversion, parallel moves with at most one temporary, allocation of
  1123. stack slots using precise liveness information, unboxing of 64-bit
  1124. integers and floating point values, and closure optimization. For more,
  1125. see "Continuation-Passing Style" in the manual.
  1126. ** Faster interpreter
  1127. Combined with a number of optimizations to the interpreter itself,
  1128. simply compiling `eval.scm' with the new compiler yields an interpreter
  1129. that is consistently two or three times faster than the one in Guile
  1130. 2.0.
  1131. ** Allocation-free dynamic stack
  1132. Guile now implements the dynamic stack with an actual stack instead of a
  1133. list of heap objects, avoiding most allocation. This speeds up prompts,
  1134. the `scm_dynwind_*' family of functions, fluids, and `dynamic-wind'.
  1135. ** Optimized UTF-8 and Latin-1 ports, symbols, and strings
  1136. Guile 2.2 is faster at reading and writing UTF-8 and Latin-1 strings
  1137. from ports, and at converting symbols and strings to and from these
  1138. encodings.
  1139. ** Optimized hash functions
  1140. Guile 2.2 now uses Bob Jenkins' `hashword2' (from his `lookup3.c') for
  1141. its string hash, and Thomas Wang's integer hash function for `hashq' and
  1142. `hashv'. These functions produce much better hash values across all
  1143. available fixnum bits.
  1144. ** Optimized generic array facility
  1145. Thanks to work by Daniel Llorens, the generic array facility is much
  1146. faster now, as it is internally better able to dispatch on the type of
  1147. the underlying backing store.
  1148. ** All ports are now buffered, can be targets of `setvbuf'
  1149. See "Buffering" in the manual, for more. A port with a buffer size of 1
  1150. is equivalent to an unbuffered port. Ports may set their default buffer
  1151. sizes, and some ports (for example soft ports) are unbuffered by default
  1152. for historical reasons.
  1153. ** Mutexes are now faster under contention
  1154. Guile implements its own mutexes, so that threads that are trying to
  1155. acquire a mutex can be interrupted. These mutexes used to be quite
  1156. inefficient when many threads were trying to acquire them, causing many
  1157. spurious wakeups and contention. This has been fixed.
  1158. * New interfaces
  1159. ** New `cond-expand' feature: `guile-2.2'
  1160. Use this feature if you need to check for Guile 2.2 from Scheme code.
  1161. ** New predicate: `nil?'
  1162. See "Nil" in the manual.
  1163. ** New compiler modules
  1164. Since the compiler was rewritten, there are new modules for the back-end
  1165. of the compiler and the low-level loader and introspection interfaces.
  1166. See the "Guile Implementation" chapter in the manual for all details.
  1167. ** Add "tree" display mode for statprof.
  1168. See the newly updated "Statprof" section of the manual, for more.
  1169. ** Support for non-blocking I/O
  1170. See "Non-Blocking I/O" in the manual, for more.
  1171. ** Implement R6RS custom binary input/output ports
  1172. See "Custom Ports" in the manual.
  1173. ** Implement R6RS output-buffer-mode
  1174. ** Implement R6RS bytevector->string, string->bytevector
  1175. See "R6RS Transcoders" in the manual.
  1176. ** `accept' now takes optional flags argument
  1177. These flags can include `SOCK_NONBLOCK' and `SOCK_CLOEXEC', indicating
  1178. options to apply to the returned socket, potentially removing the need
  1179. for additional system calls to set these options. See "Network Sockets
  1180. and Communication" in the manual, for more.
  1181. ** Thread-safe atomic boxes (references)
  1182. See "Atomics" in the manual.
  1183. ** Thread-local fluids
  1184. Guile now has support for fluids whose values are not captured by
  1185. `current-dynamic-state' and not inheritied by child threads, and thus
  1186. are local to the kernel thread they run on. See "Thread-Local
  1187. Variables" in the manual, for more.
  1188. ** suspendable-continuation?
  1189. This predicate returns true if the delimited continuation captured by
  1190. aborting to a prompt would be able to be resumed. See "Prompt
  1191. Primitives" in the manual for more.
  1192. ** scm_c_prepare_to_wait_on_fd, scm_c_prepare_to_wait_on_cond,
  1193. ** scm_c_wait_finished
  1194. See "Asyncs" in the manual for more.
  1195. ** File descriptor finalizers
  1196. See "Ports and File Descriptors" in the manual.
  1197. ** New inline functions: `scm_new_smob', `scm_new_double_smob'
  1198. These can replace many uses of SCM_NEWSMOB, SCM_RETURN_NEWSMOB2, and the
  1199. like. See XXX in the manual, for more.
  1200. ** New low-level type accessors
  1201. For more on `SCM_HAS_TYP7', `SCM_HAS_TYP7S', `SCM_HAS_TYP16', see XXX.
  1202. `SCM_HEAP_OBJECT_P' is now an alias for the inscrutable `SCM_NIMP'.
  1203. `SCM_UNPACK_POINTER' and `SCM_PACK_POINTER' are better-named versions of
  1204. the old `SCM2PTR' and `PTR2SCM'. Also, `SCM_UNPACK_POINTER' yields a
  1205. void*.
  1206. ** `TCP_NODELAY' and `TCP_CORK' socket options, if provided by the system
  1207. ** `scm_c_put_latin1_chars', `scm_c_put_utf32_chars'
  1208. Use these instead of `scm_lfwrite'. See the new "Using Ports from C"
  1209. section of the manual, for more.
  1210. ** <standard-vtable>, standard-vtable-fields
  1211. See "Structures" in the manual for more on these.
  1212. ** Convenience utilities for ports and strings.
  1213. See "Conversion to/from C" for more on `scm_from_port_string',
  1214. `scm_from_port_stringn', `scm_to_port_string', and
  1215. `scm_to_port_stringn'.
  1216. ** New expressive PEG parser
  1217. See "PEG Parsing" in the manual for more. Thanks to Michael Lucy for
  1218. originally writing these, and to Noah Lavine for integration work.
  1219. ** `make-stack' now also works on delimited continuations
  1220. ** Better URI-reference support
  1221. The `(web uri)' module now has interfaces for handling URI references,
  1222. which might not have a scheme. The Location header of a web request or
  1223. response is now a URI reference instead of a URI. Also,
  1224. `request-absolute-uri' now has an optional default scheme argument. See
  1225. "Web" in the manual for full details.
  1226. ** formal-name->char, char->formal-name
  1227. See "Characters", in the manual.
  1228. * Incompatible changes
  1229. ** ASCII is not ISO-8859-1
  1230. In Guile 2.0, if a user set "ASCII" or "ANSI_X3.4-1968" as the encoding
  1231. of a port, Guile would treat it as ISO-8859-1. While these encodings
  1232. are the same for codepoints 0 to 127, ASCII does not extend past that
  1233. range, whereas ISO-8859-1 goes up to 255. Guile 2.2 no longer treats
  1234. ASCII as ISO-8859-1. This is likely to be a problem only if the user's
  1235. locale is set to ASCII, and the user or a program writes non-ASCII
  1236. codepoints to a port.
  1237. ** Decoding errors do not advance the read pointer before erroring
  1238. When the user sets a port's conversion strategy to "error", indicating
  1239. that Guile should throw an error if it tries to read from a port whose
  1240. incoming bytes are not valid for the port's encoding, it used to be that
  1241. Guile would advance the read pointer past the bad bytes, and then throw
  1242. an error. This would allow the following `read-char' invocation to
  1243. proceed after the bad bytes. This behavior is incompatible with the
  1244. final R6RS standard, and besides contravenes the user's intention to
  1245. raise an error on bad input. Guile now raises an error without
  1246. advancing the read pointer. To skip over a bad encoding, set the port
  1247. conversion strategy to "substitute" and read a substitute character.
  1248. ** Decoding errors with `substitute' strategy return U+FFFD
  1249. It used to be that decoding errors with the `substitute' conversion
  1250. strategy would replace the bad bytes with a `?' character. This has
  1251. been changed to use the standard U+FFFD REPLACEMENT CHARACTER, in
  1252. accordance with the Unicode recommendations.
  1253. ** API to define new port types from C has changed
  1254. Guile's ports have been completely overhauled to allow Guile developers
  1255. and eventually Guile users to write low-level input and output routines
  1256. in Scheme. The new internals will eventually allow for user-space
  1257. tasklets or green threads that suspend to a scheduler when they would
  1258. cause blocking I/O, allowing users to write straightforward network
  1259. services that parse their input and send their output as if it were
  1260. blocking, while under the hood Guile can multiplex many active
  1261. connections at once.
  1262. At the same time, this change makes Guile's ports implementation much
  1263. more maintainable, rationalizing the many legacy port internals and
  1264. making sure that the abstractions between the user, Guile's core ports
  1265. facility, and the port implementations result in a system that is as
  1266. performant and expressive as possible.
  1267. The interface to the user has no significant change, neither on the C
  1268. side nor on the Scheme side. However this refactoring has changed the
  1269. interface to the port implementor in an incompatible way. See the newly
  1270. expanded "I/O Extensions" in the manual, for full details.
  1271. *** Remove `scm_set_port_mark'
  1272. Port mark functions have not been called since the switch to the BDW
  1273. garbage collector.
  1274. *** Remove `scm_set_port_equalp'
  1275. Likewise port equal functions weren't being called. Given that ports
  1276. have their own internal buffers, it doesn't make sense to hook them into
  1277. equal? anyway.
  1278. *** Remove `scm_set_port_free'
  1279. It used to be that if an open port became unreachable, a special "free"
  1280. function would be called instead of the "close" function. Now that the
  1281. BDW-GC collector allows us to run arbitrary code in finalizers, we can
  1282. simplify to just call "close" on the port and remove the separate free
  1283. functions. Note that hooking into the garbage collector has some
  1284. overhead. For that reason Guile exposes a new interface,
  1285. `scm_set_port_needs_close_on_gc', allowing port implementations to
  1286. indicate to Guile whether they need closing on GC or not.
  1287. *** Remove `scm_set_port_end_input', `scm_set_port_flush'
  1288. As buffering is handled by Guile itself, these functions which were to
  1289. manage an implementation-side buffer are no longer needed.
  1290. *** Change prototype of `scm_make_port_type'
  1291. The `read' (renamed from `fill_input') and `write' functions now operate
  1292. on bytevectors. Also the `mode_bits' argument now inplicitly includes
  1293. SCM_OPN, so you don't need to include these.
  1294. *** Change prototype of port `close' function
  1295. The port close function now returns void.
  1296. *** Port and port type data structures are now opaque
  1297. Port type implementations should now use API to access port state.
  1298. However, since the change to handle port buffering centrally, port type
  1299. implementations rarely need to access unrelated port state.
  1300. *** Port types are now `scm_t_port_type*', not a tc16 value
  1301. `scm_make_port_type' now returns an opaque pointer, not a tc16.
  1302. Relatedly, the limitation that there only be 256 port types has been
  1303. lifted.
  1304. ** String ports default to UTF-8
  1305. Guile 2.0 would use the `%default-port-encoding' when creating string
  1306. ports. This resulted in ports that could only accept a subset of valid
  1307. characters, which was surprising to users. Now string ports default to
  1308. the UTF-8 encoding. Sneaky users can still play encoding conversion
  1309. games with string ports by explicitly setting the encoding of a port
  1310. after it is open. See "Ports" in the manual for more.
  1311. ** `scm_from_stringn' and `scm_to_stringn' encoding arguments are never NULL
  1312. These functions now require a valid `encoding' argument, and will abort
  1313. if given `NULL'.
  1314. ** All r6rs ports are both textual and binary
  1315. Because R6RS ports are a thin layer on top of Guile's ports, and Guile's
  1316. ports are both textual and binary, Guile's R6RS ports are also both
  1317. textual and binary, and thus both kinds have port transcoders. This is
  1318. an incompatibility with respect to R6RS.
  1319. ** Threading facilities moved to (ice-9 threads)
  1320. It used to be that call-with-new-thread and other threading primitives
  1321. were available in the default environment. This is no longer the case;
  1322. they have been moved to (ice-9 threads) instead. Existing code will not
  1323. break, however; we used the deprecation facility to signal a warning
  1324. message while also providing these bindings in the root environment for
  1325. the duration of the 2.2 series.
  1326. ** cancel-thread uses asynchronous interrupts, not pthread_cancel
  1327. See "Asyncs" in the manual, for more on asynchronous interrupts.
  1328. ** SRFI-18 threads, mutexes, cond vars disjoint from Guile
  1329. When we added support for the SRFI-18 threading library in Guile 2.0, we
  1330. did so in a way that made SRFI-18 mutexes the same as Guile mutexes.
  1331. This was a mistake. In Guile our goal is to provide basic,
  1332. well-thought-out, well-implemented, minimal primitives, on top of which
  1333. we can build a variety of opinionated frameworks. Incorporating SRFI-18
  1334. functionality into core Guile caused us to bloat and slow down our core
  1335. threading primitives. Worse, they became very hard to describe; they
  1336. did many things, did them poorly, and all that they did was never
  1337. adequately specified.
  1338. For all of these reasons we have returned to a situation where SRFI-18
  1339. concepts are implemented only in the `(srfi srfi-18)' module. This
  1340. means that SRFI-18 threads are built on Guile threads, but aren't the
  1341. same as Guile threads; calling Guile `thread?' on a thread no longer
  1342. returns true.
  1343. We realize this causes inconvenience to users who use both Guile
  1344. threading interfaces and SRFI-18 interfaces, and we lament the change --
  1345. but we are better off now. We hope the newly revised "Scheduling"
  1346. section in the manual compensates for the headache.
  1347. ** Remove `lock-mutex' "owner" argument
  1348. Mutex owners are a SRFI-18 concept; use SRFI-18 mutexes instead.
  1349. Relatedly, `scm_lock_mutex_timed' taking the owner argument is now
  1350. deprecated; use `scm_timed_lock_mutex' instead.
  1351. ** Remove `unlock-mutex' cond var and timeout arguments
  1352. It used to be that `unlock-mutex' included `wait-condition-variable'
  1353. functionality. This has been deprecated; use SRFI-18 if you want this
  1354. behavior from `mutex-unlock!'. Relatedly, `scm_unlock_mutex_timed' is
  1355. deprecated; use `scm_unlock_mutex' instead.
  1356. ** Removed `unchecked-unlock' mutex flag
  1357. This flag was introduced for internal use by SRFI-18; use SRFI-18
  1358. mutexes if you need this behaviour.
  1359. ** SRFI-18 mutexes no longer recursive
  1360. Contrary to specification, SRFI-18 mutexes in Guile were recursive.
  1361. This is no longer the case.
  1362. ** Thread cleanup handlers removed
  1363. The `set-thread-cleanup!' and `thread-cleanup' functions that were added
  1364. in Guile 2.0 to support cleanup after thread cancellation are no longer
  1365. needed, since threads can declare cleanup handlers via `dynamic-wind'.
  1366. ** Only threads created by Guile are joinable
  1367. `join-thread' used to work on "foreign" threads that were not created by
  1368. Guile itself, though their join value was always `#f'. This is no
  1369. longer the case; attempting to join a foreign thread will throw an
  1370. error.
  1371. ** Dynamic states capture values, not locations
  1372. Dynamic states used to capture the locations of fluid-value
  1373. associations. Capturing the current dynamic state then setting a fluid
  1374. would result in a mutation of that captured state. Now capturing a
  1375. dynamic state simply captures the current values, and calling
  1376. `with-dynamic-state' copies those values into the Guile virtual machine
  1377. instead of aliasing them in a way that could allow them to be mutated in
  1378. place. This change allows Guile's fluid variables to be thread-safe.
  1379. To capture the locations of a dynamic state, capture a
  1380. `with-dynamic-state' invocation using partial continuations instead.
  1381. ** Remove `frame-procedure'
  1382. Several optimizations in Guile make `frame-procedure' an interface that
  1383. we can no longer support. For background, `frame-procedure' used to
  1384. return the value at slot 0 in a frame, which usually corresponds to the
  1385. SCM value of the procedure being applied. However it could be that this
  1386. slot is re-used for some other value, because the closure was not needed
  1387. in the function. Such a re-use might even be for an untagged value, in
  1388. which case treating slot 0 as a SCM value is quite dangerous. It's also
  1389. possible that so-called "well-known" closures (closures whose callers
  1390. are all known) are optimized in such a way that slot 0 is not a
  1391. procedure but some optimized representation of the procedure's free
  1392. variables. Instead, developers building debugging tools that would like
  1393. access to `frame-procedure' are invited to look at the source for the
  1394. `(system vm frame)' module for alternate interfaces, including the new
  1395. `frame-procedure-name'.
  1396. ** Remove `,procedure' REPL command
  1397. Not all procedures have values, so it doesn't make sense to expose this
  1398. interface to the user. Instead, the `,locals' REPL command will include
  1399. the callee, if it is live.
  1400. ** Remove `frame-local-ref', `frame-local-set!', `frame-num-locals'
  1401. These procedures reference values in a frame on the stack. Since we now
  1402. have unboxed values of different kinds, it is now necessary to specify
  1403. the type when reference locals, and once this incompatible change needs
  1404. to be made, we might as well make these interfaces private. See
  1405. "Frames' in the manual, for more information on the replacements for
  1406. these low-level interfaces.
  1407. ** Vtable hierarchy changes
  1408. In an attempt to make Guile's structure and record types integrate
  1409. better with GOOPS by unifying the vtable hierarchy, `make-vtable-vtable'
  1410. is now deprecated. Instead, users should just use `make-vtable' with
  1411. appropriate arguments. See "Structures" in the manual for all of the
  1412. details. As such, `record-type-vtable' and `%condition-type-vtable' now
  1413. have a parent vtable and are no longer roots of the vtable hierarchy.
  1414. ** Syntax parameters are a distinct type
  1415. Guile 2.0's transitional implementation of `syntax-parameterize' was
  1416. based on the `fluid-let-syntax' interface inherited from the psyntax
  1417. expander. This interface allowed any binding to be dynamically rebound
  1418. -- even bindings like `lambda'. This is no longer the case in Guile
  1419. 2.2. Syntax parameters must be defined via `define-syntax-parameter',
  1420. and only such bindings may be parameterized. See "Syntax Parameters" in
  1421. the manual for more.
  1422. ** Defined identifiers scoped in the current module
  1423. Sometimes Guile's expander would attach incorrect module scoping
  1424. information for top-level bindings made by an expansion. For example,
  1425. given the following R6RS library:
  1426. (library (defconst)
  1427. (export defconst)
  1428. (import (guile))
  1429. (define-syntax-rule (defconst name val)
  1430. (begin
  1431. (define t val)
  1432. (define-syntax-rule (name) t))))
  1433. Attempting to use it would produce an error:
  1434. (import (defconst))
  1435. (defconst foo 42)
  1436. (foo)
  1437. =| Unbound variable: t
  1438. It wasn't clear that we could fix this in Guile 2.0 without breaking
  1439. someone's delicate macros, so the fix is only coming out now.
  1440. ** Pseudo-hygienically rename macro-introduced bindings
  1441. Bindings introduced by macros, like `t' in the `defconst' example above,
  1442. are now given pseudo-fresh names. This allows
  1443. (defconst foo 42)
  1444. (defconst bar 37)
  1445. to introduce different bindings for `t'. These pseudo-fresh names are
  1446. made in such a way that if the macro is expanded again, for example as
  1447. part of a simple recompilation, the introduced identifiers get the same
  1448. pseudo-fresh names. See "Hygiene and the Top-Level" in the manual, for
  1449. details.
  1450. ** Fix literal matching for module-bound literals
  1451. `syntax-rules' and `syntax-case' macros can take a set of "literals":
  1452. bound or unbound keywords that the syntax matcher treats specially.
  1453. Before, literals were always matched symbolically (by name). Now they
  1454. are matched by binding. This allows literals to be reliably bound to
  1455. values, renamed by imports or exports, et cetera. See "Syntax-rules
  1456. Macros" in the manual for more on literals.
  1457. ** Fix bug importing specific bindings with #:select
  1458. It used to be that if #:select didn't find a binding in the public
  1459. interface of a module, it would actually grovel in the module's
  1460. unexported private bindings. This was not intended and is now fixed.
  1461. ** Statically scoped module duplicate handlers
  1462. It used to be that if a module did not specify a #:duplicates handler,
  1463. when a name was first referenced in that module and multiple imported
  1464. modules provide that name, the value of the
  1465. `default-duplicate-binding-handlers' parameter would be used to resolve
  1466. the duplicate bindings. We have changed so that instead a module
  1467. defaults to the set of handlers described in the manual. If the module
  1468. specifies #:duplicates, of course we use that. The
  1469. `default-duplicate-binding-handlers' parameter now simply accesses the
  1470. handlers of the current module, instead of some global value.
  1471. ** Fix too-broad capture of dynamic stack by delimited continuations
  1472. Guile was using explicit stacks to represent, for example, the chain of
  1473. current exception handlers. This means that a delimited continuation
  1474. that captured a "catch" expression would capture the whole stack of
  1475. exception handlers, not just the exception handler added by the "catch".
  1476. This led to strangeness when resuming the continuation in some other
  1477. context like other threads; "throw" could see an invalid stack of
  1478. exception handlers. This has been fixed by the addition of the new
  1479. "fluid-ref*" procedure that can access older values of fluids; in this
  1480. way the exception handler stack is now implicit. See "Fluids and
  1481. Dynamic States" in the manual, for more on fluid-ref*.
  1482. ** `dynamic-wind' doesn't check that guards are thunks
  1483. Checking that the dynamic-wind out-guard procedure was actually a thunk
  1484. before doing the wind was slow, unreliable, and not strictly needed.
  1485. ** All deprecated code removed
  1486. All code deprecated in Guile 2.0 has been removed. See older NEWS, and
  1487. check that your programs can compile without linker warnings and run
  1488. without runtime warnings. See "Deprecation" in the manual.
  1489. In particular, the following functions, which were deprecated in 2.0.10
  1490. but not specifically mentioned earlier in this file, have been removed:
  1491. *** `uniform-vector-read!' and `uniform-vector-write' have been
  1492. removed. Use `get-bytevector-n!' and `put-bytevector' from (rnrs io
  1493. ports) instead.
  1494. ** Remove miscellaneous unused interfaces
  1495. We have removed accidentally public, undocumented interfaces that we
  1496. think are not used, and not useful. This includes `scm_markstream',
  1497. `SCM_FLUSH_REGISTER_WINDOWS', `SCM_THREAD_SWITCHING_CODE', `SCM_FENCE',
  1498. `scm_call_generic_0', `scm_call_generic_1', `scm_call_generic_2'
  1499. `scm_call_generic_3', `scm_apply_generic', and `scm_program_source'.
  1500. `scm_async_click' was renamed to `scm_async_tick', and `SCM_ASYNC_TICK'
  1501. was made private (use `SCM_TICK' instead).
  1502. ** Many internal compiler / VM changes
  1503. As the compiler and virtual machine were re-written, there are many
  1504. changes in the back-end of Guile to interfaces that were introduced in
  1505. Guile 2.0. These changes are only only of interest if you wrote a
  1506. language on Guile 2.0 or a tool using Guile 2.0 internals. If this is
  1507. the case, drop by the IRC channel to discuss the changes.
  1508. ** Defining a SMOB or port type no longer mucks exports of `(oop goops)'
  1509. It used to be that defining a SMOB or port type added an export to
  1510. GOOPS, for the wrapper class of the smob type. This violated
  1511. modularity, though, so we have removed this behavior.
  1512. ** Bytecode replaces objcode as a target language
  1513. One way in which people may have used details of Guile's runtime in
  1514. Guile 2.0 is in compiling code to thunks for later invocation. Instead
  1515. of compiling to objcode and then calling `make-program', now the way to
  1516. do it is to compile to `bytecode' and then call `load-thunk-from-memory'
  1517. from `(system vm loader)'.
  1518. ** Weak pairs removed
  1519. Weak pairs were not safe to access with `car' and `cdr', and so were
  1520. removed.
  1521. ** Weak alist vectors removed
  1522. Use weak hash tables instead.
  1523. ** Weak vectors may no longer be accessed via `vector-ref' et al
  1524. Weak vectors may no longer be accessed with the vector interface. This
  1525. was a source of bugs in the 2.0 Guile implementation, and a limitation
  1526. on using vectors as building blocks for other abstractions. Vectors in
  1527. Guile are now a concrete type; for an abstract interface, use the
  1528. generic array facility (`array-ref' et al).
  1529. ** scm_t_array_implementation removed
  1530. This interface was introduced in 2.0 but never documented. It was a
  1531. failed attempt to layer the array implementation that actually
  1532. introduced too many layers, as it prevented the "vref" and "vset"
  1533. members of scm_t_array_handle (called "ref" and "set" in 1.8, not
  1534. present in 2.0) from specializing on array backing stores.
  1535. Notably, the definition of scm_t_array_handle has now changed, to not
  1536. include the (undocumented) "impl" member. We are sorry for any
  1537. inconvenience this may cause.
  1538. ** `scm_make' is now equivalent to Scheme `make'
  1539. It used to be that `scm_make' only implemented a hard-wired object
  1540. allocation and initialization protocol. This was because `scm_make' was
  1541. used while GOOPS booted its own, more complete `make' implementation in
  1542. Scheme. Now that we've re-implemented everything in Scheme, the C
  1543. `scm_make' now dispatches directly to Scheme `make', which implements
  1544. the full protocol. This change is incompatible in some ways, but on the
  1545. whole is good news for GOOPS users.
  1546. ** GOOPS slot definitions are now objects
  1547. Slot definitions are now instances of a <slot> class, instead of being
  1548. specially formatted lists. To most user code, this is transparent, as
  1549. the slot definition accessors like `slot-definition-name' continue to
  1550. work. However, code that for example uses `car' to get the name of a
  1551. slot definition will need to be updated to use the accessors.
  1552. ** Class slot changes
  1553. Class objects no longer have a `default-slot-definition-class' slot,
  1554. which was never used. They also no longer have slots for hashsets
  1555. (`h0', `h1', and so on up to `h7'), which have been unused since Guile
  1556. 2.0 and were not a great idea.
  1557. There is a new class option, `#:static-slot-allocation?'. See the
  1558. manual for details.
  1559. ** Removal of internal, unintentionally exposed GOOPS C interfaces
  1560. These include: `scm_sys_fast_slot_ref', `scm_sys_fast_slot_set_x'
  1561. `scm_basic_basic_make_class', `scm_sys_compute_slots',
  1562. `scm_sys_prep_layout_x' `scm_t_method', `SCM_METHOD',
  1563. `scm_s_slot_set_x', `SCM_CLASS_CLASS_LAYOUT', `scm_si_slotdef_class',
  1564. `scm_si_generic_function', `scm_si_specializers', `scm_si_procedure',
  1565. `scm_si_formals', `scm_si_body', `scm_si_make_procedure',
  1566. `SCM_CLASS_CLASS_LAYOUT', `SCM_INSTANCE_HASH', `SCM_SET_HASHSET', `union
  1567. scm_t_debug_info', `scm_pure_generic_p', `SCM_PUREGENERICP',
  1568. `SCM_VALIDATE_PUREGENERIC', `SCM_VTABLE_FLAG_GOOPS_PURE_GENERIC',
  1569. `SCM_CLASSF_PURE_GENERIC', `scm_c_extend_primitive_generic',
  1570. `scm_sys_initialize_object', `SCM_CLASS_CLASS_LAYOUT',
  1571. `scm_si_redefined', `scm_si_direct_supers', `scm_si_direct_slots',
  1572. `scm_si_direct_subclasses', `scm_si_direct_methods', `scm_si_cpl'
  1573. `scm_si_slots', `scm_si_getters_n_setters', `SCM_N_CLASS_SLOTS',
  1574. `SCM_OBJ_CLASS_REDEF', `SCM_INST', `SCM_ACCESSORS_OF',
  1575. `scm_sys_allocate_instance', and `scm_sys_invalidate_class_x'.
  1576. * New deprecations
  1577. ** `SCM_FDES_RANDOM_P'
  1578. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1579. ** `_IONBF', `_IOLBF', and `_IOFBF'
  1580. Instead, use the symbol values `none', `line', or `block', respectively,
  1581. as arguments to the `setvbuf' function.
  1582. ** `SCM_FDES_RANDOM_P'
  1583. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1584. ** Arbiters
  1585. Arbiters were an experimental mutual exclusion facility from 20 years
  1586. ago that didn't survive the test of time. Use mutexes or atomic boxes
  1587. instead.
  1588. ** User asyncs
  1589. Guile had (and still has) "system asyncs", which are asynchronous
  1590. interrupts, and also had this thing called "user asyncs", which was a
  1591. trivial unused data structure. Now that we have deprecated the old
  1592. `async', `async-mark', and `run-asyncs' procedures that comprised the
  1593. "user async" facility, we have been able to clarify our documentation to
  1594. only refer to "asyncs".
  1595. ** Critical sections
  1596. Critical sections have long been just a fancy way to lock a mutex and
  1597. defer asynchronous interrupts. Instead of SCM_CRITICAL_SECTION_START,
  1598. make sure you're in a "scm_dynwind_begin (0)" and use
  1599. scm_dynwind_pthread_mutex_lock instead, possibly also with
  1600. scm_dynwind_block_asyncs.
  1601. ** `scm_make_mutex_with_flags'
  1602. Use `scm_make_mutex_with_kind' instead. See "Mutexes and Condition
  1603. Variables" in the manual, for more.
  1604. ** Dynamic roots
  1605. This was a facility that predated threads, was unused as far as we can
  1606. tell, and was never documented. Still, a grep of your code for
  1607. dynamic-root or dynamic_root would not be amiss.
  1608. ** `make-dynamic-state'
  1609. Use `current-dynamic-state' to get an immutable copy of the current
  1610. fluid-value associations.
  1611. ** `with-statprof' macro
  1612. Use the `statprof' procedure instead.
  1613. ** SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1, SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_N
  1614. ** SCM_GASSERT0, SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn
  1615. ** SCM_WTA_DISPATCH_1_SUBR
  1616. These macros were used in dispatching primitive generics. They can be
  1617. replaced by using C functions (the same name but in lower case), if
  1618. needed, but this is a hairy part of Guile that perhaps you shouldn't be
  1619. using.
  1620. ** scm_compute_applicable_methods and scm_find_method
  1621. Use `compute-applicable-methods' from Scheme instead.
  1622. ** scm_no_applicable_method
  1623. Fetch no-applicable-method from the GOOPS exports if you need it.
  1624. ** scm_class_boolean, scm_class_char, scm_class_pair
  1625. ** scm_class_procedure, scm_class_string, scm_class_symbol
  1626. ** scm_class_primitive_generic, scm_class_vector, scm_class_null
  1627. ** scm_class_real, scm_class_complex, scm_class_integer
  1628. ** scm_class_fraction, scm_class_unknown, scm_class_top
  1629. ** scm_class_object, scm_class_class, scm_class_applicable
  1630. ** scm_class_applicable_struct, scm_class_applicable_struct_with_setter
  1631. ** scm_class_generic, scm_class_generic_with_setter, scm_class_accessor
  1632. ** scm_class_extended_generic, scm_class_extended_generic_with_setter
  1633. ** scm_class_extended_accessor, scm_class_method
  1634. ** scm_class_accessor_method, scm_class_procedure_class
  1635. ** scm_class_applicable_struct_class, scm_class_number, scm_class_list
  1636. ** scm_class_keyword, scm_class_port, scm_class_input_output_port
  1637. ** scm_class_input_port, scm_class_output_port, scm_class_foreign_slot
  1638. ** scm_class_self, scm_class_protected, scm_class_hidden
  1639. ** scm_class_opaque, scm_class_read_only, scm_class_protected_hidden
  1640. ** scm_class_protected_opaque, scm_class_protected_read_only
  1641. ** scm_class_scm, scm_class_int, scm_class_float, scm_class_double
  1642. ** scm_port_class, scm_smob_class
  1643. These class exports are now deprecated. Instead, look up the ones you
  1644. need from the GOOPS module, or use `scm_class_of' on particular values.
  1645. ** scm_get_keyword
  1646. Instead from Scheme use kw-arg-ref or real keyword arguments, and from C
  1647. use `scm_c_bind_keyword_arguments'.
  1648. ** scm_slot_ref_using_class, scm_slot_set_using_class_x
  1649. ** scm_slot_bound_using_class_p, scm_slot_exists_using_class_p
  1650. Instead use the normal `scm_slot_ref' and similar procedures.
  1651. * Changes to the distribution
  1652. ** Pre-built binary files in the tarball
  1653. Building Guile from a tarball can now take advantage of a "prebuilt/"
  1654. tree of prebuilt .go files. These compiled files are created when a
  1655. tarball is made, and are used to speed up the build for users of
  1656. official releases.
  1657. These pre-built binaries are not necessary, however: they are not stored
  1658. in revision control and can always be re-created from the source, given
  1659. that Guile can bootstrap itself from its minimal bootstrap C
  1660. interpreter. If you do not want to depend on these pre-built binaries,
  1661. you can "make -C prebuilt clean" before building.
  1662. ** New minor version
  1663. The "effective version" of Guile is now 2.2, which allows parallel
  1664. installation with other effective versions (for example, the older Guile
  1665. 2.0). See "Parallel Installations" in the manual for full details.
  1666. Notably, the `pkg-config' file is now `guile-2.2'.
  1667. ** Bump required libgc version to 7.2, released March 2012.
  1668. ** GUILE_PROGS searches for versioned Guile
  1669. The GUILE_PROGS autoconf macro can take a required version argument. As
  1670. a new change, that version argument is additionally searched for as a
  1671. suffix. For example, GUILE_PROGS(2.2) would look for guile-2.2,
  1672. guile2.2, guile-2, guile2, and then guile. The found prefix is also
  1673. applied to guild, guile-config, and the like. Thanks to Freja Nordsiek
  1674. for this work.
  1675. ** The readline extension is now installed in the extensionsdir
  1676. The shared library that implements Guile's readline extension is no
  1677. longer installed to the libdir. This change should be transparent to
  1678. users, but packagers may be interested.
  1679. Changes in 2.0.14 (since 2.0.13):
  1680. * Bug fixes
  1681. ** Builds of .go files and of Guile itself are now bit-reproducible
  1682. (<http://bugs.gnu.org/20272>)
  1683. ** 'number->locale-string' and 'monetary-amount->locale-string' fixes
  1684. (<http://bugs.gnu.org/24990>)
  1685. ** (system base target) now recognizes "sh3" as a cross-compilation target
  1686. ** Fix race condition in '00-repl-server.test'
  1687. (<http://bugs.gnu.org/24769>)
  1688. ** 'scandir' from (ice-9 ftw) no longer calls 'stat' for each entry
  1689. ** Several documentation improvements
  1690. Changes in 2.0.13 (since 2.0.12):
  1691. * Security fixes
  1692. ** CVE-2016-8606: REPL server now protects against HTTP inter-protocol
  1693. attacks
  1694. Guile 2.x provides a "REPL server" started by the '--listen'
  1695. command-line option or equivalent API (see "REPL Servers" in the
  1696. manual).
  1697. The REPL server is vulnerable to the HTTP inter-protocol attack as
  1698. described at
  1699. <https://en.wikipedia.org/wiki/Inter-protocol_exploitation>, notably the
  1700. HTML form protocol attack described at
  1701. <https://www.jochentopf.com/hfpa/hfpa.pdf>. A "DNS rebinding attack"
  1702. can be combined with this attack and allow an attacker to send arbitrary
  1703. Guile code to the REPL server through web pages accessed by the
  1704. developer, even though the REPL server is listening to a loopback device
  1705. ("localhost"). This was demonstrated in an article entitled "How to
  1706. steal any developer's local database" available at
  1707. <http://bouk.co/blog/hacking-developers/>.
  1708. The REPL server in Guile 2.0.13 now detects attempts to exploit this
  1709. vulnerability. It immediately closes the connection when it receives a
  1710. line that looks like an HTTP request.
  1711. Nevertheless, we recommend binding the REPL server to a Unix-domain
  1712. socket, for instance by running:
  1713. guile --listen=/tmp/guile-socket
  1714. ** CVE-2016-8605: 'mkdir' procedure no longer calls umask(2)
  1715. (<http://bugs.gnu.org/24659>)
  1716. When the second argument to the 'mkdir' procedure was omitted, it would
  1717. call umask(0) followed by umask(previous_umask) and apply the umask to
  1718. mode #o777.
  1719. This was unnecessary and a security issue for multi-threaded
  1720. applications: during a small window the process' umask was set to zero,
  1721. so other threads calling mkdir(2) or open(2) could end up creating
  1722. world-readable/writable/executable directories or files.
  1723. * New interfaces
  1724. ** mkstemp! takes optional "mode" argument
  1725. See "File System" in the manual, for more.
  1726. ** New 'scm_to_uintptr_t' and 'scm_from_uintptr_t' C functions
  1727. * Bug fixes
  1728. ** Fix optimizer bug when compiling fixpoint operator
  1729. ** Fix build error on MinGW
  1730. ** Update 'uname' implementation on MinGW
  1731. ** 'port-encoding' and 'set-port-encoding!' ensure they are passed an
  1732. open port
  1733. ** (system base target) now recognizes Alpha as a cross-compilation target
  1734. Changes in 2.0.12 (since 2.0.11):
  1735. * Notable changes
  1736. ** FFI: Add support for functions that set 'errno'
  1737. When accessing POSIX functions from a system's libc via Guile's dynamic
  1738. FFI, you commonly want to access the 'errno' variable to be able to
  1739. produce useful diagnostic messages.
  1740. This is now possible using 'pointer->procedure' or
  1741. 'scm_pointer_to_procedure_with_errno'. See "Dynamic FFI" in the manual.
  1742. ** The #!r6rs directive now influences read syntax
  1743. The #!r6rs directive now changes the per-port reader options to make
  1744. Guile's reader conform more closely to the R6RS syntax. In particular:
  1745. - It makes the reader case sensitive.
  1746. - It disables the recognition of keyword syntax in conflict with the
  1747. R6RS (and R5RS).
  1748. - It enables the `square-brackets', `hungry-eol-escapes' and
  1749. `r6rs-hex-escapes' reader options.
  1750. ** 'read' now accepts "\(" as equivalent to "("
  1751. This is indented for use at the beginning of lines in multi-line strings
  1752. to avoid confusing Emacs' lisp modes. Previously "\(" was an error.
  1753. ** SRFI-14 character data set upgraded to Unicode 8.0.0
  1754. ** SRFI-19 table of leap seconds updated
  1755. ** 'string-hash', 'read-string', and 'write' have been optimized
  1756. ** GOOPS bug fix for inherited accessor methods
  1757. In the port of GOOPS to Guile 2.0, we introduced a bug related to
  1758. accessor methods. The bug resulted in GOOPS assuming that a slot S in
  1759. an object whose class is C would always be present in instances of all
  1760. subclasses C, and allocated to the same struct index. This is not the
  1761. case for multiple inheritance. This behavior has been fixed to be as it
  1762. was in 1.8.
  1763. One aspect of this change may cause confusion among users. Previously
  1764. if you defined a class C:
  1765. (use-modules (oop goops))
  1766. (define-class C ()
  1767. (a #:getter get-a))
  1768. And now you define a subclass, intending to provide an #:init-value for
  1769. the slot A:
  1770. (define-class D (A)
  1771. (a #:init-value 42))
  1772. Really what you have done is define in D a new slot with the same name,
  1773. overriding the existing slot. The problem comes in that before fixing
  1774. this bug (but not in 1.8), the getter 'get-a' would succeed for
  1775. instances of D, even though 'get-a' should only work for the slot 'a'
  1776. that is defined on class C, not any other slot that happens to have the
  1777. same name and be in a class with C as a superclass.
  1778. It would be possible to "merge" the slot definitions on C and D, but
  1779. that part of the meta-object protocol (`compute-slots' et al) is not
  1780. fully implemented.
  1781. Somewhat relatedly, GOOPS also had a fix around #:init-value on
  1782. class-allocated slots. GOOPS was re-initializing the value of slots
  1783. with #:class or #:each-subclass allocation every time instances of that
  1784. class was allocated. This has been fixed.
  1785. * New interfaces
  1786. ** New SRFI-28 string formatting implementation
  1787. See "SRFI-28" in the manual.
  1788. ** New (ice-9 unicode) module
  1789. See "Characters" in the manual.
  1790. ** Web server
  1791. The (web server) module now exports 'make-server-impl', 'server-impl?',
  1792. and related procedures. Likewise, (web server http) exports 'http'.
  1793. ** New procedures: 'string-utf8-length' and 'scm_c_string_utf8_length'
  1794. See "Bytevectors as Strings" in the manual, for more.
  1795. ** New 'EXIT_SUCCESS' and 'EXIT_FAILURE' Scheme variables
  1796. See "Processes" in the manual.
  1797. ** New C functions to disable automatic SMOB finalization
  1798. The new 'scm_set_automatic_finalization_enabled' C function allows you
  1799. to choose whether automatic object finalization should be enabled (as
  1800. was the case until now, and still is by default.) This is meant for
  1801. applications that are not thread-safe nor async-safe; such applications
  1802. can disable automatic finalization and call the new 'scm_run_finalizers'
  1803. function when appropriate.
  1804. See the "Garbage Collecting Smobs" and "Smobs" sections in the manual.
  1805. ** Cross-compilation to ARM
  1806. More ARM cross-compilation targets are supported: "arm.*eb",
  1807. "^aarch64.*be", and "aarch64".
  1808. * New deprecation
  1809. ** The undocumented and unused C function 'scm_string_hash' is now deprecated
  1810. * Bugs fixed
  1811. ** Compiler
  1812. *** 'call-with-prompt' does not truncate multiple-value returns
  1813. (<http://bugs.gnu.org/14347>)
  1814. *** Use permissions of source file for compiled file
  1815. (<http://bugs.gnu.org/18477>)
  1816. *** Fix bug when inlining some functions with optional arguments
  1817. (<http://bugs.gnu.org/17634>)
  1818. *** Avoid quadratic expansion time in 'and' and 'or' macros
  1819. (<http://bugs.gnu.org/17147>)
  1820. *** Fix expander bug introduced when adding support for tail patterns
  1821. (<http://lists.gnu.org/archive/html/guile-user/2015-09/msg00017.html>)
  1822. *** Handle ~p in 'format' warnings (<http://bugs.gnu.org/18299>)
  1823. *** Fix bug that exposed `list' invocations to CSE
  1824. (<http://bugs.gnu.org/21899>)
  1825. *** Reduce eq? and eqv? over constants using equal?
  1826. (<http://bugs.gnu.org/21855>)
  1827. *** Skip invalid .go files found in GUILE_LOAD_COMPILED_PATH
  1828. ** Threads
  1829. *** Fix data races leading to corruption (<http://bugs.gnu.org/22152>)
  1830. ** Memory management
  1831. *** Fix race between SMOB marking and finalization
  1832. (<http://bugs.gnu.org/19883>)
  1833. ** Ports
  1834. *** Fix port position handling on binary input ports
  1835. (<http://bugs.gnu.org/20302>)
  1836. *** Bytevector and custom binary ports to use ISO-8859-1
  1837. (<http://bugs.gnu.org/20200>)
  1838. *** Fix buffer overrun with unbuffered custom binary input ports
  1839. (<http://bugs.gnu.org/19621>)
  1840. *** Fix memory corruption that arose when using 'get-bytevector-n'
  1841. (<http://bugs.gnu.org/17466>)
  1842. ** System
  1843. *** {get,set}sockopt now expect type 'int' for SO_SNDBUF/SO_RCVBUF
  1844. *** 'system*' now available on MS-Windows
  1845. *** 'open-pipe' now available on MS-Windows
  1846. *** Better support for file names containing backslashes on Windows
  1847. ** Web
  1848. *** 'split-and-decode-uri-path' no longer decodes "+" to space
  1849. *** HTTP: Support date strings with a leading space for hours
  1850. (<http://bugs.gnu.org/23421>)
  1851. *** HTTP: Accept empty reason phrases (<http://bugs.gnu.org/22273>)
  1852. *** HTTP: 'Location' header can now contain URI references, not just
  1853. absolute URIs
  1854. *** HTTP: Improve chunked-mode support (<http://bugs.gnu.org/19939>)
  1855. *** HTTP: 'open-socket-for-uri' now sets better OS buffering parameters
  1856. (<http://bugs.gnu.org/15368>)
  1857. ** Miscellaneous
  1858. *** Fix 'atan' procedure when applied to complex numbers
  1859. *** Fix Texinfo to HTML conversion for @itemize and @acronym
  1860. (<http://bugs.gnu.org/21772>)
  1861. *** 'bytevector-fill!' accepts fill arguments greater than 127
  1862. (<http://bugs.gnu.org/19027>)
  1863. *** 'bytevector-copy' correctly copies SRFI-4 homogeneous vectors
  1864. (<http://bugs.gnu.org/18866>)
  1865. *** 'strerror' no longer hangs when passed a non-integer argument
  1866. (<http://bugs.gnu.org/18065>)
  1867. *** 'scm_boot_guile' now gracefully handles argc == 0
  1868. (<http://bugs.gnu.org/18680>)
  1869. *** Fix 'SCM_SMOB_OBJECT_LOC' definition (<http://bugs.gnu.org/18495>)
  1870. *** Fix bug where 'bit-count*' was not using its second argument
  1871. *** SRFI-1 'length+' raises an error for non-lists and dotted lists
  1872. (<http://bugs.gnu.org/17296>)
  1873. *** Add documentation for SXPath (<http://bugs.gnu.org/19478>)
  1874. Changes in 2.0.11 (since 2.0.10):
  1875. This release fixes an embarrassing regression introduced in the C
  1876. interface to SRFI-4 vectors. See
  1877. <https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00047.html>
  1878. for details.
  1879. Changes in 2.0.10 (since 2.0.9):
  1880. * Notable changes
  1881. ** New GDB extension to support Guile
  1882. Guile now comes with an extension for GDB 7.8 or later (unreleased at
  1883. the time of writing) that simplifies debugging of C code that uses
  1884. Guile. See "GDB Support" in the manual.
  1885. ** Improved integration between R6RS and native Guile exceptions
  1886. R6RS exception handlers, established using 'with-exception-handler' or
  1887. 'guard', are now able to catch native Guile exceptions, which are
  1888. automatically converted into appropriate R6RS condition objects.
  1889. ** Support for HTTP proxies
  1890. Guile's built-in web client now honors the 'http_proxy' environment
  1891. variable, as well as the new 'current-http-proxy' parameter. See
  1892. "Web Client" in the manual for details.
  1893. ** Lexical syntax improvements
  1894. *** Support |...| symbol notation.
  1895. Guile's core reader and printer now support the R7RS |...| notation
  1896. for writing symbols with arbitrary characters, as a more portable and
  1897. attractive alternative to Guile's native #{...}# notation. To enable
  1898. this notation by default, put one or both of the following in your
  1899. ~/.guile:
  1900. (read-enable 'r7rs-symbols)
  1901. (print-enable 'r7rs-symbols)
  1902. *** Support '#true' and '#false' notation for booleans.
  1903. The booleans '#t' and '#f' may now be written as '#true' and '#false'
  1904. for improved readability, per R7RS.
  1905. *** Recognize '#\escape' character name.
  1906. The escape character '#\esc' may now be written as '#\escape', per R7RS.
  1907. *** Accept "\|" in string literals.
  1908. The pipe character may now be preceded by a backslash, per R7RS.
  1909. ** Custom binary input ports now support 'setvbuf'.
  1910. Until now, ports returned by 'make-custom-binary-input-port' were always
  1911. full-buffered. Now, their buffering mode can be changed using 'setvbuf'.
  1912. ** SRFI-4 predicates and length accessors no longer accept arrays.
  1913. Given that the SRFI-4 accessors don't work for arrays, the fact that the
  1914. predicates and length accessors returned true for arrays was a bug.
  1915. ** GUILE_PROGS now supports specifying a minimum required version.
  1916. The 'GUILE_PROGS' autoconf macro in guile.m4 now allows an optional
  1917. argument to specify a minimum required Guile version. By default, it
  1918. requires Guile >= 2.0. A micro version can also be specified, e.g.:
  1919. GUILE_PROGS([2.0.10])
  1920. ** Error reporting improvements
  1921. *** Improved run-time error reporting in (ice-9 match).
  1922. If no pattern matches in a 'match' form, the datum that failed to match
  1923. is printed along with the location of the failed 'match' invocation.
  1924. *** Print the faulty object upon invalid-keyword errors.
  1925. *** Improved error reporting of procedures defined by define-inlinable.
  1926. *** Improved error reporting for misplaced ellipses in macro definitions.
  1927. *** Improved error checking in 'define-public' and 'module-add!'.
  1928. *** Improved error when 'include' form with relative path is not in a file.
  1929. ** Speed improvements
  1930. *** 'scm_c_read' on ISO-8859-1 (e.g. binary) unbuffered ports is faster.
  1931. *** New inline asm for VM fixnum multiply, for faster overflow checking.
  1932. *** New inline asm for VM fixnum operations on ARM and 32-bit x86.
  1933. *** 'positive?' and 'negative?' are now compiled to VM primitives.
  1934. *** Numerical comparisons with more than 2 arguments are compiled to VM code.
  1935. *** Several R6RS bitwise operators have been optimized.
  1936. ** Miscellaneous
  1937. *** Web: 'content-disposition' headers are now supported.
  1938. *** Web: 'uri-encode' hexadecimal percent-encoding is now uppercase.
  1939. *** Size argument to 'make-doubly-weak-hash-table' is now optional.
  1940. *** Timeout for 'unlock-mutex' and SRFI-18 'mutex-unlock!' may now be #f.
  1941. ** Gnulib update
  1942. Guile's copy of Gnulib was updated to v0.1-92-g546ff82. The following
  1943. modules were imported from Gnulib: copysign, fsync, isfinite, link,
  1944. lstat, mkdir, mkstemp, readlink, rename, rmdir, and unistd.
  1945. * New interfaces
  1946. ** Cooperative REPL servers
  1947. This new facility supports REPLs that run at specified times within an
  1948. existing thread, for example in programs utilizing an event loop or in
  1949. single-threaded programs. This allows for safe access and mutation of
  1950. a program's data structures from the REPL without concern for thread
  1951. synchronization. See "Cooperative REPL Servers" in the manual for
  1952. details.
  1953. ** SRFI-43 (Vector Library)
  1954. Guile now includes SRFI-43, a comprehensive library of vector operations
  1955. analogous to the SRFI-1 list library. See "SRFI-43" in the manual for
  1956. details.
  1957. ** SRFI-64 (A Scheme API for test suites)
  1958. Guile now includes SRFI-64, a flexible framework for creating test
  1959. suites. The reference implementation of SRFI-64 has also been updated
  1960. to fully support earlier versions of Guile.
  1961. ** SRFI-111 (Boxes)
  1962. See "SRFI-111" in the manual.
  1963. ** 'define-values'
  1964. See "Binding multiple return values" in the manual.
  1965. ** Custom ellipsis identifiers using 'with-ellipsis' or SRFI-46.
  1966. Guile now allows macro definitions to use identifiers other than '...'
  1967. as the ellipsis. This is convenient when writing macros that generate
  1968. macro definitions. The desired ellipsis identifier can be given as the
  1969. first operand to 'syntax-rules', as specified in SRFI-46 and R7RS, or by
  1970. using the new 'with-ellipsis' special form in procedural macros. With
  1971. this addition, Guile now fully supports SRFI-46.
  1972. See "Specifying a Custom Ellipsis Identifier" and "Custom Ellipsis
  1973. Identifiers for syntax-case Macros" in the manual for details.
  1974. ** R7RS 'syntax-error'
  1975. Guile now supports 'syntax-error', as specified by R7RS, allowing for
  1976. improved compile-time error reporting from 'syntax-rules' macros. See
  1977. "Reporting Syntax Errors in Macros" in the manual for details.
  1978. ** New procedures to convert association lists into hash tables
  1979. Guile now includes the convenience procedures 'alist->hash-table',
  1980. 'alist->hashq-table', 'alist->hashv-table', and 'alist->hashx-table'.
  1981. See "Hash Table Reference" in the manual.
  1982. ** New predicates: 'exact-integer?' and 'scm_is_exact_integer'
  1983. See "Integers" in the manual.
  1984. ** 'weak-vector-length', 'weak-vector-ref', and 'weak-vector-set!'
  1985. These should now be used to access weak vectors, instead of
  1986. 'vector-length', 'vector-ref', and 'vector-set!'.
  1987. * Manual updates
  1988. ** Improve docs for 'eval-when'.
  1989. Each 'eval-when' condition is now explained in detail, including
  1990. 'expand' which was previously undocumented. (expand load eval) is now
  1991. the recommended set of conditions, instead of (compile load eval).
  1992. See "Eval When" in the manual, for details.
  1993. ** Update the section on SMOBs and memory management.
  1994. See "Defining New Types (Smobs)" in the manual.
  1995. ** Fixes
  1996. *** GOOPS: #:dsupers is the init keyword for the dsupers slot.
  1997. *** 'unfold-right' takes a tail, not a tail generator.
  1998. *** Clarify that 'append!' and 'reverse!' might not mutate.
  1999. *** Fix doc that incorrectly claimed (integer? +inf.0) => #t.
  2000. (http://bugs.gnu.org/16356)
  2001. *** Document that we support SRFI-62 (S-expression comments).
  2002. *** Document that we support SRFI-87 (=> in case clauses).
  2003. *** Document 'equal?' in the list of R6RS incompatibilities.
  2004. *** Remove outdated documentation of LTDL_LIBRARY_PATH.
  2005. *** Fix 'weak-vector?' doc: Weak hash tables are not weak vectors.
  2006. *** Fix 'my-or' examples to use let-bound variable.
  2007. (http://bugs.gnu.org/14203)
  2008. * New deprecations
  2009. ** General 'uniform-vector' interface
  2010. This interface lacked both generality and specificity. The general
  2011. replacements are 'array-length', 'array-ref', and friends on the scheme
  2012. side, and the array handle interface on the C side. On the specific
  2013. side of things, there are the specific bytevector, SRFI-4, and bitvector
  2014. interfaces.
  2015. ** Use of the vector interface on arrays
  2016. ** 'vector-length', 'vector-ref', and 'vector-set!' on weak vectors
  2017. ** 'vector-length', 'vector-ref', and 'vector-set!' as primitive-generics
  2018. Making the vector interface operate only on a single representation will
  2019. allow future versions of Guile to compile loops involving vectors to
  2020. more efficient native code.
  2021. ** 'htons', 'htonl', 'ntohs', 'ntohl'
  2022. These procedures, like their C counterpart, were used to convert numbers
  2023. to/from network byte order, typically in conjunction with the
  2024. now-deprecated uniform vector API.
  2025. This functionality is now covered by the bytevector and binary I/O APIs.
  2026. See "Interpreting Bytevector Contents as Integers" in the manual.
  2027. ** 'gc-live-object-stats'
  2028. It hasn't worked in the whole 2.0 series. There is no replacement,
  2029. unfortunately.
  2030. ** 'scm_c_program_source'
  2031. This internal VM function was not meant to be public. Use
  2032. 'scm_procedure_source' instead.
  2033. * Build fixes
  2034. ** Fix build with Clang 3.4.
  2035. ** MinGW build fixes
  2036. *** Do not add $(EXEEXT) to guild or guile-tools.
  2037. *** tests: Use double quotes around shell arguments, for Windows.
  2038. *** tests: Don't rely on $TMPDIR and /tmp on Windows.
  2039. *** tests: Skip FFI tests that use `qsort' when it's not accessible.
  2040. *** tests: Remove symlink only when it exists.
  2041. *** tests: Don't rely on `scm_call_2' being visible.
  2042. ** Fix computation of LIBLOBJS so dependencies work properly.
  2043. (http://bugs.gnu.org/14193)
  2044. * Bug fixes
  2045. ** Web: Fix web client with methods other than GET.
  2046. (http://bugs.gnu.org/15908)
  2047. ** Web: Add Content-Length header for empty bodies.
  2048. ** Web: Accept "UTC" as the zone offset in date headers.
  2049. (http://bugs.gnu.org/14128)
  2050. ** Web: Don't throw if a response is longer than its Content-Length says.
  2051. ** Web: Write out HTTP Basic auth headers correctly.
  2052. (http://bugs.gnu.org/14370)
  2053. ** Web: Always print a path component in 'write-request-line'.
  2054. ** Fix 'define-public' from (ice-9 curried-definitions).
  2055. ** psyntax: toplevel variable definitions discard previous syntactic binding.
  2056. (http://bugs.gnu.org/11988)
  2057. ** Fix thread-unsafe lazy initializations.
  2058. ** Make (ice-9 popen) thread-safe.
  2059. (http://bugs.gnu.org/15683)
  2060. ** Make guardians thread-safe.
  2061. ** Make regexp_exec thread-safe.
  2062. (http://bugs.gnu.org/14404)
  2063. ** vm: Gracefully handle stack overflows.
  2064. (http://bugs.gnu.org/15065)
  2065. ** Fix 'rationalize'.
  2066. (http://bugs.gnu.org/14905)
  2067. ** Fix inline asm for VM fixnum operations on x32.
  2068. ** Fix 'SCM_SYSCALL' to really swallow EINTR.
  2069. ** Hide EINTR returns from 'accept'.
  2070. ** SRFI-19: Update the table of leap seconds.
  2071. ** Add missing files to the test-suite Makefile.
  2072. ** Make sure 'ftw' allows directory traversal when running as root.
  2073. ** Fix 'hash-for-each' for weak hash tables.
  2074. ** SRFI-18: Export 'current-thread'.
  2075. (http://bugs.gnu.org/16890)
  2076. ** Fix inlining of tail list to apply.
  2077. (http://bugs.gnu.org/15533)
  2078. ** Fix bug in remqueue in threads.c when removing last element.
  2079. ** Fix build when '>>' on negative integers is not arithmetic.
  2080. ** Fix 'bitwise-bit-count' for negative arguments.
  2081. (http://bugs.gnu.org/14864)
  2082. ** Fix VM 'ash' for right shifts by large amounts.
  2083. (http://bugs.gnu.org/14864)
  2084. ** Fix rounding in scm_i_divide2double for negative arguments.
  2085. ** Avoid lossy conversion from inum to double in numerical comparisons.
  2086. ** Fix numerical comparison of fractions to infinities.
  2087. ** Allow fl+ and fl* to accept zero arguments.
  2088. (http://bugs.gnu.org/14869)
  2089. ** flonum? returns false for complex number objects.
  2090. (http://bugs.gnu.org/14866)
  2091. ** flfinite? applied to a NaN returns false.
  2092. (http://bugs.gnu.org/14868)
  2093. ** Flonum operations always return flonums.
  2094. (http://bugs.gnu.org/14871)
  2095. ** min and max: NaNs beat infinities, per R6RS errata.
  2096. (http://bugs.gnu.org/14865)
  2097. ** Fix 'fxbit-count' for negative arguments.
  2098. ** 'gcd' and 'lcm' support inexact integer arguments.
  2099. (http://bugs.gnu.org/14870)
  2100. ** Fix R6RS 'fixnum-width'.
  2101. (http://bugs.gnu.org/14879)
  2102. ** tests: Use shell constructs that /bin/sh on Solaris 10 can understand.
  2103. (http://bugs.gnu.org/14042)
  2104. ** Fix display of symbols containing backslashes.
  2105. (http://bugs.gnu.org/15033)
  2106. ** Fix truncated-print for uniform vectors.
  2107. ** Define `AF_UNIX' only when Unix-domain sockets are supported.
  2108. ** Decompiler: fix handling of empty 'case-lambda' expressions.
  2109. ** Fix handling of signed zeroes and infinities in 'numerator' and 'denominator'.
  2110. ** dereference-pointer: check for null pointer.
  2111. ** Optimizer: Numerical comparisons are not negatable, for correct NaN handling.
  2112. ** Compiler: Evaluate '-' and '/' in left-to-right order.
  2113. (for more robust floating-point arithmetic)
  2114. ** snarf.h: Declare static const function name vars as SCM_UNUSED.
  2115. ** chars.c: Remove duplicate 'const' specifiers.
  2116. ** Modify SCM_UNPACK type check to avoid warnings in clang.
  2117. ** Arrange so that 'file-encoding' does not truncate the encoding name.
  2118. (http://bugs.gnu.org/16463)
  2119. ** Improve error checking in bytevector->uint-list and bytevector->sint-list.
  2120. (http://bugs.gnu.org/15100)
  2121. ** Fix (ash -1 SCM_I_FIXNUM_BIT-1) to return a fixnum instead of a bignum.
  2122. ** i18n: Fix null pointer dereference when locale info is missing.
  2123. ** Fix 'string-copy!' to work properly with overlapping src/dest.
  2124. ** Fix hashing of vectors to run in bounded time.
  2125. ** 'port-position' works on CBIPs that do not support 'set-port-position!'.
  2126. ** Custom binary input ports sanity-check the return value of 'read!'.
  2127. ** bdw-gc.h: Check SCM_USE_PTHREAD_THREADS using #if not #ifdef.
  2128. ** REPL Server: Don't establish a SIGINT handler.
  2129. ** REPL Server: Redirect warnings to client socket.
  2130. ** REPL Server: Improve robustness of 'stop-server-and-clients!'.
  2131. ** Add srfi-16, srfi-30, srfi-46, srfi-62, srfi-87 to %cond-expand-features.
  2132. ** Fix trap handlers to handle applicable structs.
  2133. (http://bugs.gnu.org/15691)
  2134. ** Fix optional end argument in `uniform-vector-read!'.
  2135. (http://bugs.gnu.org/15370)
  2136. ** Fix brainfuck->scheme compiler.
  2137. ** texinfo: Fix newline preservation in @example with lines beginning with @
  2138. ** C standards conformance improvements
  2139. Improvements and bug fixes were made to the C part of Guile's run-time
  2140. support (libguile).
  2141. *** Don't use the identifier 'noreturn'.
  2142. (http://bugs.gnu.org/15798)
  2143. *** Rewrite SCM_I_INUM to avoid unspecified behavior when not using GNU C.
  2144. *** Improve fallback implemention of SCM_SRS to avoid unspecified behavior.
  2145. *** SRFI-60: Reimplement 'rotate-bit-field' on inums to be more portable.
  2146. *** Improve compliance with C standards regarding signed integer shifts.
  2147. *** Avoid signed overflow in random.c.
  2148. *** VM: Avoid signed overflows in 'add1' and 'sub1'.
  2149. *** VM: Avoid overflow in ASM_ADD when the result is most-positive-fixnum.
  2150. *** read: Avoid signed integer overflow in 'read_decimal_integer'.
  2151. Changes in 2.0.9 (since 2.0.7):
  2152. Note: 2.0.8 was a brown paper bag release that was never announced, but
  2153. some mirrors may have picked it up. Please do not use it.
  2154. * Notable changes
  2155. ** New keyword arguments for procedures that open files
  2156. The following procedures that open files now support keyword arguments
  2157. to request binary I/O or to specify the character encoding for text
  2158. files: `open-file', `open-input-file', `open-output-file',
  2159. `call-with-input-file', `call-with-output-file', `with-input-from-file',
  2160. `with-output-to-file', and `with-error-to-file'.
  2161. It is also now possible to specify whether Guile should scan files for
  2162. Emacs-style coding declarations. This scan was done by default in
  2163. versions 2.0.0 through 2.0.7, but now must be explicitly requested.
  2164. See "File Ports" in the manual for details.
  2165. ** Rewritten guile.m4
  2166. The `guile.m4' autoconf macros have been rewritten to use `guild' and
  2167. `pkg-config' instead of the deprecated `guile-config' (which itself
  2168. calls pkg-config).
  2169. There is also a new macro, `GUILE_PKG', which allows packages to select
  2170. the version of Guile that they want to compile against. See "Autoconf
  2171. Macros" in the manual, for more information.
  2172. ** Better Windows support
  2173. Guile now correctly identifies absolute paths on Windows (MinGW), and
  2174. creates files on that platform according to its path conventions. See
  2175. "File System" in the manual, for all details.
  2176. In addition, the new Gnulib imports provide `select' and `poll' on
  2177. Windows builds.
  2178. As an incompatible change, systems that are missing <sys/select.h> were
  2179. previously provided a public `scm_std_select' C function that defined a
  2180. version of `select', but unhappily it also provided its own incompatible
  2181. definitions for FD_SET, FD_ZERO, and other system interfaces. Guile
  2182. should not be setting these macros in public API, so this interface was
  2183. removed on those plaforms (basically only MinGW).
  2184. ** Numerics improvements
  2185. `number->string' now reliably outputs enough digits to produce the same
  2186. number when read back in. Previously, it mishandled subnormal numbers
  2187. (printing them as "#.#"), and failed to distinguish between some
  2188. distinct inexact numbers, e.g. 1.0 and (+ 1.0 (expt 2.0 -52)). These
  2189. problems had far-reaching implications, since the compiler uses
  2190. `number->string' to serialize numeric constants into .go files.
  2191. `sqrt' now produces exact rational results when possible, and handles
  2192. very large or very small numbers more robustly.
  2193. A number (ahem) of operations involving exact rationals have been
  2194. optimized, most notably `integer-expt' and `expt'.
  2195. `exact->inexact' now performs correct IEEE rounding.
  2196. ** New optimizations
  2197. There were a number of improvements to the partial evaluator, allowing
  2198. complete reduction of forms such as:
  2199. ((let ((_ 10)) (lambda () _)))
  2200. ((lambda _ _))
  2201. (apply (lambda _ _) 1 2 3 '(4))
  2202. (call-with-values (lambda () (values 1 2)) (lambda _ _))
  2203. `string-join' now handles huge lists efficiently.
  2204. `get-bytevector-some' now uses buffered input, which is much faster.
  2205. Finally, `array-ref', `array-set!' on arrays of rank 1 or 2 is now
  2206. faster, because it avoids building a rest list. Similarly, the
  2207. one-argument case of `array-for-each' and `array-map!' has been
  2208. optimized, and `array-copy!' and `array-fill!' are faster.
  2209. ** `peek-char' no longer consumes EOF
  2210. As required by the R5RS, if `peek-char' returns EOF, then the next read
  2211. will also return EOF. Previously `peek-char' would consume the EOF.
  2212. This makes a difference for terminal devices where it is possible to
  2213. read past an EOF.
  2214. ** Gnulib update
  2215. Guile's copy of Gnulib was updated to v0.0-7865-ga828bb2. The following
  2216. modules were imported from Gnulib: select, times, pipe-posix, fstat,
  2217. getlogin, poll, and c-strcase.
  2218. ** `include' resolves relative file names relative to including file
  2219. Given a relative file name, `include' will look for it relative to the
  2220. directory of the including file. This harmonizes the behavior of
  2221. `include' with that of `load'.
  2222. ** SLIB compatibility restored
  2223. Guile 2.0.8 is now compatible with SLIB. You will have to use a
  2224. development version of SLIB, however, until a new version of SLIB is
  2225. released.
  2226. ** Better ,trace REPL command
  2227. Sometimes the ,trace output for nested function calls could overflow the
  2228. terminal width, which wasn't useful. Now there is a limit to the amount
  2229. of space the prefix will take. See the documentation for ",trace" for
  2230. more information.
  2231. ** Better docstring syntax supported for `case-lambda'
  2232. Docstrings can now be placed immediately after the `case-lambda' or
  2233. `case-lambda*' keyword. See "Case-lambda" in the manual.
  2234. ** Improved handling of Unicode byte order marks
  2235. See "BOM Handling" in the manual for details.
  2236. ** Update predefined character sets to Unicode 6.2
  2237. ** GMP 4.2 or later required
  2238. Guile used to require GMP at least version 4.1 (released in May 2002),
  2239. and now requires at least version 4.2 (released in March 2006).
  2240. * Manual updates
  2241. ** Better SXML documentation
  2242. The documentation for SXML modules was much improved, though there is
  2243. still far to go. See "SXML" in manual.
  2244. ** Style updates
  2245. Use of "iff" was replaced with standard English. Keyword arguments are
  2246. now documented consistently, along with their default values.
  2247. ** An end to the generated-documentation experiment
  2248. When Guile 2.0 imported some modules from Guile-Lib, they came with a
  2249. system that generated documentation from docstrings and module
  2250. commentaries. This produced terrible documentation. We finally bit the
  2251. bullet and incorporated these modules into the main text, and will be
  2252. improving them manually over time, as is the case with SXML. Help is
  2253. appreciated.
  2254. ** New documentation
  2255. There is now documentation for `scm_array_type', and `scm_array_ref', as
  2256. well as for the new `array-length' / 'scm_c_array_length' /
  2257. `scm_array_length' functions. `array-in-bounds?' has better
  2258. documentation as well. The `program-arguments-alist' and
  2259. `program-lambda-list' functions are now documented, as well as `and=>',
  2260. `exit', and `quit'. The (system repl server) module is now documented
  2261. (see REPL Servers). Finally, the GOOPS class hierarchy diagram has been
  2262. regenerated for the web and print output formats.
  2263. * New deprecations
  2264. ** Deprecate generalized vector interface
  2265. The generalized vector interface, introduced in 1.8.0, is simply a
  2266. redundant, verbose interface to arrays of rank 1. `array-ref' and
  2267. similar functions are entirely sufficient. Thus,
  2268. `scm_generalized_vector_p', `scm_generalized_vector_length',
  2269. `scm_generalized_vector_ref', `scm_generalized_vector_set_x', and
  2270. `scm_generalized_vector_to_list' are now deprecated.
  2271. ** Deprecate SCM_CHAR_CODE_LIMIT and char-code-limit
  2272. These constants were defined to 256, which is not the highest codepoint
  2273. supported by Guile. Given that they were useless and incorrect, they
  2274. have been deprecated.
  2275. ** Deprecate `http-get*'
  2276. The new `#:streaming?' argument to `http-get' subsumes the functionality
  2277. of `http-get*' (introduced in 2.0.7). Also, the `#:extra-headers'
  2278. argument is deprecated in favor of `#:headers'.
  2279. ** Deprecate (ice-9 mapping)
  2280. This module, present in Guile since 1996 but never used or documented,
  2281. has never worked in Guile 2.0. It has now been deprecated and will be
  2282. removed in Guile 2.2.
  2283. ** Deprecate undocumented array-related C functions
  2284. These are `scm_array_fill_int', `scm_ra_eqp', `scm_ra_lessp',
  2285. `scm_ra_leqp', `scm_ra_grp', `scm_ra_greqp', `scm_ra_sum',
  2286. `scm_ra_product', `scm_ra_difference', `scm_ra_divide', and
  2287. `scm_array_identity'.
  2288. * New interfaces
  2289. ** SRFI-41 Streams
  2290. See "SRFI-41" in the manual.
  2291. ** SRFI-45 exports `promise?'
  2292. SRFI-45 now exports a `promise?' procedure that works with its promises.
  2293. Also, its promises now print more nicely.
  2294. ** New HTTP client procedures
  2295. See "Web Client" for documentation on the new `http-head', `http-post',
  2296. `http-put', `http-delete', `http-trace', and `http-options' procedures,
  2297. and also for more options to `http-get'.
  2298. ** Much more capable `xml->sxml'
  2299. See "Reading and Writing XML" for information on how the `xml->sxml'
  2300. parser deals with namespaces, processed entities, doctypes, and literal
  2301. strings. Incidentally, `current-ssax-error-port' is now a parameter
  2302. object.
  2303. ** New procedures for converting strings to and from bytevectors
  2304. See "Representing Strings as Bytes" for documention on the new `(ice-9
  2305. iconv)' module and its `bytevector->string' and `string->bytevector'
  2306. procedures.
  2307. ** Escape continuations with `call/ec' and `let/ec'
  2308. See "Prompt Primitives".
  2309. ** New procedures to read all characters from a port
  2310. See "Line/Delimited" in the manual for documentation on `read-string'
  2311. and `read-string!'.
  2312. ** New procedure `sendfile'
  2313. See "File System".
  2314. ** New procedure `unget-bytevector'
  2315. See "R6RS Binary Input".
  2316. ** New C helper: `scm_c_bind_keyword_arguments'
  2317. See "Keyword Procedures".
  2318. ** New command-line arguments: `--language' and `-C'
  2319. See "Command-line Options" in the manual.
  2320. ** New environment variables: `GUILE_STACK_SIZE', `GUILE_INSTALL_LOCALE'
  2321. See "Environment Variables".
  2322. ** New procedures for dealing with file names
  2323. See "File System" for documentation on `system-file-name-convention',
  2324. `file-name-separator?', `absolute-file-name?', and
  2325. `file-name-separator-string'.
  2326. ** `array-length', an array's first dimension
  2327. See "Array Procedures".
  2328. ** `hash-count', for hash tables
  2329. See "Hash Tables".
  2330. ** `round-ash', a bit-shifting operator that rounds on right-shift
  2331. See "Bitwise Operations".
  2332. ** New foreign types: `ssize_t', `ptrdiff_t'
  2333. See "Foreign Types".
  2334. ** New C helpers: `scm_from_ptrdiff_t', `scm_to_ptrdiff_t'
  2335. See "Integers".
  2336. ** Socket option `SO_REUSEPORT' now available from Scheme
  2337. If supported on the platform, `SO_REUSEPORT' is now available from
  2338. Scheme as well. See "Network Sockets and Communication".
  2339. ** `current-language' in default environment
  2340. Previously defined only in `(system base language)', `current-language'
  2341. is now defined in the default environment, and is used to determine the
  2342. language for the REPL, and for `compile-and-load'.
  2343. ** New procedure: `fluid->parameter'
  2344. See "Parameters", for information on how to convert a fluid to a
  2345. parameter.
  2346. ** New `print' REPL option
  2347. See "REPL Commands" in the manual for information on the new
  2348. user-customizable REPL printer.
  2349. ** New variable: %site-ccache-dir
  2350. The "Installing Site Packages" and "Build Config" manual sections now
  2351. refer to this variable to describe where users should install their
  2352. `.go' files.
  2353. * Build fixes
  2354. ** Fix compilation against libgc 7.3.
  2355. ** Fix cross-compilation of `c-tokenize.o'.
  2356. ** Fix warning when compiling against glibc 2.17.
  2357. ** Fix documentation build against Texinfo 5.0.
  2358. ** Fix building Guile from a directory with non-ASCII characters.
  2359. ** Fix native MinGW build.
  2360. ** Fix --disable-posix build.
  2361. ** Fix MinGW builds with networking, POSIX, and thread support.
  2362. * Bug fixes
  2363. ** Fix inexact number printer.
  2364. (http://bugs.gnu.org/13757)
  2365. ** Fix infinite loop when parsing optional-argument short options (SRFI-37).
  2366. (http://bugs.gnu.org/13176)
  2367. ** web: Support non-GMT date headers in the HTTP client.
  2368. (http://bugs.gnu.org/13544)
  2369. ** web: support IP-literal (IPv6 address) in Host header.
  2370. ** Avoid stack overflows with `par-map' and nested futures in general.
  2371. (http://bugs.gnu.org/13188)
  2372. ** Peek-char no longer consumes EOF.
  2373. (http://bugs.gnu.org/12216)
  2374. ** Avoid swallowing multiple EOFs in R6RS binary-input procedures.
  2375. ** A fork when multiple threads are running will now print a warning.
  2376. ** Allow for spurious wakeups from pthread_cond_wait.
  2377. (http://bugs.gnu.org/10641)
  2378. ** Warn and ignore module autoload failures.
  2379. (http://bugs.gnu.org/12202)
  2380. ** Use chmod portably in (system base compile).
  2381. (http://bugs.gnu.org/10474)
  2382. ** Fix response-body-port for HTTP responses without content-length.
  2383. (http://bugs.gnu.org/13857)
  2384. ** Allow case-lambda expressions with no clauses.
  2385. (http://bugs.gnu.org/9776)
  2386. ** Improve standards conformance of string->number.
  2387. (http://bugs.gnu.org/11887)
  2388. ** Support calls and tail-calls with more than 255 formals.
  2389. ** ,option evaluates its right-hand-side.
  2390. (http://bugs.gnu.org/13076)
  2391. ** Structs with tail arrays are not simple.
  2392. (http://bugs.gnu.org/12808)
  2393. ** Make `SCM_LONG_BIT' usable in preprocessor conditionals.
  2394. (http://bugs.gnu.org/13848)
  2395. ** Fix thread-unsafe lazy initializations.
  2396. ** Allow SMOB mark procedures to be called from parallel markers.
  2397. (http://bugs.gnu.org/13611)
  2398. ** Fix later-bindings-win logic in with-fluids.
  2399. (http://bugs.gnu.org/13843)
  2400. ** Fix duplicate removal of with-fluids.
  2401. (http://bugs.gnu.org/13838)
  2402. ** Support calling foreign functions of 10 arguments or more.
  2403. (http://bugs.gnu.org/13809)
  2404. ** Let reverse! accept arbitrary types as second argument.
  2405. (http://bugs.gnu.org/13835)
  2406. ** Recognize the `x86_64.*-gnux32' triplet.
  2407. ** Check whether a triplet's OS part specifies an ABI.
  2408. ** Recognize mips64* as having 32-bit pointers by default.
  2409. ** Use portable sed constructs.
  2410. (http://bugs.gnu.org/14042)
  2411. ** Remove language/glil/decompile-assembly.scm.
  2412. (http://bugs.gnu.org/10622)
  2413. ** Use O_BINARY in `copy-file', `load-objcode', `mkstemp'.
  2414. ** Use byte-oriented functions in `get-bytevector*'.
  2415. ** Fix abort when iconv swallows BOM from UTF-16 or UTF-32 stream.
  2416. ** Fix compilation of functions with more than 255 local variables.
  2417. ** Fix `getgroups' for when zero supplementary group IDs exist.
  2418. ** Allow (define-macro name (lambda ...)).
  2419. ** Various fixes to the (texinfo) modules.
  2420. ** guild: Gracefully handle failures to install the locale.
  2421. ** Fix format string warnings for ~!, ~|, ~/, ~q, ~Q, and ~^.
  2422. (http://bugs.gnu.org/13485)
  2423. ** Fix source annotation bug in psyntax 'expand-body'.
  2424. ** Ecmascript: Fix conversion to boolean for non-numbers.
  2425. ** Use case-insensitive comparisons for encoding names.
  2426. ** Add missing cond-expand feature identifiers.
  2427. ** A failure to find a module's file does not prevent future loading.
  2428. ** Many (oop goops save) fixes.
  2429. ** `http-get': don't shutdown write end of socket.
  2430. (http://bugs.gnu.org/13095)
  2431. ** Avoid signed integer overflow in scm_product.
  2432. ** http: read-response-body always returns bytevector or #f, never EOF.
  2433. ** web: Correctly detect "No route to host" conditions.
  2434. ** `system*': failure to execvp no longer leaks dangling processes.
  2435. (http://bugs.gnu.org/13166)
  2436. ** More sensible case-lambda* dispatch.
  2437. (http://bugs.gnu.org/12929)
  2438. ** Do not defer expansion of internal define-syntax forms.
  2439. (http://bugs.gnu.org/13509)
  2440. Changes in 2.0.7 (since 2.0.6):
  2441. * Notable changes
  2442. ** SRFI-105 curly infix expressions are supported
  2443. Curly infix expressions as described at
  2444. http://srfi.schemers.org/srfi-105/srfi-105.html are now supported by
  2445. Guile's reader. This allows users to write things like {a * {b + c}}
  2446. instead of (* a (+ b c)). SRFI-105 support is enabled by using the
  2447. `#!curly-infix' directive in source code, or the `curly-infix' reader
  2448. option. See the manual for details.
  2449. ** Reader options may now be per-port
  2450. Historically, `read-options' and related procedures would manipulate
  2451. global options, affecting the `read' procedure for all threads, and all
  2452. current uses of `read'.
  2453. Guile can now associate `read' options with specific ports, allowing
  2454. different ports to use different options. For instance, the
  2455. `#!fold-case' and `#!no-fold-case' reader directives have been
  2456. implemented, and their effect is to modify the current read options of
  2457. the current port only; similarly for `#!curly-infix'. Thus, it is
  2458. possible, for instance, to have one port reading case-sensitive code,
  2459. while another port reads case-insensitive code.
  2460. ** Futures may now be nested
  2461. Futures may now be nested: a future can itself spawn and then `touch'
  2462. other futures. In addition, any thread that touches a future that has
  2463. not completed now processes other futures while waiting for the touched
  2464. future to completed. This allows all threads to be kept busy, and was
  2465. made possible by the use of delimited continuations (see the manual for
  2466. details.)
  2467. Consequently, `par-map' and `par-for-each' have been rewritten and can
  2468. now use all cores.
  2469. ** `GUILE_LOAD_PATH' et al can now add directories to the end of the path
  2470. `GUILE_LOAD_PATH' and `GUILE_LOAD_COMPILED_PATH' can now be used to add
  2471. directories to both ends of the load path. If the special path
  2472. component `...' (ellipsis) is present in these environment variables,
  2473. then the default path is put in place of the ellipsis, otherwise the
  2474. default path is placed at the end. See "Environment Variables" in the
  2475. manual for details.
  2476. ** `load-in-vicinity' search for `.go' files in `%load-compiled-path'
  2477. Previously, `load-in-vicinity' would look for compiled files in the
  2478. auto-compilation cache, but not in `%load-compiled-path'. This is now
  2479. fixed. This affects `load', and the `-l' command-line flag. See
  2480. <http://bugs.gnu.org/12519> for details.
  2481. ** Extension search order fixed, and LD_LIBRARY_PATH preserved
  2482. Up to 2.0.6, Guile would modify the `LD_LIBRARY_PATH' environment
  2483. variable (or whichever is relevant for the host OS) to insert its own
  2484. default extension directories in the search path (using GNU libltdl
  2485. facilities was not possible here.) This approach was problematic in two
  2486. ways.
  2487. First, the `LD_LIBRARY_PATH' modification would be visible to
  2488. sub-processes, and would also affect future calls to `dlopen', which
  2489. could lead to subtle bugs in the application or sub-processes. Second,
  2490. when the installation prefix is /usr, the `LD_LIBRARY_PATH' modification
  2491. would typically end up inserting /usr/lib before /usr/local/lib in the
  2492. search path, which is often the opposite of system-wide settings such as
  2493. `ld.so.conf'.
  2494. Both issues have now been fixed.
  2495. ** `make-vtable-vtable' is now deprecated
  2496. Programs should instead use `make-vtable' and `<standard-vtable>'.
  2497. ** The `-Wduplicate-case-datum' and `-Wbad-case-datum' are enabled
  2498. These recently introduced warnings have been documented and are now
  2499. enabled by default when auto-compiling.
  2500. ** Optimize calls to `equal?' or `eqv?' with a constant argument
  2501. The compiler simplifies calls to `equal?' or `eqv?' with a constant
  2502. argument to use `eq?' instead, when applicable.
  2503. * Manual updates
  2504. ** SRFI-9 records now documented under "Compound Data Types"
  2505. The documentation of SRFI-9 record types has been moved in the "Compound
  2506. Data Types", next to Guile's other record APIs. A new section
  2507. introduces the various record APIs, and describes the trade-offs they
  2508. make. These changes were made in an attempt to better guide users
  2509. through the maze of records API, and to recommend SRFI-9 as the main
  2510. API.
  2511. The documentation of Guile's raw `struct' API has also been improved.
  2512. ** (ice-9 and-let-star) and (ice-9 curried-definitions) now documented
  2513. These modules were missing from the manual.
  2514. * New interfaces
  2515. ** New "functional record setters" as a GNU extension of SRFI-9
  2516. The (srfi srfi-9 gnu) module now provides three new macros to deal with
  2517. "updates" of immutable records: `define-immutable-record-type',
  2518. `set-field', and `set-fields'.
  2519. The first one allows record type "functional setters" to be defined;
  2520. such setters keep the record unchanged, and instead return a new record
  2521. with only one different field. The remaining macros provide the same
  2522. functionality, and also optimize updates of multiple or nested fields.
  2523. See the manual for details.
  2524. ** web: New `http-get*', `response-body-port', and `text-content-type?'
  2525. procedures
  2526. These procedures return a port from which to read the response's body.
  2527. Unlike `http-get' and `read-response-body', they allow the body to be
  2528. processed incrementally instead of being stored entirely in memory.
  2529. The `text-content-type?' predicate allows users to determine whether the
  2530. content type of a response is textual.
  2531. See the manual for details.
  2532. ** `string-split' accepts character sets and predicates
  2533. The `string-split' procedure can now be given a SRFI-14 character set or
  2534. a predicate, instead of just a character.
  2535. ** R6RS SRFI support
  2536. Previously, in R6RS modules, Guile incorrectly ignored components of
  2537. SRFI module names after the SRFI number, making it impossible to specify
  2538. sub-libraries. This release corrects this, bringing us into accordance
  2539. with SRFI 97.
  2540. ** `define-public' is no a longer curried definition by default
  2541. The (ice-9 curried-definitions) should be used for such uses. See the
  2542. manual for details.
  2543. * Build fixes
  2544. ** Remove reference to `scm_init_popen' when `fork' is unavailable
  2545. This fixes a MinGW build issue (http://bugs.gnu.org/12477).
  2546. ** Fix race between installing `guild' and the `guile-tools' symlink
  2547. * Bug fixes
  2548. ** Procedures returned by `eval' now have docstrings
  2549. (http://bugs.gnu.org/12173)
  2550. ** web client: correctly handle uri-query, etc. in relative URI headers
  2551. (http://bugs.gnu.org/12827)
  2552. ** Fix docs for R6RS `hashtable-copy'
  2553. ** R6RS `string-for-each' now accepts multiple string arguments
  2554. ** Fix out-of-range error in the compiler's CSE pass
  2555. (http://bugs.gnu.org/12883)
  2556. ** Add missing R6RS `open-file-input/output-port' procedure
  2557. ** Futures: Avoid creating the worker pool more than once
  2558. ** Fix invalid assertion about mutex ownership in threads.c
  2559. (http://bugs.gnu.org/12719)
  2560. ** Have `SCM_NUM2FLOAT' and `SCM_NUM2DOUBLE' use `scm_to_double'
  2561. ** The `scandir' procedure now uses `lstat' instead of `stat'
  2562. ** Fix `generalized-vector->list' indexing bug with shared arrays
  2563. (http://bugs.gnu.org/12465)
  2564. ** web: Change `http-get' to try all the addresses for the given URI
  2565. ** Implement `hash' for structs
  2566. (http://lists.gnu.org/archive/html/guile-devel/2012-10/msg00031.html)
  2567. ** `read' now adds source properties for data types beyond pairs
  2568. ** Improve error reporting in `append!'
  2569. ** In fold-matches, set regexp/notbol unless matching string start
  2570. ** Don't stat(2) and access(2) the .go location before using it
  2571. ** SRFI-19: use zero padding for hours in ISO 8601 format, not blanks
  2572. ** web: Fix uri-encoding for strings with no unreserved chars, and octets 0-15
  2573. ** More robust texinfo alias handling
  2574. ** Optimize `format' and `simple-format'
  2575. (http://bugs.gnu.org/12033)
  2576. ** Angle of -0.0 is pi, not zero
  2577. Changes in 2.0.6 (since 2.0.5):
  2578. * Notable changes
  2579. ** New optimization pass: common subexpression elimination (CSE)
  2580. Guile's optimizer will now run a CSE pass after partial evaluation.
  2581. This pass propagates static information about branches taken, bound
  2582. lexicals, and effects from an expression's dominators. It can replace
  2583. common subexpressions with their boolean values (potentially enabling
  2584. dead code elimination), equivalent bound lexicals, or it can elide them
  2585. entirely, depending on the context in which they are executed. This
  2586. pass is especially useful in removing duplicate type checks, such as
  2587. those produced by SRFI-9 record accessors.
  2588. ** Improvements to the partial evaluator
  2589. Peval can now hoist tests that are common to both branches of a
  2590. conditional into the test. This can help with long chains of
  2591. conditionals, such as those generated by the `match' macro. Peval can
  2592. now do simple beta-reductions of procedures with rest arguments. It
  2593. also avoids residualizing degenerate lexical aliases, even when full
  2594. inlining is not possible. Finally, peval now uses the effects analysis
  2595. introduced for the CSE pass. More precise effects analysis allows peval
  2596. to move more code.
  2597. ** Run finalizers asynchronously in asyncs
  2598. Finalizers are now run asynchronously, via an async. See Asyncs in the
  2599. manual. This allows Guile and user code to safely allocate memory while
  2600. holding a mutex.
  2601. ** Update SRFI-14 character sets to Unicode 6.1
  2602. Note that this update causes the Latin-1 characters `§' and `¶' to be
  2603. reclassified as punctuation. They were previously considered to be part
  2604. of `char-set:symbol'.
  2605. ** Better source information for datums
  2606. When the `positions' reader option is on, as it is by default, Guile's
  2607. reader will record source information for more kinds of datums.
  2608. ** Improved error and warning messages
  2609. `syntax-violation' errors now prefer `subform' for source info, with
  2610. `form' as fallback. Syntactic errors in `cond' and `case' now produce
  2611. better errors. `case' can now warn on duplicate datums, or datums that
  2612. cannot be usefully compared with `eqv?'. `-Warity-mismatch' now handles
  2613. applicable structs. `-Wformat' is more robust in the presence of
  2614. `gettext'. Finally, various exceptions thrown by the Web modules now
  2615. define appropriate exception printers.
  2616. ** A few important bug fixes in the HTTP modules.
  2617. Guile's web server framework now checks if an application returns a body
  2618. where it is not permitted, for example in response to a HEAD request,
  2619. and warn or truncate the response as appropriate. Bad requests now
  2620. cause a 400 Bad Request response to be printed before closing the port.
  2621. Finally, some date-printing and URL-parsing bugs were fixed.
  2622. ** Pretty-print improvements
  2623. When Guile needs to pretty-print Tree-IL, it will try to reconstruct
  2624. `cond', `or`, and other derived syntax forms from the primitive tree-IL
  2625. forms. It also uses the original names instead of the fresh unique
  2626. names, when it is unambiguous to do so. This can be seen in the output
  2627. of REPL commands like `,optimize'.
  2628. Also, the `pretty-print' procedure has a new keyword argument,
  2629. `#:max-expr-width'.
  2630. ** Fix memory leak involving applicable SMOBs
  2631. At some point in the 1.9.x series, Guile began leaking any applicable
  2632. SMOB that was actually applied. (There was a weak-key map from SMOB to
  2633. trampoline functions, where the value had a strong reference on the
  2634. key.) This has been fixed. There was much rejoicing!
  2635. ** Support for HTTP/1.1 chunked transfer coding
  2636. See "Transfer Codings" in the manual, for more.
  2637. ** Micro-optimizations
  2638. A pile of micro-optimizations: the `string-trim' function when called
  2639. with `char-set:whitespace'; the `(web http)' parsers; SMOB application;
  2640. conversion of raw UTF-8 and UTF-32 data to and from SCM strings; vlists
  2641. and vhashes; `read' when processing string literals.
  2642. ** Incompatible change to `scandir'
  2643. As was the original intention, `scandir' now runs the `select?'
  2644. procedure on all items, including subdirectories and the `.' and `..'
  2645. entries. It receives the basename of the file in question instead of
  2646. the full name. We apologize for this incompatible change to this
  2647. function introduced in the 2.0.4 release.
  2648. * Manual updates
  2649. The manual has been made much more consistent in its naming conventions
  2650. with regards to formal parameters of functions. Thanks to Bake Timmons.
  2651. * New interfaces
  2652. ** New C function: `scm_to_pointer'
  2653. ** New C inline functions: `scm_new_smob', `scm_new_double_smob'
  2654. ** (ice-9 format): Add ~h specifier for localized number output.
  2655. ** (web response): New procedure: `response-must-not-include-body?'
  2656. ** New predicate: 'supports-source-properties?'
  2657. ** New C helpers: `scm_c_values', `scm_c_nvalues'
  2658. ** Newly public inline C function: `scm_unget_byte'
  2659. ** (language tree-il): New functions: `tree-il=?', `tree-il-hash'
  2660. ** New fluid: `%default-port-conversion-strategy'
  2661. ** New syntax: `=>' within `case'
  2662. ** (web http): `make-chunked-input-port', `make-chunked-output-port'
  2663. ** (web http): `declare-opaque-header!'
  2664. Search the manual for these identifiers, for more information.
  2665. * New deprecations
  2666. ** `close-io-port' deprecated
  2667. Use `close-port'.
  2668. ** `scm_sym2var' deprecated
  2669. In most cases, replace with `scm_lookup' or `scm_module_variable'. Use
  2670. `scm_define' or `scm_module_ensure_local_variable' if the second
  2671. argument is nonzero. See "Accessing Modules from C" in the manual, for
  2672. full details.
  2673. ** Lookup closures deprecated
  2674. These were never documented. See "Module System Reflection" in the
  2675. manual for replacements.
  2676. * Build fixes
  2677. ** Fix compilation against uninstalled Guile on non-GNU platforms.
  2678. ** Fix `SCM_I_ERROR' definition for MinGW without networking.
  2679. ** Fix compilation with the Sun C compiler.
  2680. ** Fix check for `clock_gettime' on OpenBSD and some other systems.
  2681. ** Fix build with --enable-debug-malloc.
  2682. ** Honor $(program_transform_name) for the `guile-tools' symlink.
  2683. ** Fix cross-compilation of GOOPS-using code.
  2684. * Bug fixes
  2685. ** Fix use of unitialized stat buffer in search-path of absolute paths.
  2686. ** Avoid calling `freelocale' with a NULL argument.
  2687. ** Work around erroneous tr_TR locale in Darwin 8 in tests.
  2688. ** Fix `getaddrinfo' test for Darwin 8.
  2689. ** Use Gnulib's `regex' module for better regex portability.
  2690. ** `source-properties' and friends work on any object
  2691. ** Rewrite open-process in C, for robustness related to threads and fork
  2692. ** Fix <TAG>vector-length when applied to other uniform vector types
  2693. ** Fix escape-only prompt optimization (was disabled previously)
  2694. ** Fix a segfault when /dev/urandom is not accessible
  2695. ** Fix flush on soft ports, so that it actually runs.
  2696. ** Better compatibility of SRFI-9 records with core records
  2697. ** Fix and clarify documentation of `sorted?'.
  2698. ** Fix IEEE-754 endianness conversion in bytevectors.
  2699. ** Correct thunk check in the `wind' instruction.
  2700. ** Add @acronym support to texinfo modules
  2701. ** Fix docbook->texi for <ulink> without URL
  2702. ** Fix `setvbuf' to leave the line/column number unchanged.
  2703. ** Add missing public declaration for `scm_take_from_input_buffers'.
  2704. ** Fix relative file name canonicalization with empty %LOAD-PATH entries.
  2705. ** Import newer (ice-9 match) from Chibi-Scheme.
  2706. ** Fix unbound variables and unbound values in ECMAScript runtime.
  2707. ** Make SRFI-6 string ports Unicode-capable.
  2708. Changes in 2.0.5 (since 2.0.4):
  2709. This release fixes the binary interface information (SONAME) of
  2710. libguile, which was incorrect in 2.0.4. It does not contain other
  2711. changes.
  2712. Changes in 2.0.4 (since 2.0.3):
  2713. * Notable changes
  2714. ** Better debuggability for interpreted procedures.
  2715. Guile 2.0 came with a great debugging experience for compiled
  2716. procedures, but the story for interpreted procedures was terrible. Now,
  2717. at least, interpreted procedures have names, and the `arity' procedure
  2718. property is always correct (or, as correct as it can be, in the presence
  2719. of `case-lambda').
  2720. ** Support for cross-compilation.
  2721. One can now use a native Guile to cross-compile `.go' files for a
  2722. different architecture. See the documentation for `--target' in the
  2723. "Compilation" section of the manual, for information on how to use the
  2724. cross-compiler. See the "Cross building Guile" section of the README,
  2725. for more on how to cross-compile Guile itself.
  2726. ** The return of `local-eval'.
  2727. Back by popular demand, `the-environment' and `local-eval' allow the
  2728. user to capture a lexical environment, and then evaluate arbitrary
  2729. expressions in that context. There is also a new `local-compile'
  2730. command. See "Local Evaluation" in the manual, for more. Special
  2731. thanks to Mark Weaver for an initial implementation of this feature.
  2732. ** Fluids can now have default values.
  2733. Fluids are used for dynamic and thread-local binding. They have always
  2734. inherited their values from the context or thread that created them.
  2735. However, there was a case in which a new thread would enter Guile, and
  2736. the default values of all the fluids would be `#f' for that thread.
  2737. This has now been fixed so that `make-fluid' has an optional default
  2738. value for fluids in unrelated dynamic roots, which defaults to `#f'.
  2739. ** Garbage collector tuning.
  2740. The garbage collector has now been tuned to run more often under some
  2741. circumstances.
  2742. *** Unmanaged allocation
  2743. The new `scm_gc_register_allocation' function will notify the collector
  2744. of unmanaged allocation. This will cause the collector to run sooner.
  2745. Guile's `scm_malloc', `scm_calloc', and `scm_realloc' unmanaged
  2746. allocators eventually call this function. This leads to better
  2747. performance under steady-state unmanaged allocation.
  2748. *** Transient allocation
  2749. When the collector runs, it will try to record the total memory
  2750. footprint of a process, if the platform supports this information. If
  2751. the memory footprint is growing, the collector will run more frequently.
  2752. This reduces the increase of the resident size of a process in response
  2753. to a transient increase in allocation.
  2754. *** Management of threads, bignums
  2755. Creating a thread will allocate a fair amount of memory. Guile now does
  2756. some GC work (using `GC_collect_a_little') when allocating a thread.
  2757. This leads to a better memory footprint when creating many short-lived
  2758. threads.
  2759. Similarly, bignums can occupy a lot of memory. Guile now offers hooks
  2760. to enable custom GMP allocators that end up calling
  2761. `scm_gc_register_allocation'. These allocators are enabled by default
  2762. when running Guile from the command-line. To enable them in libraries,
  2763. set the `scm_install_gmp_memory_functions' variable to a nonzero value
  2764. before loading Guile.
  2765. ** SRFI-39 parameters are available by default.
  2766. Guile now includes support for parameters, as defined by SRFI-39, in the
  2767. default environment. See "Parameters" in the manual, for more
  2768. information. `current-input-port', `current-output-port', and
  2769. `current-error-port' are now parameters.
  2770. ** Add `current-warning-port'.
  2771. Guile now outputs warnings on a separate port, `current-warning-port',
  2772. initialized to the value that `current-error-port' has on startup.
  2773. ** Syntax parameters.
  2774. Following Racket's lead, Guile now supports syntax parameters. See
  2775. "Syntax parameters" in the manual, for more.
  2776. Also see Barzilay, Culpepper, and Flatt's 2011 SFP workshop paper,
  2777. "Keeping it Clean with syntax-parameterize".
  2778. ** Parse command-line arguments from the locale encoding.
  2779. Guile now attempts to parse command-line arguments using the user's
  2780. locale. However for backwards compatibility with other 2.0.x releases,
  2781. it does so without actually calling `setlocale'. Please report any bugs
  2782. in this facility to bug-guile@gnu.org.
  2783. ** One-armed conditionals: `when' and `unless'
  2784. Guile finally has `when' and `unless' in the default environment. Use
  2785. them whenever you would use an `if' with only one branch. See
  2786. "Conditionals" in the manual, for more.
  2787. ** `current-filename', `add-to-load-path'
  2788. There is a new form, `(current-filename)', which expands out to the
  2789. source file in which it occurs. Combined with the new
  2790. `add-to-load-path', this allows simple scripts to easily add nearby
  2791. directories to the load path. See "Load Paths" in the manual, for more.
  2792. ** `random-state-from-platform'
  2793. This procedure initializes a random seed using good random sources
  2794. available on your platform, such as /dev/urandom. See "Random Number
  2795. Generation" in the manual, for more.
  2796. ** Warn about unsupported `simple-format' options.
  2797. The `-Wformat' compilation option now reports unsupported format options
  2798. passed to `simple-format'.
  2799. ** Manual updates
  2800. Besides the sections already mentioned, the following manual sections
  2801. are new in this release: "Modules and the File System", "Module System
  2802. Reflection", "Syntax Transformer Helpers", and "Local Inclusion".
  2803. * New interfaces
  2804. ** (ice-9 session): `apropos-hook'
  2805. ** New print option: `escape-newlines', defaults to #t.
  2806. ** (ice-9 ftw): `file-system-fold', `file-system-tree', `scandir'
  2807. ** `scm_c_value_ref': access to multiple returned values from C
  2808. ** scm_call (a varargs version), scm_call_7, scm_call_8, scm_call_9
  2809. ** Some new syntax helpers in (system syntax)
  2810. Search the manual for these identifiers and modules, for more.
  2811. * Build fixes
  2812. ** FreeBSD build fixes.
  2813. ** OpenBSD compilation fixes.
  2814. ** Solaris 2.10 test suite fixes.
  2815. ** IA64 compilation fix.
  2816. ** MinGW build fixes.
  2817. ** Work around instruction reordering on SPARC and HPPA in the VM.
  2818. ** Gnulib updates: added `dirfd', `setenv' modules.
  2819. * Bug fixes
  2820. ** Add a deprecated alias for $expt.
  2821. ** Add an exception printer for `getaddrinfo-error'.
  2822. ** Add deprecated shim for `scm_display_error' with stack as first argument.
  2823. ** Add warnings for unsupported `simple-format' options.
  2824. ** Allow overlapping regions to be passed to `bytevector-copy!'.
  2825. ** Better function prologue disassembly
  2826. ** Compiler: fix miscompilation of (values foo ...) in some contexts.
  2827. ** Compiler: fix serialization of #nil-terminated lists.
  2828. ** Compiler: allow values bound in non-tail let expressions to be collected.
  2829. ** Deprecate SCM_ASRTGO.
  2830. ** Document invalidity of (begin) as expression; add back-compat shim.
  2831. ** Don't leak file descriptors when mmaping objcode.
  2832. ** Empty substrings no longer reference the original stringbuf.
  2833. ** FFI: Fix `set-pointer-finalizer!' to leave the type cell unchanged.
  2834. ** FFI: Hold a weak reference to the CIF made by `procedure->pointer'.
  2835. ** FFI: Hold a weak reference to the procedure passed to `procedure->pointer'.
  2836. ** FFI: Properly unpack small integer return values in closure call.
  2837. ** Fix R6RS `fold-left' so the accumulator is the first argument.
  2838. ** Fix bit-set*! bug from 2005.
  2839. ** Fix bug in `make-repl' when `lang' is actually a <language>.
  2840. ** Fix bugs related to mutation, the null string, and shared substrings.
  2841. ** Fix <dynwind> serialization.
  2842. ** Fix erroneous check in `set-procedure-properties!'.
  2843. ** Fix generalized-vector-{ref,set!} for slices.
  2844. ** Fix error messages involving definition forms.
  2845. ** Fix primitive-eval to return #<unspecified> for definitions.
  2846. ** HTTP: Extend handling of "Cache-Control" header.
  2847. ** HTTP: Fix qstring writing of cache-extension values
  2848. ** HTTP: Fix validators for various list-style headers.
  2849. ** HTTP: Permit non-date values for Expires header.
  2850. ** HTTP: `write-request-line' writes absolute paths, not absolute URIs.
  2851. ** Hack the port-column of current-output-port after printing a prompt.
  2852. ** Make sure `regexp-quote' tests use Unicode-capable string ports.
  2853. ** Peval: Fix bugs in the new optimizer.
  2854. ** Statistically unique marks and labels, for robust hygiene across sessions.
  2855. ** Web: Allow URIs with empty authorities, like "file:///etc/hosts".
  2856. ** `,language' at REPL sets the current-language fluid.
  2857. ** `primitive-load' returns the value(s) of the last expression.
  2858. ** `scm_from_stringn' always returns unique strings.
  2859. ** `scm_i_substring_copy' tries to narrow the substring.
  2860. ** i18n: Fix gc_malloc/free mismatch on non-GNU systems.
  2861. Changes in 2.0.3 (since 2.0.2):
  2862. * Speed improvements
  2863. ** Guile has a new optimizer, `peval'.
  2864. `Peval' is a partial evaluator that performs constant folding, dead code
  2865. elimination, copy propagation, and inlining. By default it runs on
  2866. every piece of code that Guile compiles, to fold computations that can
  2867. happen at compile-time, so they don't have to happen at runtime.
  2868. If we did our job right, the only impact you would see would be your
  2869. programs getting faster. But if you notice slowdowns or bloated code,
  2870. please send a mail to bug-guile@gnu.org with details.
  2871. Thanks to William R. Cook, Oscar Waddell, and Kent Dybvig for inspiring
  2872. peval and its implementation.
  2873. You can see what peval does on a given piece of code by running the new
  2874. `,optimize' REPL meta-command, and comparing it to the output of
  2875. `,expand'. See "Compile Commands" in the manual, for more.
  2876. ** Fewer calls to `stat'.
  2877. Guile now stats only the .go file and the .scm file when loading a fresh
  2878. compiled file.
  2879. * Notable changes
  2880. ** New module: `(web client)', a simple synchronous web client.
  2881. See "Web Client" in the manual, for more.
  2882. ** Users can now install compiled `.go' files.
  2883. See "Installing Site Packages" in the manual.
  2884. ** Remove Front-Cover and Back-Cover text from the manual.
  2885. The manual is still under the GNU Free Documentation License, but no
  2886. longer has any invariant sections.
  2887. ** More helpful `guild help'.
  2888. `guild' is Guile's multi-tool, for use in shell scripting. Now it has a
  2889. nicer interface for querying the set of existing commands, and getting
  2890. help on those commands. Try it out and see!
  2891. ** New macro: `define-syntax-rule'
  2892. `define-syntax-rule' is a shorthand to make a `syntax-rules' macro with
  2893. one clause. See "Syntax Rules" in the manual, for more.
  2894. ** The `,time' REPL meta-command now has more precision.
  2895. The output of this command now has microsecond precision, instead of
  2896. 10-millisecond precision.
  2897. ** `(ice-9 match)' can now match records.
  2898. See "Pattern Matching" in the manual, for more on matching records.
  2899. ** New module: `(language tree-il debug)'.
  2900. This module provides a tree-il verifier. This is useful for people that
  2901. generate tree-il, usually as part of a language compiler.
  2902. ** New functions: `scm_is_exact', `scm_is_inexact'.
  2903. These provide a nice C interface for Scheme's `exact?' and `inexact?',
  2904. respectively.
  2905. * Bugs fixed
  2906. See the git log (or the ChangeLog) for more details on these bugs.
  2907. ** Fix order of importing modules and resolving duplicates handlers.
  2908. ** Fix a number of bugs involving extended (merged) generics.
  2909. ** Fix invocation of merge-generics duplicate handler.
  2910. ** Fix write beyond array end in arrays.c.
  2911. ** Fix read beyond end of hashtable size array in hashtab.c.
  2912. ** (web http): Locale-independent parsing and serialization of dates.
  2913. ** Ensure presence of Host header in HTTP/1.1 requests.
  2914. ** Fix take-right and drop-right for improper lists.
  2915. ** Fix leak in get_current_locale().
  2916. ** Fix recursive define-inlinable expansions.
  2917. ** Check that srfi-1 procedure arguments are procedures.
  2918. ** Fix r6rs `map' for multiple returns.
  2919. ** Fix scm_tmpfile leak on POSIX platforms.
  2920. ** Fix a couple of leaks (objcode->bytecode, make-boot-program).
  2921. ** Fix guile-lib back-compatibility for module-stexi-documentation.
  2922. ** Fix --listen option to allow other ports.
  2923. ** Fix scm_to_latin1_stringn for substrings.
  2924. ** Fix compilation of untyped arrays of rank not 1.
  2925. ** Fix unparse-tree-il of <dynset>.
  2926. ** Fix reading of #||||#.
  2927. ** Fix segfault in GOOPS when class fields are redefined.
  2928. ** Prefer poll(2) over select(2) to allow file descriptors above FD_SETSIZE.
  2929. Changes in 2.0.2 (since 2.0.1):
  2930. * Notable changes
  2931. ** `guile-tools' renamed to `guild'
  2932. The new name is shorter. Its intended future use is for a CPAN-like
  2933. system for Guile wizards and journeyfolk to band together to share code;
  2934. hence the name. `guile-tools' is provided as a backward-compatible
  2935. symbolic link. See "Using Guile Tools" in the manual, for more.
  2936. ** New control operators: `shift' and `reset'
  2937. See "Shift and Reset" in the manual, for more information.
  2938. ** `while' as an expression
  2939. Previously the return value of `while' was unspecified. Now its
  2940. values are specified both in the case of normal termination, and via
  2941. termination by invoking `break', possibly with arguments. See "while
  2942. do" in the manual for more.
  2943. ** Disallow access to handles of weak hash tables
  2944. `hash-get-handle' and `hash-create-handle!' are no longer permitted to
  2945. be called on weak hash tables, because the fields in a weak handle could
  2946. be nulled out by the garbage collector at any time, but yet they are
  2947. otherwise indistinguishable from pairs. Use `hash-ref' and `hash-set!'
  2948. instead.
  2949. ** More precision for `get-internal-run-time', `get-internal-real-time'
  2950. On 64-bit systems which support POSIX clocks, Guile's internal timing
  2951. procedures offer nanosecond resolution instead of the 10-millisecond
  2952. resolution previously available. 32-bit systems now use 1-millisecond
  2953. timers.
  2954. ** Guile now measures time spent in GC
  2955. `gc-stats' now returns a meaningful value for `gc-time-taken'.
  2956. ** Add `gcprof'
  2957. The statprof profiler now exports a `gcprof' procedure, driven by the
  2958. `after-gc-hook', to see which parts of your program are causing GC. Let
  2959. us know if you find it useful.
  2960. ** `map', `for-each' and some others now implemented in Scheme
  2961. We would not mention this in NEWS, as it is not a user-visible change,
  2962. if it were not for one thing: `map' and `for-each' are no longer
  2963. primitive generics. Instead they are normal bindings, which can be
  2964. wrapped by normal generics. This fixes some modularity issues between
  2965. core `map', SRFI-1 `map', and GOOPS.
  2966. Also it's pretty cool that we can do this without a performance impact.
  2967. ** Add `scm_peek_byte_or_eof'.
  2968. This helper is like `scm_peek_char_or_eof', but for bytes instead of
  2969. full characters.
  2970. ** Implement #:stop-at-first-non-option option for getopt-long
  2971. See "getopt-long Reference" in the manual, for more information.
  2972. ** Improve R6RS conformance for conditions in the I/O libraries
  2973. The `(rnrs io simple)' module now raises the correct R6RS conditions in
  2974. error cases. `(rnrs io ports)' is also more correct now, though it is
  2975. still a work in progress.
  2976. ** All deprecated routines emit warnings
  2977. A few deprecated routines were lacking deprecation warnings. This has
  2978. been fixed now.
  2979. * Speed improvements
  2980. ** Constants in compiled code now share state better
  2981. Constants with shared state, like `("foo")' and `"foo"', now share state
  2982. as much as possible, in the entire compilation unit. This cuts compiled
  2983. `.go' file sizes in half, generally, and speeds startup.
  2984. ** VLists: optimize `vlist-fold-right', and add `vhash-fold-right'
  2985. These procedures are now twice as fast as they were.
  2986. ** UTF-8 ports to bypass `iconv' entirely
  2987. This reduces memory usage in a very common case.
  2988. ** Compiler speedups
  2989. The compiler is now about 40% faster. (Note that this is only the case
  2990. once the compiler is itself compiled, so the build still takes as long
  2991. as it did before.)
  2992. ** VM speed tuning
  2993. Some assertions that were mostly useful for sanity-checks on the
  2994. bytecode compiler are now off for both "regular" and "debug" engines.
  2995. This together with a fix to cache a TLS access and some other tweaks
  2996. improve the VM's performance by about 20%.
  2997. ** SRFI-1 list-set optimizations
  2998. lset-adjoin and lset-union now have fast paths for eq? sets.
  2999. ** `memq', `memv' optimizations
  3000. These procedures are now at least twice as fast than in 2.0.1.
  3001. * Deprecations
  3002. ** Deprecate scm_whash API
  3003. `scm_whash_get_handle', `SCM_WHASHFOUNDP', `SCM_WHASHREF',
  3004. `SCM_WHASHSET', `scm_whash_create_handle', `scm_whash_lookup', and
  3005. `scm_whash_insert' are now deprecated. Use the normal hash table API
  3006. instead.
  3007. ** Deprecate scm_struct_table
  3008. `SCM_STRUCT_TABLE_NAME', `SCM_SET_STRUCT_TABLE_NAME',
  3009. `SCM_STRUCT_TABLE_CLASS', `SCM_SET_STRUCT_TABLE_CLASS',
  3010. `scm_struct_table', and `scm_struct_create_handle' are now deprecated.
  3011. These routines formed part of the internals of the map between structs
  3012. and classes.
  3013. ** Deprecate scm_internal_dynamic_wind
  3014. The `scm_t_inner' type and `scm_internal_dynamic_wind' are deprecated,
  3015. as the `scm_dynwind' API is better, and this API encourages users to
  3016. stuff SCM values into pointers.
  3017. ** Deprecate scm_immutable_cell, scm_immutable_double_cell
  3018. These routines are deprecated, as the GC_STUBBORN API doesn't do
  3019. anything any more.
  3020. * Manual updates
  3021. Andreas Rottman kindly transcribed the missing parts of the `(rnrs io
  3022. ports)' documentation from the R6RS documentation. Thanks Andreas!
  3023. * Bugs fixed
  3024. ** Fix double-loading of script in -ds case
  3025. ** -x error message fix
  3026. ** iconveh-related cross-compilation fixes
  3027. ** Fix small integer return value packing on big endian machines.
  3028. ** Fix hash-set! in weak-value table from non-immediate to immediate
  3029. ** Fix call-with-input-file & relatives for multiple values
  3030. ** Fix `hash' for inf and nan
  3031. ** Fix libguile internal type errors caught by typing-strictness==2
  3032. ** Fix compile error in MinGW fstat socket detection
  3033. ** Fix generation of auto-compiled file names on MinGW
  3034. ** Fix multithreaded access to internal hash tables
  3035. ** Emit a 1-based line number in error messages
  3036. ** Fix define-module ordering
  3037. ** Fix several POSIX functions to use the locale encoding
  3038. ** Add type and range checks to the complex generalized vector accessors
  3039. ** Fix unaligned accesses for bytevectors of complex numbers
  3040. ** Fix '(a #{.} b)
  3041. ** Fix erroneous VM stack overflow for canceled threads
  3042. Changes in 2.0.1 (since 2.0.0):
  3043. * Notable changes
  3044. ** guile.m4 supports linking with rpath
  3045. The GUILE_FLAGS macro now sets GUILE_LIBS and GUILE_LTLIBS, which
  3046. include appropriate directives to the linker to include libguile-2.0.so
  3047. in the runtime library lookup path.
  3048. ** `begin' expands macros in its body before other expressions
  3049. This enables support for programs like the following:
  3050. (begin
  3051. (define even?
  3052. (lambda (x)
  3053. (or (= x 0) (odd? (- x 1)))))
  3054. (define-syntax odd?
  3055. (syntax-rules ()
  3056. ((odd? x) (not (even? x)))))
  3057. (even? 10))
  3058. ** REPL reader usability enhancements
  3059. The REPL now flushes input after a read error, which should prevent one
  3060. error from causing other errors. The REPL also now interprets comments
  3061. as whitespace.
  3062. ** REPL output has configurable width
  3063. The REPL now defaults to output with the current terminal's width, in
  3064. columns. See "Debug Commands" in the manual for more information on
  3065. the ,width command.
  3066. ** Better C access to the module system
  3067. Guile now has convenient C accessors to look up variables or values in
  3068. modules and their public interfaces. See `scm_c_public_ref' and friends
  3069. in "Accessing Modules from C" in the manual.
  3070. ** Added `scm_call_5', `scm_call_6'
  3071. See "Fly Evaluation" in the manual.
  3072. ** Added `scm_from_latin1_keyword', `scm_from_utf8_keyword'
  3073. See "Keyword Procedures" in the manual, for more. Note that
  3074. `scm_from_locale_keyword' should not be used when the name is a C string
  3075. constant.
  3076. ** R6RS unicode and string I/O work
  3077. Added efficient implementations of `get-string-n' and `get-string-n!'
  3078. for binary ports. Exported `current-input-port', `current-output-port'
  3079. and `current-error-port' from `(rnrs io ports)', and enhanced support
  3080. for transcoders.
  3081. ** Added `pointer->scm', `scm->pointer' to `(system foreign)'
  3082. These procedure are useful if one needs to pass and receive SCM values
  3083. to and from foreign functions. See "Foreign Variables" in the manual,
  3084. for more.
  3085. ** Added `heap-allocated-since-gc' to `(gc-stats)'
  3086. Also fixed the long-standing bug in the REPL `,stat' command.
  3087. ** Add `on-error' REPL option
  3088. This option controls what happens when an error occurs at the REPL, and
  3089. defaults to `debug', indicating that Guile should enter the debugger.
  3090. Other values include `report', which will simply print a backtrace
  3091. without entering the debugger. See "System Commands" in the manual.
  3092. ** Enforce immutability of string literals
  3093. Attempting to mutate a string literal now causes a runtime error.
  3094. ** Fix pthread redirection
  3095. Guile 2.0.0 shipped with headers that, if configured with pthread
  3096. support, would re-define `pthread_create', `pthread_join', and other API
  3097. to redirect to the BDW-GC wrappers, `GC_pthread_create', etc. This was
  3098. unintended, and not necessary: because threads must enter Guile with
  3099. `scm_with_guile', Guile can handle thread registration itself, without
  3100. needing to make the GC aware of all threads. This oversight has been
  3101. fixed.
  3102. ** `with-continuation-barrier' now unwinds on `quit'
  3103. A throw to `quit' in a continuation barrier will cause Guile to exit.
  3104. Before, it would do so before unwinding to the barrier, which would
  3105. prevent cleanup handlers from running. This has been fixed so that it
  3106. exits only after unwinding.
  3107. ** `string->pointer' and `pointer->string' have optional encoding arg
  3108. This allows users of the FFI to more easily deal in strings with
  3109. particular (non-locale) encodings, like "utf-8". See "Void Pointers and
  3110. Byte Access" in the manual, for more.
  3111. ** R6RS fixnum arithmetic optimizations
  3112. R6RS fixnum operations are are still slower than generic arithmetic,
  3113. however.
  3114. ** New procedure: `define-inlinable'
  3115. See "Inlinable Procedures" in the manual, for more.
  3116. ** New procedure: `exact-integer-sqrt'
  3117. See "Integer Operations" in the manual, for more.
  3118. ** "Extended read syntax" for symbols parses better
  3119. In #{foo}# symbols, backslashes are now treated as escapes, as the
  3120. symbol-printing code intended. Additionally, "\x" within #{foo}# is now
  3121. interpreted as starting an R6RS hex escape. This is backward compatible
  3122. because the symbol printer would never produce a "\x" before. The
  3123. printer also works better too.
  3124. ** Added `--fresh-auto-compile' option
  3125. This allows a user to invalidate the auto-compilation cache. It's
  3126. usually not needed. See "Compilation" in the manual, for a discussion.
  3127. * Manual updates
  3128. ** GOOPS documentation updates
  3129. ** New man page
  3130. Thanks to Mark Harig for improvements to guile.1.
  3131. ** SRFI-23 documented
  3132. The humble `error' SRFI now has an entry in the manual.
  3133. * New modules
  3134. ** `(ice-9 binary-ports)': "R6RS I/O Ports", in the manual
  3135. ** `(ice-9 eval-string)': "Fly Evaluation", in the manual
  3136. ** `(ice-9 command-line)', not documented yet
  3137. * Bugs fixed
  3138. ** Fixed `iconv_t' memory leak on close-port
  3139. ** Fixed some leaks with weak hash tables
  3140. ** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
  3141. ** `after-gc-hook' works again
  3142. ** `define-record-type' now allowed in nested contexts
  3143. ** `exact-integer-sqrt' now handles large integers correctly
  3144. ** Fixed C extension examples in manual
  3145. ** `vhash-delete' honors HASH argument
  3146. ** Make `locale-digit-grouping' more robust
  3147. ** Default exception printer robustness fixes
  3148. ** Fix presence of non-I CPPFLAGS in `guile-2.0.pc'
  3149. ** `read' updates line/column numbers when reading SCSH block comments
  3150. ** Fix imports of multiple custom interfaces of same module
  3151. ** Fix encoding scanning for non-seekable ports
  3152. ** Fix `setter' when called with a non-setter generic
  3153. ** Fix f32 and f64 bytevectors to not accept rationals
  3154. ** Fix description of the R6RS `finite?' in manual
  3155. ** Quotient, remainder and modulo accept inexact integers again
  3156. ** Fix `continue' within `while' to take zero arguments
  3157. ** Fix alignment for structures in FFI
  3158. ** Fix port-filename of stdin, stdout, stderr to match the docs
  3159. ** Fix weak hash table-related bug in `define-wrapped-pointer-type'
  3160. ** Fix partial continuation application with pending procedure calls
  3161. ** scm_{to,from}_locale_string use current locale, not current ports
  3162. ** Fix thread cleanup, by using a pthread_key destructor
  3163. ** Fix `quit' at the REPL
  3164. ** Fix a failure to sync regs in vm bytevector ops
  3165. ** Fix (texinfo reflection) to handle nested structures like syntax patterns
  3166. ** Fix stexi->html double translation
  3167. ** Fix tree-il->scheme fix for <prompt>
  3168. ** Fix compilation of <prompt> in <fix> in single-value context
  3169. ** Fix race condition in ensure-writable-dir
  3170. ** Fix error message on ,disassemble "non-procedure"
  3171. ** Fix prompt and abort with the boot evaluator
  3172. ** Fix `procedure->pointer' for functions returning `void'
  3173. ** Fix error reporting in dynamic-pointer
  3174. ** Fix problems detecting coding: in block comments
  3175. ** Fix duplicate load-path and load-compiled-path in compilation environment
  3176. ** Add fallback read(2) suppport for .go files if mmap(2) unavailable
  3177. ** Fix c32vector-set!, c64vector-set!
  3178. ** Fix mistakenly deprecated read syntax for uniform complex vectors
  3179. ** Fix parsing of exact numbers with negative exponents
  3180. ** Ignore SIGPIPE in (system repl server)
  3181. ** Fix optional second arg to R6RS log function
  3182. ** Fix R6RS `assert' to return true value.
  3183. ** Fix fencepost error when seeking in bytevector input ports
  3184. ** Gracefully handle `setlocale' errors when starting the REPL
  3185. ** Improve support of the `--disable-posix' configure option
  3186. ** Make sure R6RS binary ports pass `binary-port?' regardless of the locale
  3187. ** Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'
  3188. Changes in 2.0.0 (changes since the 1.8.x series):
  3189. * New modules (see the manual for details)
  3190. ** `(srfi srfi-18)', more sophisticated multithreading support
  3191. ** `(srfi srfi-27)', sources of random bits
  3192. ** `(srfi srfi-38)', External Representation for Data With Shared Structure
  3193. ** `(srfi srfi-42)', eager comprehensions
  3194. ** `(srfi srfi-45)', primitives for expressing iterative lazy algorithms
  3195. ** `(srfi srfi-67)', compare procedures
  3196. ** `(ice-9 i18n)', internationalization support
  3197. ** `(ice-9 futures)', fine-grain parallelism
  3198. ** `(rnrs bytevectors)', the R6RS bytevector API
  3199. ** `(rnrs io ports)', a subset of the R6RS I/O port API
  3200. ** `(system xref)', a cross-referencing facility (FIXME undocumented)
  3201. ** `(ice-9 vlist)', lists with constant-time random access; hash lists
  3202. ** `(system foreign)', foreign function interface
  3203. ** `(sxml match)', a pattern matcher for SXML
  3204. ** `(srfi srfi-9 gnu)', extensions to the SRFI-9 record library
  3205. ** `(system vm coverage)', a line-by-line code coverage library
  3206. ** `(web uri)', URI data type, parser, and unparser
  3207. ** `(web http)', HTTP header parsers and unparsers
  3208. ** `(web request)', HTTP request data type, reader, and writer
  3209. ** `(web response)', HTTP response data type, reader, and writer
  3210. ** `(web server)', Generic HTTP server
  3211. ** `(ice-9 poll)', a poll wrapper
  3212. ** `(web server http)', HTTP-over-TCP web server implementation
  3213. ** Replaced `(ice-9 match)' with Alex Shinn's compatible, hygienic matcher.
  3214. Guile's copy of Andrew K. Wright's `match' library has been replaced by
  3215. a compatible hygienic implementation by Alex Shinn. It is now
  3216. documented, see "Pattern Matching" in the manual.
  3217. Compared to Andrew K. Wright's `match', the new `match' lacks
  3218. `match-define', `match:error-control', `match:set-error-control',
  3219. `match:error', `match:set-error', and all structure-related procedures.
  3220. ** Imported statprof, SSAX, and texinfo modules from Guile-Lib
  3221. The statprof statistical profiler, the SSAX XML toolkit, and the texinfo
  3222. toolkit from Guile-Lib have been imported into Guile proper. See
  3223. "Standard Library" in the manual for more details.
  3224. ** Integration of lalr-scm, a parser generator
  3225. Guile has included Dominique Boucher's fine `lalr-scm' parser generator
  3226. as `(system base lalr)'. See "LALR(1) Parsing" in the manual, for more
  3227. information.
  3228. * Changes to the stand-alone interpreter
  3229. ** Guile now can compile Scheme to bytecode for a custom virtual machine.
  3230. Compiled code loads much faster than Scheme source code, and runs around
  3231. 3 or 4 times as fast, generating much less garbage in the process.
  3232. ** Evaluating Scheme code does not use the C stack.
  3233. Besides when compiling Guile itself, Guile no longer uses a recursive C
  3234. function as an evaluator. This obviates the need to check the C stack
  3235. pointer for overflow. Continuations still capture the C stack, however.
  3236. ** New environment variables: GUILE_LOAD_COMPILED_PATH,
  3237. GUILE_SYSTEM_LOAD_COMPILED_PATH
  3238. GUILE_LOAD_COMPILED_PATH is for compiled files what GUILE_LOAD_PATH is
  3239. for source files. It is a different path, however, because compiled
  3240. files are architecture-specific. GUILE_SYSTEM_LOAD_COMPILED_PATH is like
  3241. GUILE_SYSTEM_PATH.
  3242. ** New read-eval-print loop (REPL) implementation
  3243. Running Guile with no arguments drops the user into the new REPL. See
  3244. "Using Guile Interactively" in the manual, for more information.
  3245. ** Remove old Emacs interface
  3246. Guile had an unused `--emacs' command line argument that was supposed to
  3247. help when running Guile inside Emacs. This option has been removed, and
  3248. the helper functions `named-module-use!' and `load-emacs-interface' have
  3249. been deprecated.
  3250. ** Add `(system repl server)' module and `--listen' command-line argument
  3251. The `(system repl server)' module exposes procedures to listen on
  3252. sockets for connections, and serve REPLs to those clients. The --listen
  3253. command-line argument allows any Guile program to thus be remotely
  3254. debuggable.
  3255. See "Invoking Guile" for more information on `--listen'.
  3256. ** Command line additions
  3257. The guile binary now supports a new switch "-x", which can be used to
  3258. extend the list of filename extensions tried when loading files
  3259. (%load-extensions).
  3260. ** New reader options: `square-brackets', `r6rs-hex-escapes',
  3261. `hungry-eol-escapes'
  3262. The reader supports a new option (changeable via `read-options'),
  3263. `square-brackets', which instructs it to interpret square brackets as
  3264. parentheses. This option is on by default.
  3265. When the new `r6rs-hex-escapes' reader option is enabled, the reader
  3266. will recognize string escape sequences as defined in R6RS. R6RS string
  3267. escape sequences are incompatible with Guile's existing escapes, though,
  3268. so this option is off by default.
  3269. Additionally, Guile follows the R6RS newline escaping rules when the
  3270. `hungry-eol-escapes' option is enabled.
  3271. See "String Syntax" in the manual, for more information.
  3272. ** Function profiling and tracing at the REPL
  3273. The `,profile FORM' REPL meta-command can now be used to statistically
  3274. profile execution of a form, to see which functions are taking the most
  3275. time. See `,help profile' for more information.
  3276. Similarly, `,trace FORM' traces all function applications that occur
  3277. during the execution of `FORM'. See `,help trace' for more information.
  3278. ** Recursive debugging REPL on error
  3279. When Guile sees an error at the REPL, instead of saving the stack, Guile
  3280. will directly enter a recursive REPL in the dynamic context of the
  3281. error. See "Error Handling" in the manual, for more information.
  3282. A recursive REPL is the same as any other REPL, except that it
  3283. has been augmented with debugging information, so that one can inspect
  3284. the context of the error. The debugger has been integrated with the REPL
  3285. via a set of debugging meta-commands.
  3286. For example, one may access a backtrace with `,backtrace' (or
  3287. `,bt'). See "Interactive Debugging" in the manual, for more
  3288. information.
  3289. ** New `guile-tools' commands: `compile', `disassemble'
  3290. Pass the `--help' command-line option to these commands for more
  3291. information.
  3292. ** Guile now adds its install prefix to the LTDL_LIBRARY_PATH
  3293. Users may now install Guile to nonstandard prefixes and just run
  3294. `/path/to/bin/guile', instead of also having to set LTDL_LIBRARY_PATH to
  3295. include `/path/to/lib'.
  3296. ** Guile's Emacs integration is now more keyboard-friendly
  3297. Backtraces may now be disclosed with the keyboard in addition to the
  3298. mouse.
  3299. ** Load path change: search in version-specific paths before site paths
  3300. When looking for a module, Guile now searches first in Guile's
  3301. version-specific path (the library path), *then* in the site dir. This
  3302. allows Guile's copy of SSAX to override any Guile-Lib copy the user has
  3303. installed. Also it should cut the number of `stat' system calls by half,
  3304. in the common case.
  3305. ** Value history in the REPL on by default
  3306. By default, the REPL will save computed values in variables like `$1',
  3307. `$2', and the like. There are programmatic and interactive interfaces to
  3308. control this. See "Value History" in the manual, for more information.
  3309. ** Readline tab completion for arguments
  3310. When readline is enabled, tab completion works for arguments too, not
  3311. just for the operator position.
  3312. ** Expression-oriented readline history
  3313. Guile's readline history now tries to operate on expressions instead of
  3314. input lines. Let us know what you think!
  3315. ** Interactive Guile follows GNU conventions
  3316. As recommended by the GPL, Guile now shows a brief copyright and
  3317. warranty disclaimer on startup, along with pointers to more information.
  3318. * Changes to Scheme functions and syntax
  3319. ** Support for R6RS libraries
  3320. The `library' and `import' forms from the latest Scheme report have been
  3321. added to Guile, in such a way that R6RS libraries share a namespace with
  3322. Guile modules. R6RS modules may import Guile modules, and are available
  3323. for Guile modules to import via use-modules and all the rest. See "R6RS
  3324. Libraries" in the manual for more information.
  3325. ** Implementations of R6RS libraries
  3326. Guile now has implementations for all of the libraries defined in the
  3327. R6RS. Thanks to Julian Graham for this excellent hack. See "R6RS
  3328. Standard Libraries" in the manual for a full list of libraries.
  3329. ** Partial R6RS compatibility
  3330. Guile now has enough support for R6RS to run a reasonably large subset
  3331. of R6RS programs.
  3332. Guile is not fully R6RS compatible. Many incompatibilities are simply
  3333. bugs, though some parts of Guile will remain R6RS-incompatible for the
  3334. foreseeable future. See "R6RS Incompatibilities" in the manual, for more
  3335. information.
  3336. Please contact bug-guile@gnu.org if you have found an issue not
  3337. mentioned in that compatibility list.
  3338. ** New implementation of `primitive-eval'
  3339. Guile's `primitive-eval' is now implemented in Scheme. Actually there is
  3340. still a C evaluator, used when building a fresh Guile to interpret the
  3341. compiler, so we can compile eval.scm. Thereafter all calls to
  3342. primitive-eval are implemented by VM-compiled code.
  3343. This allows all of Guile's procedures, be they interpreted or compiled,
  3344. to execute on the same stack, unifying multiple-value return semantics,
  3345. providing for proper tail recursion between interpreted and compiled
  3346. code, and simplifying debugging.
  3347. As part of this change, the evaluator no longer mutates the internal
  3348. representation of the code being evaluated in a thread-unsafe manner.
  3349. There are two negative aspects of this change, however. First, Guile
  3350. takes a lot longer to compile now. Also, there is less debugging
  3351. information available for debugging interpreted code. We hope to improve
  3352. both of these situations.
  3353. There are many changes to the internal C evalator interface, but all
  3354. public interfaces should be the same. See the ChangeLog for details. If
  3355. we have inadvertantly changed an interface that you were using, please
  3356. contact bug-guile@gnu.org.
  3357. ** Procedure removed: `the-environment'
  3358. This procedure was part of the interpreter's execution model, and does
  3359. not apply to the compiler.
  3360. ** No more `local-eval'
  3361. `local-eval' used to exist so that one could evaluate code in the
  3362. lexical context of a function. Since there is no way to get the lexical
  3363. environment any more, as that concept has no meaning for the compiler,
  3364. and a different meaning for the interpreter, we have removed the
  3365. function.
  3366. If you think you need `local-eval', you should probably implement your
  3367. own metacircular evaluator. It will probably be as fast as Guile's
  3368. anyway.
  3369. ** Scheme source files will now be compiled automatically.
  3370. If a compiled .go file corresponding to a .scm file is not found or is
  3371. not fresh, the .scm file will be compiled on the fly, and the resulting
  3372. .go file stored away. An advisory note will be printed on the console.
  3373. Note that this mechanism depends on the timestamp of the .go file being
  3374. newer than that of the .scm file; if the .scm or .go files are moved
  3375. after installation, care should be taken to preserve their original
  3376. timestamps.
  3377. Auto-compiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
  3378. directory, where $XDG_CACHE_HOME defaults to ~/.cache. This directory
  3379. will be created if needed.
  3380. To inhibit automatic compilation, set the GUILE_AUTO_COMPILE environment
  3381. variable to 0, or pass --no-auto-compile on the Guile command line.
  3382. ** New POSIX procedures: `getrlimit' and `setrlimit'
  3383. Note however that the interface of these functions is likely to change
  3384. in the next prerelease.
  3385. ** New POSIX procedure: `getsid'
  3386. Scheme binding for the `getsid' C library call.
  3387. ** New POSIX procedure: `getaddrinfo'
  3388. Scheme binding for the `getaddrinfo' C library function.
  3389. ** Multicast socket options
  3390. Support was added for the IP_MULTICAST_TTL and IP_MULTICAST_IF socket
  3391. options. See "Network Sockets and Communication" in the manual, for
  3392. more information.
  3393. ** `recv!', `recvfrom!', `send', `sendto' now deal in bytevectors
  3394. These socket procedures now take bytevectors as arguments, instead of
  3395. strings. There is some deprecated string support, however.
  3396. ** New GNU procedures: `setaffinity' and `getaffinity'.
  3397. See "Processes" in the manual, for more information.
  3398. ** New procedures: `compose', `negate', and `const'
  3399. See "Higher-Order Functions" in the manual, for more information.
  3400. ** New procedure in `(oops goops)': `method-formals'
  3401. ** New procedures in (ice-9 session): `add-value-help-handler!',
  3402. `remove-value-help-handler!', `add-name-help-handler!'
  3403. `remove-name-help-handler!', `procedure-arguments'
  3404. The value and name help handlers provide some minimal extensibility to
  3405. the help interface. Guile-lib's `(texinfo reflection)' uses them, for
  3406. example, to make stexinfo help documentation available. See those
  3407. procedures' docstrings for more information.
  3408. `procedure-arguments' describes the arguments that a procedure can take,
  3409. combining arity and formals. For example:
  3410. (procedure-arguments resolve-interface)
  3411. => ((required . (name)) (rest . args))
  3412. Additionally, `module-commentary' is now publically exported from
  3413. `(ice-9 session).
  3414. ** Removed: `procedure->memoizing-macro', `procedure->syntax'
  3415. These procedures created primitive fexprs for the old evaluator, and are
  3416. no longer supported. If you feel that you need these functions, you
  3417. probably need to write your own metacircular evaluator (which will
  3418. probably be as fast as Guile's, anyway).
  3419. ** New language: ECMAScript
  3420. Guile now ships with one other high-level language supported,
  3421. ECMAScript. The goal is to support all of version 3.1 of the standard,
  3422. but not all of the libraries are there yet. This support is not yet
  3423. documented; ask on the mailing list if you are interested.
  3424. ** New language: Brainfuck
  3425. Brainfuck is a toy language that closely models Turing machines. Guile's
  3426. brainfuck compiler is meant to be an example of implementing other
  3427. languages. See the manual for details, or
  3428. http://en.wikipedia.org/wiki/Brainfuck for more information about the
  3429. Brainfuck language itself.
  3430. ** New language: Elisp
  3431. Guile now has an experimental Emacs Lisp compiler and runtime. You can
  3432. now switch to Elisp at the repl: `,language elisp'. All kudos to Daniel
  3433. Kraft and Brian Templeton, and all bugs to bug-guile@gnu.org.
  3434. ** Better documentation infrastructure for macros
  3435. It is now possible to introspect on the type of a macro, e.g.
  3436. syntax-rules, identifier-syntax, etc, and extract information about that
  3437. macro, such as the syntax-rules patterns or the defmacro arguments.
  3438. `(texinfo reflection)' takes advantage of this to give better macro
  3439. documentation.
  3440. ** Support for arbitrary procedure metadata
  3441. Building on its support for docstrings, Guile now supports multiple
  3442. docstrings, adding them to the tail of a compiled procedure's
  3443. properties. For example:
  3444. (define (foo)
  3445. "one"
  3446. "two"
  3447. 3)
  3448. (procedure-properties foo)
  3449. => ((name . foo) (documentation . "one") (documentation . "two"))
  3450. Also, vectors of pairs are now treated as additional metadata entries:
  3451. (define (bar)
  3452. #((quz . #f) (docstring . "xyzzy"))
  3453. 3)
  3454. (procedure-properties bar)
  3455. => ((name . bar) (quz . #f) (docstring . "xyzzy"))
  3456. This allows arbitrary literals to be embedded as metadata in a compiled
  3457. procedure.
  3458. ** The psyntax expander now knows how to interpret the @ and @@ special
  3459. forms.
  3460. ** The psyntax expander is now hygienic with respect to modules.
  3461. Free variables in a macro are scoped in the module that the macro was
  3462. defined in, not in the module the macro is used in. For example, code
  3463. like this works now:
  3464. (define-module (foo) #:export (bar))
  3465. (define (helper x) ...)
  3466. (define-syntax bar
  3467. (syntax-rules () ((_ x) (helper x))))
  3468. (define-module (baz) #:use-module (foo))
  3469. (bar qux)
  3470. It used to be you had to export `helper' from `(foo)' as well.
  3471. Thankfully, this has been fixed.
  3472. ** Support for version information in Guile's `module' form
  3473. Guile modules now have a `#:version' field. See "R6RS Version
  3474. References", "General Information about Modules", "Using Guile Modules",
  3475. and "Creating Guile Modules" in the manual for more information.
  3476. ** Support for renaming bindings on module export
  3477. Wherever Guile accepts a symbol as an argument to specify a binding to
  3478. export, it now also accepts a pair of symbols, indicating that a binding
  3479. should be renamed on export. See "Creating Guile Modules" in the manual
  3480. for more information.
  3481. ** New procedure: `module-export-all!'
  3482. This procedure exports all current and future bindings from a module.
  3483. Use as `(module-export-all! (current-module))'.
  3484. ** New procedure `reload-module', and `,reload' REPL command
  3485. See "Module System Reflection" and "Module Commands" in the manual, for
  3486. more information.
  3487. ** `eval-case' has been deprecated, and replaced by `eval-when'.
  3488. The semantics of `eval-when' are easier to understand. See "Eval When"
  3489. in the manual, for more information.
  3490. ** Guile is now more strict about prohibiting definitions in expression
  3491. contexts.
  3492. Although previous versions of Guile accepted it, the following
  3493. expression is not valid, in R5RS or R6RS:
  3494. (if test (define foo 'bar) (define foo 'baz))
  3495. In this specific case, it would be better to do:
  3496. (define foo (if test 'bar 'baz))
  3497. It is possible to circumvent this restriction with e.g.
  3498. `(module-define! (current-module) 'foo 'baz)'. Contact the list if you
  3499. have any questions.
  3500. ** Support for `letrec*'
  3501. Guile now supports `letrec*', a recursive lexical binding operator in
  3502. which the identifiers are bound in order. See "Local Bindings" in the
  3503. manual, for more details.
  3504. ** Internal definitions now expand to `letrec*'
  3505. Following the R6RS, internal definitions now expand to letrec* instead
  3506. of letrec. The following program is invalid for R5RS, but valid for
  3507. R6RS:
  3508. (define (foo)
  3509. (define bar 10)
  3510. (define baz (+ bar 20))
  3511. baz)
  3512. ;; R5RS and Guile <= 1.8:
  3513. (foo) => Unbound variable: bar
  3514. ;; R6RS and Guile >= 2.0:
  3515. (foo) => 30
  3516. This change should not affect correct R5RS programs, or programs written
  3517. in earlier Guile dialects.
  3518. ** Macro expansion produces structures instead of s-expressions
  3519. In the olden days, macroexpanding an s-expression would yield another
  3520. s-expression. Though the lexical variables were renamed, expansions of
  3521. core forms like `if' and `begin' were still non-hygienic, as they relied
  3522. on the toplevel definitions of `if' et al being the conventional ones.
  3523. The solution is to expand to structures instead of s-expressions. There
  3524. is an `if' structure, a `begin' structure, a `toplevel-ref' structure,
  3525. etc. The expander already did this for compilation, producing Tree-IL
  3526. directly; it has been changed now to do so when expanding for the
  3527. evaluator as well.
  3528. ** Defmacros must now produce valid Scheme expressions.
  3529. It used to be that defmacros could unquote in Scheme values, as a way of
  3530. supporting partial evaluation, and avoiding some hygiene issues. For
  3531. example:
  3532. (define (helper x) ...)
  3533. (define-macro (foo bar)
  3534. `(,helper ,bar))
  3535. Assuming this macro is in the `(baz)' module, the direct translation of
  3536. this code would be:
  3537. (define (helper x) ...)
  3538. (define-macro (foo bar)
  3539. `((@@ (baz) helper) ,bar))
  3540. Of course, one could just use a hygienic macro instead:
  3541. (define-syntax foo
  3542. (syntax-rules ()
  3543. ((_ bar) (helper bar))))
  3544. ** Guile's psyntax now supports docstrings and internal definitions.
  3545. The following Scheme is not strictly legal:
  3546. (define (foo)
  3547. "bar"
  3548. (define (baz) ...)
  3549. (baz))
  3550. However its intent is fairly clear. Guile interprets "bar" to be the
  3551. docstring of `foo', and the definition of `baz' is still in definition
  3552. context.
  3553. ** Support for settable identifier syntax
  3554. Following the R6RS, "variable transformers" are settable
  3555. identifier-syntax. See "Identifier macros" in the manual, for more
  3556. information.
  3557. ** syntax-case treats `_' as a placeholder
  3558. Following R6RS, a `_' in a syntax-rules or syntax-case pattern matches
  3559. anything, and binds no pattern variables. Unlike the R6RS, Guile also
  3560. permits `_' to be in the literals list for a pattern.
  3561. ** Macros need to be defined before their first use.
  3562. It used to be that with lazy memoization, this might work:
  3563. (define (foo x)
  3564. (ref x))
  3565. (define-macro (ref x) x)
  3566. (foo 1) => 1
  3567. But now, the body of `foo' is interpreted to mean a call to the toplevel
  3568. `ref' function, instead of a macro expansion. The solution is to define
  3569. macros before code that uses them.
  3570. ** Functions needed by macros at expand-time need to be present at
  3571. expand-time.
  3572. For example, this code will work at the REPL:
  3573. (define (double-helper x) (* x x))
  3574. (define-macro (double-literal x) (double-helper x))
  3575. (double-literal 2) => 4
  3576. But it will not work when a file is compiled, because the definition of
  3577. `double-helper' is not present at expand-time. The solution is to wrap
  3578. the definition of `double-helper' in `eval-when':
  3579. (eval-when (load compile eval)
  3580. (define (double-helper x) (* x x)))
  3581. (define-macro (double-literal x) (double-helper x))
  3582. (double-literal 2) => 4
  3583. See the documentation for eval-when for more information.
  3584. ** `macroexpand' produces structures, not S-expressions.
  3585. Given the need to maintain referential transparency, both lexically and
  3586. modular, the result of expanding Scheme expressions is no longer itself
  3587. an s-expression. If you want a human-readable approximation of the
  3588. result of `macroexpand', call `tree-il->scheme' from `(language
  3589. tree-il)'.
  3590. ** Removed function: `macroexpand-1'
  3591. It is unclear how to implement `macroexpand-1' with syntax-case, though
  3592. PLT Scheme does prove that it is possible.
  3593. ** New reader macros: #' #` #, #,@
  3594. These macros translate, respectively, to `syntax', `quasisyntax',
  3595. `unsyntax', and `unsyntax-splicing'. See the R6RS for more information.
  3596. These reader macros may be overridden by `read-hash-extend'.
  3597. ** Incompatible change to #'
  3598. Guile did have a #' hash-extension, by default, which just returned the
  3599. subsequent datum: #'foo => foo. In the unlikely event that anyone
  3600. actually used this, this behavior may be reinstated via the
  3601. `read-hash-extend' mechanism.
  3602. ** `unquote' and `unquote-splicing' accept multiple expressions
  3603. As per the R6RS, these syntax operators can now accept any number of
  3604. expressions to unquote.
  3605. ** Scheme expresssions may be commented out with #;
  3606. #; comments out an entire expression. See SRFI-62 or the R6RS for more
  3607. information.
  3608. ** Prompts: Delimited, composable continuations
  3609. Guile now has prompts as part of its primitive language. See "Prompts"
  3610. in the manual, for more information.
  3611. Expressions entered in at the REPL, or from the command line, are
  3612. surrounded by a prompt with the default prompt tag.
  3613. ** `make-stack' with a tail-called procedural narrowing argument no longer
  3614. works (with compiled procedures)
  3615. It used to be the case that a captured stack could be narrowed to select
  3616. calls only up to or from a certain procedure, even if that procedure
  3617. already tail-called another procedure. This was because the debug
  3618. information from the original procedure was kept on the stack.
  3619. Now with the new compiler, the stack only contains active frames from
  3620. the current continuation. A narrow to a procedure that is not in the
  3621. stack will result in an empty stack. To fix this, narrow to a procedure
  3622. that is active in the current continuation, or narrow to a specific
  3623. number of stack frames.
  3624. ** Backtraces through compiled procedures only show procedures that are
  3625. active in the current continuation
  3626. Similarly to the previous issue, backtraces in compiled code may be
  3627. different from backtraces in interpreted code. There are no semantic
  3628. differences, however. Please mail bug-guile@gnu.org if you see any
  3629. deficiencies with Guile's backtraces.
  3630. ** `positions' reader option enabled by default
  3631. This change allows primitive-load without --auto-compile to also
  3632. propagate source information through the expander, for better errors and
  3633. to let macros know their source locations. The compiler was already
  3634. turning it on anyway.
  3635. ** New macro: `current-source-location'
  3636. The macro returns the current source location (to be documented).
  3637. ** syntax-rules and syntax-case macros now propagate source information
  3638. through to the expanded code
  3639. This should result in better backtraces.
  3640. ** The currying behavior of `define' has been removed.
  3641. Before, `(define ((f a) b) (* a b))' would translate to
  3642. (define f (lambda (a) (lambda (b) (* a b))))
  3643. Now a syntax error is signaled, as this syntax is not supported by
  3644. default. Use the `(ice-9 curried-definitions)' module to get back the
  3645. old behavior.
  3646. ** New procedure, `define!'
  3647. `define!' is a procedure that takes two arguments, a symbol and a value,
  3648. and binds the value to the symbol in the current module. It's useful to
  3649. programmatically make definitions in the current module, and is slightly
  3650. less verbose than `module-define!'.
  3651. ** All modules have names now
  3652. Before, you could have anonymous modules: modules without names. Now,
  3653. because of hygiene and macros, all modules have names. If a module was
  3654. created without a name, the first time `module-name' is called on it, a
  3655. fresh name will be lazily generated for it.
  3656. ** The module namespace is now separate from the value namespace
  3657. It was a little-known implementation detail of Guile's module system
  3658. that it was built on a single hierarchical namespace of values -- that
  3659. if there was a module named `(foo bar)', then in the module named
  3660. `(foo)' there was a binding from `bar' to the `(foo bar)' module.
  3661. This was a neat trick, but presented a number of problems. One problem
  3662. was that the bindings in a module were not apparent from the module
  3663. itself; perhaps the `(foo)' module had a private binding for `bar', and
  3664. then an external contributor defined `(foo bar)'. In the end there can
  3665. be only one binding, so one of the two will see the wrong thing, and
  3666. produce an obtuse error of unclear provenance.
  3667. Also, the public interface of a module was also bound in the value
  3668. namespace, as `%module-public-interface'. This was a hack from the early
  3669. days of Guile's modules.
  3670. Both of these warts have been fixed by the addition of fields in the
  3671. `module' data type. Access to modules and their interfaces from the
  3672. value namespace has been deprecated, and all accessors use the new
  3673. record accessors appropriately.
  3674. When Guile is built with support for deprecated code, as is the default,
  3675. the value namespace is still searched for modules and public interfaces,
  3676. and a deprecation warning is raised as appropriate.
  3677. Finally, to support lazy loading of modules as one used to be able to do
  3678. with module binder procedures, Guile now has submodule binders, called
  3679. if a given submodule is not found. See boot-9.scm for more information.
  3680. ** New procedures: module-ref-submodule, module-define-submodule,
  3681. nested-ref-module, nested-define-module!, local-ref-module,
  3682. local-define-module
  3683. These new accessors are like their bare variants, but operate on
  3684. namespaces instead of values.
  3685. ** The (app modules) module tree is officially deprecated
  3686. It used to be that one could access a module named `(foo bar)' via
  3687. `(nested-ref the-root-module '(app modules foo bar))'. The `(app
  3688. modules)' bit was a never-used and never-documented abstraction, and has
  3689. been deprecated. See the following mail for a full discussion:
  3690. http://lists.gnu.org/archive/html/guile-devel/2010-04/msg00168.html
  3691. The `%app' binding is also deprecated.
  3692. ** `module-filename' field and accessor
  3693. Modules now record the file in which they are defined. This field may be
  3694. accessed with the new `module-filename' procedure.
  3695. ** Modules load within a known environment
  3696. It takes a few procedure calls to define a module, and those procedure
  3697. calls need to be in scope. Now we ensure that the current module when
  3698. loading a module is one that has the needed bindings, instead of relying
  3699. on chance.
  3700. ** `load' is a macro (!) that resolves paths relative to source file dir
  3701. The familiar Schem `load' procedure is now a macro that captures the
  3702. name of the source file being expanded, and dispatches to the new
  3703. `load-in-vicinity'. Referencing `load' by bare name returns a closure
  3704. that embeds the current source file name.
  3705. This fix allows `load' of relative paths to be resolved with respect to
  3706. the location of the file that calls `load'.
  3707. ** Many syntax errors have different texts now
  3708. Syntax errors still throw to the `syntax-error' key, but the arguments
  3709. are often different now. Perhaps in the future, Guile will switch to
  3710. using standard SRFI-35 conditions.
  3711. ** Returning multiple values to compiled code will silently truncate the
  3712. values to the expected number
  3713. For example, the interpreter would raise an error evaluating the form,
  3714. `(+ (values 1 2) (values 3 4))', because it would see the operands as
  3715. being two compound "values" objects, to which `+' does not apply.
  3716. The compiler, on the other hand, receives multiple values on the stack,
  3717. not as a compound object. Given that it must check the number of values
  3718. anyway, if too many values are provided for a continuation, it chooses
  3719. to truncate those values, effectively evaluating `(+ 1 3)' instead.
  3720. The idea is that the semantics that the compiler implements is more
  3721. intuitive, and the use of the interpreter will fade out with time.
  3722. This behavior is allowed both by the R5RS and the R6RS.
  3723. ** Multiple values in compiled code are not represented by compound
  3724. objects
  3725. This change may manifest itself in the following situation:
  3726. (let ((val (foo))) (do-something) val)
  3727. In the interpreter, if `foo' returns multiple values, multiple values
  3728. are produced from the `let' expression. In the compiler, those values
  3729. are truncated to the first value, and that first value is returned. In
  3730. the compiler, if `foo' returns no values, an error will be raised, while
  3731. the interpreter would proceed.
  3732. Both of these behaviors are allowed by R5RS and R6RS. The compiler's
  3733. behavior is more correct, however. If you wish to preserve a potentially
  3734. multiply-valued return, you will need to set up a multiple-value
  3735. continuation, using `call-with-values'.
  3736. ** Defmacros are now implemented in terms of syntax-case.
  3737. The practical ramification of this is that the `defmacro?' predicate has
  3738. been removed, along with `defmacro-transformer', `macro-table',
  3739. `xformer-table', `assert-defmacro?!', `set-defmacro-transformer!' and
  3740. `defmacro:transformer'. This is because defmacros are simply macros. If
  3741. any of these procedures provided useful facilities to you, we encourage
  3742. you to contact the Guile developers.
  3743. ** Hygienic macros documented as the primary syntactic extension mechanism.
  3744. The macro documentation was finally fleshed out with some documentation
  3745. on `syntax-rules' and `syntax-case' macros, and other parts of the macro
  3746. expansion process. See "Macros" in the manual, for details.
  3747. ** psyntax is now the default expander
  3748. Scheme code is now expanded by default by the psyntax hygienic macro
  3749. expander. Expansion is performed completely before compilation or
  3750. interpretation.
  3751. Notably, syntax errors will be signalled before interpretation begins.
  3752. In the past, many syntax errors were only detected at runtime if the
  3753. code in question was memoized.
  3754. As part of its expansion, psyntax renames all lexically-bound
  3755. identifiers. Original identifier names are preserved and given to the
  3756. compiler, but the interpreter will see the renamed variables, e.g.,
  3757. `x432' instead of `x'.
  3758. Note that the psyntax that Guile uses is a fork, as Guile already had
  3759. modules before incompatible modules were added to psyntax -- about 10
  3760. years ago! Thus there are surely a number of bugs that have been fixed
  3761. in psyntax since then. If you find one, please notify bug-guile@gnu.org.
  3762. ** syntax-rules and syntax-case are available by default.
  3763. There is no longer any need to import the `(ice-9 syncase)' module
  3764. (which is now deprecated). The expander may be invoked directly via
  3765. `macroexpand', though it is normally searched for via the current module
  3766. transformer.
  3767. Also, the helper routines for syntax-case are available in the default
  3768. environment as well: `syntax->datum', `datum->syntax',
  3769. `bound-identifier=?', `free-identifier=?', `generate-temporaries',
  3770. `identifier?', and `syntax-violation'. See the R6RS for documentation.
  3771. ** Tail patterns in syntax-case
  3772. Guile has pulled in some more recent changes from the psyntax portable
  3773. syntax expander, to implement support for "tail patterns". Such patterns
  3774. are supported by syntax-rules and syntax-case. This allows a syntax-case
  3775. match clause to have ellipses, then a pattern at the end. For example:
  3776. (define-syntax case
  3777. (syntax-rules (else)
  3778. ((_ val match-clause ... (else e e* ...))
  3779. [...])))
  3780. Note how there is MATCH-CLAUSE, which is ellipsized, then there is a
  3781. tail pattern for the else clause. Thanks to Andreas Rottmann for the
  3782. patch, and Kent Dybvig for the code.
  3783. ** Lexical bindings introduced by hygienic macros may not be referenced
  3784. by nonhygienic macros.
  3785. If a lexical binding is introduced by a hygienic macro, it may not be
  3786. referenced by a nonhygienic macro. For example, this works:
  3787. (let ()
  3788. (define-macro (bind-x val body)
  3789. `(let ((x ,val)) ,body))
  3790. (define-macro (ref x)
  3791. x)
  3792. (bind-x 10 (ref x)))
  3793. But this does not:
  3794. (let ()
  3795. (define-syntax bind-x
  3796. (syntax-rules ()
  3797. ((_ val body) (let ((x val)) body))))
  3798. (define-macro (ref x)
  3799. x)
  3800. (bind-x 10 (ref x)))
  3801. It is not normal to run into this situation with existing code. However,
  3802. if you have defmacros that expand to hygienic macros, it is possible to
  3803. run into situations like this. For example, if you have a defmacro that
  3804. generates a `while' expression, the `break' bound by the `while' may not
  3805. be visible within other parts of your defmacro. The solution is to port
  3806. from defmacros to syntax-rules or syntax-case.
  3807. ** Macros may no longer be referenced as first-class values.
  3808. In the past, you could evaluate e.g. `if', and get its macro value. Now,
  3809. expanding this form raises a syntax error.
  3810. Macros still /exist/ as first-class values, but they must be
  3811. /referenced/ via the module system, e.g. `(module-ref (current-module)
  3812. 'if)'.
  3813. ** Macros may now have docstrings.
  3814. `object-documentation' from `(ice-9 documentation)' may be used to
  3815. retrieve the docstring, once you have a macro value -- but see the above
  3816. note about first-class macros. Docstrings are associated with the syntax
  3817. transformer procedures.
  3818. ** `case-lambda' is now available in the default environment.
  3819. The binding in the default environment is equivalent to the one from the
  3820. `(srfi srfi-16)' module. Use the srfi-16 module explicitly if you wish
  3821. to maintain compatibility with Guile 1.8 and earlier.
  3822. ** Procedures may now have more than one arity.
  3823. This can be the case, for example, in case-lambda procedures. The
  3824. arities of compiled procedures may be accessed via procedures from the
  3825. `(system vm program)' module; see "Compiled Procedures", "Optional
  3826. Arguments", and "Case-lambda" in the manual.
  3827. ** Deprecate arity access via (procedure-properties proc 'arity)
  3828. Instead of accessing a procedure's arity as a property, use the new
  3829. `procedure-minimum-arity' function, which gives the most permissive
  3830. arity that the function has, in the same format as the old arity
  3831. accessor.
  3832. ** `lambda*' and `define*' are now available in the default environment
  3833. As with `case-lambda', `(ice-9 optargs)' continues to be supported, for
  3834. compatibility purposes. No semantic change has been made (we hope).
  3835. Optional and keyword arguments now dispatch via special VM operations,
  3836. without the need to cons rest arguments, making them very fast.
  3837. ** New syntax: define-once
  3838. `define-once' is like Lisp's `defvar': it creates a toplevel binding,
  3839. but only if one does not exist already.
  3840. ** New function, `truncated-print', with `format' support
  3841. `(ice-9 pretty-print)' now exports `truncated-print', a printer that
  3842. will ensure that the output stays within a certain width, truncating the
  3843. output in what is hopefully an intelligent manner. See the manual for
  3844. more details.
  3845. There is a new `format' specifier, `~@y', for doing a truncated
  3846. print (as opposed to `~y', which does a pretty-print). See the `format'
  3847. documentation for more details.
  3848. ** Better pretty-printing
  3849. Indentation recognizes more special forms, like `syntax-case', and read
  3850. macros like `quote' are printed better.
  3851. ** Passing a number as the destination of `format' is deprecated
  3852. The `format' procedure in `(ice-9 format)' now emits a deprecation
  3853. warning if a number is passed as its first argument.
  3854. Also, it used to be that you could omit passing a port to `format', in
  3855. some cases. This still works, but has been formally deprecated.
  3856. ** SRFI-4 vectors reimplemented in terms of R6RS bytevectors
  3857. Guile now implements SRFI-4 vectors using bytevectors. Often when you
  3858. have a numeric vector, you end up wanting to write its bytes somewhere,
  3859. or have access to the underlying bytes, or read in bytes from somewhere
  3860. else. Bytevectors are very good at this sort of thing. But the SRFI-4
  3861. APIs are nicer to use when doing number-crunching, because they are
  3862. addressed by element and not by byte.
  3863. So as a compromise, Guile allows all bytevector functions to operate on
  3864. numeric vectors. They address the underlying bytes in the native
  3865. endianness, as one would expect.
  3866. Following the same reasoning, that it's just bytes underneath, Guile
  3867. also allows uniform vectors of a given type to be accessed as if they
  3868. were of any type. One can fill a u32vector, and access its elements with
  3869. u8vector-ref. One can use f64vector-ref on bytevectors. It's all the
  3870. same to Guile.
  3871. In this way, uniform numeric vectors may be written to and read from
  3872. input/output ports using the procedures that operate on bytevectors.
  3873. Calls to SRFI-4 accessors (ref and set functions) from Scheme are now
  3874. inlined to the VM instructions for bytevector access.
  3875. See "SRFI-4" in the manual, for more information.
  3876. ** Nonstandard SRFI-4 procedures now available from `(srfi srfi-4 gnu)'
  3877. Guile's `(srfi srfi-4)' now only exports those srfi-4 procedures that
  3878. are part of the standard. Complex uniform vectors and the
  3879. `any->FOOvector' family are now available only from `(srfi srfi-4 gnu)'.
  3880. Guile's default environment imports `(srfi srfi-4)', and probably should
  3881. import `(srfi srfi-4 gnu)' as well.
  3882. See "SRFI-4 Extensions" in the manual, for more information.
  3883. ** New syntax: include-from-path.
  3884. `include-from-path' is like `include', except it looks for its file in
  3885. the load path. It can be used to compile other files into a file.
  3886. ** New syntax: quasisyntax.
  3887. `quasisyntax' is to `syntax' as `quasiquote' is to `quote'. See the R6RS
  3888. documentation for more information. Thanks to Andre van Tonder for the
  3889. implementation.
  3890. ** `*unspecified*' is identifier syntax
  3891. `*unspecified*' is no longer a variable, so it is optimized properly by
  3892. the compiler, and is not `set!'-able.
  3893. ** Changes and bugfixes in numerics code
  3894. *** Added six new sets of fast quotient and remainder operators
  3895. Added six new sets of fast quotient and remainder operator pairs with
  3896. different semantics than the R5RS operators. They support not only
  3897. integers, but all reals, including exact rationals and inexact
  3898. floating point numbers.
  3899. These procedures accept two real numbers N and D, where the divisor D
  3900. must be non-zero. Each set of operators computes an integer quotient
  3901. Q and a real remainder R such that N = Q*D + R and |R| < |D|. They
  3902. differ only in how N/D is rounded to produce Q.
  3903. `euclidean-quotient' returns the integer Q and `euclidean-remainder'
  3904. returns the real R such that N = Q*D + R and 0 <= R < |D|. `euclidean/'
  3905. returns both Q and R, and is more efficient than computing each
  3906. separately. Note that when D > 0, `euclidean-quotient' returns
  3907. floor(N/D), and when D < 0 it returns ceiling(N/D).
  3908. `centered-quotient', `centered-remainder', and `centered/' are similar
  3909. except that the range of remainders is -abs(D/2) <= R < abs(D/2), and
  3910. `centered-quotient' rounds N/D to the nearest integer. Note that these
  3911. operators are equivalent to the R6RS integer division operators `div',
  3912. `mod', `div-and-mod', `div0', `mod0', and `div0-and-mod0'.
  3913. `floor-quotient' and `floor-remainder' compute Q and R, respectively,
  3914. where Q has been rounded toward negative infinity. `floor/' returns
  3915. both Q and R, and is more efficient than computing each separately.
  3916. Note that when applied to integers, `floor-remainder' is equivalent to
  3917. the R5RS integer-only `modulo' operator. `ceiling-quotient',
  3918. `ceiling-remainder', and `ceiling/' are similar except that Q is
  3919. rounded toward positive infinity.
  3920. For `truncate-quotient', `truncate-remainder', and `truncate/', Q is
  3921. rounded toward zero. Note that when applied to integers,
  3922. `truncate-quotient' and `truncate-remainder' are equivalent to the
  3923. R5RS integer-only operators `quotient' and `remainder'.
  3924. For `round-quotient', `round-remainder', and `round/', Q is rounded to
  3925. the nearest integer, with ties going to the nearest even integer.
  3926. *** Complex number changes
  3927. Guile is now able to represent non-real complex numbers whose
  3928. imaginary part is an _inexact_ zero (0.0 or -0.0), per R6RS.
  3929. Previously, such numbers were immediately changed into inexact reals.
  3930. (real? 0.0+0.0i) now returns #f, per R6RS, although (zero? 0.0+0.0i)
  3931. still returns #t, per R6RS. (= 0 0.0+0.0i) and (= 0.0 0.0+0.0i) are
  3932. #t, but the same comparisons using `eqv?' or `equal?' are #f.
  3933. Like other non-real numbers, these complex numbers with inexact zero
  3934. imaginary part will raise exceptions is passed to procedures requiring
  3935. reals, such as `<', `>', `<=', `>=', `min', `max', `positive?',
  3936. `negative?', `inf?', `nan?', `finite?', etc.
  3937. **** `make-rectangular' changes
  3938. scm_make_rectangular `make-rectangular' now returns a real number only
  3939. if the imaginary part is an _exact_ 0. Previously, it would return a
  3940. real number if the imaginary part was an inexact zero.
  3941. scm_c_make_rectangular now always returns a non-real complex number,
  3942. even if the imaginary part is zero. Previously, it would return a
  3943. real number if the imaginary part was zero.
  3944. **** `make-polar' changes
  3945. scm_make_polar `make-polar' now returns a real number only if the
  3946. angle or magnitude is an _exact_ 0. If the magnitude is an exact 0,
  3947. it now returns an exact 0. Previously, it would return a real
  3948. number if the imaginary part was an inexact zero.
  3949. scm_c_make_polar now always returns a non-real complex number, even if
  3950. the imaginary part is 0.0. Previously, it would return a real number
  3951. if the imaginary part was 0.0.
  3952. **** `imag-part' changes
  3953. scm_imag_part `imag-part' now returns an exact 0 if applied to an
  3954. inexact real number. Previously it returned an inexact zero in this
  3955. case.
  3956. *** `eqv?' and `equal?' now compare numbers equivalently
  3957. scm_equal_p `equal?' now behaves equivalently to scm_eqv_p `eqv?' for
  3958. numeric values, per R5RS. Previously, equal? worked differently,
  3959. e.g. `(equal? 0.0 -0.0)' returned #t but `(eqv? 0.0 -0.0)' returned #f,
  3960. and `(equal? +nan.0 +nan.0)' returned #f but `(eqv? +nan.0 +nan.0)'
  3961. returned #t.
  3962. *** `(equal? +nan.0 +nan.0)' now returns #t
  3963. Previously, `(equal? +nan.0 +nan.0)' returned #f, although
  3964. `(let ((x +nan.0)) (equal? x x))' and `(eqv? +nan.0 +nan.0)'
  3965. both returned #t. R5RS requires that `equal?' behave like
  3966. `eqv?' when comparing numbers.
  3967. *** Change in handling products `*' involving exact 0
  3968. scm_product `*' now handles exact 0 differently. A product containing
  3969. an exact 0 now returns an exact 0 if and only if the other arguments
  3970. are all exact. An inexact zero is returned if and only if the other
  3971. arguments are all finite but not all exact. If an infinite or NaN
  3972. value is present, a NaN value is returned. Previously, any product
  3973. containing an exact 0 yielded an exact 0, regardless of the other
  3974. arguments.
  3975. *** `expt' and `integer-expt' changes when the base is 0
  3976. While `(expt 0 0)' is still 1, and `(expt 0 N)' for N > 0 is still
  3977. zero, `(expt 0 N)' for N < 0 is now a NaN value, and likewise for
  3978. integer-expt. This is more correct, and conforming to R6RS, but seems
  3979. to be incompatible with R5RS, which would return 0 for all non-zero
  3980. values of N.
  3981. *** `expt' and `integer-expt' are more generic, less strict
  3982. When raising to an exact non-negative integer exponent, `expt' and
  3983. `integer-expt' are now able to exponentiate any object that can be
  3984. multiplied using `*'. They can also raise an object to an exact
  3985. negative integer power if its reciprocal can be taken using `/'.
  3986. In order to allow this, the type of the first argument is no longer
  3987. checked when raising to an exact integer power. If the exponent is 0
  3988. or 1, the first parameter is not manipulated at all, and need not
  3989. even support multiplication.
  3990. *** Infinities are no longer integers, nor rationals
  3991. scm_integer_p `integer?' and scm_rational_p `rational?' now return #f
  3992. for infinities, per R6RS. Previously they returned #t for real
  3993. infinities. The real infinities and NaNs are still considered real by
  3994. scm_real `real?' however, per R6RS.
  3995. *** NaNs are no longer rationals
  3996. scm_rational_p `rational?' now returns #f for NaN values, per R6RS.
  3997. Previously it returned #t for real NaN values. They are still
  3998. considered real by scm_real `real?' however, per R6RS.
  3999. *** `inf?' and `nan?' now throw exceptions for non-reals
  4000. The domain of `inf?' and `nan?' is the real numbers. Guile now signals
  4001. an error when a non-real number or non-number is passed to these
  4002. procedures. (Note that NaNs _are_ considered numbers by scheme, despite
  4003. their name).
  4004. *** `rationalize' bugfixes and changes
  4005. Fixed bugs in scm_rationalize `rationalize'. Previously, it returned
  4006. exact integers unmodified, although that was incorrect if the epsilon
  4007. was at least 1 or inexact, e.g. (rationalize 4 1) should return 3 per
  4008. R5RS and R6RS, but previously it returned 4. It also now handles
  4009. cases involving infinities and NaNs properly, per R6RS.
  4010. *** Trigonometric functions now return exact numbers in some cases
  4011. scm_sin `sin', scm_cos `cos', scm_tan `tan', scm_asin `asin', scm_acos
  4012. `acos', scm_atan `atan', scm_sinh `sinh', scm_cosh `cosh', scm_tanh
  4013. `tanh', scm_sys_asinh `asinh', scm_sys_acosh `acosh', and
  4014. scm_sys_atanh `atanh' now return exact results in some cases.
  4015. *** New procedure: `finite?'
  4016. Add scm_finite_p `finite?' from R6RS to guile core, which returns #t
  4017. if and only if its argument is neither infinite nor a NaN. Note that
  4018. this is not the same as (not (inf? x)) or (not (infinite? x)), since
  4019. NaNs are neither finite nor infinite.
  4020. *** Improved exactness handling for complex number parsing
  4021. When parsing non-real complex numbers, exactness specifiers are now
  4022. applied to each component, as is done in PLT Scheme. For complex
  4023. numbers written in rectangular form, exactness specifiers are applied
  4024. to the real and imaginary parts before calling scm_make_rectangular.
  4025. For complex numbers written in polar form, exactness specifiers are
  4026. applied to the magnitude and angle before calling scm_make_polar.
  4027. Previously, exactness specifiers were applied to the number as a whole
  4028. _after_ calling scm_make_rectangular or scm_make_polar.
  4029. For example, (string->number "#i5.0+0i") now does the equivalent of:
  4030. (make-rectangular (exact->inexact 5.0) (exact->inexact 0))
  4031. which yields 5.0+0.0i. Previously it did the equivalent of:
  4032. (exact->inexact (make-rectangular 5.0 0))
  4033. which yielded 5.0.
  4034. ** Unicode characters
  4035. Unicode characters may be entered in octal format via e.g. `#\454', or
  4036. created via (integer->char 300). A hex external representation will
  4037. probably be introduced at some point.
  4038. ** Unicode strings
  4039. Internally, strings are now represented either in the `latin-1'
  4040. encoding, one byte per character, or in UTF-32, with four bytes per
  4041. character. Strings manage their own allocation, switching if needed.
  4042. Extended characters may be written in a literal string using the
  4043. hexadecimal escapes `\xXX', `\uXXXX', or `\UXXXXXX', for 8-bit, 16-bit,
  4044. or 24-bit codepoints, respectively, or entered directly in the native
  4045. encoding of the port on which the string is read.
  4046. ** Unicode symbols
  4047. One may now use U+03BB (GREEK SMALL LETTER LAMBDA) as an identifier.
  4048. ** Support for non-ASCII source code files
  4049. The default reader now handles source code files for some of the
  4050. non-ASCII character encodings, such as UTF-8. A non-ASCII source file
  4051. should have an encoding declaration near the top of the file. Also,
  4052. there is a new function, `file-encoding', that scans a port for a coding
  4053. declaration. See the section of the manual entitled, "Character Encoding
  4054. of Source Files".
  4055. The pre-1.9.3 reader handled 8-bit clean but otherwise unspecified source
  4056. code. This use is now discouraged. Binary input and output is
  4057. currently supported by opening ports in the ISO-8859-1 locale.
  4058. ** Source files default to UTF-8.
  4059. If source files do not specify their encoding via a `coding:' block,
  4060. the default encoding is UTF-8, instead of being taken from the current
  4061. locale.
  4062. ** Interactive Guile installs the current locale.
  4063. Instead of leaving the user in the "C" locale, running the Guile REPL
  4064. installs the current locale. [FIXME xref?]
  4065. ** Support for locale transcoding when reading from and writing to ports
  4066. Ports now have an associated character encoding, and port read and write
  4067. operations do conversion to and from locales automatically. Ports also
  4068. have an associated strategy for how to deal with locale conversion
  4069. failures.
  4070. See the documentation in the manual for the four new support functions,
  4071. `set-port-encoding!', `port-encoding', `set-port-conversion-strategy!',
  4072. and `port-conversion-strategy'.
  4073. ** String and SRFI-13 functions can operate on Unicode strings
  4074. ** Unicode support for SRFI-14 character sets
  4075. The default character sets are no longer locale dependent and contain
  4076. characters from the whole Unicode range. There is a new predefined
  4077. character set, `char-set:designated', which contains all assigned
  4078. Unicode characters. There is a new debugging function, `%char-set-dump'.
  4079. ** Character functions operate on Unicode characters
  4080. `char-upcase' and `char-downcase' use default Unicode casing rules.
  4081. Character comparisons such as `char<?' and `char-ci<?' now sort based on
  4082. Unicode code points.
  4083. ** Global variables `scm_charnames' and `scm_charnums' are removed
  4084. These variables contained the names of control characters and were
  4085. used when writing characters. While these were global, they were
  4086. never intended to be public API. They have been replaced with private
  4087. functions.
  4088. ** EBCDIC support is removed
  4089. There was an EBCDIC compile flag that altered some of the character
  4090. processing. It appeared that full EBCDIC support was never completed
  4091. and was unmaintained.
  4092. ** Compile-time warnings
  4093. Guile can warn about potentially unbound free variables. Pass the
  4094. -Wunbound-variable on the `guile-tools compile' command line, or add
  4095. `#:warnings '(unbound-variable)' to your `compile' or `compile-file'
  4096. invocation. Warnings are also enabled by default for expressions entered
  4097. at the REPL.
  4098. Guile can also warn when you pass the wrong number of arguments to a
  4099. procedure, with -Warity-mismatch, or `arity-mismatch' in the
  4100. `#:warnings' as above.
  4101. Other warnings include `-Wunused-variable' and `-Wunused-toplevel', to
  4102. warn about unused local or global (top-level) variables, and `-Wformat',
  4103. to check for various errors related to the `format' procedure.
  4104. ** A new `memoize-symbol' evaluator trap has been added.
  4105. This trap can be used for efficiently implementing a Scheme code
  4106. coverage.
  4107. ** Duplicate bindings among used modules are resolved lazily.
  4108. This slightly improves program startup times.
  4109. ** New thread cancellation and thread cleanup API
  4110. See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'.
  4111. ** New threads are in `(guile-user)' by default, not `(guile)'
  4112. It used to be that a new thread entering Guile would do so in the
  4113. `(guile)' module, unless this was the first time Guile was initialized,
  4114. in which case it was `(guile-user)'. This has been fixed to have all
  4115. new threads unknown to Guile default to `(guile-user)'.
  4116. ** New helpers: `print-exception', `set-exception-printer!'
  4117. These functions implement an extensible exception printer. Guile
  4118. registers printers for all of the exceptions it throws. Users may add
  4119. their own printers. There is also `scm_print_exception', for use by C
  4120. programs. Pleasantly, this allows SRFI-35 and R6RS exceptions to be
  4121. printed appropriately.
  4122. ** GOOPS dispatch in scheme
  4123. As an implementation detail, GOOPS dispatch is no longer implemented by
  4124. special evaluator bytecodes, but rather directly via a Scheme function
  4125. associated with an applicable struct. There is some VM support for the
  4126. underlying primitives, like `class-of'.
  4127. This change will in the future allow users to customize generic function
  4128. dispatch without incurring a performance penalty, and allow us to
  4129. implement method combinations.
  4130. ** Applicable struct support
  4131. One may now make structs from Scheme that may be applied as procedures.
  4132. To do so, make a struct whose vtable is `<applicable-struct-vtable>'.
  4133. That struct will be the vtable of your applicable structs; instances of
  4134. that new struct are assumed to have the procedure in their first slot.
  4135. `<applicable-struct-vtable>' is like Common Lisp's
  4136. `funcallable-standard-class'. Likewise there is
  4137. `<applicable-struct-with-setter-vtable>', which looks for the setter in
  4138. the second slot. This needs to be better documented.
  4139. ** GOOPS cleanups.
  4140. GOOPS had a number of concepts that were relevant to the days of Tcl,
  4141. but not any more: operators and entities, mainly. These objects were
  4142. never documented, and it is unlikely that they were ever used. Operators
  4143. were a kind of generic specific to the Tcl support. Entities were
  4144. replaced by applicable structs, mentioned above.
  4145. ** New struct slot allocation: "hidden"
  4146. A hidden slot is readable and writable, but will not be initialized by a
  4147. call to make-struct. For example in your layout you would say "ph"
  4148. instead of "pw". Hidden slots are useful for adding new slots to a
  4149. vtable without breaking existing invocations to make-struct.
  4150. ** eqv? not a generic
  4151. One used to be able to extend `eqv?' as a primitive-generic, but no
  4152. more. Because `eqv?' is in the expansion of `case' (via `memv'), which
  4153. should be able to compile to static dispatch tables, it doesn't make
  4154. sense to allow extensions that would subvert this optimization.
  4155. ** `inet-ntop' and `inet-pton' are always available.
  4156. Guile now use a portable implementation of `inet_pton'/`inet_ntop', so
  4157. there is no more need to use `inet-aton'/`inet-ntoa'. The latter
  4158. functions are deprecated.
  4159. ** `getopt-long' parsing errors throw to `quit', not `misc-error'
  4160. This change should inhibit backtraces on argument parsing errors.
  4161. `getopt-long' has been modified to print out the error that it throws
  4162. itself.
  4163. ** New primitive: `tmpfile'.
  4164. See "File System" in the manual.
  4165. ** Random generator state may be serialized to a datum
  4166. `random-state->datum' will serialize a random state to a datum, which
  4167. may be written out, read back in later, and revivified using
  4168. `datum->random-state'. See "Random" in the manual, for more details.
  4169. ** Fix random number generator on 64-bit platforms
  4170. There was a nasty bug on 64-bit platforms in which asking for a random
  4171. integer with a range between 2**32 and 2**64 caused a segfault. After
  4172. many embarrassing iterations, this was fixed.
  4173. ** Fast bit operations.
  4174. The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
  4175. have dedicated bytecodes. Guile is not just for symbolic computation,
  4176. it's for number crunching too.
  4177. ** Faster SRFI-9 record access
  4178. SRFI-9 records are now implemented directly on top of Guile's structs,
  4179. and their accessors are defined in such a way that normal call-sites
  4180. inline to special VM opcodes, while still allowing for the general case
  4181. (e.g. passing a record accessor to `apply').
  4182. ** R6RS block comment support
  4183. Guile now supports R6RS nested block comments. The start of a comment is
  4184. marked with `#|', and the end with `|#'.
  4185. ** `guile-2' cond-expand feature
  4186. To test if your code is running under Guile 2.0 (or its alpha releases),
  4187. test for the `guile-2' cond-expand feature. Like this:
  4188. (cond-expand (guile-2 (eval-when (compile)
  4189. ;; This must be evaluated at compile time.
  4190. (fluid-set! current-reader my-reader)))
  4191. (guile
  4192. ;; Earlier versions of Guile do not have a
  4193. ;; separate compilation phase.
  4194. (fluid-set! current-reader my-reader)))
  4195. ** New global variables: %load-compiled-path, %load-compiled-extensions
  4196. These are analogous to %load-path and %load-extensions.
  4197. ** New fluid: `%file-port-name-canonicalization'
  4198. This fluid parameterizes the file names that are associated with file
  4199. ports. If %file-port-name-canonicalization is 'absolute, then file names
  4200. are canonicalized to be absolute paths. If it is 'relative, then the
  4201. name is canonicalized, but any prefix corresponding to a member of
  4202. `%load-path' is stripped off. Otherwise the names are passed through
  4203. unchanged.
  4204. In addition, the `compile-file' and `compile-and-load' procedures bind
  4205. %file-port-name-canonicalization to their `#:canonicalization' keyword
  4206. argument, which defaults to 'relative. In this way, one might compile
  4207. "../module/ice-9/boot-9.scm", but the path that gets residualized into
  4208. the .go is "ice-9/boot-9.scm".
  4209. ** New procedure, `make-promise'
  4210. `(make-promise (lambda () foo))' is equivalent to `(delay foo)'.
  4211. ** `defined?' may accept a module as its second argument
  4212. Previously it only accepted internal structures from the evaluator.
  4213. ** New entry into %guile-build-info: `ccachedir'
  4214. ** Fix bug in `module-bound?'.
  4215. `module-bound?' was returning true if a module did have a local
  4216. variable, but one that was unbound, but another imported module bound
  4217. the variable. This was an error, and was fixed.
  4218. ** `(ice-9 syncase)' has been deprecated.
  4219. As syntax-case is available by default, importing `(ice-9 syncase)' has
  4220. no effect, and will trigger a deprecation warning.
  4221. ** New readline history functions
  4222. The (ice-9 readline) module now provides add-history, read-history,
  4223. write-history and clear-history, which wrap the corresponding GNU
  4224. History library functions.
  4225. ** Removed deprecated uniform array procedures:
  4226. dimensions->uniform-array, list->uniform-array, array-prototype
  4227. Instead, use make-typed-array, list->typed-array, or array-type,
  4228. respectively.
  4229. ** Deprecate the old `scm-style-repl'
  4230. The following bindings from boot-9 are now found in `(ice-9
  4231. scm-style-repl)': `scm-style-repl', `error-catching-loop',
  4232. `error-catching-repl', `bad-throw', `scm-repl-silent'
  4233. `assert-repl-silence', `repl-print-unspecified',
  4234. `assert-repl-print-unspecified', `scm-repl-verbose',
  4235. `assert-repl-verbosity', `scm-repl-prompt', `set-repl-prompt!', `repl',
  4236. `default-pre-unwind-handler', `handle-system-error',
  4237. The following bindings have been deprecated, with no replacement:
  4238. `pre-unwind-handler-dispatch'.
  4239. The following bindings have been totally removed:
  4240. `before-signal-stack'.
  4241. Deprecated forwarding shims have been installed so that users that
  4242. expect these bindings in the main namespace will still work, but receive
  4243. a deprecation warning.
  4244. ** `set-batch-mode?!' replaced by `ensure-batch-mode!'
  4245. "Batch mode" is a flag used to tell a program that it is not running
  4246. interactively. One usually turns it on after a fork. It may not be
  4247. turned off. `ensure-batch-mode!' deprecates the old `set-batch-mode?!',
  4248. because it is a better interface, as it can only turn on batch mode, not
  4249. turn it off.
  4250. ** Deprecate `save-stack', `the-last-stack'
  4251. It used to be that the way to debug programs in Guile was to capture the
  4252. stack at the time of error, drop back to the REPL, then debug that
  4253. stack. But this approach didn't compose, was tricky to get right in the
  4254. presence of threads, and was not very powerful.
  4255. So `save-stack', `stack-saved?', and `the-last-stack' have been moved to
  4256. `(ice-9 save-stack)', with deprecated bindings left in the root module.
  4257. ** `top-repl' has its own module
  4258. The `top-repl' binding, called with Guile is run interactively, is now
  4259. is its own module, `(ice-9 top-repl)'. A deprecated forwarding shim was
  4260. left in the default environment.
  4261. ** `display-error' takes a frame
  4262. The `display-error' / `scm_display_error' helper now takes a frame as an
  4263. argument instead of a stack. Stacks are still supported in deprecated
  4264. builds. Additionally, `display-error' will again source location
  4265. information for the error.
  4266. ** No more `(ice-9 debug)'
  4267. This module had some debugging helpers that are no longer applicable to
  4268. the current debugging model. Importing this module will produce a
  4269. deprecation warning. Users should contact bug-guile for support.
  4270. ** Remove obsolete debug-options
  4271. Removed `breakpoints', `trace', `procnames', `indent', `frames',
  4272. `maxdepth', and `debug' debug-options.
  4273. ** `backtrace' debug option on by default
  4274. Given that Guile 2.0 can always give you a backtrace, backtraces are now
  4275. on by default.
  4276. ** `turn-on-debugging' deprecated
  4277. ** Remove obsolete print-options
  4278. The `source' and `closure-hook' print options are obsolete, and have
  4279. been removed.
  4280. ** Remove obsolete read-options
  4281. The "elisp-strings" and "elisp-vectors" read options were unused and
  4282. obsolete, so they have been removed.
  4283. ** Remove eval-options and trap-options
  4284. Eval-options and trap-options are obsolete with the new VM and
  4285. evaluator.
  4286. ** Remove (ice-9 debugger) and (ice-9 debugging)
  4287. See "Traps" and "Interactive Debugging" in the manual, for information
  4288. on their replacements.
  4289. ** Remove the GDS Emacs integration
  4290. See "Using Guile in Emacs" in the manual, for info on how we think you
  4291. should use Guile with Emacs.
  4292. ** Deprecated: `lazy-catch'
  4293. `lazy-catch' was a form that captured the stack at the point of a
  4294. `throw', but the dynamic state at the point of the `catch'. It was a bit
  4295. crazy. Please change to use `catch', possibly with a throw-handler, or
  4296. `with-throw-handler'.
  4297. ** Deprecated: primitive properties
  4298. The `primitive-make-property', `primitive-property-set!',
  4299. `primitive-property-ref', and `primitive-property-del!' procedures were
  4300. crufty and only used to implement object properties, which has a new,
  4301. threadsafe implementation. Use object properties or weak hash tables
  4302. instead.
  4303. ** Deprecated `@bind' syntax
  4304. `@bind' was part of an older implementation of the Emacs Lisp language,
  4305. and is no longer used.
  4306. ** Miscellaneous other deprecations
  4307. `cuserid' has been deprecated, as it only returns 8 bytes of a user's
  4308. login. Use `(passwd:name (getpwuid (geteuid)))' instead.
  4309. Additionally, the procedures `apply-to-args', `has-suffix?', `scheme-file-suffix'
  4310. `get-option', `for-next-option', `display-usage-report',
  4311. `transform-usage-lambda', `collect', and `set-batch-mode?!' have all
  4312. been deprecated.
  4313. ** Add support for unbound fluids
  4314. See `make-unbound-fluid', `fluid-unset!', and `fluid-bound?' in the
  4315. manual.
  4316. ** Add `variable-unset!'
  4317. See "Variables" in the manual, for more details.
  4318. ** Last but not least, the `λ' macro can be used in lieu of `lambda'
  4319. * Changes to the C interface
  4320. ** Guile now uses libgc, the Boehm-Demers-Weiser garbage collector
  4321. The semantics of `scm_gc_malloc ()' have been changed, in a
  4322. backward-compatible way. A new allocation routine,
  4323. `scm_gc_malloc_pointerless ()', was added.
  4324. Libgc is a conservative GC, which we hope will make interaction with C
  4325. code easier and less error-prone.
  4326. ** New procedures: `scm_to_stringn', `scm_from_stringn'
  4327. ** New procedures: scm_{to,from}_{utf8,latin1}_symbol{n,}
  4328. ** New procedures: scm_{to,from}_{utf8,utf32,latin1}_string{n,}
  4329. These new procedures convert to and from string representations in
  4330. particular encodings.
  4331. Users should continue to use locale encoding for user input, user
  4332. output, or interacting with the C library.
  4333. Use the Latin-1 functions for ASCII, and for literals in source code.
  4334. Use UTF-8 functions for interaction with modern libraries which deal in
  4335. UTF-8, and UTF-32 for interaction with utf32-using libraries.
  4336. Otherwise, use scm_to_stringn or scm_from_stringn with a specific
  4337. encoding.
  4338. ** New type definitions for `scm_t_intptr' and friends.
  4339. `SCM_T_UINTPTR_MAX', `SCM_T_INTPTR_MIN', `SCM_T_INTPTR_MAX',
  4340. `SIZEOF_SCM_T_BITS', `scm_t_intptr' and `scm_t_uintptr' are now
  4341. available to C. Have fun!
  4342. ** The GH interface (deprecated in version 1.6, 2001) was removed.
  4343. ** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
  4344. This makes these internal functions technically not callable from
  4345. application code.
  4346. ** Functions for handling `scm_option' now no longer require an argument
  4347. indicating length of the `scm_t_option' array.
  4348. ** Procedures-with-setters are now implemented using applicable structs
  4349. From a user's perspective this doesn't mean very much. But if, for some
  4350. odd reason, you used the SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE, or
  4351. SCM_SETTER macros, know that they're deprecated now. Also, scm_tc7_pws
  4352. is gone.
  4353. ** Remove old evaluator closures
  4354. There used to be ranges of typecodes allocated to interpreted data
  4355. structures, but that it no longer the case, given that interpreted
  4356. procedure are now just regular VM closures. As a result, there is a
  4357. newly free tc3, and a number of removed macros. See the ChangeLog for
  4358. details.
  4359. ** Primitive procedures are now VM trampoline procedures
  4360. It used to be that there were something like 12 different typecodes
  4361. allocated to primitive procedures, each with its own calling convention.
  4362. Now there is only one, the gsubr. This may affect user code if you were
  4363. defining a procedure using scm_c_make_subr rather scm_c_make_gsubr. The
  4364. solution is to switch to use scm_c_make_gsubr. This solution works well
  4365. both with the old 1.8 and with the current 1.9 branch.
  4366. Guile's old evaluator used to have special cases for applying "gsubrs",
  4367. primitive procedures with specified numbers of required, optional, and
  4368. rest arguments. Now, however, Guile represents gsubrs as normal VM
  4369. procedures, with appropriate bytecode to parse out the correct number of
  4370. arguments, including optional and rest arguments, and then with a
  4371. special bytecode to apply the gsubr.
  4372. This allows primitive procedures to appear on the VM stack, allowing
  4373. them to be accurately counted in profiles. Also they now have more
  4374. debugging information attached to them -- their number of arguments, for
  4375. example. In addition, the VM can completely inline the application
  4376. mechanics, allowing for faster primitive calls.
  4377. However there are some changes on the C level. There is no more
  4378. `scm_tc7_gsubr' or `scm_tcs_subrs' typecode for primitive procedures, as
  4379. they are just VM procedures. Likewise the macros `SCM_GSUBR_TYPE',
  4380. `SCM_GSUBR_MAKTYPE', `SCM_GSUBR_REQ', `SCM_GSUBR_OPT', and
  4381. `SCM_GSUBR_REST' are gone, as are `SCM_SUBR_META_INFO', `SCM_SUBR_PROPS'
  4382. `SCM_SET_SUBR_GENERIC_LOC', and `SCM_SUBR_ARITY_TO_TYPE'.
  4383. Perhaps more significantly, `scm_c_make_subr',
  4384. `scm_c_make_subr_with_generic', `scm_c_define_subr', and
  4385. `scm_c_define_subr_with_generic'. They all operated on subr typecodes,
  4386. and there are no more subr typecodes. Use the scm_c_make_gsubr family
  4387. instead.
  4388. Normal users of gsubrs should not be affected, though, as the
  4389. scm_c_make_gsubr family still is the correct way to create primitive
  4390. procedures.
  4391. ** Remove deprecated array C interfaces
  4392. Removed the deprecated array functions `scm_i_arrayp',
  4393. `scm_i_array_ndim', `scm_i_array_mem', `scm_i_array_v',
  4394. `scm_i_array_base', `scm_i_array_dims', and the deprecated macros
  4395. `SCM_ARRAYP', `SCM_ARRAY_NDIM', `SCM_ARRAY_CONTP', `SCM_ARRAY_MEM',
  4396. `SCM_ARRAY_V', `SCM_ARRAY_BASE', and `SCM_ARRAY_DIMS'.
  4397. ** Remove unused snarf macros
  4398. `SCM_DEFINE1', `SCM_PRIMITIVE_GENERIC_1', `SCM_PROC1, and `SCM_GPROC1'
  4399. are no more. Use SCM_DEFINE or SCM_PRIMITIVE_GENERIC instead.
  4400. ** New functions: `scm_call_n', `scm_c_run_hookn'
  4401. `scm_call_n' applies to apply a function to an array of arguments.
  4402. `scm_c_run_hookn' runs a hook with an array of arguments.
  4403. ** Some SMOB types changed to have static typecodes
  4404. Fluids, dynamic states, and hash tables used to be SMOB objects, but now
  4405. they have statically allocated tc7 typecodes.
  4406. ** Preparations for changing SMOB representation
  4407. If things go right, we'll be changing the SMOB representation soon. To
  4408. that end, we did a lot of cleanups to calls to e.g. SCM_CELL_WORD_2(x) when
  4409. the code meant SCM_SMOB_DATA_2(x); user code will need similar changes
  4410. in the future. Code accessing SMOBs using SCM_CELL macros was never
  4411. correct, but until now things still worked. Users should be aware of
  4412. such changes.
  4413. ** Changed invocation mechanics of applicable SMOBs
  4414. Guile's old evaluator used to have special cases for applying SMOB
  4415. objects. Now, with the VM, when Guile sees a SMOB, it looks up a VM
  4416. trampoline procedure for it, and use the normal mechanics to apply the
  4417. trampoline. This simplifies procedure application in the normal,
  4418. non-SMOB case.
  4419. The upshot is that the mechanics used to apply a SMOB are different from
  4420. 1.8. Descriptors no longer have `apply_0', `apply_1', `apply_2', and
  4421. `apply_3' functions, and the macros SCM_SMOB_APPLY_0 and friends are now
  4422. deprecated. Just use the scm_call_0 family of procedures.
  4423. ** Removed support shlibs for SRFIs 1, 4, 13, 14, and 60
  4424. Though these SRFI support libraries did expose API, they encoded a
  4425. strange version string into their library names. That version was never
  4426. programmatically exported, so there was no way people could use the
  4427. libs.
  4428. This was a fortunate oversight, as it allows us to remove the need for
  4429. extra, needless shared libraries --- the C support code for SRFIs 4, 13,
  4430. and 14 was already in core --- and allow us to incrementally return the
  4431. SRFI implementation to Scheme.
  4432. ** New C function: scm_module_public_interface
  4433. This procedure corresponds to Scheme's `module-public-interface'.
  4434. ** Undeprecate `scm_the_root_module ()'
  4435. It's useful to be able to get the root module from C without doing a
  4436. full module lookup.
  4437. ** Inline vector allocation
  4438. Instead of having vectors point out into the heap for their data, their
  4439. data is now allocated inline to the vector object itself. The same is
  4440. true for bytevectors, by default, though there is an indirection
  4441. available which should allow for making a bytevector from an existing
  4442. memory region.
  4443. ** New struct constructors that don't involve making lists
  4444. `scm_c_make_struct' and `scm_c_make_structv' are new varargs and array
  4445. constructors, respectively, for structs. You might find them useful.
  4446. ** Stack refactor
  4447. In Guile 1.8, there were debugging frames on the C stack. Now there is
  4448. no more need to explicitly mark the stack in this way, because Guile has
  4449. a VM stack that it knows how to walk, which simplifies the C API
  4450. considerably. See the ChangeLog for details; the relevant interface is
  4451. in libguile/stacks.h. The Scheme API has not been changed significantly.
  4452. ** Removal of Guile's primitive object system.
  4453. There were a number of pieces in `objects.[ch]' that tried to be a
  4454. minimal object system, but were never documented, and were quickly
  4455. obseleted by GOOPS' merge into Guile proper. So `scm_make_class_object',
  4456. `scm_make_subclass_object', `scm_metaclass_standard', and like symbols
  4457. from objects.h are no more. In the very unlikely case in which these
  4458. were useful to you, we urge you to contact guile-devel.
  4459. ** No future.
  4460. Actually the future is still in the state that it was, is, and ever
  4461. shall be, Amen, except that `futures.c' and `futures.h' are no longer a
  4462. part of it. These files were experimental, never compiled, and would be
  4463. better implemented in Scheme anyway. In the future, that is.
  4464. ** Deprecate trampolines
  4465. There used to be C functions `scm_trampoline_0', `scm_trampoline_1', and
  4466. so on. The point was to do some precomputation on the type of the
  4467. procedure, then return a specialized "call" procedure. However this
  4468. optimization wasn't actually an optimization, so it is now deprecated.
  4469. Just use `scm_call_0', etc instead.
  4470. ** Deprecated `scm_badargsp'
  4471. This function is unused in Guile, but was part of its API.
  4472. ** Better support for Lisp `nil'.
  4473. The bit representation of `nil' has been tweaked so that it is now very
  4474. efficient to check e.g. if a value is equal to Scheme's end-of-list or
  4475. Lisp's nil. Additionally there are a heap of new, specific predicates
  4476. like scm_is_null_or_nil.
  4477. ** Better integration of Lisp `nil'.
  4478. `scm_is_boolean', `scm_is_false', and `scm_is_null' all return true now
  4479. for Lisp's `nil'. This shouldn't affect any Scheme code at this point,
  4480. but when we start to integrate more with Emacs, it is possible that we
  4481. break code that assumes that, for example, `(not x)' implies that `x' is
  4482. `eq?' to `#f'. This is not a common assumption. Refactoring affected
  4483. code to rely on properties instead of identities will improve code
  4484. correctness. See "Nil" in the manual, for more details.
  4485. ** Support for static allocation of strings, symbols, and subrs.
  4486. Calls to snarfing CPP macros like SCM_DEFINE macro will now allocate
  4487. much of their associated data as static variables, reducing Guile's
  4488. memory footprint.
  4489. ** `scm_stat' has an additional argument, `exception_on_error'
  4490. ** `scm_primitive_load_path' has an additional argument `exception_on_not_found'
  4491. ** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type
  4492. Previously they would use the `off_t' type, which is fragile since its
  4493. definition depends on the application's value for `_FILE_OFFSET_BITS'.
  4494. ** The `long_long' C type, deprecated in 1.8, has been removed
  4495. ** Removed deprecated uniform array procedures: scm_make_uve,
  4496. scm_array_prototype, scm_list_to_uniform_array,
  4497. scm_dimensions_to_uniform_array, scm_make_ra, scm_shap2ra, scm_cvref,
  4498. scm_ra_set_contp, scm_aind, scm_raprin1
  4499. These functions have been deprecated since early 2005.
  4500. * Changes to the distribution
  4501. ** Guile's license is now LGPLv3+
  4502. In other words the GNU Lesser General Public License, version 3 or
  4503. later (at the discretion of each person that chooses to redistribute
  4504. part of Guile).
  4505. ** AM_SILENT_RULES
  4506. Guile's build is visually quieter, due to the use of Automake 1.11's
  4507. AM_SILENT_RULES. Build as `make V=1' to see all of the output.
  4508. ** GOOPS documentation folded into Guile reference manual
  4509. GOOPS, Guile's object system, used to be documented in separate manuals.
  4510. This content is now included in Guile's manual directly.
  4511. ** `guile-config' will be deprecated in favor of `pkg-config'
  4512. `guile-config' has been rewritten to get its information from
  4513. `pkg-config', so this should be a transparent change. Note however that
  4514. guile.m4 has yet to be modified to call pkg-config instead of
  4515. guile-config.
  4516. ** Guile now provides `guile-2.0.pc' instead of `guile-1.8.pc'
  4517. Programs that use `pkg-config' to find Guile or one of its Autoconf
  4518. macros should now require `guile-2.0' instead of `guile-1.8'.
  4519. ** New installation directory: $(pkglibdir)/1.9/ccache
  4520. If $(libdir) is /usr/lib, for example, Guile will install its .go files
  4521. to /usr/lib/guile/1.9/ccache. These files are architecture-specific.
  4522. ** Parallel installability fixes
  4523. Guile now installs its header files to a effective-version-specific
  4524. directory, and includes the effective version (e.g. 2.0) in the library
  4525. name (e.g. libguile-2.0.so).
  4526. This change should be transparent to users, who should detect Guile via
  4527. the guile.m4 macro, or the guile-2.0.pc pkg-config file. It will allow
  4528. parallel installs for multiple versions of Guile development
  4529. environments.
  4530. ** Dynamically loadable extensions may be placed in a Guile-specific path
  4531. Before, Guile only searched the system library paths for extensions
  4532. (e.g. /usr/lib), which meant that the names of Guile extensions had to
  4533. be globally unique. Installing them to a Guile-specific extensions
  4534. directory is cleaner. Use `pkg-config --variable=extensiondir
  4535. guile-2.0' to get the location of the extensions directory.
  4536. ** User Scheme code may be placed in a version-specific path
  4537. Before, there was only one way to install user Scheme code to a
  4538. version-specific Guile directory: install to Guile's own path,
  4539. e.g. /usr/share/guile/2.0. The site directory,
  4540. e.g. /usr/share/guile/site, was unversioned. This has been changed to
  4541. add a version-specific site directory, e.g. /usr/share/guile/site/2.0,
  4542. searched before the global site directory.
  4543. ** New dependency: libgc
  4544. See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for more information.
  4545. ** New dependency: GNU libunistring
  4546. See http://www.gnu.org/software/libunistring/, for more information. Our
  4547. Unicode support uses routines from libunistring.
  4548. ** New dependency: libffi
  4549. See http://sourceware.org/libffi/, for more information.
  4550. Changes in 1.8.8 (since 1.8.7)
  4551. * Bugs fixed
  4552. ** Fix possible buffer overruns when parsing numbers
  4553. ** Avoid clash with system setjmp/longjmp on IA64
  4554. ** Fix `wrong type arg' exceptions with IPv6 addresses
  4555. Changes in 1.8.7 (since 1.8.6)
  4556. * New modules (see the manual for details)
  4557. ** `(srfi srfi-98)', an interface to access environment variables
  4558. * Bugs fixed
  4559. ** Fix compilation with `--disable-deprecated'
  4560. ** Fix %fast-slot-ref/set!, to avoid possible segmentation fault
  4561. ** Fix MinGW build problem caused by HAVE_STRUCT_TIMESPEC confusion
  4562. ** Fix build problem when scm_t_timespec is different from struct timespec
  4563. ** Fix build when compiled with -Wundef -Werror
  4564. ** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
  4565. ** Build fixes for `powerpc-ibm-aix5.3.0.0' (AIX 5.3)
  4566. ** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
  4567. ** Better diagnose broken `(strftime "%z" ...)' in `time.test' (bug #24130)
  4568. ** Fix parsing of SRFI-88/postfix keywords longer than 128 characters
  4569. ** Fix reading of complex numbers where both parts are inexact decimals
  4570. ** Allow @ macro to work with (ice-9 syncase)
  4571. Previously, use of the @ macro in a module whose code is being
  4572. transformed by (ice-9 syncase) would cause an "Invalid syntax" error.
  4573. Now it works as you would expect (giving the value of the specified
  4574. module binding).
  4575. ** Have `scm_take_locale_symbol ()' return an interned symbol (bug #25865)
  4576. Changes in 1.8.6 (since 1.8.5)
  4577. * New features (see the manual for details)
  4578. ** New convenience function `scm_c_symbol_length ()'
  4579. ** Single stepping through code from Emacs
  4580. When you use GDS to evaluate Scheme code from Emacs, you can now use
  4581. `C-u' to indicate that you want to single step through that code. See
  4582. `Evaluating Scheme Code' in the manual for more details.
  4583. ** New "guile(1)" man page!
  4584. * Changes to the distribution
  4585. ** Automake's `AM_MAINTAINER_MODE' is no longer used
  4586. Thus, the `--enable-maintainer-mode' configure option is no longer
  4587. available: Guile is now always configured in "maintainer mode".
  4588. ** `ChangeLog' files are no longer updated
  4589. Instead, changes are detailed in the version control system's logs. See
  4590. the top-level `ChangeLog' files for details.
  4591. * Bugs fixed
  4592. ** `symbol->string' now returns a read-only string, as per R5RS
  4593. ** Fix incorrect handling of the FLAGS argument of `fold-matches'
  4594. ** `guile-config link' now prints `-L$libdir' before `-lguile'
  4595. ** Fix memory corruption involving GOOPS' `class-redefinition'
  4596. ** Fix possible deadlock in `mutex-lock'
  4597. ** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
  4598. ** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
  4599. ** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
  4600. ** Fix build issue on i386-unknown-freebsd7.0 ("break strict-aliasing rules")
  4601. ** Fix misleading output from `(help rationalize)'
  4602. ** Fix build failure on Debian hppa architecture (bad stack growth detection)
  4603. ** Fix `gcd' when called with a single, negative argument.
  4604. ** Fix `Stack overflow' errors seen when building on some platforms
  4605. ** Fix bug when `scm_with_guile ()' was called several times from the
  4606. same thread
  4607. ** The handler of SRFI-34 `with-exception-handler' is now invoked in the
  4608. dynamic environment of the call to `raise'
  4609. ** Fix potential deadlock in `make-struct'
  4610. ** Fix compilation problem with libltdl from Libtool 2.2.x
  4611. ** Fix sloppy bound checking in `string-{ref,set!}' with the empty string
  4612. Changes in 1.8.5 (since 1.8.4)
  4613. * Infrastructure changes
  4614. ** Guile repository switched from CVS to Git
  4615. The new repository can be accessed using
  4616. "git-clone git://git.sv.gnu.org/guile.git", or can be browsed on-line at
  4617. http://git.sv.gnu.org/gitweb/?p=guile.git . See `README' for details.
  4618. ** Add support for `pkg-config'
  4619. See "Autoconf Support" in the manual for details.
  4620. * New modules (see the manual for details)
  4621. ** `(srfi srfi-88)'
  4622. * New features (see the manual for details)
  4623. ** New `postfix' read option, for SRFI-88 keyword syntax
  4624. ** Some I/O primitives have been inlined, which improves I/O performance
  4625. ** New object-based traps infrastructure
  4626. This is a GOOPS-based infrastructure that builds on Guile's low-level
  4627. evaluator trap calls and facilitates the development of debugging
  4628. features like single-stepping, breakpoints, tracing and profiling.
  4629. See the `Traps' node of the manual for details.
  4630. ** New support for working on Guile code from within Emacs
  4631. Guile now incorporates the `GDS' library (previously distributed
  4632. separately) for working on Guile code from within Emacs. See the
  4633. `Using Guile In Emacs' node of the manual for details.
  4634. * Bugs fixed
  4635. ** `scm_add_slot ()' no longer segfaults (fixes bug #22369)
  4636. ** Fixed `(ice-9 match)' for patterns like `((_ ...) ...)'
  4637. Previously, expressions like `(match '((foo) (bar)) (((_ ...) ...) #t))'
  4638. would trigger an unbound variable error for `match:andmap'.
  4639. ** `(oop goops describe)' now properly provides the `describe' feature
  4640. ** Fixed `args-fold' from `(srfi srfi-37)'
  4641. Previously, parsing short option names of argument-less options would
  4642. lead to a stack overflow.
  4643. ** `(srfi srfi-35)' is now visible through `cond-expand'
  4644. ** Fixed type-checking for the second argument of `eval'
  4645. ** Fixed type-checking for SRFI-1 `partition'
  4646. ** Fixed `struct-ref' and `struct-set!' on "light structs"
  4647. ** Honor struct field access rights in GOOPS
  4648. ** Changed the storage strategy of source properties, which fixes a deadlock
  4649. ** Allow compilation of Guile-using programs in C99 mode with GCC 4.3 and later
  4650. ** Fixed build issue for GNU/Linux on IA64
  4651. ** Fixed build issues on NetBSD 1.6
  4652. ** Fixed build issue on Solaris 2.10 x86_64
  4653. ** Fixed build issue with DEC/Compaq/HP's compiler
  4654. ** Fixed `scm_from_complex_double' build issue on FreeBSD
  4655. ** Fixed `alloca' build issue on FreeBSD 6
  4656. ** Removed use of non-portable makefile constructs
  4657. ** Fixed shadowing of libc's <random.h> on Tru64, which broke compilation
  4658. ** Make sure all tests honor `$TMPDIR'
  4659. Changes in 1.8.4 (since 1.8.3)
  4660. * Bugs fixed
  4661. ** CR (ASCII 0x0d) is (again) recognized as a token delimiter by the reader
  4662. ** Fixed a segmentation fault which occurred when displaying the
  4663. backtrace of a stack with a promise object (made by `delay') in it.
  4664. ** Make `accept' leave guile mode while blocking
  4665. ** `scm_c_read ()' and `scm_c_write ()' now type-check their port argument
  4666. ** Fixed a build problem on AIX (use of func_data identifier)
  4667. ** Fixed a segmentation fault which occurred when hashx-ref or hashx-set! was
  4668. called with an associator proc that returns neither a pair nor #f.
  4669. ** Secondary threads now always return a valid module for (current-module).
  4670. ** Avoid MacOS build problems caused by incorrect combination of "64"
  4671. system and library calls.
  4672. ** `guile-snarf' now honors `$TMPDIR'
  4673. ** `guile-config compile' now reports CPPFLAGS used at compile-time
  4674. ** Fixed build with Sun Studio (Solaris 9)
  4675. ** Fixed wrong-type-arg errors when creating zero length SRFI-4
  4676. uniform vectors on AIX.
  4677. ** Fixed a deadlock that occurs upon GC with multiple threads.
  4678. ** Fixed compile problem with GCC on Solaris and AIX (use of _Complex_I)
  4679. ** Fixed autotool-derived build problems on AIX 6.1.
  4680. ** Fixed NetBSD/alpha support
  4681. ** Fixed MacOS build problem caused by use of rl_get_keymap(_name)
  4682. * New modules (see the manual for details)
  4683. ** `(srfi srfi-69)'
  4684. * Documentation fixes and improvements
  4685. ** Removed premature breakpoint documentation
  4686. The features described are not available in the series of 1.8.x
  4687. releases, so the documentation was misleading and has been removed.
  4688. ** More about Guile's default *random-state* variable
  4689. ** GOOPS: more about how to use `next-method'
  4690. * Changes to the distribution
  4691. ** Corrected a few files that referred incorrectly to the old GPL + special exception licence
  4692. In fact Guile since 1.8.0 has been licensed with the GNU Lesser
  4693. General Public License, and the few incorrect files have now been
  4694. fixed to agree with the rest of the Guile distribution.
  4695. ** Removed unnecessary extra copies of COPYING*
  4696. The distribution now contains a single COPYING.LESSER at its top level.
  4697. Changes in 1.8.3 (since 1.8.2)
  4698. * New modules (see the manual for details)
  4699. ** `(srfi srfi-35)'
  4700. ** `(srfi srfi-37)'
  4701. * Bugs fixed
  4702. ** The `(ice-9 slib)' module now works as expected
  4703. ** Expressions like "(set! 'x #t)" no longer yield a crash
  4704. ** Warnings about duplicate bindings now go to stderr
  4705. ** A memory leak in `make-socket-address' was fixed
  4706. ** Alignment issues (e.g., on SPARC) in network routines were fixed
  4707. ** A threading issue that showed up at least on NetBSD was fixed
  4708. ** Build problems on Solaris and IRIX fixed
  4709. * Implementation improvements
  4710. ** The reader is now faster, which reduces startup time
  4711. ** Procedures returned by `record-accessor' and `record-modifier' are faster
  4712. Changes in 1.8.2 (since 1.8.1):
  4713. * New procedures (see the manual for details)
  4714. ** set-program-arguments
  4715. ** make-vtable
  4716. * Incompatible changes
  4717. ** The body of a top-level `define' no longer sees the binding being created
  4718. In a top-level `define', the binding being created is no longer visible
  4719. from the `define' body. This breaks code like
  4720. "(define foo (begin (set! foo 1) (+ foo 1)))", where `foo' is now
  4721. unbound in the body. However, such code was not R5RS-compliant anyway,
  4722. per Section 5.2.1.
  4723. * Bugs fixed
  4724. ** Fractions were not `equal?' if stored in unreduced form.
  4725. (A subtle problem, since printing a value reduced it, making it work.)
  4726. ** srfi-60 `copy-bit' failed on 64-bit systems
  4727. ** "guile --use-srfi" option at the REPL can replace core functions
  4728. (Programs run with that option were ok, but in the interactive REPL
  4729. the core bindings got priority, preventing SRFI replacements or
  4730. extensions.)
  4731. ** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
  4732. ** `kill' on mingw throws an error for a PID other than oneself
  4733. ** Procedure names are attached to procedure-with-setters
  4734. ** Array read syntax works with negative lower bound
  4735. ** `array-in-bounds?' fix if an array has different lower bounds on each index
  4736. ** `*' returns exact 0 for "(* inexact 0)"
  4737. This follows what it always did for "(* 0 inexact)".
  4738. ** SRFI-19: Value returned by `(current-time time-process)' was incorrect
  4739. ** SRFI-19: `date->julian-day' did not account for timezone offset
  4740. ** `ttyname' no longer crashes when passed a non-tty argument
  4741. ** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address
  4742. ** Small memory leaks have been fixed in `make-fluid' and `add-history'
  4743. ** GOOPS: Fixed a bug in `method-more-specific?'
  4744. ** Build problems on Solaris fixed
  4745. ** Build problems on HP-UX IA64 fixed
  4746. ** Build problems on MinGW fixed
  4747. Changes in 1.8.1 (since 1.8.0):
  4748. * LFS functions are now used to access 64-bit files on 32-bit systems.
  4749. * New procedures (see the manual for details)
  4750. ** primitive-_exit - [Scheme] the-root-module
  4751. ** scm_primitive__exit - [C]
  4752. ** make-completion-function - [Scheme] (ice-9 readline)
  4753. ** scm_c_locale_stringn_to_number - [C]
  4754. ** scm_srfi1_append_reverse [C]
  4755. ** scm_srfi1_append_reverse_x [C]
  4756. ** scm_log - [C]
  4757. ** scm_log10 - [C]
  4758. ** scm_exp - [C]
  4759. ** scm_sqrt - [C]
  4760. * Bugs fixed
  4761. ** Build problems have been fixed on MacOS, SunOS, and QNX.
  4762. ** `strftime' fix sign of %z timezone offset.
  4763. ** A one-dimensional array can now be 'equal?' to a vector.
  4764. ** Structures, records, and SRFI-9 records can now be compared with `equal?'.
  4765. ** SRFI-14 standard char sets are recomputed upon a successful `setlocale'.
  4766. ** `record-accessor' and `record-modifier' now have strict type checks.
  4767. Record accessor and modifier procedures now throw an error if the
  4768. record type of the record they're given is not the type expected.
  4769. (Previously accessors returned #f and modifiers silently did nothing).
  4770. ** It is now OK to use both autoload and use-modules on a given module.
  4771. ** `apply' checks the number of arguments more carefully on "0 or 1" funcs.
  4772. Previously there was no checking on primatives like make-vector that
  4773. accept "one or two" arguments. Now there is.
  4774. ** The srfi-1 assoc function now calls its equality predicate properly.
  4775. Previously srfi-1 assoc would call the equality predicate with the key
  4776. last. According to the SRFI, the key should be first.
  4777. ** A bug in n-par-for-each and n-for-each-par-map has been fixed.
  4778. ** The array-set! procedure no longer segfaults when given a bit vector.
  4779. ** Bugs in make-shared-array have been fixed.
  4780. ** string<? and friends now follow char<? etc order on 8-bit chars.
  4781. ** The format procedure now handles inf and nan values for ~f correctly.
  4782. ** exact->inexact should no longer overflow when given certain large fractions.
  4783. ** srfi-9 accessor and modifier procedures now have strict record type checks.
  4784. This matches the srfi-9 specification.
  4785. ** (ice-9 ftw) procedures won't ignore different files with same inode number.
  4786. Previously the (ice-9 ftw) procedures would ignore any file that had
  4787. the same inode number as a file they had already seen, even if that
  4788. file was on a different device.
  4789. Changes in 1.8.0 (changes since the 1.6.x series):
  4790. * Changes to the distribution
  4791. ** Guile is now licensed with the GNU Lesser General Public License.
  4792. ** The manual is now licensed with the GNU Free Documentation License.
  4793. ** Guile now requires GNU MP (http://swox.com/gmp).
  4794. Guile now uses the GNU MP library for arbitrary precision arithmetic.
  4795. ** Guile now has separate private and public configuration headers.
  4796. That is, things like HAVE_STRING_H no longer leak from Guile's
  4797. headers.
  4798. ** Guile now provides and uses an "effective" version number.
  4799. Guile now provides scm_effective_version and effective-version
  4800. functions which return the "effective" version number. This is just
  4801. the normal full version string without the final micro-version number,
  4802. so the current effective-version is "1.8". The effective version
  4803. should remain unchanged during a stable series, and should be used for
  4804. items like the versioned share directory name
  4805. i.e. /usr/share/guile/1.8.
  4806. Providing an unchanging version number during a stable release for
  4807. things like the versioned share directory can be particularly
  4808. important for Guile "add-on" packages, since it provides a directory
  4809. that they can install to that won't be changed out from under them
  4810. with each micro release during a stable series.
  4811. ** Thread implementation has changed.
  4812. When you configure "--with-threads=null", you will get the usual
  4813. threading API (call-with-new-thread, make-mutex, etc), but you can't
  4814. actually create new threads. Also, "--with-threads=no" is now
  4815. equivalent to "--with-threads=null". This means that the thread API
  4816. is always present, although you might not be able to create new
  4817. threads.
  4818. When you configure "--with-threads=pthreads" or "--with-threads=yes",
  4819. you will get threads that are implemented with the portable POSIX
  4820. threads. These threads can run concurrently (unlike the previous
  4821. "coop" thread implementation), but need to cooperate for things like
  4822. the GC.
  4823. The default is "pthreads", unless your platform doesn't have pthreads,
  4824. in which case "null" threads are used.
  4825. See the manual for details, nodes "Initialization", "Multi-Threading",
  4826. "Blocking", and others.
  4827. ** There is the new notion of 'discouraged' features.
  4828. This is a milder form of deprecation.
  4829. Things that are discouraged should not be used in new code, but it is
  4830. OK to leave them in old code for now. When a discouraged feature is
  4831. used, no warning message is printed like there is for 'deprecated'
  4832. features. Also, things that are merely discouraged are nevertheless
  4833. implemented efficiently, while deprecated features can be very slow.
  4834. You can omit discouraged features from libguile by configuring it with
  4835. the '--disable-discouraged' option.
  4836. ** Deprecation warnings can be controlled at run-time.
  4837. (debug-enable 'warn-deprecated) switches them on and (debug-disable
  4838. 'warn-deprecated) switches them off.
  4839. ** Support for SRFI 61, extended cond syntax for multiple values has
  4840. been added.
  4841. This SRFI is always available.
  4842. ** Support for require-extension, SRFI-55, has been added.
  4843. The SRFI-55 special form `require-extension' has been added. It is
  4844. available at startup, and provides a portable way to load Scheme
  4845. extensions. SRFI-55 only requires support for one type of extension,
  4846. "srfi"; so a set of SRFIs may be loaded via (require-extension (srfi 1
  4847. 13 14)).
  4848. ** New module (srfi srfi-26) provides support for `cut' and `cute'.
  4849. The (srfi srfi-26) module is an implementation of SRFI-26 which
  4850. provides the `cut' and `cute' syntax. These may be used to specialize
  4851. parameters without currying.
  4852. ** New module (srfi srfi-31)
  4853. This is an implementation of SRFI-31 which provides a special form
  4854. `rec' for recursive evaluation.
  4855. ** The modules (srfi srfi-13), (srfi srfi-14) and (srfi srfi-4) have
  4856. been merged with the core, making their functionality always
  4857. available.
  4858. The modules are still available, tho, and you could use them together
  4859. with a renaming import, for example.
  4860. ** Guile no longer includes its own version of libltdl.
  4861. The official version is good enough now.
  4862. ** The --enable-htmldoc option has been removed from 'configure'.
  4863. Support for translating the documentation into HTML is now always
  4864. provided. Use 'make html'.
  4865. ** New module (ice-9 serialize):
  4866. (serialize FORM1 ...) and (parallelize FORM1 ...) are useful when you
  4867. don't trust the thread safety of most of your program, but where you
  4868. have some section(s) of code which you consider can run in parallel to
  4869. other sections. See ice-9/serialize.scm for more information.
  4870. ** The configure option '--disable-arrays' has been removed.
  4871. Support for arrays and uniform numeric arrays is now always included
  4872. in Guile.
  4873. * Changes to the stand-alone interpreter
  4874. ** New command line option `-L'.
  4875. This option adds a directory to the front of the load path.
  4876. ** New command line option `--no-debug'.
  4877. Specifying `--no-debug' on the command line will keep the debugging
  4878. evaluator turned off, even for interactive sessions.
  4879. ** User-init file ~/.guile is now loaded with the debugging evaluator.
  4880. Previously, the normal evaluator would have been used. Using the
  4881. debugging evaluator gives better error messages.
  4882. ** The '-e' option now 'read's its argument.
  4883. This is to allow the new '(@ MODULE-NAME VARIABLE-NAME)' construct to
  4884. be used with '-e'. For example, you can now write a script like
  4885. #! /bin/sh
  4886. exec guile -e '(@ (demo) main)' -s "$0" "$@"
  4887. !#
  4888. (define-module (demo)
  4889. :export (main))
  4890. (define (main args)
  4891. (format #t "Demo: ~a~%" args))
  4892. * Changes to Scheme functions and syntax
  4893. ** Guardians have changed back to their original semantics
  4894. Guardians now behave like described in the paper by Dybvig et al. In
  4895. particular, they no longer make guarantees about the order in which
  4896. they return objects, and they can no longer be greedy.
  4897. They no longer drop cyclic data structures.
  4898. The C function scm_make_guardian has been changed incompatibly and no
  4899. longer takes the 'greedy_p' argument.
  4900. ** New function hashx-remove!
  4901. This function completes the set of 'hashx' functions.
  4902. ** The concept of dynamic roots has been factored into continuation
  4903. barriers and dynamic states.
  4904. Each thread has a current dynamic state that carries the values of the
  4905. fluids. You can create and copy dynamic states and use them as the
  4906. second argument for 'eval'. See "Fluids and Dynamic States" in the
  4907. manual.
  4908. To restrict the influence that captured continuations can have on the
  4909. control flow, you can errect continuation barriers. See "Continuation
  4910. Barriers" in the manual.
  4911. The function call-with-dynamic-root now essentially temporarily
  4912. installs a new dynamic state and errects a continuation barrier.
  4913. ** The default load path no longer includes "." at the end.
  4914. Automatically loading modules from the current directory should not
  4915. happen by default. If you want to allow it in a more controlled
  4916. manner, set the environment variable GUILE_LOAD_PATH or the Scheme
  4917. variable %load-path.
  4918. ** The uniform vector and array support has been overhauled.
  4919. It now complies with SRFI-4 and the weird prototype based uniform
  4920. array creation has been deprecated. See the manual for more details.
  4921. Some non-compatible changes have been made:
  4922. - characters can no longer be stored into byte arrays.
  4923. - strings and bit vectors are no longer considered to be uniform numeric
  4924. vectors.
  4925. - array-rank throws an error for non-arrays instead of returning zero.
  4926. - array-ref does no longer accept non-arrays when no indices are given.
  4927. There is the new notion of 'generalized vectors' and corresponding
  4928. procedures like 'generalized-vector-ref'. Generalized vectors include
  4929. strings, bitvectors, ordinary vectors, and uniform numeric vectors.
  4930. Arrays use generalized vectors as their storage, so that you still
  4931. have arrays of characters, bits, etc. However, uniform-array-read!
  4932. and uniform-array-write can no longer read/write strings and
  4933. bitvectors.
  4934. ** There is now support for copy-on-write substrings, mutation-sharing
  4935. substrings and read-only strings.
  4936. Three new procedures are related to this: substring/shared,
  4937. substring/copy, and substring/read-only. See the manual for more
  4938. information.
  4939. ** Backtraces will now highlight the value that caused the error.
  4940. By default, these values are enclosed in "{...}", such as in this
  4941. example:
  4942. guile> (car 'a)
  4943. Backtrace:
  4944. In current input:
  4945. 1: 0* [car {a}]
  4946. <unnamed port>:1:1: In procedure car in expression (car (quote a)):
  4947. <unnamed port>:1:1: Wrong type (expecting pair): a
  4948. ABORT: (wrong-type-arg)
  4949. The prefix and suffix used for highlighting can be set via the two new
  4950. printer options 'highlight-prefix' and 'highlight-suffix'. For
  4951. example, putting this into ~/.guile will output the bad value in bold
  4952. on an ANSI terminal:
  4953. (print-set! highlight-prefix "\x1b[1m")
  4954. (print-set! highlight-suffix "\x1b[22m")
  4955. ** 'gettext' support for internationalization has been added.
  4956. See the manual for details.
  4957. ** New syntax '@' and '@@':
  4958. You can now directly refer to variables exported from a module by
  4959. writing
  4960. (@ MODULE-NAME VARIABLE-NAME)
  4961. For example (@ (ice-9 pretty-print) pretty-print) will directly access
  4962. the pretty-print variable exported from the (ice-9 pretty-print)
  4963. module. You don't need to 'use' that module first. You can also use
  4964. '@' as a target of 'set!', as in (set! (@ mod var) val).
  4965. The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
  4966. but it can also access variables that have not been exported. It is
  4967. intended only for kluges and temporary fixes and for debugging, not
  4968. for ordinary code.
  4969. ** Keyword syntax has been made more disciplined.
  4970. Previously, the name of a keyword was read as a 'token' but printed as
  4971. a symbol. Now, it is read as a general Scheme datum which must be a
  4972. symbol.
  4973. Previously:
  4974. guile> #:12
  4975. #:#{12}#
  4976. guile> #:#{12}#
  4977. #:#{\#{12}\#}#
  4978. guile> #:(a b c)
  4979. #:#{}#
  4980. ERROR: In expression (a b c):
  4981. Unbound variable: a
  4982. guile> #: foo
  4983. #:#{}#
  4984. ERROR: Unbound variable: foo
  4985. Now:
  4986. guile> #:12
  4987. ERROR: Wrong type (expecting symbol): 12
  4988. guile> #:#{12}#
  4989. #:#{12}#
  4990. guile> #:(a b c)
  4991. ERROR: Wrong type (expecting symbol): (a b c)
  4992. guile> #: foo
  4993. #:foo
  4994. ** The printing of symbols that might look like keywords can be
  4995. controlled.
  4996. The new printer option 'quote-keywordish-symbols' controls how symbols
  4997. are printed that have a colon as their first or last character. The
  4998. default now is to only quote a symbol with #{...}# when the read
  4999. option 'keywords' is not '#f'. Thus:
  5000. guile> (define foo (string->symbol ":foo"))
  5001. guile> (read-set! keywords #f)
  5002. guile> foo
  5003. :foo
  5004. guile> (read-set! keywords 'prefix)
  5005. guile> foo
  5006. #{:foo}#
  5007. guile> (print-set! quote-keywordish-symbols #f)
  5008. guile> foo
  5009. :foo
  5010. ** 'while' now provides 'break' and 'continue'
  5011. break and continue were previously bound in a while loop, but not
  5012. documented, and continue didn't quite work properly. The undocumented
  5013. parameter to break which gave a return value for the while has been
  5014. dropped.
  5015. ** 'call-with-current-continuation' is now also available under the name
  5016. 'call/cc'.
  5017. ** The module system now checks for duplicate bindings.
  5018. The module system now can check for name conflicts among imported
  5019. bindings.
  5020. The behavior can be controlled by specifying one or more 'duplicates'
  5021. handlers. For example, to make Guile return an error for every name
  5022. collision, write:
  5023. (define-module (foo)
  5024. :use-module (bar)
  5025. :use-module (baz)
  5026. :duplicates check)
  5027. The new default behavior of the module system when a name collision
  5028. has been detected is to
  5029. 1. Give priority to bindings marked as a replacement.
  5030. 2. Issue a warning (different warning if overriding core binding).
  5031. 3. Give priority to the last encountered binding (this corresponds to
  5032. the old behavior).
  5033. If you want the old behavior back without replacements or warnings you
  5034. can add the line:
  5035. (default-duplicate-binding-handler 'last)
  5036. to your .guile init file.
  5037. ** New define-module option: :replace
  5038. :replace works as :export, but, in addition, marks the binding as a
  5039. replacement.
  5040. A typical example is `format' in (ice-9 format) which is a replacement
  5041. for the core binding `format'.
  5042. ** Adding prefixes to imported bindings in the module system
  5043. There is now a new :use-module option :prefix. It can be used to add
  5044. a prefix to all imported bindings.
  5045. (define-module (foo)
  5046. :use-module ((bar) :prefix bar:))
  5047. will import all bindings exported from bar, but rename them by adding
  5048. the prefix `bar:'.
  5049. ** Conflicting generic functions can be automatically merged.
  5050. When two imported bindings conflict and they are both generic
  5051. functions, the two functions can now be merged automatically. This is
  5052. activated with the 'duplicates' handler 'merge-generics'.
  5053. ** New function: effective-version
  5054. Returns the "effective" version number. This is just the normal full
  5055. version string without the final micro-version number. See "Changes
  5056. to the distribution" above.
  5057. ** New threading functions: parallel, letpar, par-map, and friends
  5058. These are convenient ways to run calculations in parallel in new
  5059. threads. See "Parallel forms" in the manual for details.
  5060. ** New function 'try-mutex'.
  5061. This function will attempt to lock a mutex but will return immediately
  5062. instead of blocking and indicate failure.
  5063. ** Waiting on a condition variable can have a timeout.
  5064. The function 'wait-condition-variable' now takes a third, optional
  5065. argument that specifies the point in time where the waiting should be
  5066. aborted.
  5067. ** New function 'broadcast-condition-variable'.
  5068. ** New functions 'all-threads' and 'current-thread'.
  5069. ** Signals and system asyncs work better with threads.
  5070. The function 'sigaction' now takes a fourth, optional, argument that
  5071. specifies the thread that the handler should run in. When the
  5072. argument is omitted, the handler will run in the thread that called
  5073. 'sigaction'.
  5074. Likewise, 'system-async-mark' takes a second, optional, argument that
  5075. specifies the thread that the async should run in. When it is
  5076. omitted, the async will run in the thread that called
  5077. 'system-async-mark'.
  5078. C code can use the new functions scm_sigaction_for_thread and
  5079. scm_system_async_mark_for_thread to pass the new thread argument.
  5080. When a thread blocks on a mutex, a condition variable or is waiting
  5081. for IO to be possible, it will still execute system asyncs. This can
  5082. be used to interrupt such a thread by making it execute a 'throw', for
  5083. example.
  5084. ** The function 'system-async' is deprecated.
  5085. You can now pass any zero-argument procedure to 'system-async-mark'.
  5086. The function 'system-async' will just return its argument unchanged
  5087. now.
  5088. ** New functions 'call-with-blocked-asyncs' and
  5089. 'call-with-unblocked-asyncs'
  5090. The expression (call-with-blocked-asyncs PROC) will call PROC and will
  5091. block execution of system asyncs for the current thread by one level
  5092. while PROC runs. Likewise, call-with-unblocked-asyncs will call a
  5093. procedure and will unblock the execution of system asyncs by one
  5094. level for the current thread.
  5095. Only system asyncs are affected by these functions.
  5096. ** The functions 'mask-signals' and 'unmask-signals' are deprecated.
  5097. Use 'call-with-blocked-asyncs' or 'call-with-unblocked-asyncs'
  5098. instead. Those functions are easier to use correctly and can be
  5099. nested.
  5100. ** New function 'unsetenv'.
  5101. ** New macro 'define-syntax-public'.
  5102. It works like 'define-syntax' and also exports the defined macro (but
  5103. only on top-level).
  5104. ** There is support for Infinity and NaNs.
  5105. Following PLT Scheme, Guile can now work with infinite numbers, and
  5106. 'not-a-numbers'.
  5107. There is new syntax for numbers: "+inf.0" (infinity), "-inf.0"
  5108. (negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as
  5109. "+nan.0"). These numbers are inexact and have no exact counterpart.
  5110. Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the
  5111. sign of the dividend. The infinities are integers, and they answer #t
  5112. for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is
  5113. not '=' to itself, but '+nan.0' is 'eqv?' to itself.
  5114. For example
  5115. (/ 1 0.0)
  5116. => +inf.0
  5117. (/ 0 0.0)
  5118. => +nan.0
  5119. (/ 0)
  5120. ERROR: Numerical overflow
  5121. Two new predicates 'inf?' and 'nan?' can be used to test for the
  5122. special values.
  5123. ** Inexact zero can have a sign.
  5124. Guile can now distinguish between plus and minus inexact zero, if your
  5125. platform supports this, too. The two zeros are equal according to
  5126. '=', but not according to 'eqv?'. For example
  5127. (- 0.0)
  5128. => -0.0
  5129. (= 0.0 (- 0.0))
  5130. => #t
  5131. (eqv? 0.0 (- 0.0))
  5132. => #f
  5133. ** Guile now has exact rationals.
  5134. Guile can now represent fractions such as 1/3 exactly. Computing with
  5135. them is also done exactly, of course:
  5136. (* 1/3 3/2)
  5137. => 1/2
  5138. ** 'floor', 'ceiling', 'round' and 'truncate' now return exact numbers
  5139. for exact arguments.
  5140. For example: (floor 2) now returns an exact 2 where in the past it
  5141. returned an inexact 2.0. Likewise, (floor 5/4) returns an exact 1.
  5142. ** inexact->exact no longer returns only integers.
  5143. Without exact rationals, the closest exact number was always an
  5144. integer, but now inexact->exact returns the fraction that is exactly
  5145. equal to a floating point number. For example:
  5146. (inexact->exact 1.234)
  5147. => 694680242521899/562949953421312
  5148. When you want the old behavior, use 'round' explicitly:
  5149. (inexact->exact (round 1.234))
  5150. => 1
  5151. ** New function 'rationalize'.
  5152. This function finds a simple fraction that is close to a given real
  5153. number. For example (and compare with inexact->exact above):
  5154. (rationalize (inexact->exact 1.234) 1/2000)
  5155. => 58/47
  5156. Note that, as required by R5RS, rationalize returns only then an exact
  5157. result when both its arguments are exact.
  5158. ** 'odd?' and 'even?' work also for inexact integers.
  5159. Previously, (odd? 1.0) would signal an error since only exact integers
  5160. were recognized as integers. Now (odd? 1.0) returns #t, (odd? 2.0)
  5161. returns #f and (odd? 1.5) signals an error.
  5162. ** Guile now has uninterned symbols.
  5163. The new function 'make-symbol' will return an uninterned symbol. This
  5164. is a symbol that is unique and is guaranteed to remain unique.
  5165. However, uninterned symbols can not yet be read back in.
  5166. Use the new function 'symbol-interned?' to check whether a symbol is
  5167. interned or not.
  5168. ** pretty-print has more options.
  5169. The function pretty-print from the (ice-9 pretty-print) module can now
  5170. also be invoked with keyword arguments that control things like
  5171. maximum output width. See the manual for details.
  5172. ** Variables have no longer a special behavior for `equal?'.
  5173. Previously, comparing two variables with `equal?' would recursivly
  5174. compare their values. This is no longer done. Variables are now only
  5175. `equal?' if they are `eq?'.
  5176. ** `(begin)' is now valid.
  5177. You can now use an empty `begin' form. It will yield #<unspecified>
  5178. when evaluated and simply be ignored in a definition context.
  5179. ** Deprecated: procedure->macro
  5180. Change your code to use 'define-macro' or r5rs macros. Also, be aware
  5181. that macro expansion will not be done during evaluation, but prior to
  5182. evaluation.
  5183. ** Soft ports now allow a `char-ready?' procedure
  5184. The vector argument to `make-soft-port' can now have a length of
  5185. either 5 or 6. (Previously the length had to be 5.) The optional 6th
  5186. element is interpreted as an `input-waiting' thunk -- i.e. a thunk
  5187. that returns the number of characters that can be read immediately
  5188. without the soft port blocking.
  5189. ** Deprecated: undefine
  5190. There is no replacement for undefine.
  5191. ** The functions make-keyword-from-dash-symbol and keyword-dash-symbol
  5192. have been discouraged.
  5193. They are relics from a time where a keyword like #:foo was used
  5194. directly as a Tcl option "-foo" and thus keywords were internally
  5195. stored as a symbol with a starting dash. We now store a symbol
  5196. without the dash.
  5197. Use symbol->keyword and keyword->symbol instead.
  5198. ** The `cheap' debug option is now obsolete
  5199. Evaluator trap calls are now unconditionally "cheap" - in other words,
  5200. they pass a debug object to the trap handler rather than a full
  5201. continuation. The trap handler code can capture a full continuation
  5202. by using `call-with-current-continuation' in the usual way, if it so
  5203. desires.
  5204. The `cheap' option is retained for now so as not to break existing
  5205. code which gets or sets it, but setting it now has no effect. It will
  5206. be removed in the next major Guile release.
  5207. ** Evaluator trap calls now support `tweaking'
  5208. `Tweaking' means that the trap handler code can modify the Scheme
  5209. expression that is about to be evaluated (in the case of an
  5210. enter-frame trap) or the value that is being returned (in the case of
  5211. an exit-frame trap). The trap handler code indicates that it wants to
  5212. do this by returning a pair whose car is the symbol 'instead and whose
  5213. cdr is the modified expression or return value.
  5214. * Changes to the C interface
  5215. ** The functions scm_hash_fn_remove_x and scm_hashx_remove_x no longer
  5216. take a 'delete' function argument.
  5217. This argument makes no sense since the delete function is used to
  5218. remove a pair from an alist, and this must not be configurable.
  5219. This is an incompatible change.
  5220. ** The GH interface is now subject to the deprecation mechanism
  5221. The GH interface has been deprecated for quite some time but now it is
  5222. actually removed from Guile when it is configured with
  5223. --disable-deprecated.
  5224. See the manual "Transitioning away from GH" for more information.
  5225. ** A new family of functions for converting between C values and
  5226. Scheme values has been added.
  5227. These functions follow a common naming scheme and are designed to be
  5228. easier to use, thread-safe and more future-proof than the older
  5229. alternatives.
  5230. - int scm_is_* (...)
  5231. These are predicates that return a C boolean: 1 or 0. Instead of
  5232. SCM_NFALSEP, you can now use scm_is_true, for example.
  5233. - <type> scm_to_<type> (SCM val, ...)
  5234. These are functions that convert a Scheme value into an appropriate
  5235. C value. For example, you can use scm_to_int to safely convert from
  5236. a SCM to an int.
  5237. - SCM scm_from_<type> (<type> val, ...)
  5238. These functions convert from a C type to a SCM value; for example,
  5239. scm_from_int for ints.
  5240. There is a huge number of these functions, for numbers, strings,
  5241. symbols, vectors, etc. They are documented in the reference manual in
  5242. the API section together with the types that they apply to.
  5243. ** New functions for dealing with complex numbers in C have been added.
  5244. The new functions are scm_c_make_rectangular, scm_c_make_polar,
  5245. scm_c_real_part, scm_c_imag_part, scm_c_magnitude and scm_c_angle.
  5246. They work like scm_make_rectangular etc but take or return doubles
  5247. directly.
  5248. ** The function scm_make_complex has been discouraged.
  5249. Use scm_c_make_rectangular instead.
  5250. ** The INUM macros have been deprecated.
  5251. A lot of code uses these macros to do general integer conversions,
  5252. although the macros only work correctly with fixnums. Use the
  5253. following alternatives.
  5254. SCM_INUMP -> scm_is_integer or similar
  5255. SCM_NINUMP -> !scm_is_integer or similar
  5256. SCM_MAKINUM -> scm_from_int or similar
  5257. SCM_INUM -> scm_to_int or similar
  5258. SCM_VALIDATE_INUM_* -> Do not use these; scm_to_int, etc. will
  5259. do the validating for you.
  5260. ** The scm_num2<type> and scm_<type>2num functions and scm_make_real
  5261. have been discouraged.
  5262. Use the newer scm_to_<type> and scm_from_<type> functions instead for
  5263. new code. The functions have been discouraged since they don't fit
  5264. the naming scheme.
  5265. ** The 'boolean' macros SCM_FALSEP etc have been discouraged.
  5266. They have strange names, especially SCM_NFALSEP, and SCM_BOOLP
  5267. evaluates its argument twice. Use scm_is_true, etc. instead for new
  5268. code.
  5269. ** The macro SCM_EQ_P has been discouraged.
  5270. Use scm_is_eq for new code, which fits better into the naming
  5271. conventions.
  5272. ** The macros SCM_CONSP, SCM_NCONSP, SCM_NULLP, and SCM_NNULLP have
  5273. been discouraged.
  5274. Use the function scm_is_pair or scm_is_null instead.
  5275. ** The functions scm_round and scm_truncate have been deprecated and
  5276. are now available as scm_c_round and scm_c_truncate, respectively.
  5277. These functions occupy the names that scm_round_number and
  5278. scm_truncate_number should have.
  5279. ** The functions scm_c_string2str, scm_c_substring2str, and
  5280. scm_c_symbol2str have been deprecated.
  5281. Use scm_to_locale_stringbuf or similar instead, maybe together with
  5282. scm_substring.
  5283. ** New functions scm_c_make_string, scm_c_string_length,
  5284. scm_c_string_ref, scm_c_string_set_x, scm_c_substring,
  5285. scm_c_substring_shared, scm_c_substring_copy.
  5286. These are like scm_make_string, scm_length, etc. but are slightly
  5287. easier to use from C.
  5288. ** The macros SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_LENGTH,
  5289. SCM_SYMBOL_CHARS, and SCM_SYMBOL_LENGTH have been deprecated.
  5290. They export too many assumptions about the implementation of strings
  5291. and symbols that are no longer true in the presence of
  5292. mutation-sharing substrings and when Guile switches to some form of
  5293. Unicode.
  5294. When working with strings, it is often best to use the normal string
  5295. functions provided by Guile, such as scm_c_string_ref,
  5296. scm_c_string_set_x, scm_string_append, etc. Be sure to look in the
  5297. manual since many more such functions are now provided than
  5298. previously.
  5299. When you want to convert a SCM string to a C string, use the
  5300. scm_to_locale_string function or similar instead. For symbols, use
  5301. scm_symbol_to_string and then work with that string. Because of the
  5302. new string representation, scm_symbol_to_string does not need to copy
  5303. and is thus quite efficient.
  5304. ** Some string, symbol and keyword functions have been discouraged.
  5305. They don't fit into the uniform naming scheme and are not explicit
  5306. about the character encoding.
  5307. Replace according to the following table:
  5308. scm_allocate_string -> scm_c_make_string
  5309. scm_take_str -> scm_take_locale_stringn
  5310. scm_take0str -> scm_take_locale_string
  5311. scm_mem2string -> scm_from_locale_stringn
  5312. scm_str2string -> scm_from_locale_string
  5313. scm_makfrom0str -> scm_from_locale_string
  5314. scm_mem2symbol -> scm_from_locale_symboln
  5315. scm_mem2uninterned_symbol -> scm_from_locale_stringn + scm_make_symbol
  5316. scm_str2symbol -> scm_from_locale_symbol
  5317. SCM_SYMBOL_HASH -> scm_hashq
  5318. SCM_SYMBOL_INTERNED_P -> scm_symbol_interned_p
  5319. scm_c_make_keyword -> scm_from_locale_keyword
  5320. ** The functions scm_keyword_to_symbol and sym_symbol_to_keyword are
  5321. now also available to C code.
  5322. ** SCM_KEYWORDP and SCM_KEYWORDSYM have been deprecated.
  5323. Use scm_is_keyword and scm_keyword_to_symbol instead, but note that
  5324. the latter returns the true name of the keyword, not the 'dash name',
  5325. as SCM_KEYWORDSYM used to do.
  5326. ** A new way to access arrays in a thread-safe and efficient way has
  5327. been added.
  5328. See the manual, node "Accessing Arrays From C".
  5329. ** The old uniform vector and bitvector implementations have been
  5330. unceremoniously removed.
  5331. This implementation exposed the details of the tagging system of
  5332. Guile. Use the new C API explained in the manual in node "Uniform
  5333. Numeric Vectors" and "Bit Vectors", respectively.
  5334. The following macros are gone: SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
  5335. SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
  5336. SCM_SET_UVECTOR_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
  5337. SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
  5338. SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
  5339. SCM_SET_BITVECTOR_LENGTH, SCM_BITVEC_REF, SCM_BITVEC_SET,
  5340. SCM_BITVEC_CLR.
  5341. ** The macros dealing with vectors have been deprecated.
  5342. Use the new functions scm_is_vector, scm_vector_elements,
  5343. scm_vector_writable_elements, etc, or scm_is_simple_vector,
  5344. SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, etc instead. See the
  5345. manual for more details.
  5346. Deprecated are SCM_VECTORP, SCM_VELTS, SCM_VECTOR_MAX_LENGTH,
  5347. SCM_VECTOR_LENGTH, SCM_VECTOR_REF, SCM_VECTOR_SET, SCM_WRITABLE_VELTS.
  5348. The following macros have been removed: SCM_VECTOR_BASE,
  5349. SCM_SET_VECTOR_BASE, SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
  5350. SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS.
  5351. ** Some C functions and macros related to arrays have been deprecated.
  5352. Migrate according to the following table:
  5353. scm_make_uve -> scm_make_typed_array, scm_make_u8vector etc.
  5354. scm_make_ra -> scm_make_array
  5355. scm_shap2ra -> scm_make_array
  5356. scm_cvref -> scm_c_generalized_vector_ref
  5357. scm_ra_set_contp -> do not use
  5358. scm_aind -> scm_array_handle_pos
  5359. scm_raprin1 -> scm_display or scm_write
  5360. SCM_ARRAYP -> scm_is_array
  5361. SCM_ARRAY_NDIM -> scm_c_array_rank
  5362. SCM_ARRAY_DIMS -> scm_array_handle_dims
  5363. SCM_ARRAY_CONTP -> do not use
  5364. SCM_ARRAY_MEM -> do not use
  5365. SCM_ARRAY_V -> scm_array_handle_elements or similar
  5366. SCM_ARRAY_BASE -> do not use
  5367. ** SCM_CELL_WORD_LOC has been deprecated.
  5368. Use the new macro SCM_CELL_OBJECT_LOC instead, which returns a pointer
  5369. to a SCM, as opposed to a pointer to a scm_t_bits.
  5370. This was done to allow the correct use of pointers into the Scheme
  5371. heap. Previously, the heap words were of type scm_t_bits and local
  5372. variables and function arguments were of type SCM, making it
  5373. non-standards-conformant to have a pointer that can point to both.
  5374. ** New macros SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, etc.
  5375. These macros should be used instead of SCM_CELL_WORD_2/3 to access the
  5376. second and third words of double smobs. Likewise for
  5377. SCM_SET_SMOB_DATA_2 and SCM_SET_SMOB_DATA_3.
  5378. Also, there is SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS that should be
  5379. used to get and set the 16 exra bits in the zeroth word of a smob.
  5380. And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for
  5381. accesing the first immediate word of a smob as a SCM value, and there
  5382. is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate
  5383. smob word. Like wise for SCM_SMOB_OBJECT_2, etc.
  5384. ** New way to deal with non-local exits and re-entries.
  5385. There is a new set of functions that essentially do what
  5386. scm_internal_dynamic_wind does, but in a way that is more convenient
  5387. for C code in some situations. Here is a quick example of how to
  5388. prevent a potential memory leak:
  5389. void
  5390. foo ()
  5391. {
  5392. char *mem;
  5393. scm_dynwind_begin (0);
  5394. mem = scm_malloc (100);
  5395. scm_dynwind_unwind_handler (free, mem, SCM_F_WIND_EXPLICITLY);
  5396. /* MEM would leak if BAR throws an error.
  5397. SCM_DYNWIND_UNWIND_HANDLER frees it nevertheless.
  5398. */
  5399. bar ();
  5400. scm_dynwind_end ();
  5401. /* Because of SCM_F_WIND_EXPLICITLY, MEM will be freed by
  5402. SCM_DYNWIND_END as well.
  5403. */
  5404. }
  5405. For full documentation, see the node "Dynamic Wind" in the manual.
  5406. ** New function scm_dynwind_free
  5407. This function calls 'free' on a given pointer when a dynwind context
  5408. is left. Thus the call to scm_dynwind_unwind_handler above could be
  5409. replaced with simply scm_dynwind_free (mem).
  5410. ** New functions scm_c_call_with_blocked_asyncs and
  5411. scm_c_call_with_unblocked_asyncs
  5412. Like scm_call_with_blocked_asyncs etc. but for C functions.
  5413. ** New functions scm_dynwind_block_asyncs and scm_dynwind_unblock_asyncs
  5414. In addition to scm_c_call_with_blocked_asyncs you can now also use
  5415. scm_dynwind_block_asyncs in a 'dynwind context' (see above). Likewise for
  5416. scm_c_call_with_unblocked_asyncs and scm_dynwind_unblock_asyncs.
  5417. ** The macros SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
  5418. SCM_REALLOW_INTS have been deprecated.
  5419. They do no longer fulfill their original role of blocking signal
  5420. delivery. Depending on what you want to achieve, replace a pair of
  5421. SCM_DEFER_INTS and SCM_ALLOW_INTS with a dynwind context that locks a
  5422. mutex, blocks asyncs, or both. See node "Critical Sections" in the
  5423. manual.
  5424. ** The value 'scm_mask_ints' is no longer writable.
  5425. Previously, you could set scm_mask_ints directly. This is no longer
  5426. possible. Use scm_c_call_with_blocked_asyncs and
  5427. scm_c_call_with_unblocked_asyncs instead.
  5428. ** New way to temporarily set the current input, output or error ports
  5429. C code can now use scm_dynwind_current_<foo>_port in a 'dynwind
  5430. context' (see above). <foo> is one of "input", "output" or "error".
  5431. ** New way to temporarily set fluids
  5432. C code can now use scm_dynwind_fluid in a 'dynwind context' (see
  5433. above) to temporarily set the value of a fluid.
  5434. ** New types scm_t_intmax and scm_t_uintmax.
  5435. On platforms that have them, these types are identical to intmax_t and
  5436. uintmax_t, respectively. On other platforms, they are identical to
  5437. the largest integer types that Guile knows about.
  5438. ** The functions scm_unmemocopy and scm_unmemoize have been removed.
  5439. You should not have used them.
  5440. ** Many public #defines with generic names have been made private.
  5441. #defines with generic names like HAVE_FOO or SIZEOF_FOO have been made
  5442. private or renamed with a more suitable public name.
  5443. ** The macro SCM_TYP16S has been deprecated.
  5444. This macro is not intended for public use.
  5445. ** The macro SCM_SLOPPY_INEXACTP has been deprecated.
  5446. Use scm_is_true (scm_inexact_p (...)) instead.
  5447. ** The macro SCM_SLOPPY_REALP has been deprecated.
  5448. Use scm_is_real instead.
  5449. ** The macro SCM_SLOPPY_COMPLEXP has been deprecated.
  5450. Use scm_is_complex instead.
  5451. ** Some preprocessor defines have been deprecated.
  5452. These defines indicated whether a certain feature was present in Guile
  5453. or not. Going forward, assume that the features are always present.
  5454. The macros are: USE_THREADS, GUILE_ISELECT, READER_EXTENSIONS,
  5455. DEBUG_EXTENSIONS, DYNAMIC_LINKING.
  5456. The following macros have been removed completely: MEMOIZE_LOCALS,
  5457. SCM_RECKLESS, SCM_CAUTIOUS.
  5458. ** The preprocessor define STACK_DIRECTION has been deprecated.
  5459. There should be no need to know about the stack direction for ordinary
  5460. programs.
  5461. ** New function: scm_effective_version
  5462. Returns the "effective" version number. This is just the normal full
  5463. version string without the final micro-version number. See "Changes
  5464. to the distribution" above.
  5465. ** The function scm_call_with_new_thread has a new prototype.
  5466. Instead of taking a list with the thunk and handler, these two
  5467. arguments are now passed directly:
  5468. SCM scm_call_with_new_thread (SCM thunk, SCM handler);
  5469. This is an incompatible change.
  5470. ** New snarfer macro SCM_DEFINE_PUBLIC.
  5471. This is like SCM_DEFINE, but also calls scm_c_export for the defined
  5472. function in the init section.
  5473. ** The snarfer macro SCM_SNARF_INIT is now officially supported.
  5474. ** Garbage collector rewrite.
  5475. The garbage collector is cleaned up a lot, and now uses lazy
  5476. sweeping. This is reflected in the output of (gc-stats); since cells
  5477. are being freed when they are allocated, the cells-allocated field
  5478. stays roughly constant.
  5479. For malloc related triggers, the behavior is changed. It uses the same
  5480. heuristic as the cell-triggered collections. It may be tuned with the
  5481. environment variables GUILE_MIN_YIELD_MALLOC. This is the percentage
  5482. for minimum yield of malloc related triggers. The default is 40.
  5483. GUILE_INIT_MALLOC_LIMIT sets the initial trigger for doing a GC. The
  5484. default is 200 kb.
  5485. Debugging operations for the freelist have been deprecated, along with
  5486. the C variables that control garbage collection. The environment
  5487. variables GUILE_MAX_SEGMENT_SIZE, GUILE_INIT_SEGMENT_SIZE_2,
  5488. GUILE_INIT_SEGMENT_SIZE_1, and GUILE_MIN_YIELD_2 should be used.
  5489. For understanding the memory usage of a GUILE program, the routine
  5490. gc-live-object-stats returns an alist containing the number of live
  5491. objects for every type.
  5492. ** The function scm_definedp has been renamed to scm_defined_p
  5493. The name scm_definedp is deprecated.
  5494. ** The struct scm_cell type has been renamed to scm_t_cell
  5495. This is in accordance to Guile's naming scheme for types. Note that
  5496. the name scm_cell is now used for a function that allocates and
  5497. initializes a new cell (see below).
  5498. ** New functions for memory management
  5499. A new set of functions for memory management has been added since the
  5500. old way (scm_must_malloc, scm_must_free, etc) was error prone and
  5501. indeed, Guile itself contained some long standing bugs that could
  5502. cause aborts in long running programs.
  5503. The new functions are more symmetrical and do not need cooperation
  5504. from smob free routines, among other improvements.
  5505. The new functions are scm_malloc, scm_realloc, scm_calloc, scm_strdup,
  5506. scm_strndup, scm_gc_malloc, scm_gc_calloc, scm_gc_realloc,
  5507. scm_gc_free, scm_gc_register_collectable_memory, and
  5508. scm_gc_unregister_collectable_memory. Refer to the manual for more
  5509. details and for upgrading instructions.
  5510. The old functions for memory management have been deprecated. They
  5511. are: scm_must_malloc, scm_must_realloc, scm_must_free,
  5512. scm_must_strdup, scm_must_strndup, scm_done_malloc, scm_done_free.
  5513. ** Declarations of exported features are marked with SCM_API.
  5514. Every declaration of a feature that belongs to the exported Guile API
  5515. has been marked by adding the macro "SCM_API" to the start of the
  5516. declaration. This macro can expand into different things, the most
  5517. common of which is just "extern" for Unix platforms. On Win32, it can
  5518. be used to control which symbols are exported from a DLL.
  5519. If you `#define SCM_IMPORT' before including <libguile.h>, SCM_API
  5520. will expand into "__declspec (dllimport) extern", which is needed for
  5521. linking to the Guile DLL in Windows.
  5522. There are also SCM_RL_IMPORT, SCM_SRFI1314_IMPORT, and
  5523. SCM_SRFI4_IMPORT, for the corresponding libraries.
  5524. ** SCM_NEWCELL and SCM_NEWCELL2 have been deprecated.
  5525. Use the new functions scm_cell and scm_double_cell instead. The old
  5526. macros had problems because with them allocation and initialization
  5527. was separated and the GC could sometimes observe half initialized
  5528. cells. Only careful coding by the user of SCM_NEWCELL and
  5529. SCM_NEWCELL2 could make this safe and efficient.
  5530. ** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated.
  5531. Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p
  5532. instead.
  5533. ** SRCBRKP has been deprecated.
  5534. Use scm_c_source_property_breakpoint_p instead.
  5535. ** Deprecated: scm_makmacro
  5536. Change your code to use either scm_makmmacro or to define macros in
  5537. Scheme, using 'define-macro'.
  5538. ** New function scm_c_port_for_each.
  5539. This function is like scm_port_for_each but takes a pointer to a C
  5540. function as the callback instead of a SCM value.
  5541. ** The names scm_internal_select, scm_thread_sleep, and
  5542. scm_thread_usleep have been discouraged.
  5543. Use scm_std_select, scm_std_sleep, scm_std_usleep instead.
  5544. ** The GC can no longer be blocked.
  5545. The global flags scm_gc_heap_lock and scm_block_gc have been removed.
  5546. The GC can now run (partially) concurrently with other code and thus
  5547. blocking it is not well defined.
  5548. ** Many definitions have been removed that were previously deprecated.
  5549. scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify, s_t_ify,
  5550. scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
  5551. scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2,
  5552. scm_tc16_allocated, SCM_SET_SYMBOL_HASH, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
  5553. SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY, SCM_GC_SET_ALLOCATED,
  5554. scm_debug_newcell, scm_debug_newcell2, SCM_HUP_SIGNAL, SCM_INT_SIGNAL,
  5555. SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL,
  5556. SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG,
  5557. SCM_NUM_SIGS, scm_top_level_lookup_closure_var,
  5558. *top-level-lookup-closure*, scm_system_transformer, scm_eval_3,
  5559. scm_eval2, root_module_lookup_closure, SCM_SLOPPY_STRINGP,
  5560. SCM_RWSTRINGP, scm_read_only_string_p, scm_make_shared_substring,
  5561. scm_tc7_substring, sym_huh, SCM_VARVCELL, SCM_UDVARIABLEP,
  5562. SCM_DEFVARIABLEP, scm_mkbig, scm_big2inum, scm_adjbig, scm_normbig,
  5563. scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl, SCM_FIXNUM_BIT,
  5564. SCM_SETCHARS, SCM_SLOPPY_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
  5565. SCM_LENGTH_MAX, SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH,
  5566. SCM_ROCHARS, SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR,
  5567. scm_sym2vcell, scm_intern, scm_intern0, scm_sysintern, scm_sysintern0,
  5568. scm_sysintern0_no_module_lookup, scm_init_symbols_deprecated,
  5569. scm_vector_set_length_x, scm_contregs, scm_debug_info,
  5570. scm_debug_frame, SCM_DSIDEVAL, SCM_CONST_LONG, SCM_VCELL,
  5571. SCM_GLOBAL_VCELL, SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT,
  5572. SCM_HUGE_LENGTH, SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
  5573. SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
  5574. SCM_VALIDATE_RWSTRING, DIGITS, scm_small_istr2int, scm_istr2int,
  5575. scm_istr2flo, scm_istring2number, scm_istr2int, scm_istr2flo,
  5576. scm_istring2number, scm_vtable_index_vcell, scm_si_vcell, SCM_ECONSP,
  5577. SCM_NECONSP, SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL,
  5578. SCM_GLOC_VAL_LOC, scm_make_gloc, scm_gloc_p, scm_tc16_variable,
  5579. SCM_CHARS, SCM_LENGTH, SCM_SET_STRING_CHARS, SCM_SET_STRING_LENGTH.
  5580. * Changes to bundled modules
  5581. ** (ice-9 debug)
  5582. Using the (ice-9 debug) module no longer automatically switches Guile
  5583. to use the debugging evaluator. If you want to switch to the
  5584. debugging evaluator (which is needed for backtrace information if you
  5585. hit an error), please add an explicit "(debug-enable 'debug)" to your
  5586. code just after the code to use (ice-9 debug).
  5587. Changes since Guile 1.4:
  5588. * Changes to the distribution
  5589. ** A top-level TODO file is included.
  5590. ** Guile now uses a versioning scheme similar to that of the Linux kernel.
  5591. Guile now always uses three numbers to represent the version,
  5592. i.e. "1.6.5". The first number, 1, is the major version number, the
  5593. second number, 6, is the minor version number, and the third number,
  5594. 5, is the micro version number. Changes in major version number
  5595. indicate major changes in Guile.
  5596. Minor version numbers that are even denote stable releases, and odd
  5597. minor version numbers denote development versions (which may be
  5598. unstable). The micro version number indicates a minor sub-revision of
  5599. a given MAJOR.MINOR release.
  5600. In keeping with the new scheme, (minor-version) and scm_minor_version
  5601. no longer return everything but the major version number. They now
  5602. just return the minor version number. Two new functions
  5603. (micro-version) and scm_micro_version have been added to report the
  5604. micro version number.
  5605. In addition, ./GUILE-VERSION now defines GUILE_MICRO_VERSION.
  5606. ** New preprocessor definitions are available for checking versions.
  5607. version.h now #defines SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
  5608. SCM_MICRO_VERSION to the appropriate integer values.
  5609. ** Guile now actively warns about deprecated features.
  5610. The new configure option `--enable-deprecated=LEVEL' and the
  5611. environment variable GUILE_WARN_DEPRECATED control this mechanism.
  5612. See INSTALL and README for more information.
  5613. ** Guile is much more likely to work on 64-bit architectures.
  5614. Guile now compiles and passes "make check" with only two UNRESOLVED GC
  5615. cases on Alpha and ia64 based machines now. Thanks to John Goerzen
  5616. for the use of a test machine, and thanks to Stefan Jahn for ia64
  5617. patches.
  5618. ** New functions: setitimer and getitimer.
  5619. These implement a fairly direct interface to the libc functions of the
  5620. same name.
  5621. ** The #. reader extension is now disabled by default.
  5622. For safety reasons, #. evaluation is disabled by default. To
  5623. re-enable it, set the fluid read-eval? to #t. For example:
  5624. (fluid-set! read-eval? #t)
  5625. but make sure you realize the potential security risks involved. With
  5626. read-eval? enabled, reading a data file from an untrusted source can
  5627. be dangerous.
  5628. ** New SRFI modules have been added:
  5629. SRFI-0 `cond-expand' is now supported in Guile, without requiring
  5630. using a module.
  5631. (srfi srfi-1) is a library containing many useful pair- and list-processing
  5632. procedures.
  5633. (srfi srfi-2) exports and-let*.
  5634. (srfi srfi-4) implements homogeneous numeric vector datatypes.
  5635. (srfi srfi-6) is a dummy module for now, since guile already provides
  5636. all of the srfi-6 procedures by default: open-input-string,
  5637. open-output-string, get-output-string.
  5638. (srfi srfi-8) exports receive.
  5639. (srfi srfi-9) exports define-record-type.
  5640. (srfi srfi-10) exports define-reader-ctor and implements the reader
  5641. extension #,().
  5642. (srfi srfi-11) exports let-values and let*-values.
  5643. (srfi srfi-13) implements the SRFI String Library.
  5644. (srfi srfi-14) implements the SRFI Character-Set Library.
  5645. (srfi srfi-17) implements setter and getter-with-setter and redefines
  5646. some accessor procedures as procedures with getters. (such as car,
  5647. cdr, vector-ref etc.)
  5648. (srfi srfi-19) implements the SRFI Time/Date Library.
  5649. ** New scripts / "executable modules"
  5650. Subdirectory "scripts" contains Scheme modules that are packaged to
  5651. also be executable as scripts. At this time, these scripts are available:
  5652. display-commentary
  5653. doc-snarf
  5654. generate-autoload
  5655. punify
  5656. read-scheme-source
  5657. use2dot
  5658. See README there for more info.
  5659. These scripts can be invoked from the shell with the new program
  5660. "guile-tools", which keeps track of installation directory for you.
  5661. For example:
  5662. $ guile-tools display-commentary srfi/*.scm
  5663. guile-tools is copied to the standard $bindir on "make install".
  5664. ** New module (ice-9 stack-catch):
  5665. stack-catch is like catch, but saves the current state of the stack in
  5666. the fluid the-last-stack. This fluid can be useful when using the
  5667. debugger and when re-throwing an error.
  5668. ** The module (ice-9 and-let*) has been renamed to (ice-9 and-let-star)
  5669. This has been done to prevent problems on lesser operating systems
  5670. that can't tolerate `*'s in file names. The exported macro continues
  5671. to be named `and-let*', of course.
  5672. On systems that support it, there is also a compatibility module named
  5673. (ice-9 and-let*). It will go away in the next release.
  5674. ** New modules (oop goops) etc.:
  5675. (oop goops)
  5676. (oop goops describe)
  5677. (oop goops save)
  5678. (oop goops active-slot)
  5679. (oop goops composite-slot)
  5680. The Guile Object Oriented Programming System (GOOPS) has been
  5681. integrated into Guile. For further information, consult the GOOPS
  5682. manual and tutorial in the `doc' directory.
  5683. ** New module (ice-9 rdelim).
  5684. This exports the following procedures which were previously defined
  5685. in the default environment:
  5686. read-line read-line! read-delimited read-delimited! %read-delimited!
  5687. %read-line write-line
  5688. For backwards compatibility the definitions are still imported into the
  5689. default environment in this version of Guile. However you should add:
  5690. (use-modules (ice-9 rdelim))
  5691. to any program which uses the definitions, since this may change in
  5692. future.
  5693. Alternatively, if guile-scsh is installed, the (scsh rdelim) module
  5694. can be used for similar functionality.
  5695. ** New module (ice-9 rw)
  5696. This is a subset of the (scsh rw) module from guile-scsh. Currently
  5697. it defines two procedures:
  5698. *** New function: read-string!/partial str [port_or_fdes [start [end]]]
  5699. Read characters from a port or file descriptor into a string STR.
  5700. A port must have an underlying file descriptor -- a so-called
  5701. fport. This procedure is scsh-compatible and can efficiently read
  5702. large strings.
  5703. *** New function: write-string/partial str [port_or_fdes [start [end]]]
  5704. Write characters from a string STR to a port or file descriptor.
  5705. A port must have an underlying file descriptor -- a so-called
  5706. fport. This procedure is mostly compatible and can efficiently
  5707. write large strings.
  5708. ** New module (ice-9 match)
  5709. This module includes Andrew K. Wright's pattern matcher. See
  5710. ice-9/match.scm for brief description or
  5711. http://www.star-lab.com/wright/code.html
  5712. for complete documentation.
  5713. ** New module (ice-9 buffered-input)
  5714. This module provides procedures to construct an input port from an
  5715. underlying source of input that reads and returns its input in chunks.
  5716. The underlying input source is a Scheme procedure, specified by the
  5717. caller, which the port invokes whenever it needs more input.
  5718. This is useful when building an input port whose back end is Readline
  5719. or a UI element such as the GtkEntry widget.
  5720. ** Documentation
  5721. The reference and tutorial documentation that was previously
  5722. distributed separately, as `guile-doc', is now included in the core
  5723. Guile distribution. The documentation consists of the following
  5724. manuals.
  5725. - The Guile Tutorial (guile-tut.texi) contains a tutorial introduction
  5726. to using Guile.
  5727. - The Guile Reference Manual (guile.texi) contains (or is intended to
  5728. contain) reference documentation on all aspects of Guile.
  5729. - The GOOPS Manual (goops.texi) contains both tutorial-style and
  5730. reference documentation for using GOOPS, Guile's Object Oriented
  5731. Programming System.
  5732. - The Revised^5 Report on the Algorithmic Language Scheme
  5733. (r5rs.texi).
  5734. See the README file in the `doc' directory for more details.
  5735. ** There are a couple of examples in the examples/ directory now.
  5736. * Changes to the stand-alone interpreter
  5737. ** New command line option `--use-srfi'
  5738. Using this option, SRFI modules can be loaded on startup and be
  5739. available right from the beginning. This makes programming portable
  5740. Scheme programs easier.
  5741. The option `--use-srfi' expects a comma-separated list of numbers,
  5742. each representing a SRFI number to be loaded into the interpreter
  5743. before starting evaluating a script file or the REPL. Additionally,
  5744. the feature identifier for the loaded SRFIs is recognized by
  5745. `cond-expand' when using this option.
  5746. Example:
  5747. $ guile --use-srfi=8,13
  5748. guile> (receive (x z) (values 1 2) (+ 1 2))
  5749. 3
  5750. guile> (string-pad "bla" 20)
  5751. " bla"
  5752. ** Guile now always starts up in the `(guile-user)' module.
  5753. Previously, scripts executed via the `-s' option would run in the
  5754. `(guile)' module and the repl would run in the `(guile-user)' module.
  5755. Now every user action takes place in the `(guile-user)' module by
  5756. default.
  5757. * Changes to Scheme functions and syntax
  5758. ** Character classifiers work for non-ASCII characters.
  5759. The predicates `char-alphabetic?', `char-numeric?',
  5760. `char-whitespace?', `char-lower?', `char-upper?' and `char-is-both?'
  5761. no longer check whether their arguments are ASCII characters.
  5762. Previously, a character would only be considered alphabetic when it
  5763. was also ASCII, for example.
  5764. ** Previously deprecated Scheme functions have been removed:
  5765. tag - no replacement.
  5766. fseek - replaced by seek.
  5767. list* - replaced by cons*.
  5768. ** It's now possible to create modules with controlled environments
  5769. Example:
  5770. (use-modules (ice-9 safe))
  5771. (define m (make-safe-module))
  5772. ;;; m will now be a module containing only a safe subset of R5RS
  5773. (eval '(+ 1 2) m) --> 3
  5774. (eval 'load m) --> ERROR: Unbound variable: load
  5775. ** Evaluation of "()", the empty list, is now an error.
  5776. Previously, the expression "()" evaluated to the empty list. This has
  5777. been changed to signal a "missing expression" error. The correct way
  5778. to write the empty list as a literal constant is to use quote: "'()".
  5779. ** New concept of `Guile Extensions'.
  5780. A Guile Extension is just a ordinary shared library that can be linked
  5781. at run-time. We found it advantageous to give this simple concept a
  5782. dedicated name to distinguish the issues related to shared libraries
  5783. from the issues related to the module system.
  5784. *** New function: load-extension
  5785. Executing (load-extension lib init) is mostly equivalent to
  5786. (dynamic-call init (dynamic-link lib))
  5787. except when scm_register_extension has been called previously.
  5788. Whenever appropriate, you should use `load-extension' instead of
  5789. dynamic-link and dynamic-call.
  5790. *** New C function: scm_c_register_extension
  5791. This function registers a initialization function for use by
  5792. `load-extension'. Use it when you don't want specific extensions to
  5793. be loaded as shared libraries (for example on platforms that don't
  5794. support dynamic linking).
  5795. ** Auto-loading of compiled-code modules is deprecated.
  5796. Guile used to be able to automatically find and link a shared
  5797. library to satisfy requests for a module. For example, the module
  5798. `(foo bar)' could be implemented by placing a shared library named
  5799. "foo/libbar.so" (or with a different extension) in a directory on the
  5800. load path of Guile.
  5801. This has been found to be too tricky, and is no longer supported. The
  5802. shared libraries are now called "extensions". You should now write a
  5803. small Scheme file that calls `load-extension' to load the shared
  5804. library and initialize it explicitly.
  5805. The shared libraries themselves should be installed in the usual
  5806. places for shared libraries, with names like "libguile-foo-bar".
  5807. For example, place this into a file "foo/bar.scm"
  5808. (define-module (foo bar))
  5809. (load-extension "libguile-foo-bar" "foobar_init")
  5810. ** Backward incompatible change: eval EXP ENVIRONMENT-SPECIFIER
  5811. `eval' is now R5RS, that is it takes two arguments.
  5812. The second argument is an environment specifier, i.e. either
  5813. (scheme-report-environment 5)
  5814. (null-environment 5)
  5815. (interaction-environment)
  5816. or
  5817. any module.
  5818. ** The module system has been made more disciplined.
  5819. The function `eval' will save and restore the current module around
  5820. the evaluation of the specified expression. While this expression is
  5821. evaluated, `(current-module)' will now return the right module, which
  5822. is the module specified as the second argument to `eval'.
  5823. A consequence of this change is that `eval' is not particularly
  5824. useful when you want allow the evaluated code to change what module is
  5825. designated as the current module and have this change persist from one
  5826. call to `eval' to the next. The read-eval-print-loop is an example
  5827. where `eval' is now inadequate. To compensate, there is a new
  5828. function `primitive-eval' that does not take a module specifier and
  5829. that does not save/restore the current module. You should use this
  5830. function together with `set-current-module', `current-module', etc
  5831. when you want to have more control over the state that is carried from
  5832. one eval to the next.
  5833. Additionally, it has been made sure that forms that are evaluated at
  5834. the top level are always evaluated with respect to the current module.
  5835. Previously, subforms of top-level forms such as `begin', `case',
  5836. etc. did not respect changes to the current module although these
  5837. subforms are at the top-level as well.
  5838. To prevent strange behavior, the forms `define-module',
  5839. `use-modules', `use-syntax', and `export' have been restricted to only
  5840. work on the top level. The forms `define-public' and
  5841. `defmacro-public' only export the new binding on the top level. They
  5842. behave just like `define' and `defmacro', respectively, when they are
  5843. used in a lexical environment.
  5844. Also, `export' will no longer silently re-export bindings imported
  5845. from a used module. It will emit a `deprecation' warning and will
  5846. cease to perform any re-export in the next version. If you actually
  5847. want to re-export bindings, use the new `re-export' in place of
  5848. `export'. The new `re-export' will not make copies of variables when
  5849. rexporting them, as `export' did wrongly.
  5850. ** Module system now allows selection and renaming of imported bindings
  5851. Previously, when using `use-modules' or the `#:use-module' clause in
  5852. the `define-module' form, all the bindings (association of symbols to
  5853. values) for imported modules were added to the "current module" on an
  5854. as-is basis. This has been changed to allow finer control through two
  5855. new facilities: selection and renaming.
  5856. You can now select which of the imported module's bindings are to be
  5857. visible in the current module by using the `:select' clause. This
  5858. clause also can be used to rename individual bindings. For example:
  5859. ;; import all bindings no questions asked
  5860. (use-modules (ice-9 common-list))
  5861. ;; import four bindings, renaming two of them;
  5862. ;; the current module sees: every some zonk-y zonk-n
  5863. (use-modules ((ice-9 common-list)
  5864. :select (every some
  5865. (remove-if . zonk-y)
  5866. (remove-if-not . zonk-n))))
  5867. You can also programmatically rename all selected bindings using the
  5868. `:renamer' clause, which specifies a proc that takes a symbol and
  5869. returns another symbol. Because it is common practice to use a prefix,
  5870. we now provide the convenience procedure `symbol-prefix-proc'. For
  5871. example:
  5872. ;; import four bindings, renaming two of them specifically,
  5873. ;; and all four w/ prefix "CL:";
  5874. ;; the current module sees: CL:every CL:some CL:zonk-y CL:zonk-n
  5875. (use-modules ((ice-9 common-list)
  5876. :select (every some
  5877. (remove-if . zonk-y)
  5878. (remove-if-not . zonk-n))
  5879. :renamer (symbol-prefix-proc 'CL:)))
  5880. ;; import four bindings, renaming two of them specifically,
  5881. ;; and all four by upcasing.
  5882. ;; the current module sees: EVERY SOME ZONK-Y ZONK-N
  5883. (define (upcase-symbol sym)
  5884. (string->symbol (string-upcase (symbol->string sym))))
  5885. (use-modules ((ice-9 common-list)
  5886. :select (every some
  5887. (remove-if . zonk-y)
  5888. (remove-if-not . zonk-n))
  5889. :renamer upcase-symbol))
  5890. Note that programmatic renaming is done *after* individual renaming.
  5891. Also, the above examples show `use-modules', but the same facilities are
  5892. available for the `#:use-module' clause of `define-module'.
  5893. See manual for more info.
  5894. ** The semantics of guardians have changed.
  5895. The changes are for the most part compatible. An important criterion
  5896. was to keep the typical usage of guardians as simple as before, but to
  5897. make the semantics safer and (as a result) more useful.
  5898. *** All objects returned from guardians are now properly alive.
  5899. It is now guaranteed that any object referenced by an object returned
  5900. from a guardian is alive. It's now impossible for a guardian to
  5901. return a "contained" object before its "containing" object.
  5902. One incompatible (but probably not very important) change resulting
  5903. from this is that it is no longer possible to guard objects that
  5904. indirectly reference themselves (i.e. are parts of cycles). If you do
  5905. so accidentally, you'll get a warning.
  5906. *** There are now two types of guardians: greedy and sharing.
  5907. If you call (make-guardian #t) or just (make-guardian), you'll get a
  5908. greedy guardian, and for (make-guardian #f) a sharing guardian.
  5909. Greedy guardians are the default because they are more "defensive".
  5910. You can only greedily guard an object once. If you guard an object
  5911. more than once, once in a greedy guardian and the rest of times in
  5912. sharing guardians, then it is guaranteed that the object won't be
  5913. returned from sharing guardians as long as it is greedily guarded
  5914. and/or alive.
  5915. Guardians returned by calls to `make-guardian' can now take one more
  5916. optional parameter, which says whether to throw an error in case an
  5917. attempt is made to greedily guard an object that is already greedily
  5918. guarded. The default is true, i.e. throw an error. If the parameter
  5919. is false, the guardian invocation returns #t if guarding was
  5920. successful and #f if it wasn't.
  5921. Also, since greedy guarding is, in effect, a side-effecting operation
  5922. on objects, a new function is introduced: `destroy-guardian!'.
  5923. Invoking this function on a guardian renders it unoperative and, if
  5924. the guardian is greedy, clears the "greedily guarded" property of the
  5925. objects that were guarded by it, thus undoing the side effect.
  5926. Note that all this hair is hardly very important, since guardian
  5927. objects are usually permanent.
  5928. ** Continuations created by call-with-current-continuation now accept
  5929. any number of arguments, as required by R5RS.
  5930. ** New function `issue-deprecation-warning'
  5931. This function is used to display the deprecation messages that are
  5932. controlled by GUILE_WARN_DEPRECATION as explained in the README.
  5933. (define (id x)
  5934. (issue-deprecation-warning "`id' is deprecated. Use `identity' instead.")
  5935. (identity x))
  5936. guile> (id 1)
  5937. ;; `id' is deprecated. Use `identity' instead.
  5938. 1
  5939. guile> (id 1)
  5940. 1
  5941. ** New syntax `begin-deprecated'
  5942. When deprecated features are included (as determined by the configure
  5943. option --enable-deprecated), `begin-deprecated' is identical to
  5944. `begin'. When deprecated features are excluded, it always evaluates
  5945. to `#f', ignoring the body forms.
  5946. ** New function `make-object-property'
  5947. This function returns a new `procedure with setter' P that can be used
  5948. to attach a property to objects. When calling P as
  5949. (set! (P obj) val)
  5950. where `obj' is any kind of object, it attaches `val' to `obj' in such
  5951. a way that it can be retrieved by calling P as
  5952. (P obj)
  5953. This function will replace procedure properties, symbol properties and
  5954. source properties eventually.
  5955. ** Module (ice-9 optargs) now uses keywords instead of `#&'.
  5956. Instead of #&optional, #&key, etc you should now use #:optional,
  5957. #:key, etc. Since #:optional is a keyword, you can write it as just
  5958. :optional when (read-set! keywords 'prefix) is active.
  5959. The old reader syntax `#&' is still supported, but deprecated. It
  5960. will be removed in the next release.
  5961. ** New define-module option: pure
  5962. Tells the module system not to include any bindings from the root
  5963. module.
  5964. Example:
  5965. (define-module (totally-empty-module)
  5966. :pure)
  5967. ** New define-module option: export NAME1 ...
  5968. Export names NAME1 ...
  5969. This option is required if you want to be able to export bindings from
  5970. a module which doesn't import one of `define-public' or `export'.
  5971. Example:
  5972. (define-module (foo)
  5973. :pure
  5974. :use-module (ice-9 r5rs)
  5975. :export (bar))
  5976. ;;; Note that we're pure R5RS below this point!
  5977. (define (bar)
  5978. ...)
  5979. ** New function: object->string OBJ
  5980. Return a Scheme string obtained by printing a given object.
  5981. ** New function: port? X
  5982. Returns a boolean indicating whether X is a port. Equivalent to
  5983. `(or (input-port? X) (output-port? X))'.
  5984. ** New function: file-port?
  5985. Determines whether a given object is a port that is related to a file.
  5986. ** New function: port-for-each proc
  5987. Apply PROC to each port in the Guile port table in turn. The return
  5988. value is unspecified. More specifically, PROC is applied exactly once
  5989. to every port that exists in the system at the time PORT-FOR-EACH is
  5990. invoked. Changes to the port table while PORT-FOR-EACH is running
  5991. have no effect as far as PORT-FOR-EACH is concerned.
  5992. ** New function: dup2 oldfd newfd
  5993. A simple wrapper for the `dup2' system call. Copies the file
  5994. descriptor OLDFD to descriptor number NEWFD, replacing the
  5995. previous meaning of NEWFD. Both OLDFD and NEWFD must be integers.
  5996. Unlike for dup->fdes or primitive-move->fdes, no attempt is made
  5997. to move away ports which are using NEWFD. The return value is
  5998. unspecified.
  5999. ** New function: close-fdes fd
  6000. A simple wrapper for the `close' system call. Close file
  6001. descriptor FD, which must be an integer. Unlike close (*note
  6002. close: Ports and File Descriptors.), the file descriptor will be
  6003. closed even if a port is using it. The return value is
  6004. unspecified.
  6005. ** New function: crypt password salt
  6006. Encrypts `password' using the standard unix password encryption
  6007. algorithm.
  6008. ** New function: chroot path
  6009. Change the root directory of the running process to `path'.
  6010. ** New functions: getlogin, cuserid
  6011. Return the login name or the user name of the current effective user
  6012. id, respectively.
  6013. ** New functions: getpriority which who, setpriority which who prio
  6014. Get or set the priority of the running process.
  6015. ** New function: getpass prompt
  6016. Read a password from the terminal, first displaying `prompt' and
  6017. disabling echoing.
  6018. ** New function: flock file operation
  6019. Set/remove an advisory shared or exclusive lock on `file'.
  6020. ** New functions: sethostname name, gethostname
  6021. Set or get the hostname of the machine the current process is running
  6022. on.
  6023. ** New function: mkstemp! tmpl
  6024. mkstemp creates a new unique file in the file system and returns a
  6025. new buffered port open for reading and writing to the file. TMPL
  6026. is a string specifying where the file should be created: it must
  6027. end with `XXXXXX' and will be changed in place to return the name
  6028. of the temporary file.
  6029. ** New function: open-input-string string
  6030. Return an input string port which delivers the characters from
  6031. `string'. This procedure, together with `open-output-string' and
  6032. `get-output-string' implements SRFI-6.
  6033. ** New function: open-output-string
  6034. Return an output string port which collects all data written to it.
  6035. The data can then be retrieved by `get-output-string'.
  6036. ** New function: get-output-string
  6037. Return the contents of an output string port.
  6038. ** New function: identity
  6039. Return the argument.
  6040. ** socket, connect, accept etc., now have support for IPv6. IPv6 addresses
  6041. are represented in Scheme as integers with normal host byte ordering.
  6042. ** New function: inet-pton family address
  6043. Convert a printable string network address into an integer. Note that
  6044. unlike the C version of this function, the result is an integer with
  6045. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6046. e.g.,
  6047. (inet-pton AF_INET "127.0.0.1") => 2130706433
  6048. (inet-pton AF_INET6 "::1") => 1
  6049. ** New function: inet-ntop family address
  6050. Convert an integer network address into a printable string. Note that
  6051. unlike the C version of this function, the input is an integer with
  6052. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6053. e.g.,
  6054. (inet-ntop AF_INET 2130706433) => "127.0.0.1"
  6055. (inet-ntop AF_INET6 (- (expt 2 128) 1)) =>
  6056. ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  6057. ** Deprecated: id
  6058. Use `identity' instead.
  6059. ** Deprecated: -1+
  6060. Use `1-' instead.
  6061. ** Deprecated: return-it
  6062. Do without it.
  6063. ** Deprecated: string-character-length
  6064. Use `string-length' instead.
  6065. ** Deprecated: flags
  6066. Use `logior' instead.
  6067. ** Deprecated: close-all-ports-except.
  6068. This was intended for closing ports in a child process after a fork,
  6069. but it has the undesirable side effect of flushing buffers.
  6070. port-for-each is more flexible.
  6071. ** The (ice-9 popen) module now attempts to set up file descriptors in
  6072. the child process from the current Scheme ports, instead of using the
  6073. current values of file descriptors 0, 1, and 2 in the parent process.
  6074. ** Removed function: builtin-weak-bindings
  6075. There is no such concept as a weak binding any more.
  6076. ** Removed constants: bignum-radix, scm-line-incrementors
  6077. ** define-method: New syntax mandatory.
  6078. The new method syntax is now mandatory:
  6079. (define-method (NAME ARG-SPEC ...) BODY ...)
  6080. (define-method (NAME ARG-SPEC ... . REST-ARG) BODY ...)
  6081. ARG-SPEC ::= ARG-NAME | (ARG-NAME TYPE)
  6082. REST-ARG ::= ARG-NAME
  6083. If you have old code using the old syntax, import
  6084. (oop goops old-define-method) before (oop goops) as in:
  6085. (use-modules (oop goops old-define-method) (oop goops))
  6086. ** Deprecated function: builtin-variable
  6087. Removed function: builtin-bindings
  6088. There is no longer a distinction between builtin or other variables.
  6089. Use module system operations for all variables.
  6090. ** Lazy-catch handlers are no longer allowed to return.
  6091. That is, a call to `throw', `error', etc is now guaranteed to not
  6092. return.
  6093. ** Bugfixes for (ice-9 getopt-long)
  6094. This module is now tested using test-suite/tests/getopt-long.test.
  6095. The following bugs have been fixed:
  6096. *** Parsing for options that are specified to have `optional' args now checks
  6097. if the next element is an option instead of unconditionally taking it as the
  6098. option arg.
  6099. *** An error is now thrown for `--opt=val' when the option description
  6100. does not specify `(value #t)' or `(value optional)'. This condition used to
  6101. be accepted w/o error, contrary to the documentation.
  6102. *** The error message for unrecognized options is now more informative.
  6103. It used to be "not a record", an artifact of the implementation.
  6104. *** The error message for `--opt' terminating the arg list (no value), when
  6105. `(value #t)' is specified, is now more informative. It used to be "not enough
  6106. args".
  6107. *** "Clumped" single-char args now preserve trailing string, use it as arg.
  6108. The expansion used to be like so:
  6109. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "--xyz")
  6110. Note that the "5d" is dropped. Now it is like so:
  6111. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "5d" "--xyz")
  6112. This enables single-char options to have adjoining arguments as long as their
  6113. constituent characters are not potential single-char options.
  6114. ** (ice-9 session) procedure `arity' now works with (ice-9 optargs) `lambda*'
  6115. The `lambda*' and derivative forms in (ice-9 optargs) now set a procedure
  6116. property `arglist', which can be retrieved by `arity'. The result is that
  6117. `arity' can give more detailed information than before:
  6118. Before:
  6119. guile> (use-modules (ice-9 optargs))
  6120. guile> (define* (foo #:optional a b c) a)
  6121. guile> (arity foo)
  6122. 0 or more arguments in `lambda*:G0'.
  6123. After:
  6124. guile> (arity foo)
  6125. 3 optional arguments: `a', `b' and `c'.
  6126. guile> (define* (bar a b #:key c d #:allow-other-keys) a)
  6127. guile> (arity bar)
  6128. 2 required arguments: `a' and `b', 2 keyword arguments: `c'
  6129. and `d', other keywords allowed.
  6130. guile> (define* (baz a b #:optional c #:rest r) a)
  6131. guile> (arity baz)
  6132. 2 required arguments: `a' and `b', 1 optional argument: `c',
  6133. the rest in `r'.
  6134. * Changes to the C interface
  6135. ** Types have been renamed from scm_*_t to scm_t_*.
  6136. This has been done for POSIX sake. It reserves identifiers ending
  6137. with "_t". What a concept.
  6138. The old names are still available with status `deprecated'.
  6139. ** scm_t_bits (former scm_bits_t) is now a unsigned type.
  6140. ** Deprecated features have been removed.
  6141. *** Macros removed
  6142. SCM_INPORTP, SCM_OUTPORTP SCM_ICHRP, SCM_ICHR, SCM_MAKICHR
  6143. SCM_SETJMPBUF SCM_NSTRINGP SCM_NRWSTRINGP SCM_NVECTORP SCM_DOUBLE_CELLP
  6144. *** C Functions removed
  6145. scm_sysmissing scm_tag scm_tc16_flo scm_tc_flo
  6146. scm_fseek - replaced by scm_seek.
  6147. gc-thunk - replaced by after-gc-hook.
  6148. gh_int2scmb - replaced by gh_bool2scm.
  6149. scm_tc_dblr - replaced by scm_tc16_real.
  6150. scm_tc_dblc - replaced by scm_tc16_complex.
  6151. scm_list_star - replaced by scm_cons_star.
  6152. ** Deprecated: scm_makfromstr
  6153. Use scm_mem2string instead.
  6154. ** Deprecated: scm_make_shared_substring
  6155. Explicit shared substrings will disappear from Guile.
  6156. Instead, "normal" strings will be implemented using sharing
  6157. internally, combined with a copy-on-write strategy.
  6158. ** Deprecated: scm_read_only_string_p
  6159. The concept of read-only strings will disappear in next release of
  6160. Guile.
  6161. ** Deprecated: scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member
  6162. Instead, use scm_c_memq or scm_memq, scm_memv, scm_member.
  6163. ** New functions: scm_call_0, scm_call_1, scm_call_2, scm_call_3
  6164. Call a procedure with the indicated number of arguments. See "Fly
  6165. Evaluation" in the manual.
  6166. ** New functions: scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3
  6167. Call a procedure with the indicated number of arguments and a list of
  6168. further arguments. See "Fly Evaluation" in the manual.
  6169. ** New functions: scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5
  6170. Create a list of the given number of elements. See "List
  6171. Constructors" in the manual.
  6172. ** Renamed function: scm_listify has been replaced by scm_list_n.
  6173. ** Deprecated macros: SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4,
  6174. SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9.
  6175. Use functions scm_list_N instead.
  6176. ** New function: scm_c_read (SCM port, void *buffer, scm_sizet size)
  6177. Used by an application to read arbitrary number of bytes from a port.
  6178. Same semantics as libc read, except that scm_c_read only returns less
  6179. than SIZE bytes if at end-of-file.
  6180. Warning: Doesn't update port line and column counts!
  6181. ** New function: scm_c_write (SCM port, const void *ptr, scm_sizet size)
  6182. Used by an application to write arbitrary number of bytes to an SCM
  6183. port. Similar semantics as libc write. However, unlike libc
  6184. write, scm_c_write writes the requested number of bytes and has no
  6185. return value.
  6186. Warning: Doesn't update port line and column counts!
  6187. ** New function: scm_init_guile ()
  6188. In contrast to scm_boot_guile, scm_init_guile will return normally
  6189. after initializing Guile. It is not available on all systems, tho.
  6190. ** New functions: scm_str2symbol, scm_mem2symbol
  6191. The function scm_str2symbol takes a const char* pointing to a zero-terminated
  6192. field of characters and creates a scheme symbol object from that C string.
  6193. The function scm_mem2symbol takes a const char* and a number of characters and
  6194. creates a symbol from the characters in that memory area.
  6195. ** New functions: scm_primitive_make_property
  6196. scm_primitive_property_ref
  6197. scm_primitive_property_set_x
  6198. scm_primitive_property_del_x
  6199. These functions implement a new way to deal with object properties.
  6200. See libguile/properties.c for their documentation.
  6201. ** New function: scm_done_free (long size)
  6202. This function is the inverse of scm_done_malloc. Use it to report the
  6203. amount of smob memory you free. The previous method, which involved
  6204. calling scm_done_malloc with negative argument, was somewhat
  6205. unintuitive (and is still available, of course).
  6206. ** New function: scm_c_memq (SCM obj, SCM list)
  6207. This function provides a fast C level alternative for scm_memq for the case
  6208. that the list parameter is known to be a proper list. The function is a
  6209. replacement for scm_sloppy_memq, but is stricter in its requirements on its
  6210. list input parameter, since for anything else but a proper list the function's
  6211. behaviour is undefined - it may even crash or loop endlessly. Further, for
  6212. the case that the object is not found in the list, scm_c_memq returns #f which
  6213. is similar to scm_memq, but different from scm_sloppy_memq's behaviour.
  6214. ** New functions: scm_remember_upto_here_1, scm_remember_upto_here_2,
  6215. scm_remember_upto_here
  6216. These functions replace the function scm_remember.
  6217. ** Deprecated function: scm_remember
  6218. Use one of the new functions scm_remember_upto_here_1,
  6219. scm_remember_upto_here_2 or scm_remember_upto_here instead.
  6220. ** New function: scm_allocate_string
  6221. This function replaces the function scm_makstr.
  6222. ** Deprecated function: scm_makstr
  6223. Use the new function scm_allocate_string instead.
  6224. ** New global variable scm_gc_running_p introduced.
  6225. Use this variable to find out if garbage collection is being executed. Up to
  6226. now applications have used scm_gc_heap_lock to test if garbage collection was
  6227. running, which also works because of the fact that up to know only the garbage
  6228. collector has set this variable. But, this is an implementation detail that
  6229. may change. Further, scm_gc_heap_lock is not set throughout gc, thus the use
  6230. of this variable is (and has been) not fully safe anyway.
  6231. ** New macros: SCM_BITVECTOR_MAX_LENGTH, SCM_UVECTOR_MAX_LENGTH
  6232. Use these instead of SCM_LENGTH_MAX.
  6233. ** New macros: SCM_CONTINUATION_LENGTH, SCM_CCLO_LENGTH, SCM_STACK_LENGTH,
  6234. SCM_STRING_LENGTH, SCM_SYMBOL_LENGTH, SCM_UVECTOR_LENGTH,
  6235. SCM_BITVECTOR_LENGTH, SCM_VECTOR_LENGTH.
  6236. Use these instead of SCM_LENGTH.
  6237. ** New macros: SCM_SET_CONTINUATION_LENGTH, SCM_SET_STRING_LENGTH,
  6238. SCM_SET_SYMBOL_LENGTH, SCM_SET_VECTOR_LENGTH, SCM_SET_UVECTOR_LENGTH,
  6239. SCM_SET_BITVECTOR_LENGTH
  6240. Use these instead of SCM_SETLENGTH
  6241. ** New macros: SCM_STRING_CHARS, SCM_SYMBOL_CHARS, SCM_CCLO_BASE,
  6242. SCM_VECTOR_BASE, SCM_UVECTOR_BASE, SCM_BITVECTOR_BASE, SCM_COMPLEX_MEM,
  6243. SCM_ARRAY_MEM
  6244. Use these instead of SCM_CHARS, SCM_UCHARS, SCM_ROCHARS, SCM_ROUCHARS or
  6245. SCM_VELTS.
  6246. ** New macros: SCM_SET_BIGNUM_BASE, SCM_SET_STRING_CHARS,
  6247. SCM_SET_SYMBOL_CHARS, SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE,
  6248. SCM_SET_VECTOR_BASE
  6249. Use these instead of SCM_SETCHARS.
  6250. ** New macro: SCM_BITVECTOR_P
  6251. ** New macro: SCM_STRING_COERCE_0TERMINATION_X
  6252. Use instead of SCM_COERCE_SUBSTR.
  6253. ** New macros: SCM_DIR_OPEN_P, SCM_DIR_FLAG_OPEN
  6254. For directory objects, use these instead of SCM_OPDIRP and SCM_OPN.
  6255. ** Deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
  6256. SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
  6257. SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
  6258. SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP,
  6259. SCM_VALIDATE_STRINGORSUBSTR, SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS,
  6260. SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
  6261. SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
  6262. SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
  6263. SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
  6264. SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX, SCM_GC8MARKP,
  6265. SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR, SCM_SUBR_DOC,
  6266. SCM_OPDIRP, SCM_VALIDATE_OPDIR, SCM_WTA, RETURN_SCM_WTA, SCM_CONST_LONG,
  6267. SCM_WNA, SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
  6268. SCM_VALIDATE_NUMBER_DEF_COPY, SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP,
  6269. SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_SETAND_CAR, SCM_SETOR_CAR
  6270. Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
  6271. Use scm_memory_error instead of SCM_NALLOC.
  6272. Use SCM_STRINGP instead of SCM_SLOPPY_STRINGP.
  6273. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_STRINGORSUBSTR.
  6274. Use SCM_FREE_CELL_P instead of SCM_FREEP/SCM_NFREEP
  6275. Use a type specific accessor macro instead of SCM_CHARS/SCM_UCHARS.
  6276. Use a type specific accessor instead of SCM(_|_RO|_HUGE_)LENGTH.
  6277. Use SCM_VALIDATE_(SYMBOL|STRING) instead of SCM_VALIDATE_ROSTRING.
  6278. Use SCM_STRING_COERCE_0TERMINATION_X instead of SCM_COERCE_SUBSTR.
  6279. Use SCM_STRINGP or SCM_SYMBOLP instead of SCM_ROSTRINGP.
  6280. Use SCM_STRINGP instead of SCM_RWSTRINGP.
  6281. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_RWSTRING.
  6282. Use SCM_STRING_CHARS instead of SCM_ROCHARS.
  6283. Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
  6284. Use a type specific setter macro instead of SCM_SETLENGTH.
  6285. Use a type specific setter macro instead of SCM_SETCHARS.
  6286. Use a type specific length macro instead of SCM_LENGTH_MAX.
  6287. Use SCM_GCMARKP instead of SCM_GC8MARKP.
  6288. Use SCM_SETGCMARK instead of SCM_SETGC8MARK.
  6289. Use SCM_CLRGCMARK instead of SCM_CLRGC8MARK.
  6290. Use SCM_TYP16 instead of SCM_GCTYP16.
  6291. Use SCM_CDR instead of SCM_GCCDR.
  6292. Use SCM_DIR_OPEN_P instead of SCM_OPDIRP.
  6293. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of SCM_WTA.
  6294. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of RETURN_SCM_WTA.
  6295. Use SCM_VCELL_INIT instead of SCM_CONST_LONG.
  6296. Use SCM_WRONG_NUM_ARGS instead of SCM_WNA.
  6297. Use SCM_CONSP instead of SCM_SLOPPY_CONSP.
  6298. Use !SCM_CONSP instead of SCM_SLOPPY_NCONSP.
  6299. ** Removed function: scm_struct_init
  6300. ** Removed variable: scm_symhash_dim
  6301. ** Renamed function: scm_make_cont has been replaced by
  6302. scm_make_continuation, which has a different interface.
  6303. ** Deprecated function: scm_call_catching_errors
  6304. Use scm_catch or scm_lazy_catch from throw.[ch] instead.
  6305. ** Deprecated function: scm_strhash
  6306. Use scm_string_hash instead.
  6307. ** Deprecated function: scm_vector_set_length_x
  6308. Instead, create a fresh vector of the desired size and copy the contents.
  6309. ** scm_gensym has changed prototype
  6310. scm_gensym now only takes one argument.
  6311. ** Deprecated type tags: scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols,
  6312. scm_tc7_lvector
  6313. There is now only a single symbol type scm_tc7_symbol.
  6314. The tag scm_tc7_lvector was not used anyway.
  6315. ** Deprecated function: scm_make_smob_type_mfpe, scm_set_smob_mfpe.
  6316. Use scm_make_smob_type and scm_set_smob_XXX instead.
  6317. ** New function scm_set_smob_apply.
  6318. This can be used to set an apply function to a smob type.
  6319. ** Deprecated function: scm_strprint_obj
  6320. Use scm_object_to_string instead.
  6321. ** Deprecated function: scm_wta
  6322. Use scm_wrong_type_arg, or another appropriate error signalling function
  6323. instead.
  6324. ** Explicit support for obarrays has been deprecated.
  6325. Use `scm_str2symbol' and the generic hashtable functions instead.
  6326. ** The concept of `vcells' has been deprecated.
  6327. The data type `variable' is now used exclusively. `Vcells' have been
  6328. a low-level concept so you are likely not affected by this change.
  6329. *** Deprecated functions: scm_sym2vcell, scm_sysintern,
  6330. scm_sysintern0, scm_symbol_value0, scm_intern, scm_intern0.
  6331. Use scm_c_define or scm_c_lookup instead, as appropriate.
  6332. *** New functions: scm_c_module_lookup, scm_c_lookup,
  6333. scm_c_module_define, scm_c_define, scm_module_lookup, scm_lookup,
  6334. scm_module_define, scm_define.
  6335. These functions work with variables instead of with vcells.
  6336. ** New functions for creating and defining `subr's and `gsubr's.
  6337. The new functions more clearly distinguish between creating a subr (or
  6338. gsubr) object and adding it to the current module.
  6339. These new functions are available: scm_c_make_subr, scm_c_define_subr,
  6340. scm_c_make_subr_with_generic, scm_c_define_subr_with_generic,
  6341. scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,
  6342. scm_c_define_gsubr_with_generic.
  6343. ** Deprecated functions: scm_make_subr, scm_make_subr_opt,
  6344. scm_make_subr_with_generic, scm_make_gsubr,
  6345. scm_make_gsubr_with_generic.
  6346. Use the new ones from above instead.
  6347. ** C interface to the module system has changed.
  6348. While we suggest that you avoid as many explicit module system
  6349. operations from C as possible for the time being, the C interface has
  6350. been made more similar to the high-level Scheme module system.
  6351. *** New functions: scm_c_define_module, scm_c_use_module,
  6352. scm_c_export, scm_c_resolve_module.
  6353. They mostly work like their Scheme namesakes. scm_c_define_module
  6354. takes a function that is called a context where the new module is
  6355. current.
  6356. *** Deprecated functions: scm_the_root_module, scm_make_module,
  6357. scm_ensure_user_module, scm_load_scheme_module.
  6358. Use the new functions instead.
  6359. ** Renamed function: scm_internal_with_fluids becomes
  6360. scm_c_with_fluids.
  6361. scm_internal_with_fluids is available as a deprecated function.
  6362. ** New function: scm_c_with_fluid.
  6363. Just like scm_c_with_fluids, but takes one fluid and one value instead
  6364. of lists of same.
  6365. ** Deprecated typedefs: long_long, ulong_long.
  6366. They are of questionable utility and they pollute the global
  6367. namespace.
  6368. ** Deprecated typedef: scm_sizet
  6369. It is of questionable utility now that Guile requires ANSI C, and is
  6370. oddly named.
  6371. ** Deprecated typedefs: scm_port_rw_active, scm_port,
  6372. scm_ptob_descriptor, scm_debug_info, scm_debug_frame, scm_fport,
  6373. scm_option, scm_rstate, scm_rng, scm_array, scm_array_dim.
  6374. Made more compliant with the naming policy by adding a _t at the end.
  6375. ** Deprecated functions: scm_mkbig, scm_big2num, scm_adjbig,
  6376. scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl
  6377. With the exception of the mysterious scm_2ulong2big, they are still
  6378. available under new names (scm_i_mkbig etc). These functions are not
  6379. intended to be used in user code. You should avoid dealing with
  6380. bignums directly, and should deal with numbers in general (which can
  6381. be bignums).
  6382. ** Change in behavior: scm_num2long, scm_num2ulong
  6383. The scm_num2[u]long functions don't any longer accept an inexact
  6384. argument. This change in behavior is motivated by concordance with
  6385. R5RS: It is more common that a primitive doesn't want to accept an
  6386. inexact for an exact.
  6387. ** New functions: scm_short2num, scm_ushort2num, scm_int2num,
  6388. scm_uint2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
  6389. scm_num2ushort, scm_num2int, scm_num2uint, scm_num2ptrdiff,
  6390. scm_num2size.
  6391. These are conversion functions between the various ANSI C integral
  6392. types and Scheme numbers. NOTE: The scm_num2xxx functions don't
  6393. accept an inexact argument.
  6394. ** New functions: scm_float2num, scm_double2num,
  6395. scm_num2float, scm_num2double.
  6396. These are conversion functions between the two ANSI C float types and
  6397. Scheme numbers.
  6398. ** New number validation macros:
  6399. SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,INT,UINT}[_DEF]
  6400. See above.
  6401. ** New functions: scm_gc_protect_object, scm_gc_unprotect_object
  6402. These are just nicer-named old scm_protect_object and
  6403. scm_unprotect_object.
  6404. ** Deprecated functions: scm_protect_object, scm_unprotect_object
  6405. ** New functions: scm_gc_[un]register_root, scm_gc_[un]register_roots
  6406. These functions can be used to register pointers to locations that
  6407. hold SCM values.
  6408. ** Deprecated function: scm_create_hook.
  6409. Its sins are: misleading name, non-modularity and lack of general
  6410. usefulness.
  6411. Changes since Guile 1.3.4:
  6412. * Changes to the distribution
  6413. ** Trees from nightly snapshots and CVS now require you to run autogen.sh.
  6414. We've changed the way we handle generated files in the Guile source
  6415. repository. As a result, the procedure for building trees obtained
  6416. from the nightly FTP snapshots or via CVS has changed:
  6417. - You must have appropriate versions of autoconf, automake, and
  6418. libtool installed on your system. See README for info on how to
  6419. obtain these programs.
  6420. - Before configuring the tree, you must first run the script
  6421. `autogen.sh' at the top of the source tree.
  6422. The Guile repository used to contain not only source files, written by
  6423. humans, but also some generated files, like configure scripts and
  6424. Makefile.in files. Even though the contents of these files could be
  6425. derived mechanically from other files present, we thought it would
  6426. make the tree easier to build if we checked them into CVS.
  6427. However, this approach means that minor differences between
  6428. developer's installed tools and habits affected the whole team.
  6429. So we have removed the generated files from the repository, and
  6430. added the autogen.sh script, which will reconstruct them
  6431. appropriately.
  6432. ** configure now has experimental options to remove support for certain
  6433. features:
  6434. --disable-arrays omit array and uniform array support
  6435. --disable-posix omit posix interfaces
  6436. --disable-networking omit networking interfaces
  6437. --disable-regex omit regular expression interfaces
  6438. These are likely to become separate modules some day.
  6439. ** New configure option --enable-debug-freelist
  6440. This enables a debugging version of SCM_NEWCELL(), and also registers
  6441. an extra primitive, the setter `gc-set-debug-check-freelist!'.
  6442. Configure with the --enable-debug-freelist option to enable
  6443. the gc-set-debug-check-freelist! primitive, and then use:
  6444. (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
  6445. (gc-set-debug-check-freelist! #f) # turn off checking
  6446. Checking of the freelist forces a traversal of the freelist and
  6447. a garbage collection before each allocation of a cell. This can
  6448. slow down the interpreter dramatically, so the setter should be used to
  6449. turn on this extra processing only when necessary.
  6450. ** New configure option --enable-debug-malloc
  6451. Include code for debugging of calls to scm_must_malloc/realloc/free.
  6452. Checks that
  6453. 1. objects freed by scm_must_free has been mallocated by scm_must_malloc
  6454. 2. objects reallocated by scm_must_realloc has been allocated by
  6455. scm_must_malloc
  6456. 3. reallocated objects are reallocated with the same what string
  6457. But, most importantly, it records the number of allocated objects of
  6458. each kind. This is useful when searching for memory leaks.
  6459. A Guile compiled with this option provides the primitive
  6460. `malloc-stats' which returns an alist with pairs of kind and the
  6461. number of objects of that kind.
  6462. ** All includes are now referenced relative to the root directory
  6463. Since some users have had problems with mixups between Guile and
  6464. system headers, we have decided to always refer to Guile headers via
  6465. their parent directories. This essentially creates a "private name
  6466. space" for Guile headers. This means that the compiler only is given
  6467. -I options for the root build and root source directory.
  6468. ** Header files kw.h and genio.h have been removed.
  6469. ** The module (ice-9 getopt-gnu-style) has been removed.
  6470. ** New module (ice-9 documentation)
  6471. Implements the interface to documentation strings associated with
  6472. objects.
  6473. ** New module (ice-9 time)
  6474. Provides a macro `time', which displays execution time of a given form.
  6475. ** New module (ice-9 history)
  6476. Loading this module enables value history in the repl.
  6477. * Changes to the stand-alone interpreter
  6478. ** New command line option --debug
  6479. Start Guile with debugging evaluator and backtraces enabled.
  6480. This is useful when debugging your .guile init file or scripts.
  6481. ** New help facility
  6482. Usage: (help NAME) gives documentation about objects named NAME (a symbol)
  6483. (help REGEXP) ditto for objects with names matching REGEXP (a string)
  6484. (help 'NAME) gives documentation for NAME, even if it is not an object
  6485. (help ,EXPR) gives documentation for object returned by EXPR
  6486. (help (my module)) gives module commentary for `(my module)'
  6487. (help) gives this text
  6488. `help' searches among bindings exported from loaded modules, while
  6489. `apropos' searches among bindings visible from the "current" module.
  6490. Examples: (help help)
  6491. (help cons)
  6492. (help "output-string")
  6493. ** `help' and `apropos' now prints full module names
  6494. ** Dynamic linking now uses libltdl from the libtool package.
  6495. The old system dependent code for doing dynamic linking has been
  6496. replaced with calls to the libltdl functions which do all the hairy
  6497. details for us.
  6498. The major improvement is that you can now directly pass libtool
  6499. library names like "libfoo.la" to `dynamic-link' and `dynamic-link'
  6500. will be able to do the best shared library job you can get, via
  6501. libltdl.
  6502. The way dynamic libraries are found has changed and is not really
  6503. portable across platforms, probably. It is therefore recommended to
  6504. use absolute filenames when possible.
  6505. If you pass a filename without an extension to `dynamic-link', it will
  6506. try a few appropriate ones. Thus, the most platform ignorant way is
  6507. to specify a name like "libfoo", without any directories and
  6508. extensions.
  6509. ** Guile COOP threads are now compatible with LinuxThreads
  6510. Previously, COOP threading wasn't possible in applications linked with
  6511. Linux POSIX threads due to their use of the stack pointer to find the
  6512. thread context. This has now been fixed with a workaround which uses
  6513. the pthreads to allocate the stack.
  6514. ** New primitives: `pkgdata-dir', `site-dir', `library-dir'
  6515. ** Positions of erring expression in scripts
  6516. With version 1.3.4, the location of the erring expression in Guile
  6517. scipts is no longer automatically reported. (This should have been
  6518. documented before the 1.3.4 release.)
  6519. You can get this information by enabling recording of positions of
  6520. source expressions and running the debugging evaluator. Put this at
  6521. the top of your script (or in your "site" file):
  6522. (read-enable 'positions)
  6523. (debug-enable 'debug)
  6524. ** Backtraces in scripts
  6525. It is now possible to get backtraces in scripts.
  6526. Put
  6527. (debug-enable 'debug 'backtrace)
  6528. at the top of the script.
  6529. (The first options enables the debugging evaluator.
  6530. The second enables backtraces.)
  6531. ** Part of module system symbol lookup now implemented in C
  6532. The eval closure of most modules is now implemented in C. Since this
  6533. was one of the bottlenecks for loading speed, Guile now loads code
  6534. substantially faster than before.
  6535. ** Attempting to get the value of an unbound variable now produces
  6536. an exception with a key of 'unbound-variable instead of 'misc-error.
  6537. ** The initial default output port is now unbuffered if it's using a
  6538. tty device. Previously in this situation it was line-buffered.
  6539. ** New hook: after-gc-hook
  6540. after-gc-hook takes over the role of gc-thunk. This hook is run at
  6541. the first SCM_TICK after a GC. (Thus, the code is run at the same
  6542. point during evaluation as signal handlers.)
  6543. Note that this hook should be used only for diagnostic and debugging
  6544. purposes. It is not certain that it will continue to be well-defined
  6545. when this hook is run in the future.
  6546. C programmers: Note the new C level hooks scm_before_gc_c_hook,
  6547. scm_before_sweep_c_hook, scm_after_gc_c_hook.
  6548. ** Improvements to garbage collector
  6549. Guile 1.4 has a new policy for triggering heap allocation and
  6550. determining the sizes of heap segments. It fixes a number of problems
  6551. in the old GC.
  6552. 1. The new policy can handle two separate pools of cells
  6553. (2-word/4-word) better. (The old policy would run wild, allocating
  6554. more and more memory for certain programs.)
  6555. 2. The old code would sometimes allocate far too much heap so that the
  6556. Guile process became gigantic. The new code avoids this.
  6557. 3. The old code would sometimes allocate too little so that few cells
  6558. were freed at GC so that, in turn, too much time was spent in GC.
  6559. 4. The old code would often trigger heap allocation several times in a
  6560. row. (The new scheme predicts how large the segments needs to be
  6561. in order not to need further allocation.)
  6562. All in all, the new GC policy will make larger applications more
  6563. efficient.
  6564. The new GC scheme also is prepared for POSIX threading. Threads can
  6565. allocate private pools of cells ("clusters") with just a single
  6566. function call. Allocation of single cells from such a cluster can
  6567. then proceed without any need of inter-thread synchronization.
  6568. ** New environment variables controlling GC parameters
  6569. GUILE_MAX_SEGMENT_SIZE Maximal segment size
  6570. (default = 2097000)
  6571. Allocation of 2-word cell heaps:
  6572. GUILE_INIT_SEGMENT_SIZE_1 Size of initial heap segment in bytes
  6573. (default = 360000)
  6574. GUILE_MIN_YIELD_1 Minimum number of freed cells at each
  6575. GC in percent of total heap size
  6576. (default = 40)
  6577. Allocation of 4-word cell heaps
  6578. (used for real numbers and misc other objects):
  6579. GUILE_INIT_SEGMENT_SIZE_2, GUILE_MIN_YIELD_2
  6580. (See entry "Way for application to customize GC parameters" under
  6581. section "Changes to the scm_ interface" below.)
  6582. ** Guile now implements reals using 4-word cells
  6583. This speeds up computation with reals. (They were earlier allocated
  6584. with `malloc'.) There is still some room for optimizations, however.
  6585. ** Some further steps toward POSIX thread support have been taken
  6586. *** Guile's critical sections (SCM_DEFER/ALLOW_INTS)
  6587. don't have much effect any longer, and many of them will be removed in
  6588. next release.
  6589. *** Signals
  6590. are only handled at the top of the evaluator loop, immediately after
  6591. I/O, and in scm_equalp.
  6592. *** The GC can allocate thread private pools of pairs.
  6593. * Changes to Scheme functions and syntax
  6594. ** close-input-port and close-output-port are now R5RS
  6595. These procedures have been turned into primitives and have R5RS behaviour.
  6596. ** New procedure: simple-format PORT MESSAGE ARG1 ...
  6597. (ice-9 boot) makes `format' an alias for `simple-format' until possibly
  6598. extended by the more sophisticated version in (ice-9 format)
  6599. (simple-format port message . args)
  6600. Write MESSAGE to DESTINATION, defaulting to `current-output-port'.
  6601. MESSAGE can contain ~A (was %s) and ~S (was %S) escapes. When printed,
  6602. the escapes are replaced with corresponding members of ARGS:
  6603. ~A formats using `display' and ~S formats using `write'.
  6604. If DESTINATION is #t, then use the `current-output-port',
  6605. if DESTINATION is #f, then return a string containing the formatted text.
  6606. Does not add a trailing newline."
  6607. ** string-ref: the second argument is no longer optional.
  6608. ** string, list->string: no longer accept strings in their arguments,
  6609. only characters, for compatibility with R5RS.
  6610. ** New procedure: port-closed? PORT
  6611. Returns #t if PORT is closed or #f if it is open.
  6612. ** Deprecated: list*
  6613. The list* functionality is now provided by cons* (SRFI-1 compliant)
  6614. ** New procedure: cons* ARG1 ARG2 ... ARGn
  6615. Like `list', but the last arg provides the tail of the constructed list,
  6616. returning (cons ARG1 (cons ARG2 (cons ... ARGn))).
  6617. Requires at least one argument. If given one argument, that argument
  6618. is returned as result.
  6619. This function is called `list*' in some other Schemes and in Common LISP.
  6620. ** Removed deprecated: serial-map, serial-array-copy!, serial-array-map!
  6621. ** New procedure: object-documentation OBJECT
  6622. Returns the documentation string associated with OBJECT. The
  6623. procedure uses a caching mechanism so that subsequent lookups are
  6624. faster.
  6625. Exported by (ice-9 documentation).
  6626. ** module-name now returns full names of modules
  6627. Previously, only the last part of the name was returned (`session' for
  6628. `(ice-9 session)'). Ex: `(ice-9 session)'.
  6629. * Changes to the gh_ interface
  6630. ** Deprecated: gh_int2scmb
  6631. Use gh_bool2scm instead.
  6632. * Changes to the scm_ interface
  6633. ** Guile primitives now carry docstrings!
  6634. Thanks to Greg Badros!
  6635. ** Guile primitives are defined in a new way: SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  6636. Now Guile primitives are defined using the SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  6637. macros and must contain a docstring that is extracted into foo.doc using a new
  6638. guile-doc-snarf script (that uses guile-doc-snarf.awk).
  6639. However, a major overhaul of these macros is scheduled for the next release of
  6640. guile.
  6641. ** Guile primitives use a new technique for validation of arguments
  6642. SCM_VALIDATE_* macros are defined to ease the redundancy and improve
  6643. the readability of argument checking.
  6644. ** All (nearly?) K&R prototypes for functions replaced with ANSI C equivalents.
  6645. ** New macros: SCM_PACK, SCM_UNPACK
  6646. Compose/decompose an SCM value.
  6647. The SCM type is now treated as an abstract data type and may be defined as a
  6648. long, a void* or as a struct, depending on the architecture and compile time
  6649. options. This makes it easier to find several types of bugs, for example when
  6650. SCM values are treated as integers without conversion. Values of the SCM type
  6651. should be treated as "atomic" values. These macros are used when
  6652. composing/decomposing an SCM value, either because you want to access
  6653. individual bits, or because you want to treat it as an integer value.
  6654. E.g., in order to set bit 7 in an SCM value x, use the expression
  6655. SCM_PACK (SCM_UNPACK (x) | 0x80)
  6656. ** The name property of hooks is deprecated.
  6657. Thus, the use of SCM_HOOK_NAME and scm_make_hook_with_name is deprecated.
  6658. You can emulate this feature by using object properties.
  6659. ** Deprecated macros: SCM_INPORTP, SCM_OUTPORTP, SCM_CRDY, SCM_ICHRP,
  6660. SCM_ICHR, SCM_MAKICHR, SCM_SETJMPBUF, SCM_NSTRINGP, SCM_NRWSTRINGP,
  6661. SCM_NVECTORP
  6662. These macros will be removed in a future release of Guile.
  6663. ** The following types, functions and macros from numbers.h are deprecated:
  6664. scm_dblproc, SCM_UNEGFIXABLE, SCM_FLOBUFLEN, SCM_INEXP, SCM_CPLXP, SCM_REAL,
  6665. SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP, SCM_NUM2DBL, SCM_NO_BIGDIG
  6666. ** Port internals: the rw_random variable in the scm_port structure
  6667. must be set to non-zero in any random access port. In recent Guile
  6668. releases it was only set for bidirectional random-access ports.
  6669. ** Port internals: the seek ptob procedure is now responsible for
  6670. resetting the buffers if required. The change was made so that in the
  6671. special case of reading the current position (i.e., seek p 0 SEEK_CUR)
  6672. the fport and strport ptobs can avoid resetting the buffers,
  6673. in particular to avoid discarding unread chars. An existing port
  6674. type can be fixed by adding something like the following to the
  6675. beginning of the ptob seek procedure:
  6676. if (pt->rw_active == SCM_PORT_READ)
  6677. scm_end_input (object);
  6678. else if (pt->rw_active == SCM_PORT_WRITE)
  6679. ptob->flush (object);
  6680. although to actually avoid resetting the buffers and discard unread
  6681. chars requires further hacking that depends on the characteristics
  6682. of the ptob.
  6683. ** Deprecated functions: scm_fseek, scm_tag
  6684. These functions are no longer used and will be removed in a future version.
  6685. ** The scm_sysmissing procedure is no longer used in libguile.
  6686. Unless it turns out to be unexpectedly useful to somebody, it will be
  6687. removed in a future version.
  6688. ** The format of error message strings has changed
  6689. The two C procedures: scm_display_error and scm_error, as well as the
  6690. primitive `scm-error', now use scm_simple_format to do their work.
  6691. This means that the message strings of all code must be updated to use
  6692. ~A where %s was used before, and ~S where %S was used before.
  6693. During the period when there still are a lot of old Guiles out there,
  6694. you might want to support both old and new versions of Guile.
  6695. There are basically two methods to achieve this. Both methods use
  6696. autoconf. Put
  6697. AC_CHECK_FUNCS(scm_simple_format)
  6698. in your configure.in.
  6699. Method 1: Use the string concatenation features of ANSI C's
  6700. preprocessor.
  6701. In C:
  6702. #ifdef HAVE_SCM_SIMPLE_FORMAT
  6703. #define FMT_S "~S"
  6704. #else
  6705. #define FMT_S "%S"
  6706. #endif
  6707. Then represent each of your error messages using a preprocessor macro:
  6708. #define E_SPIDER_ERROR "There's a spider in your " ## FMT_S ## "!!!"
  6709. In Scheme:
  6710. (define fmt-s (if (defined? 'simple-format) "~S" "%S"))
  6711. (define make-message string-append)
  6712. (define e-spider-error (make-message "There's a spider in your " fmt-s "!!!"))
  6713. Method 2: Use the oldfmt function found in doc/oldfmt.c.
  6714. In C:
  6715. scm_misc_error ("picnic", scm_c_oldfmt0 ("There's a spider in your ~S!!!"),
  6716. ...);
  6717. In Scheme:
  6718. (scm-error 'misc-error "picnic" (oldfmt "There's a spider in your ~S!!!")
  6719. ...)
  6720. ** Deprecated: coop_mutex_init, coop_condition_variable_init
  6721. Don't use the functions coop_mutex_init and
  6722. coop_condition_variable_init. They will change.
  6723. Use scm_mutex_init and scm_cond_init instead.
  6724. ** New function: int scm_cond_timedwait (scm_cond_t *COND, scm_mutex_t *MUTEX, const struct timespec *ABSTIME)
  6725. `scm_cond_timedwait' atomically unlocks MUTEX and waits on
  6726. COND, as `scm_cond_wait' does, but it also bounds the duration
  6727. of the wait. If COND has not been signaled before time ABSTIME,
  6728. the mutex MUTEX is re-acquired and `scm_cond_timedwait'
  6729. returns the error code `ETIMEDOUT'.
  6730. The ABSTIME parameter specifies an absolute time, with the same
  6731. origin as `time' and `gettimeofday': an ABSTIME of 0 corresponds
  6732. to 00:00:00 GMT, January 1, 1970.
  6733. ** New function: scm_cond_broadcast (scm_cond_t *COND)
  6734. `scm_cond_broadcast' restarts all the threads that are waiting
  6735. on the condition variable COND. Nothing happens if no threads are
  6736. waiting on COND.
  6737. ** New function: scm_key_create (scm_key_t *KEY, void (*destr_function) (void *))
  6738. `scm_key_create' allocates a new TSD key. The key is stored in
  6739. the location pointed to by KEY. There is no limit on the number
  6740. of keys allocated at a given time. The value initially associated
  6741. with the returned key is `NULL' in all currently executing threads.
  6742. The DESTR_FUNCTION argument, if not `NULL', specifies a destructor
  6743. function associated with the key. When a thread terminates,
  6744. DESTR_FUNCTION is called on the value associated with the key in
  6745. that thread. The DESTR_FUNCTION is not called if a key is deleted
  6746. with `scm_key_delete' or a value is changed with
  6747. `scm_setspecific'. The order in which destructor functions are
  6748. called at thread termination time is unspecified.
  6749. Destructors are not yet implemented.
  6750. ** New function: scm_setspecific (scm_key_t KEY, const void *POINTER)
  6751. `scm_setspecific' changes the value associated with KEY in the
  6752. calling thread, storing the given POINTER instead.
  6753. ** New function: scm_getspecific (scm_key_t KEY)
  6754. `scm_getspecific' returns the value currently associated with
  6755. KEY in the calling thread.
  6756. ** New function: scm_key_delete (scm_key_t KEY)
  6757. `scm_key_delete' deallocates a TSD key. It does not check
  6758. whether non-`NULL' values are associated with that key in the
  6759. currently executing threads, nor call the destructor function
  6760. associated with the key.
  6761. ** New function: scm_c_hook_init (scm_c_hook_t *HOOK, void *HOOK_DATA, scm_c_hook_type_t TYPE)
  6762. Initialize a C level hook HOOK with associated HOOK_DATA and type
  6763. TYPE. (See scm_c_hook_run ().)
  6764. ** New function: scm_c_hook_add (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA, int APPENDP)
  6765. Add hook function FUNC with associated FUNC_DATA to HOOK. If APPENDP
  6766. is true, add it last, otherwise first. The same FUNC can be added
  6767. multiple times if FUNC_DATA differ and vice versa.
  6768. ** New function: scm_c_hook_remove (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA)
  6769. Remove hook function FUNC with associated FUNC_DATA from HOOK. A
  6770. function is only removed if both FUNC and FUNC_DATA matches.
  6771. ** New function: void *scm_c_hook_run (scm_c_hook_t *HOOK, void *DATA)
  6772. Run hook HOOK passing DATA to the hook functions.
  6773. If TYPE is SCM_C_HOOK_NORMAL, all hook functions are run. The value
  6774. returned is undefined.
  6775. If TYPE is SCM_C_HOOK_OR, hook functions are run until a function
  6776. returns a non-NULL value. This value is returned as the result of
  6777. scm_c_hook_run. If all functions return NULL, NULL is returned.
  6778. If TYPE is SCM_C_HOOK_AND, hook functions are run until a function
  6779. returns a NULL value, and NULL is returned. If all functions returns
  6780. a non-NULL value, the last value is returned.
  6781. ** New C level GC hooks
  6782. Five new C level hooks has been added to the garbage collector.
  6783. scm_before_gc_c_hook
  6784. scm_after_gc_c_hook
  6785. are run before locking and after unlocking the heap. The system is
  6786. thus in a mode where evaluation can take place. (Except that
  6787. scm_before_gc_c_hook must not allocate new cells.)
  6788. scm_before_mark_c_hook
  6789. scm_before_sweep_c_hook
  6790. scm_after_sweep_c_hook
  6791. are run when the heap is locked. These are intended for extension of
  6792. the GC in a modular fashion. Examples are the weaks and guardians
  6793. modules.
  6794. ** Way for application to customize GC parameters
  6795. The application can set up other default values for the GC heap
  6796. allocation parameters
  6797. GUILE_INIT_HEAP_SIZE_1, GUILE_MIN_YIELD_1,
  6798. GUILE_INIT_HEAP_SIZE_2, GUILE_MIN_YIELD_2,
  6799. GUILE_MAX_SEGMENT_SIZE,
  6800. by setting
  6801. scm_default_init_heap_size_1, scm_default_min_yield_1,
  6802. scm_default_init_heap_size_2, scm_default_min_yield_2,
  6803. scm_default_max_segment_size
  6804. respectively before callong scm_boot_guile.
  6805. (See entry "New environment variables ..." in section
  6806. "Changes to the stand-alone interpreter" above.)
  6807. ** scm_protect_object/scm_unprotect_object now nest
  6808. This means that you can call scm_protect_object multiple times on an
  6809. object and count on the object being protected until
  6810. scm_unprotect_object has been call the same number of times.
  6811. The functions also have better time complexity.
  6812. Still, it is usually possible to structure the application in a way
  6813. that you don't need to use these functions. For example, if you use a
  6814. protected standard Guile list to keep track of live objects rather
  6815. than some custom data type, objects will die a natural death when they
  6816. are no longer needed.
  6817. ** Deprecated type tags: scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc
  6818. Guile does not provide the float representation for inexact real numbers any
  6819. more. Now, only doubles are used to represent inexact real numbers. Further,
  6820. the tag names scm_tc_dblr and scm_tc_dblc have been changed to scm_tc16_real
  6821. and scm_tc16_complex, respectively.
  6822. ** Removed deprecated type scm_smobfuns
  6823. ** Removed deprecated function scm_newsmob
  6824. ** Warning: scm_make_smob_type_mfpe might become deprecated in a future release
  6825. There is an ongoing discussion among the developers whether to
  6826. deprecate `scm_make_smob_type_mfpe' or not. Please use the current
  6827. standard interface (scm_make_smob_type, scm_set_smob_XXX) in new code
  6828. until this issue has been settled.
  6829. ** Removed deprecated type tag scm_tc16_kw
  6830. ** Added type tag scm_tc16_keyword
  6831. (This was introduced already in release 1.3.4 but was not documented
  6832. until now.)
  6833. ** gdb_print now prints "*** Guile not initialized ***" until Guile initialized
  6834. * Changes to system call interfaces:
  6835. ** The "select" procedure now tests port buffers for the ability to
  6836. provide input or accept output. Previously only the underlying file
  6837. descriptors were checked.
  6838. ** New variable PIPE_BUF: the maximum number of bytes that can be
  6839. atomically written to a pipe.
  6840. ** If a facility is not available on the system when Guile is
  6841. compiled, the corresponding primitive procedure will not be defined.
  6842. Previously it would have been defined but would throw a system-error
  6843. exception if called. Exception handlers which catch this case may
  6844. need minor modification: an error will be thrown with key
  6845. 'unbound-variable instead of 'system-error. Alternatively it's
  6846. now possible to use `defined?' to check whether the facility is
  6847. available.
  6848. ** Procedures which depend on the timezone should now give the correct
  6849. result on systems which cache the TZ environment variable, even if TZ
  6850. is changed without calling tzset.
  6851. * Changes to the networking interfaces:
  6852. ** New functions: htons, ntohs, htonl, ntohl: for converting short and
  6853. long integers between network and host format. For now, it's not
  6854. particularly convenient to do this kind of thing, but consider:
  6855. (define write-network-long
  6856. (lambda (value port)
  6857. (let ((v (make-uniform-vector 1 1 0)))
  6858. (uniform-vector-set! v 0 (htonl value))
  6859. (uniform-vector-write v port))))
  6860. (define read-network-long
  6861. (lambda (port)
  6862. (let ((v (make-uniform-vector 1 1 0)))
  6863. (uniform-vector-read! v port)
  6864. (ntohl (uniform-vector-ref v 0)))))
  6865. ** If inet-aton fails, it now throws an error with key 'misc-error
  6866. instead of 'system-error, since errno is not relevant.
  6867. ** Certain gethostbyname/gethostbyaddr failures now throw errors with
  6868. specific keys instead of 'system-error. The latter is inappropriate
  6869. since errno will not have been set. The keys are:
  6870. 'host-not-found, 'try-again, 'no-recovery and 'no-data.
  6871. ** sethostent, setnetent, setprotoent, setservent: now take an
  6872. optional argument STAYOPEN, which specifies whether the database
  6873. remains open after a database entry is accessed randomly (e.g., using
  6874. gethostbyname for the hosts database.) The default is #f. Previously
  6875. #t was always used.
  6876. Changes since Guile 1.3.2:
  6877. * Changes to the stand-alone interpreter
  6878. ** Debugger
  6879. An initial version of the Guile debugger written by Chris Hanson has
  6880. been added. The debugger is still under development but is included
  6881. in the distribution anyway since it is already quite useful.
  6882. Type
  6883. (debug)
  6884. after an error to enter the debugger. Type `help' inside the debugger
  6885. for a description of available commands.
  6886. If you prefer to have stack frames numbered and printed in
  6887. anti-chronological order and prefer up in the stack to be down on the
  6888. screen as is the case in gdb, you can put
  6889. (debug-enable 'backwards)
  6890. in your .guile startup file. (However, this means that Guile can't
  6891. use indentation to indicate stack level.)
  6892. The debugger is autoloaded into Guile at the first use.
  6893. ** Further enhancements to backtraces
  6894. There is a new debug option `width' which controls the maximum width
  6895. on the screen of printed stack frames. Fancy printing parameters
  6896. ("level" and "length" as in Common LISP) are adaptively adjusted for
  6897. each stack frame to give maximum information while still fitting
  6898. within the bounds. If the stack frame can't be made to fit by
  6899. adjusting parameters, it is simply cut off at the end. This is marked
  6900. with a `$'.
  6901. ** Some modules are now only loaded when the repl is started
  6902. The modules (ice-9 debug), (ice-9 session), (ice-9 threads) and (ice-9
  6903. regex) are now loaded into (guile-user) only if the repl has been
  6904. started. The effect is that the startup time for scripts has been
  6905. reduced to 30% of what it was previously.
  6906. Correctly written scripts load the modules they require at the top of
  6907. the file and should not be affected by this change.
  6908. ** Hooks are now represented as smobs
  6909. * Changes to Scheme functions and syntax
  6910. ** Readline support has changed again.
  6911. The old (readline-activator) module is gone. Use (ice-9 readline)
  6912. instead, which now contains all readline functionality. So the code
  6913. to activate readline is now
  6914. (use-modules (ice-9 readline))
  6915. (activate-readline)
  6916. This should work at any time, including from the guile prompt.
  6917. To avoid confusion about the terms of Guile's license, please only
  6918. enable readline for your personal use; please don't make it the
  6919. default for others. Here is why we make this rather odd-sounding
  6920. request:
  6921. Guile is normally licensed under a weakened form of the GNU General
  6922. Public License, which allows you to link code with Guile without
  6923. placing that code under the GPL. This exception is important to some
  6924. people.
  6925. However, since readline is distributed under the GNU General Public
  6926. License, when you link Guile with readline, either statically or
  6927. dynamically, you effectively change Guile's license to the strict GPL.
  6928. Whenever you link any strictly GPL'd code into Guile, uses of Guile
  6929. which are normally permitted become forbidden. This is a rather
  6930. non-obvious consequence of the licensing terms.
  6931. So, to make sure things remain clear, please let people choose for
  6932. themselves whether to link GPL'd libraries like readline with Guile.
  6933. ** regexp-substitute/global has changed slightly, but incompatibly.
  6934. If you include a function in the item list, the string of the match
  6935. object it receives is the same string passed to
  6936. regexp-substitute/global, not some suffix of that string.
  6937. Correspondingly, the match's positions are relative to the entire
  6938. string, not the suffix.
  6939. If the regexp can match the empty string, the way matches are chosen
  6940. from the string has changed. regexp-substitute/global recognizes the
  6941. same set of matches that list-matches does; see below.
  6942. ** New function: list-matches REGEXP STRING [FLAGS]
  6943. Return a list of match objects, one for every non-overlapping, maximal
  6944. match of REGEXP in STRING. The matches appear in left-to-right order.
  6945. list-matches only reports matches of the empty string if there are no
  6946. other matches which begin on, end at, or include the empty match's
  6947. position.
  6948. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  6949. ** New function: fold-matches REGEXP STRING INIT PROC [FLAGS]
  6950. For each match of REGEXP in STRING, apply PROC to the match object,
  6951. and the last value PROC returned, or INIT for the first call. Return
  6952. the last value returned by PROC. We apply PROC to the matches as they
  6953. appear from left to right.
  6954. This function recognizes matches according to the same criteria as
  6955. list-matches.
  6956. Thus, you could define list-matches like this:
  6957. (define (list-matches regexp string . flags)
  6958. (reverse! (apply fold-matches regexp string '() cons flags)))
  6959. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  6960. ** Hooks
  6961. *** New function: hook? OBJ
  6962. Return #t if OBJ is a hook, otherwise #f.
  6963. *** New function: make-hook-with-name NAME [ARITY]
  6964. Return a hook with name NAME and arity ARITY. The default value for
  6965. ARITY is 0. The only effect of NAME is that it will appear when the
  6966. hook object is printed to ease debugging.
  6967. *** New function: hook-empty? HOOK
  6968. Return #t if HOOK doesn't contain any procedures, otherwise #f.
  6969. *** New function: hook->list HOOK
  6970. Return a list of the procedures that are called when run-hook is
  6971. applied to HOOK.
  6972. ** `map' signals an error if its argument lists are not all the same length.
  6973. This is the behavior required by R5RS, so this change is really a bug
  6974. fix. But it seems to affect a lot of people's code, so we're
  6975. mentioning it here anyway.
  6976. ** Print-state handling has been made more transparent
  6977. Under certain circumstances, ports are represented as a port with an
  6978. associated print state. Earlier, this pair was represented as a pair
  6979. (see "Some magic has been added to the printer" below). It is now
  6980. indistinguishable (almost; see `get-print-state') from a port on the
  6981. user level.
  6982. *** New function: port-with-print-state OUTPUT-PORT PRINT-STATE
  6983. Return a new port with the associated print state PRINT-STATE.
  6984. *** New function: get-print-state OUTPUT-PORT
  6985. Return the print state associated with this port if it exists,
  6986. otherwise return #f.
  6987. *** New function: directory-stream? OBJECT
  6988. Returns true iff OBJECT is a directory stream --- the sort of object
  6989. returned by `opendir'.
  6990. ** New function: using-readline?
  6991. Return #t if readline is in use in the current repl.
  6992. ** structs will be removed in 1.4
  6993. Structs will be replaced in Guile 1.4. We will merge GOOPS into Guile
  6994. and use GOOPS objects as the fundamental record type.
  6995. * Changes to the scm_ interface
  6996. ** structs will be removed in 1.4
  6997. The entire current struct interface (struct.c, struct.h) will be
  6998. replaced in Guile 1.4. We will merge GOOPS into libguile and use
  6999. GOOPS objects as the fundamental record type.
  7000. ** The internal representation of subr's has changed
  7001. Instead of giving a hint to the subr name, the CAR field of the subr
  7002. now contains an index to a subr entry in scm_subr_table.
  7003. *** New variable: scm_subr_table
  7004. An array of subr entries. A subr entry contains the name, properties
  7005. and documentation associated with the subr. The properties and
  7006. documentation slots are not yet used.
  7007. ** A new scheme for "forwarding" calls to a builtin to a generic function
  7008. It is now possible to extend the functionality of some Guile
  7009. primitives by letting them defer a call to a GOOPS generic function on
  7010. argument mismatch. This means that there is no loss of efficiency in
  7011. normal evaluation.
  7012. Example:
  7013. (use-modules (oop goops)) ; Must be GOOPS version 0.2.
  7014. (define-method + ((x <string>) (y <string>))
  7015. (string-append x y))
  7016. + will still be as efficient as usual in numerical calculations, but
  7017. can also be used for concatenating strings.
  7018. Who will be the first one to extend Guile's numerical tower to
  7019. rationals? :) [OK, there a few other things to fix before this can
  7020. be made in a clean way.]
  7021. *** New snarf macros for defining primitives: SCM_GPROC, SCM_GPROC1
  7022. New macro: SCM_GPROC (CNAME, SNAME, REQ, OPT, VAR, CFUNC, GENERIC)
  7023. New macro: SCM_GPROC1 (CNAME, SNAME, TYPE, CFUNC, GENERIC)
  7024. These do the same job as SCM_PROC and SCM_PROC1, but they also define
  7025. a variable GENERIC which can be used by the dispatch macros below.
  7026. [This is experimental code which may change soon.]
  7027. *** New macros for forwarding control to a generic on arg type error
  7028. New macro: SCM_WTA_DISPATCH_1 (GENERIC, ARG1, POS, SUBR)
  7029. New macro: SCM_WTA_DISPATCH_2 (GENERIC, ARG1, ARG2, POS, SUBR)
  7030. These correspond to the scm_wta function call, and have the same
  7031. behaviour until the user has called the GOOPS primitive
  7032. `enable-primitive-generic!'. After that, these macros will apply the
  7033. generic function GENERIC to the argument(s) instead of calling
  7034. scm_wta.
  7035. [This is experimental code which may change soon.]
  7036. *** New macros for argument testing with generic dispatch
  7037. New macro: SCM_GASSERT1 (COND, GENERIC, ARG1, POS, SUBR)
  7038. New macro: SCM_GASSERT2 (COND, GENERIC, ARG1, ARG2, POS, SUBR)
  7039. These correspond to the SCM_ASSERT macro, but will defer control to
  7040. GENERIC on error after `enable-primitive-generic!' has been called.
  7041. [This is experimental code which may change soon.]
  7042. ** New function: SCM scm_eval_body (SCM body, SCM env)
  7043. Evaluates the body of a special form.
  7044. ** The internal representation of struct's has changed
  7045. Previously, four slots were allocated for the procedure(s) of entities
  7046. and operators. The motivation for this representation had to do with
  7047. the structure of the evaluator, the wish to support tail-recursive
  7048. generic functions, and efficiency. Since the generic function
  7049. dispatch mechanism has changed, there is no longer a need for such an
  7050. expensive representation, and the representation has been simplified.
  7051. This should not make any difference for most users.
  7052. ** GOOPS support has been cleaned up.
  7053. Some code has been moved from eval.c to objects.c and code in both of
  7054. these compilation units has been cleaned up and better structured.
  7055. *** New functions for applying generic functions
  7056. New function: SCM scm_apply_generic (GENERIC, ARGS)
  7057. New function: SCM scm_call_generic_0 (GENERIC)
  7058. New function: SCM scm_call_generic_1 (GENERIC, ARG1)
  7059. New function: SCM scm_call_generic_2 (GENERIC, ARG1, ARG2)
  7060. New function: SCM scm_call_generic_3 (GENERIC, ARG1, ARG2, ARG3)
  7061. ** Deprecated function: scm_make_named_hook
  7062. It is now replaced by:
  7063. ** New function: SCM scm_create_hook (const char *name, int arity)
  7064. Creates a hook in the same way as make-hook above but also
  7065. binds a variable named NAME to it.
  7066. This is the typical way of creating a hook from C code.
  7067. Currently, the variable is created in the "current" module.
  7068. This might change when we get the new module system.
  7069. [The behaviour is identical to scm_make_named_hook.]
  7070. Changes since Guile 1.3:
  7071. * Changes to mailing lists
  7072. ** Some of the Guile mailing lists have moved to sourceware.cygnus.com.
  7073. See the README file to find current addresses for all the Guile
  7074. mailing lists.
  7075. * Changes to the distribution
  7076. ** Readline support is no longer included with Guile by default.
  7077. Based on the different license terms of Guile and Readline, we
  7078. concluded that Guile should not *by default* cause the linking of
  7079. Readline into an application program. Readline support is now offered
  7080. as a separate module, which is linked into an application only when
  7081. you explicitly specify it.
  7082. Although Guile is GNU software, its distribution terms add a special
  7083. exception to the usual GNU General Public License (GPL). Guile's
  7084. license includes a clause that allows you to link Guile with non-free
  7085. programs. We add this exception so as not to put Guile at a
  7086. disadvantage vis-a-vis other extensibility packages that support other
  7087. languages.
  7088. In contrast, the GNU Readline library is distributed under the GNU
  7089. General Public License pure and simple. This means that you may not
  7090. link Readline, even dynamically, into an application unless it is
  7091. distributed under a free software license that is compatible the GPL.
  7092. Because of this difference in distribution terms, an application that
  7093. can use Guile may not be able to use Readline. Now users will be
  7094. explicitly offered two independent decisions about the use of these
  7095. two packages.
  7096. You can activate the readline support by issuing
  7097. (use-modules (readline-activator))
  7098. (activate-readline)
  7099. from your ".guile" file, for example.
  7100. * Changes to the stand-alone interpreter
  7101. ** All builtins now print as primitives.
  7102. Previously builtin procedures not belonging to the fundamental subr
  7103. types printed as #<compiled closure #<primitive-procedure gsubr-apply>>.
  7104. Now, they print as #<primitive-procedure NAME>.
  7105. ** Backtraces slightly more intelligible.
  7106. gsubr-apply and macro transformer application frames no longer appear
  7107. in backtraces.
  7108. * Changes to Scheme functions and syntax
  7109. ** Guile now correctly handles internal defines by rewriting them into
  7110. their equivalent letrec. Previously, internal defines would
  7111. incrementally add to the innermost environment, without checking
  7112. whether the restrictions specified in RnRS were met. This lead to the
  7113. correct behaviour when these restriction actually were met, but didn't
  7114. catch all illegal uses. Such an illegal use could lead to crashes of
  7115. the Guile interpreter or other unwanted results. An example of
  7116. incorrect internal defines that made Guile behave erratically:
  7117. (let ()
  7118. (define a 1)
  7119. (define (b) a)
  7120. (define c (1+ (b)))
  7121. (define d 3)
  7122. (b))
  7123. => 2
  7124. The problem with this example is that the definition of `c' uses the
  7125. value of `b' directly. This confuses the meoization machine of Guile
  7126. so that the second call of `b' (this time in a larger environment that
  7127. also contains bindings for `c' and `d') refers to the binding of `c'
  7128. instead of `a'. You could also make Guile crash with a variation on
  7129. this theme:
  7130. (define (foo flag)
  7131. (define a 1)
  7132. (define (b flag) (if flag a 1))
  7133. (define c (1+ (b flag)))
  7134. (define d 3)
  7135. (b #t))
  7136. (foo #f)
  7137. (foo #t)
  7138. From now on, Guile will issue an `Unbound variable: b' error message
  7139. for both examples.
  7140. ** Hooks
  7141. A hook contains a list of functions which should be called on
  7142. particular occasions in an existing program. Hooks are used for
  7143. customization.
  7144. A window manager might have a hook before-window-map-hook. The window
  7145. manager uses the function run-hooks to call all functions stored in
  7146. before-window-map-hook each time a window is mapped. The user can
  7147. store functions in the hook using add-hook!.
  7148. In Guile, hooks are first class objects.
  7149. *** New function: make-hook [N_ARGS]
  7150. Return a hook for hook functions which can take N_ARGS arguments.
  7151. The default value for N_ARGS is 0.
  7152. (See also scm_make_named_hook below.)
  7153. *** New function: add-hook! HOOK PROC [APPEND_P]
  7154. Put PROC at the beginning of the list of functions stored in HOOK.
  7155. If APPEND_P is supplied, and non-false, put PROC at the end instead.
  7156. PROC must be able to take the number of arguments specified when the
  7157. hook was created.
  7158. If PROC already exists in HOOK, then remove it first.
  7159. *** New function: remove-hook! HOOK PROC
  7160. Remove PROC from the list of functions in HOOK.
  7161. *** New function: reset-hook! HOOK
  7162. Clear the list of hook functions stored in HOOK.
  7163. *** New function: run-hook HOOK ARG1 ...
  7164. Run all hook functions stored in HOOK with arguments ARG1 ... .
  7165. The number of arguments supplied must correspond to the number given
  7166. when the hook was created.
  7167. ** The function `dynamic-link' now takes optional keyword arguments.
  7168. The only keyword argument that is currently defined is `:global
  7169. BOOL'. With it, you can control whether the shared library will be
  7170. linked in global mode or not. In global mode, the symbols from the
  7171. linked library can be used to resolve references from other
  7172. dynamically linked libraries. In non-global mode, the linked
  7173. library is essentially invisible and can only be accessed via
  7174. `dynamic-func', etc. The default is now to link in global mode.
  7175. Previously, the default has been non-global mode.
  7176. The `#:global' keyword is only effective on platforms that support
  7177. the dlopen family of functions.
  7178. ** New function `provided?'
  7179. - Function: provided? FEATURE
  7180. Return true iff FEATURE is supported by this installation of
  7181. Guile. FEATURE must be a symbol naming a feature; the global
  7182. variable `*features*' is a list of available features.
  7183. ** Changes to the module (ice-9 expect):
  7184. *** The expect-strings macro now matches `$' in a regular expression
  7185. only at a line-break or end-of-file by default. Previously it would
  7186. match the end of the string accumulated so far. The old behaviour
  7187. can be obtained by setting the variable `expect-strings-exec-flags'
  7188. to 0.
  7189. *** The expect-strings macro now uses a variable `expect-strings-exec-flags'
  7190. for the regexp-exec flags. If `regexp/noteol' is included, then `$'
  7191. in a regular expression will still match before a line-break or
  7192. end-of-file. The default is `regexp/noteol'.
  7193. *** The expect-strings macro now uses a variable
  7194. `expect-strings-compile-flags' for the flags to be supplied to
  7195. `make-regexp'. The default is `regexp/newline', which was previously
  7196. hard-coded.
  7197. *** The expect macro now supplies two arguments to a match procedure:
  7198. the current accumulated string and a flag to indicate whether
  7199. end-of-file has been reached. Previously only the string was supplied.
  7200. If end-of-file is reached, the match procedure will be called an
  7201. additional time with the same accumulated string as the previous call
  7202. but with the flag set.
  7203. ** New module (ice-9 format), implementing the Common Lisp `format' function.
  7204. This code, and the documentation for it that appears here, was
  7205. borrowed from SLIB, with minor adaptations for Guile.
  7206. - Function: format DESTINATION FORMAT-STRING . ARGUMENTS
  7207. An almost complete implementation of Common LISP format description
  7208. according to the CL reference book `Common LISP' from Guy L.
  7209. Steele, Digital Press. Backward compatible to most of the
  7210. available Scheme format implementations.
  7211. Returns `#t', `#f' or a string; has side effect of printing
  7212. according to FORMAT-STRING. If DESTINATION is `#t', the output is
  7213. to the current output port and `#t' is returned. If DESTINATION
  7214. is `#f', a formatted string is returned as the result of the call.
  7215. NEW: If DESTINATION is a string, DESTINATION is regarded as the
  7216. format string; FORMAT-STRING is then the first argument and the
  7217. output is returned as a string. If DESTINATION is a number, the
  7218. output is to the current error port if available by the
  7219. implementation. Otherwise DESTINATION must be an output port and
  7220. `#t' is returned.
  7221. FORMAT-STRING must be a string. In case of a formatting error
  7222. format returns `#f' and prints a message on the current output or
  7223. error port. Characters are output as if the string were output by
  7224. the `display' function with the exception of those prefixed by a
  7225. tilde (~). For a detailed description of the FORMAT-STRING syntax
  7226. please consult a Common LISP format reference manual. For a test
  7227. suite to verify this format implementation load `formatst.scm'.
  7228. Please send bug reports to `lutzeb@cs.tu-berlin.de'.
  7229. Note: `format' is not reentrant, i.e. only one `format'-call may
  7230. be executed at a time.
  7231. *** Format Specification (Format version 3.0)
  7232. Please consult a Common LISP format reference manual for a detailed
  7233. description of the format string syntax. For a demonstration of the
  7234. implemented directives see `formatst.scm'.
  7235. This implementation supports directive parameters and modifiers (`:'
  7236. and `@' characters). Multiple parameters must be separated by a comma
  7237. (`,'). Parameters can be numerical parameters (positive or negative),
  7238. character parameters (prefixed by a quote character (`''), variable
  7239. parameters (`v'), number of rest arguments parameter (`#'), empty and
  7240. default parameters. Directive characters are case independent. The
  7241. general form of a directive is:
  7242. DIRECTIVE ::= ~{DIRECTIVE-PARAMETER,}[:][@]DIRECTIVE-CHARACTER
  7243. DIRECTIVE-PARAMETER ::= [ [-|+]{0-9}+ | 'CHARACTER | v | # ]
  7244. *** Implemented CL Format Control Directives
  7245. Documentation syntax: Uppercase characters represent the
  7246. corresponding control directive characters. Lowercase characters
  7247. represent control directive parameter descriptions.
  7248. `~A'
  7249. Any (print as `display' does).
  7250. `~@A'
  7251. left pad.
  7252. `~MINCOL,COLINC,MINPAD,PADCHARA'
  7253. full padding.
  7254. `~S'
  7255. S-expression (print as `write' does).
  7256. `~@S'
  7257. left pad.
  7258. `~MINCOL,COLINC,MINPAD,PADCHARS'
  7259. full padding.
  7260. `~D'
  7261. Decimal.
  7262. `~@D'
  7263. print number sign always.
  7264. `~:D'
  7265. print comma separated.
  7266. `~MINCOL,PADCHAR,COMMACHARD'
  7267. padding.
  7268. `~X'
  7269. Hexadecimal.
  7270. `~@X'
  7271. print number sign always.
  7272. `~:X'
  7273. print comma separated.
  7274. `~MINCOL,PADCHAR,COMMACHARX'
  7275. padding.
  7276. `~O'
  7277. Octal.
  7278. `~@O'
  7279. print number sign always.
  7280. `~:O'
  7281. print comma separated.
  7282. `~MINCOL,PADCHAR,COMMACHARO'
  7283. padding.
  7284. `~B'
  7285. Binary.
  7286. `~@B'
  7287. print number sign always.
  7288. `~:B'
  7289. print comma separated.
  7290. `~MINCOL,PADCHAR,COMMACHARB'
  7291. padding.
  7292. `~NR'
  7293. Radix N.
  7294. `~N,MINCOL,PADCHAR,COMMACHARR'
  7295. padding.
  7296. `~@R'
  7297. print a number as a Roman numeral.
  7298. `~:@R'
  7299. print a number as an "old fashioned" Roman numeral.
  7300. `~:R'
  7301. print a number as an ordinal English number.
  7302. `~:@R'
  7303. print a number as a cardinal English number.
  7304. `~P'
  7305. Plural.
  7306. `~@P'
  7307. prints `y' and `ies'.
  7308. `~:P'
  7309. as `~P but jumps 1 argument backward.'
  7310. `~:@P'
  7311. as `~@P but jumps 1 argument backward.'
  7312. `~C'
  7313. Character.
  7314. `~@C'
  7315. prints a character as the reader can understand it (i.e. `#\'
  7316. prefixing).
  7317. `~:C'
  7318. prints a character as emacs does (eg. `^C' for ASCII 03).
  7319. `~F'
  7320. Fixed-format floating-point (prints a flonum like MMM.NNN).
  7321. `~WIDTH,DIGITS,SCALE,OVERFLOWCHAR,PADCHARF'
  7322. `~@F'
  7323. If the number is positive a plus sign is printed.
  7324. `~E'
  7325. Exponential floating-point (prints a flonum like MMM.NNN`E'EE).
  7326. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARE'
  7327. `~@E'
  7328. If the number is positive a plus sign is printed.
  7329. `~G'
  7330. General floating-point (prints a flonum either fixed or
  7331. exponential).
  7332. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARG'
  7333. `~@G'
  7334. If the number is positive a plus sign is printed.
  7335. `~$'
  7336. Dollars floating-point (prints a flonum in fixed with signs
  7337. separated).
  7338. `~DIGITS,SCALE,WIDTH,PADCHAR$'
  7339. `~@$'
  7340. If the number is positive a plus sign is printed.
  7341. `~:@$'
  7342. A sign is always printed and appears before the padding.
  7343. `~:$'
  7344. The sign appears before the padding.
  7345. `~%'
  7346. Newline.
  7347. `~N%'
  7348. print N newlines.
  7349. `~&'
  7350. print newline if not at the beginning of the output line.
  7351. `~N&'
  7352. prints `~&' and then N-1 newlines.
  7353. `~|'
  7354. Page Separator.
  7355. `~N|'
  7356. print N page separators.
  7357. `~~'
  7358. Tilde.
  7359. `~N~'
  7360. print N tildes.
  7361. `~'<newline>
  7362. Continuation Line.
  7363. `~:'<newline>
  7364. newline is ignored, white space left.
  7365. `~@'<newline>
  7366. newline is left, white space ignored.
  7367. `~T'
  7368. Tabulation.
  7369. `~@T'
  7370. relative tabulation.
  7371. `~COLNUM,COLINCT'
  7372. full tabulation.
  7373. `~?'
  7374. Indirection (expects indirect arguments as a list).
  7375. `~@?'
  7376. extracts indirect arguments from format arguments.
  7377. `~(STR~)'
  7378. Case conversion (converts by `string-downcase').
  7379. `~:(STR~)'
  7380. converts by `string-capitalize'.
  7381. `~@(STR~)'
  7382. converts by `string-capitalize-first'.
  7383. `~:@(STR~)'
  7384. converts by `string-upcase'.
  7385. `~*'
  7386. Argument Jumping (jumps 1 argument forward).
  7387. `~N*'
  7388. jumps N arguments forward.
  7389. `~:*'
  7390. jumps 1 argument backward.
  7391. `~N:*'
  7392. jumps N arguments backward.
  7393. `~@*'
  7394. jumps to the 0th argument.
  7395. `~N@*'
  7396. jumps to the Nth argument (beginning from 0)
  7397. `~[STR0~;STR1~;...~;STRN~]'
  7398. Conditional Expression (numerical clause conditional).
  7399. `~N['
  7400. take argument from N.
  7401. `~@['
  7402. true test conditional.
  7403. `~:['
  7404. if-else-then conditional.
  7405. `~;'
  7406. clause separator.
  7407. `~:;'
  7408. default clause follows.
  7409. `~{STR~}'
  7410. Iteration (args come from the next argument (a list)).
  7411. `~N{'
  7412. at most N iterations.
  7413. `~:{'
  7414. args from next arg (a list of lists).
  7415. `~@{'
  7416. args from the rest of arguments.
  7417. `~:@{'
  7418. args from the rest args (lists).
  7419. `~^'
  7420. Up and out.
  7421. `~N^'
  7422. aborts if N = 0
  7423. `~N,M^'
  7424. aborts if N = M
  7425. `~N,M,K^'
  7426. aborts if N <= M <= K
  7427. *** Not Implemented CL Format Control Directives
  7428. `~:A'
  7429. print `#f' as an empty list (see below).
  7430. `~:S'
  7431. print `#f' as an empty list (see below).
  7432. `~<~>'
  7433. Justification.
  7434. `~:^'
  7435. (sorry I don't understand its semantics completely)
  7436. *** Extended, Replaced and Additional Control Directives
  7437. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHD'
  7438. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHX'
  7439. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHO'
  7440. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHB'
  7441. `~N,MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHR'
  7442. COMMAWIDTH is the number of characters between two comma
  7443. characters.
  7444. `~I'
  7445. print a R4RS complex number as `~F~@Fi' with passed parameters for
  7446. `~F'.
  7447. `~Y'
  7448. Pretty print formatting of an argument for scheme code lists.
  7449. `~K'
  7450. Same as `~?.'
  7451. `~!'
  7452. Flushes the output if format DESTINATION is a port.
  7453. `~_'
  7454. Print a `#\space' character
  7455. `~N_'
  7456. print N `#\space' characters.
  7457. `~/'
  7458. Print a `#\tab' character
  7459. `~N/'
  7460. print N `#\tab' characters.
  7461. `~NC'
  7462. Takes N as an integer representation for a character. No arguments
  7463. are consumed. N is converted to a character by `integer->char'. N
  7464. must be a positive decimal number.
  7465. `~:S'
  7466. Print out readproof. Prints out internal objects represented as
  7467. `#<...>' as strings `"#<...>"' so that the format output can always
  7468. be processed by `read'.
  7469. `~:A'
  7470. Print out readproof. Prints out internal objects represented as
  7471. `#<...>' as strings `"#<...>"' so that the format output can always
  7472. be processed by `read'.
  7473. `~Q'
  7474. Prints information and a copyright notice on the format
  7475. implementation.
  7476. `~:Q'
  7477. prints format version.
  7478. `~F, ~E, ~G, ~$'
  7479. may also print number strings, i.e. passing a number as a string
  7480. and format it accordingly.
  7481. *** Configuration Variables
  7482. The format module exports some configuration variables to suit the
  7483. systems and users needs. There should be no modification necessary for
  7484. the configuration that comes with Guile. Format detects automatically
  7485. if the running scheme system implements floating point numbers and
  7486. complex numbers.
  7487. format:symbol-case-conv
  7488. Symbols are converted by `symbol->string' so the case type of the
  7489. printed symbols is implementation dependent.
  7490. `format:symbol-case-conv' is a one arg closure which is either
  7491. `#f' (no conversion), `string-upcase', `string-downcase' or
  7492. `string-capitalize'. (default `#f')
  7493. format:iobj-case-conv
  7494. As FORMAT:SYMBOL-CASE-CONV but applies for the representation of
  7495. implementation internal objects. (default `#f')
  7496. format:expch
  7497. The character prefixing the exponent value in `~E' printing.
  7498. (default `#\E')
  7499. *** Compatibility With Other Format Implementations
  7500. SLIB format 2.x:
  7501. See `format.doc'.
  7502. SLIB format 1.4:
  7503. Downward compatible except for padding support and `~A', `~S',
  7504. `~P', `~X' uppercase printing. SLIB format 1.4 uses C-style
  7505. `printf' padding support which is completely replaced by the CL
  7506. `format' padding style.
  7507. MIT C-Scheme 7.1:
  7508. Downward compatible except for `~', which is not documented
  7509. (ignores all characters inside the format string up to a newline
  7510. character). (7.1 implements `~a', `~s', ~NEWLINE, `~~', `~%',
  7511. numerical and variable parameters and `:/@' modifiers in the CL
  7512. sense).
  7513. Elk 1.5/2.0:
  7514. Downward compatible except for `~A' and `~S' which print in
  7515. uppercase. (Elk implements `~a', `~s', `~~', and `~%' (no
  7516. directive parameters or modifiers)).
  7517. Scheme->C 01nov91:
  7518. Downward compatible except for an optional destination parameter:
  7519. S2C accepts a format call without a destination which returns a
  7520. formatted string. This is equivalent to a #f destination in S2C.
  7521. (S2C implements `~a', `~s', `~c', `~%', and `~~' (no directive
  7522. parameters or modifiers)).
  7523. ** Changes to string-handling functions.
  7524. These functions were added to support the (ice-9 format) module, above.
  7525. *** New function: string-upcase STRING
  7526. *** New function: string-downcase STRING
  7527. These are non-destructive versions of the existing string-upcase! and
  7528. string-downcase! functions.
  7529. *** New function: string-capitalize! STRING
  7530. *** New function: string-capitalize STRING
  7531. These functions convert the first letter of each word in the string to
  7532. upper case. Thus:
  7533. (string-capitalize "howdy there")
  7534. => "Howdy There"
  7535. As with the other functions, string-capitalize! modifies the string in
  7536. place, while string-capitalize returns a modified copy of its argument.
  7537. *** New function: string-ci->symbol STRING
  7538. Return a symbol whose name is STRING, but having the same case as if
  7539. the symbol had be read by `read'.
  7540. Guile can be configured to be sensitive or insensitive to case
  7541. differences in Scheme identifiers. If Guile is case-insensitive, all
  7542. symbols are converted to lower case on input. The `string-ci->symbol'
  7543. function returns a symbol whose name in STRING, transformed as Guile
  7544. would if STRING were input.
  7545. *** New function: substring-move! STRING1 START END STRING2 START
  7546. Copy the substring of STRING1 from START (inclusive) to END
  7547. (exclusive) to STRING2 at START. STRING1 and STRING2 may be the same
  7548. string, and the source and destination areas may overlap; in all
  7549. cases, the function behaves as if all the characters were copied
  7550. simultanously.
  7551. *** Extended functions: substring-move-left! substring-move-right!
  7552. These functions now correctly copy arbitrarily overlapping substrings;
  7553. they are both synonyms for substring-move!.
  7554. ** New module (ice-9 getopt-long), with the function `getopt-long'.
  7555. getopt-long is a function for parsing command-line arguments in a
  7556. manner consistent with other GNU programs.
  7557. (getopt-long ARGS GRAMMAR)
  7558. Parse the arguments ARGS according to the argument list grammar GRAMMAR.
  7559. ARGS should be a list of strings. Its first element should be the
  7560. name of the program; subsequent elements should be the arguments
  7561. that were passed to the program on the command line. The
  7562. `program-arguments' procedure returns a list of this form.
  7563. GRAMMAR is a list of the form:
  7564. ((OPTION (PROPERTY VALUE) ...) ...)
  7565. Each OPTION should be a symbol. `getopt-long' will accept a
  7566. command-line option named `--OPTION'.
  7567. Each option can have the following (PROPERTY VALUE) pairs:
  7568. (single-char CHAR) --- Accept `-CHAR' as a single-character
  7569. equivalent to `--OPTION'. This is how to specify traditional
  7570. Unix-style flags.
  7571. (required? BOOL) --- If BOOL is true, the option is required.
  7572. getopt-long will raise an error if it is not found in ARGS.
  7573. (value BOOL) --- If BOOL is #t, the option accepts a value; if
  7574. it is #f, it does not; and if it is the symbol
  7575. `optional', the option may appear in ARGS with or
  7576. without a value.
  7577. (predicate FUNC) --- If the option accepts a value (i.e. you
  7578. specified `(value #t)' for this option), then getopt
  7579. will apply FUNC to the value, and throw an exception
  7580. if it returns #f. FUNC should be a procedure which
  7581. accepts a string and returns a boolean value; you may
  7582. need to use quasiquotes to get it into GRAMMAR.
  7583. The (PROPERTY VALUE) pairs may occur in any order, but each
  7584. property may occur only once. By default, options do not have
  7585. single-character equivalents, are not required, and do not take
  7586. values.
  7587. In ARGS, single-character options may be combined, in the usual
  7588. Unix fashion: ("-x" "-y") is equivalent to ("-xy"). If an option
  7589. accepts values, then it must be the last option in the
  7590. combination; the value is the next argument. So, for example, using
  7591. the following grammar:
  7592. ((apples (single-char #\a))
  7593. (blimps (single-char #\b) (value #t))
  7594. (catalexis (single-char #\c) (value #t)))
  7595. the following argument lists would be acceptable:
  7596. ("-a" "-b" "bang" "-c" "couth") ("bang" and "couth" are the values
  7597. for "blimps" and "catalexis")
  7598. ("-ab" "bang" "-c" "couth") (same)
  7599. ("-ac" "couth" "-b" "bang") (same)
  7600. ("-abc" "couth" "bang") (an error, since `-b' is not the
  7601. last option in its combination)
  7602. If an option's value is optional, then `getopt-long' decides
  7603. whether it has a value by looking at what follows it in ARGS. If
  7604. the next element is a string, and it does not appear to be an
  7605. option itself, then that string is the option's value.
  7606. The value of a long option can appear as the next element in ARGS,
  7607. or it can follow the option name, separated by an `=' character.
  7608. Thus, using the same grammar as above, the following argument lists
  7609. are equivalent:
  7610. ("--apples" "Braeburn" "--blimps" "Goodyear")
  7611. ("--apples=Braeburn" "--blimps" "Goodyear")
  7612. ("--blimps" "Goodyear" "--apples=Braeburn")
  7613. If the option "--" appears in ARGS, argument parsing stops there;
  7614. subsequent arguments are returned as ordinary arguments, even if
  7615. they resemble options. So, in the argument list:
  7616. ("--apples" "Granny Smith" "--" "--blimp" "Goodyear")
  7617. `getopt-long' will recognize the `apples' option as having the
  7618. value "Granny Smith", but it will not recognize the `blimp'
  7619. option; it will return the strings "--blimp" and "Goodyear" as
  7620. ordinary argument strings.
  7621. The `getopt-long' function returns the parsed argument list as an
  7622. assocation list, mapping option names --- the symbols from GRAMMAR
  7623. --- onto their values, or #t if the option does not accept a value.
  7624. Unused options do not appear in the alist.
  7625. All arguments that are not the value of any option are returned
  7626. as a list, associated with the empty list.
  7627. `getopt-long' throws an exception if:
  7628. - it finds an unrecognized option in ARGS
  7629. - a required option is omitted
  7630. - an option that requires an argument doesn't get one
  7631. - an option that doesn't accept an argument does get one (this can
  7632. only happen using the long option `--opt=value' syntax)
  7633. - an option predicate fails
  7634. So, for example:
  7635. (define grammar
  7636. `((lockfile-dir (required? #t)
  7637. (value #t)
  7638. (single-char #\k)
  7639. (predicate ,file-is-directory?))
  7640. (verbose (required? #f)
  7641. (single-char #\v)
  7642. (value #f))
  7643. (x-includes (single-char #\x))
  7644. (rnet-server (single-char #\y)
  7645. (predicate ,string?))))
  7646. (getopt-long '("my-prog" "-vk" "/tmp" "foo1" "--x-includes=/usr/include"
  7647. "--rnet-server=lamprod" "--" "-fred" "foo2" "foo3")
  7648. grammar)
  7649. => ((() "foo1" "-fred" "foo2" "foo3")
  7650. (rnet-server . "lamprod")
  7651. (x-includes . "/usr/include")
  7652. (lockfile-dir . "/tmp")
  7653. (verbose . #t))
  7654. ** The (ice-9 getopt-gnu-style) module is obsolete; use (ice-9 getopt-long).
  7655. It will be removed in a few releases.
  7656. ** New syntax: lambda*
  7657. ** New syntax: define*
  7658. ** New syntax: define*-public
  7659. ** New syntax: defmacro*
  7660. ** New syntax: defmacro*-public
  7661. Guile now supports optional arguments.
  7662. `lambda*', `define*', `define*-public', `defmacro*' and
  7663. `defmacro*-public' are identical to the non-* versions except that
  7664. they use an extended type of parameter list that has the following BNF
  7665. syntax (parentheses are literal, square brackets indicate grouping,
  7666. and `*', `+' and `?' have the usual meaning):
  7667. ext-param-list ::= ( [identifier]* [#&optional [ext-var-decl]+]?
  7668. [#&key [ext-var-decl]+ [#&allow-other-keys]?]?
  7669. [[#&rest identifier]|[. identifier]]? ) | [identifier]
  7670. ext-var-decl ::= identifier | ( identifier expression )
  7671. The semantics are best illustrated with the following documentation
  7672. and examples for `lambda*':
  7673. lambda* args . body
  7674. lambda extended for optional and keyword arguments
  7675. lambda* creates a procedure that takes optional arguments. These
  7676. are specified by putting them inside brackets at the end of the
  7677. paramater list, but before any dotted rest argument. For example,
  7678. (lambda* (a b #&optional c d . e) '())
  7679. creates a procedure with fixed arguments a and b, optional arguments c
  7680. and d, and rest argument e. If the optional arguments are omitted
  7681. in a call, the variables for them are unbound in the procedure. This
  7682. can be checked with the bound? macro.
  7683. lambda* can also take keyword arguments. For example, a procedure
  7684. defined like this:
  7685. (lambda* (#&key xyzzy larch) '())
  7686. can be called with any of the argument lists (#:xyzzy 11)
  7687. (#:larch 13) (#:larch 42 #:xyzzy 19) (). Whichever arguments
  7688. are given as keywords are bound to values.
  7689. Optional and keyword arguments can also be given default values
  7690. which they take on when they are not present in a call, by giving a
  7691. two-item list in place of an optional argument, for example in:
  7692. (lambda* (foo #&optional (bar 42) #&key (baz 73)) (list foo bar baz))
  7693. foo is a fixed argument, bar is an optional argument with default
  7694. value 42, and baz is a keyword argument with default value 73.
  7695. Default value expressions are not evaluated unless they are needed
  7696. and until the procedure is called.
  7697. lambda* now supports two more special parameter list keywords.
  7698. lambda*-defined procedures now throw an error by default if a
  7699. keyword other than one of those specified is found in the actual
  7700. passed arguments. However, specifying #&allow-other-keys
  7701. immediately after the kyword argument declarations restores the
  7702. previous behavior of ignoring unknown keywords. lambda* also now
  7703. guarantees that if the same keyword is passed more than once, the
  7704. last one passed is the one that takes effect. For example,
  7705. ((lambda* (#&key (heads 0) (tails 0)) (display (list heads tails)))
  7706. #:heads 37 #:tails 42 #:heads 99)
  7707. would result in (99 47) being displayed.
  7708. #&rest is also now provided as a synonym for the dotted syntax rest
  7709. argument. The argument lists (a . b) and (a #&rest b) are equivalent in
  7710. all respects to lambda*. This is provided for more similarity to DSSSL,
  7711. MIT-Scheme and Kawa among others, as well as for refugees from other
  7712. Lisp dialects.
  7713. Further documentation may be found in the optargs.scm file itself.
  7714. The optional argument module also exports the macros `let-optional',
  7715. `let-optional*', `let-keywords', `let-keywords*' and `bound?'. These
  7716. are not documented here because they may be removed in the future, but
  7717. full documentation is still available in optargs.scm.
  7718. ** New syntax: and-let*
  7719. Guile now supports the `and-let*' form, described in the draft SRFI-2.
  7720. Syntax: (land* (<clause> ...) <body> ...)
  7721. Each <clause> should have one of the following forms:
  7722. (<variable> <expression>)
  7723. (<expression>)
  7724. <bound-variable>
  7725. Each <variable> or <bound-variable> should be an identifier. Each
  7726. <expression> should be a valid expression. The <body> should be a
  7727. possibly empty sequence of expressions, like the <body> of a
  7728. lambda form.
  7729. Semantics: A LAND* expression is evaluated by evaluating the
  7730. <expression> or <bound-variable> of each of the <clause>s from
  7731. left to right. The value of the first <expression> or
  7732. <bound-variable> that evaluates to a false value is returned; the
  7733. remaining <expression>s and <bound-variable>s are not evaluated.
  7734. The <body> forms are evaluated iff all the <expression>s and
  7735. <bound-variable>s evaluate to true values.
  7736. The <expression>s and the <body> are evaluated in an environment
  7737. binding each <variable> of the preceding (<variable> <expression>)
  7738. clauses to the value of the <expression>. Later bindings
  7739. shadow earlier bindings.
  7740. Guile's and-let* macro was contributed by Michael Livshin.
  7741. ** New sorting functions
  7742. *** New function: sorted? SEQUENCE LESS?
  7743. Returns `#t' when the sequence argument is in non-decreasing order
  7744. according to LESS? (that is, there is no adjacent pair `... x y
  7745. ...' for which `(less? y x)').
  7746. Returns `#f' when the sequence contains at least one out-of-order
  7747. pair. It is an error if the sequence is neither a list nor a
  7748. vector.
  7749. *** New function: merge LIST1 LIST2 LESS?
  7750. LIST1 and LIST2 are sorted lists.
  7751. Returns the sorted list of all elements in LIST1 and LIST2.
  7752. Assume that the elements a and b1 in LIST1 and b2 in LIST2 are "equal"
  7753. in the sense that (LESS? x y) --> #f for x, y in {a, b1, b2},
  7754. and that a < b1 in LIST1. Then a < b1 < b2 in the result.
  7755. (Here "<" should read "comes before".)
  7756. *** New procedure: merge! LIST1 LIST2 LESS?
  7757. Merges two lists, re-using the pairs of LIST1 and LIST2 to build
  7758. the result. If the code is compiled, and LESS? constructs no new
  7759. pairs, no pairs at all will be allocated. The first pair of the
  7760. result will be either the first pair of LIST1 or the first pair of
  7761. LIST2.
  7762. *** New function: sort SEQUENCE LESS?
  7763. Accepts either a list or a vector, and returns a new sequence
  7764. which is sorted. The new sequence is the same type as the input.
  7765. Always `(sorted? (sort sequence less?) less?)'. The original
  7766. sequence is not altered in any way. The new sequence shares its
  7767. elements with the old one; no elements are copied.
  7768. *** New procedure: sort! SEQUENCE LESS
  7769. Returns its sorted result in the original boxes. No new storage is
  7770. allocated at all. Proper usage: (set! slist (sort! slist <))
  7771. *** New function: stable-sort SEQUENCE LESS?
  7772. Similar to `sort' but stable. That is, if "equal" elements are
  7773. ordered a < b in the original sequence, they will have the same order
  7774. in the result.
  7775. *** New function: stable-sort! SEQUENCE LESS?
  7776. Similar to `sort!' but stable.
  7777. Uses temporary storage when sorting vectors.
  7778. *** New functions: sort-list, sort-list!
  7779. Added for compatibility with scsh.
  7780. ** New built-in random number support
  7781. *** New function: random N [STATE]
  7782. Accepts a positive integer or real N and returns a number of the
  7783. same type between zero (inclusive) and N (exclusive). The values
  7784. returned have a uniform distribution.
  7785. The optional argument STATE must be of the type produced by
  7786. `copy-random-state' or `seed->random-state'. It defaults to the value
  7787. of the variable `*random-state*'. This object is used to maintain the
  7788. state of the pseudo-random-number generator and is altered as a side
  7789. effect of the `random' operation.
  7790. *** New variable: *random-state*
  7791. Holds a data structure that encodes the internal state of the
  7792. random-number generator that `random' uses by default. The nature
  7793. of this data structure is implementation-dependent. It may be
  7794. printed out and successfully read back in, but may or may not
  7795. function correctly as a random-number state object in another
  7796. implementation.
  7797. *** New function: copy-random-state [STATE]
  7798. Returns a new object of type suitable for use as the value of the
  7799. variable `*random-state*' and as a second argument to `random'.
  7800. If argument STATE is given, a copy of it is returned. Otherwise a
  7801. copy of `*random-state*' is returned.
  7802. *** New function: seed->random-state SEED
  7803. Returns a new object of type suitable for use as the value of the
  7804. variable `*random-state*' and as a second argument to `random'.
  7805. SEED is a string or a number. A new state is generated and
  7806. initialized using SEED.
  7807. *** New function: random:uniform [STATE]
  7808. Returns an uniformly distributed inexact real random number in the
  7809. range between 0 and 1.
  7810. *** New procedure: random:solid-sphere! VECT [STATE]
  7811. Fills VECT with inexact real random numbers the sum of whose
  7812. squares is less than 1.0. Thinking of VECT as coordinates in
  7813. space of dimension N = `(vector-length VECT)', the coordinates are
  7814. uniformly distributed within the unit N-shere. The sum of the
  7815. squares of the numbers is returned. VECT can be either a vector
  7816. or a uniform vector of doubles.
  7817. *** New procedure: random:hollow-sphere! VECT [STATE]
  7818. Fills VECT with inexact real random numbers the sum of whose squares
  7819. is equal to 1.0. Thinking of VECT as coordinates in space of
  7820. dimension n = `(vector-length VECT)', the coordinates are uniformly
  7821. distributed over the surface of the unit n-shere. VECT can be either
  7822. a vector or a uniform vector of doubles.
  7823. *** New function: random:normal [STATE]
  7824. Returns an inexact real in a normal distribution with mean 0 and
  7825. standard deviation 1. For a normal distribution with mean M and
  7826. standard deviation D use `(+ M (* D (random:normal)))'.
  7827. *** New procedure: random:normal-vector! VECT [STATE]
  7828. Fills VECT with inexact real random numbers which are independent and
  7829. standard normally distributed (i.e., with mean 0 and variance 1).
  7830. VECT can be either a vector or a uniform vector of doubles.
  7831. *** New function: random:exp STATE
  7832. Returns an inexact real in an exponential distribution with mean 1.
  7833. For an exponential distribution with mean U use (* U (random:exp)).
  7834. ** The range of logand, logior, logxor, logtest, and logbit? have changed.
  7835. These functions now operate on numbers in the range of a C unsigned
  7836. long.
  7837. These functions used to operate on numbers in the range of a C signed
  7838. long; however, this seems inappropriate, because Guile integers don't
  7839. overflow.
  7840. ** New function: make-guardian
  7841. This is an implementation of guardians as described in
  7842. R. Kent Dybvig, Carl Bruggeman, and David Eby (1993) "Guardians in a
  7843. Generation-Based Garbage Collector" ACM SIGPLAN Conference on
  7844. Programming Language Design and Implementation, June 1993
  7845. ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/guardians.ps.gz
  7846. ** New functions: delq1!, delv1!, delete1!
  7847. These procedures behave similar to delq! and friends but delete only
  7848. one object if at all.
  7849. ** New function: unread-string STRING PORT
  7850. Unread STRING to PORT, that is, push it back onto the port so that
  7851. next read operation will work on the pushed back characters.
  7852. ** unread-char can now be called multiple times
  7853. If unread-char is called multiple times, the unread characters will be
  7854. read again in last-in first-out order.
  7855. ** the procedures uniform-array-read! and uniform-array-write! now
  7856. work on any kind of port, not just ports which are open on a file.
  7857. ** Now 'l' in a port mode requests line buffering.
  7858. ** The procedure truncate-file now works on string ports as well
  7859. as file ports. If the size argument is omitted, the current
  7860. file position is used.
  7861. ** new procedure: seek PORT/FDES OFFSET WHENCE
  7862. The arguments are the same as for the old fseek procedure, but it
  7863. works on string ports as well as random-access file ports.
  7864. ** the fseek procedure now works on string ports, since it has been
  7865. redefined using seek.
  7866. ** the setvbuf procedure now uses a default size if mode is _IOFBF and
  7867. size is not supplied.
  7868. ** the newline procedure no longer flushes the port if it's not
  7869. line-buffered: previously it did if it was the current output port.
  7870. ** open-pipe and close-pipe are no longer primitive procedures, but
  7871. an emulation can be obtained using `(use-modules (ice-9 popen))'.
  7872. ** the freopen procedure has been removed.
  7873. ** new procedure: drain-input PORT
  7874. Drains PORT's read buffers (including any pushed-back characters)
  7875. and returns the contents as a single string.
  7876. ** New function: map-in-order PROC LIST1 LIST2 ...
  7877. Version of `map' which guarantees that the procedure is applied to the
  7878. lists in serial order.
  7879. ** Renamed `serial-array-copy!' and `serial-array-map!' to
  7880. `array-copy-in-order!' and `array-map-in-order!'. The old names are
  7881. now obsolete and will go away in release 1.5.
  7882. ** New syntax: collect BODY1 ...
  7883. Version of `begin' which returns a list of the results of the body
  7884. forms instead of the result of the last body form. In contrast to
  7885. `begin', `collect' allows an empty body.
  7886. ** New functions: read-history FILENAME, write-history FILENAME
  7887. Read/write command line history from/to file. Returns #t on success
  7888. and #f if an error occured.
  7889. ** `ls' and `lls' in module (ice-9 ls) now handle no arguments.
  7890. These procedures return a list of definitions available in the specified
  7891. argument, a relative module reference. In the case of no argument,
  7892. `(current-module)' is now consulted for definitions to return, instead
  7893. of simply returning #f, the former behavior.
  7894. ** The #/ syntax for lists is no longer supported.
  7895. Earlier versions of Scheme accepted this syntax, but printed a
  7896. warning.
  7897. ** Guile no longer consults the SCHEME_LOAD_PATH environment variable.
  7898. Instead, you should set GUILE_LOAD_PATH to tell Guile where to find
  7899. modules.
  7900. * Changes to the gh_ interface
  7901. ** gh_scm2doubles
  7902. Now takes a second argument which is the result array. If this
  7903. pointer is NULL, a new array is malloced (the old behaviour).
  7904. ** gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
  7905. gh_scm2shorts, gh_scm2longs, gh_scm2floats
  7906. New functions.
  7907. * Changes to the scm_ interface
  7908. ** Function: scm_make_named_hook (char* name, int n_args)
  7909. Creates a hook in the same way as make-hook above but also
  7910. binds a variable named NAME to it.
  7911. This is the typical way of creating a hook from C code.
  7912. Currently, the variable is created in the "current" module. This
  7913. might change when we get the new module system.
  7914. ** The smob interface
  7915. The interface for creating smobs has changed. For documentation, see
  7916. data-rep.info (made from guile-core/doc/data-rep.texi).
  7917. *** Deprecated function: SCM scm_newsmob (scm_smobfuns *)
  7918. >>> This function will be removed in 1.3.4. <<<
  7919. It is replaced by:
  7920. *** Function: SCM scm_make_smob_type (const char *name, scm_sizet size)
  7921. This function adds a new smob type, named NAME, with instance size
  7922. SIZE to the system. The return value is a tag that is used in
  7923. creating instances of the type. If SIZE is 0, then no memory will
  7924. be allocated when instances of the smob are created, and nothing
  7925. will be freed by the default free function.
  7926. *** Function: void scm_set_smob_mark (long tc, SCM (*mark) (SCM))
  7927. This function sets the smob marking procedure for the smob type
  7928. specified by the tag TC. TC is the tag returned by
  7929. `scm_make_smob_type'.
  7930. *** Function: void scm_set_smob_free (long tc, SCM (*mark) (SCM))
  7931. This function sets the smob freeing procedure for the smob type
  7932. specified by the tag TC. TC is the tag returned by
  7933. `scm_make_smob_type'.
  7934. *** Function: void scm_set_smob_print (tc, print)
  7935. - Function: void scm_set_smob_print (long tc,
  7936. scm_sizet (*print) (SCM,
  7937. SCM,
  7938. scm_print_state *))
  7939. This function sets the smob printing procedure for the smob type
  7940. specified by the tag TC. TC is the tag returned by
  7941. `scm_make_smob_type'.
  7942. *** Function: void scm_set_smob_equalp (long tc, SCM (*equalp) (SCM, SCM))
  7943. This function sets the smob equality-testing predicate for the
  7944. smob type specified by the tag TC. TC is the tag returned by
  7945. `scm_make_smob_type'.
  7946. *** Macro: void SCM_NEWSMOB (SCM var, long tc, void *data)
  7947. Make VALUE contain a smob instance of the type with type code TC and
  7948. smob data DATA. VALUE must be previously declared as C type `SCM'.
  7949. *** Macro: fn_returns SCM_RETURN_NEWSMOB (long tc, void *data)
  7950. This macro expands to a block of code that creates a smob instance
  7951. of the type with type code TC and smob data DATA, and returns that
  7952. `SCM' value. It should be the last piece of code in a block.
  7953. ** The interfaces for using I/O ports and implementing port types
  7954. (ptobs) have changed significantly. The new interface is based on
  7955. shared access to buffers and a new set of ptob procedures.
  7956. *** scm_newptob has been removed
  7957. It is replaced by:
  7958. *** Function: SCM scm_make_port_type (type_name, fill_buffer, write_flush)
  7959. - Function: SCM scm_make_port_type (char *type_name,
  7960. int (*fill_buffer) (SCM port),
  7961. void (*write_flush) (SCM port));
  7962. Similarly to the new smob interface, there is a set of function
  7963. setters by which the user can customize the behaviour of his port
  7964. type. See ports.h (scm_set_port_XXX).
  7965. ** scm_strport_to_string: New function: creates a new string from
  7966. a string port's buffer.
  7967. ** Plug in interface for random number generators
  7968. The variable `scm_the_rng' in random.c contains a value and three
  7969. function pointers which together define the current random number
  7970. generator being used by the Scheme level interface and the random
  7971. number library functions.
  7972. The user is free to replace the default generator with the generator
  7973. of his own choice.
  7974. *** Variable: size_t scm_the_rng.rstate_size
  7975. The size of the random state type used by the current RNG
  7976. measured in chars.
  7977. *** Function: unsigned long scm_the_rng.random_bits (scm_rstate *STATE)
  7978. Given the random STATE, return 32 random bits.
  7979. *** Function: void scm_the_rng.init_rstate (scm_rstate *STATE, chars *S, int N)
  7980. Seed random state STATE using string S of length N.
  7981. *** Function: scm_rstate *scm_the_rng.copy_rstate (scm_rstate *STATE)
  7982. Given random state STATE, return a malloced copy.
  7983. ** Default RNG
  7984. The default RNG is the MWC (Multiply With Carry) random number
  7985. generator described by George Marsaglia at the Department of
  7986. Statistics and Supercomputer Computations Research Institute, The
  7987. Florida State University (http://stat.fsu.edu/~geo).
  7988. It uses 64 bits, has a period of 4578426017172946943 (4.6e18), and
  7989. passes all tests in the DIEHARD test suite
  7990. (http://stat.fsu.edu/~geo/diehard.html). The generation of 32 bits
  7991. costs one multiply and one add on platforms which either supports long
  7992. longs (gcc does this on most systems) or have 64 bit longs. The cost
  7993. is four multiply on other systems but this can be optimized by writing
  7994. scm_i_uniform32 in assembler.
  7995. These functions are provided through the scm_the_rng interface for use
  7996. by libguile and the application.
  7997. *** Function: unsigned long scm_i_uniform32 (scm_i_rstate *STATE)
  7998. Given the random STATE, return 32 random bits.
  7999. Don't use this function directly. Instead go through the plugin
  8000. interface (see "Plug in interface" above).
  8001. *** Function: void scm_i_init_rstate (scm_i_rstate *STATE, char *SEED, int N)
  8002. Initialize STATE using SEED of length N.
  8003. *** Function: scm_i_rstate *scm_i_copy_rstate (scm_i_rstate *STATE)
  8004. Return a malloc:ed copy of STATE. This function can easily be re-used
  8005. in the interfaces to other RNGs.
  8006. ** Random number library functions
  8007. These functions use the current RNG through the scm_the_rng interface.
  8008. It might be a good idea to use these functions from your C code so
  8009. that only one random generator is used by all code in your program.
  8010. The default random state is stored in:
  8011. *** Variable: SCM scm_var_random_state
  8012. Contains the vcell of the Scheme variable "*random-state*" which is
  8013. used as default state by all random number functions in the Scheme
  8014. level interface.
  8015. Example:
  8016. double x = scm_c_uniform01 (SCM_RSTATE (SCM_CDR (scm_var_random_state)));
  8017. *** Function: scm_rstate *scm_c_default_rstate (void)
  8018. This is a convenience function which returns the value of
  8019. scm_var_random_state. An error message is generated if this value
  8020. isn't a random state.
  8021. *** Function: scm_rstate *scm_c_make_rstate (char *SEED, int LENGTH)
  8022. Make a new random state from the string SEED of length LENGTH.
  8023. It is generally not a good idea to use multiple random states in a
  8024. program. While subsequent random numbers generated from one random
  8025. state are guaranteed to be reasonably independent, there is no such
  8026. guarantee for numbers generated from different random states.
  8027. *** Macro: unsigned long scm_c_uniform32 (scm_rstate *STATE)
  8028. Return 32 random bits.
  8029. *** Function: double scm_c_uniform01 (scm_rstate *STATE)
  8030. Return a sample from the uniform(0,1) distribution.
  8031. *** Function: double scm_c_normal01 (scm_rstate *STATE)
  8032. Return a sample from the normal(0,1) distribution.
  8033. *** Function: double scm_c_exp1 (scm_rstate *STATE)
  8034. Return a sample from the exp(1) distribution.
  8035. *** Function: unsigned long scm_c_random (scm_rstate *STATE, unsigned long M)
  8036. Return a sample from the discrete uniform(0,M) distribution.
  8037. *** Function: SCM scm_c_random_bignum (scm_rstate *STATE, SCM M)
  8038. Return a sample from the discrete uniform(0,M) distribution.
  8039. M must be a bignum object. The returned value may be an INUM.
  8040. Changes in Guile 1.3 (released Monday, October 19, 1998):
  8041. * Changes to the distribution
  8042. ** We renamed the SCHEME_LOAD_PATH environment variable to GUILE_LOAD_PATH.
  8043. To avoid conflicts, programs should name environment variables after
  8044. themselves, except when there's a common practice establishing some
  8045. other convention.
  8046. For now, Guile supports both GUILE_LOAD_PATH and SCHEME_LOAD_PATH,
  8047. giving the former precedence, and printing a warning message if the
  8048. latter is set. Guile 1.4 will not recognize SCHEME_LOAD_PATH at all.
  8049. ** The header files related to multi-byte characters have been removed.
  8050. They were: libguile/extchrs.h and libguile/mbstrings.h. Any C code
  8051. which referred to these explicitly will probably need to be rewritten,
  8052. since the support for the variant string types has been removed; see
  8053. below.
  8054. ** The header files append.h and sequences.h have been removed. These
  8055. files implemented non-R4RS operations which would encourage
  8056. non-portable programming style and less easy-to-read code.
  8057. * Changes to the stand-alone interpreter
  8058. ** New procedures have been added to implement a "batch mode":
  8059. *** Function: batch-mode?
  8060. Returns a boolean indicating whether the interpreter is in batch
  8061. mode.
  8062. *** Function: set-batch-mode?! ARG
  8063. If ARG is true, switches the interpreter to batch mode. The `#f'
  8064. case has not been implemented.
  8065. ** Guile now provides full command-line editing, when run interactively.
  8066. To use this feature, you must have the readline library installed.
  8067. The Guile build process will notice it, and automatically include
  8068. support for it.
  8069. The readline library is available via anonymous FTP from any GNU
  8070. mirror site; the canonical location is "ftp://prep.ai.mit.edu/pub/gnu".
  8071. ** the-last-stack is now a fluid.
  8072. * Changes to the procedure for linking libguile with your programs
  8073. ** You can now use the `guile-config' utility to build programs that use Guile.
  8074. Guile now includes a command-line utility called `guile-config', which
  8075. can provide information about how to compile and link programs that
  8076. use Guile.
  8077. *** `guile-config compile' prints any C compiler flags needed to use Guile.
  8078. You should include this command's output on the command line you use
  8079. to compile C or C++ code that #includes the Guile header files. It's
  8080. usually just a `-I' flag to help the compiler find the Guile headers.
  8081. *** `guile-config link' prints any linker flags necessary to link with Guile.
  8082. This command writes to its standard output a list of flags which you
  8083. must pass to the linker to link your code against the Guile library.
  8084. The flags include '-lguile' itself, any other libraries the Guile
  8085. library depends upon, and any `-L' flags needed to help the linker
  8086. find those libraries.
  8087. For example, here is a Makefile rule that builds a program named 'foo'
  8088. from the object files ${FOO_OBJECTS}, and links them against Guile:
  8089. foo: ${FOO_OBJECTS}
  8090. ${CC} ${CFLAGS} ${FOO_OBJECTS} `guile-config link` -o foo
  8091. Previous Guile releases recommended that you use autoconf to detect
  8092. which of a predefined set of libraries were present on your system.
  8093. It is more robust to use `guile-config', since it records exactly which
  8094. libraries the installed Guile library requires.
  8095. This was originally called `build-guile', but was renamed to
  8096. `guile-config' before Guile 1.3 was released, to be consistent with
  8097. the analogous script for the GTK+ GUI toolkit, which is called
  8098. `gtk-config'.
  8099. ** Use the GUILE_FLAGS macro in your configure.in file to find Guile.
  8100. If you are using the GNU autoconf package to configure your program,
  8101. you can use the GUILE_FLAGS autoconf macro to call `guile-config'
  8102. (described above) and gather the necessary values for use in your
  8103. Makefiles.
  8104. The GUILE_FLAGS macro expands to configure script code which runs the
  8105. `guile-config' script, to find out where Guile's header files and
  8106. libraries are installed. It sets two variables, marked for
  8107. substitution, as by AC_SUBST.
  8108. GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
  8109. code that uses Guile header files. This is almost always just a
  8110. -I flag.
  8111. GUILE_LDFLAGS --- flags to pass to the linker to link a
  8112. program against Guile. This includes `-lguile' for the Guile
  8113. library itself, any libraries that Guile itself requires (like
  8114. -lqthreads), and so on. It may also include a -L flag to tell the
  8115. compiler where to find the libraries.
  8116. GUILE_FLAGS is defined in the file guile.m4, in the top-level
  8117. directory of the Guile distribution. You can copy it into your
  8118. package's aclocal.m4 file, and then use it in your configure.in file.
  8119. If you are using the `aclocal' program, distributed with GNU automake,
  8120. to maintain your aclocal.m4 file, the Guile installation process
  8121. installs guile.m4 where aclocal will find it. All you need to do is
  8122. use GUILE_FLAGS in your configure.in file, and then run `aclocal';
  8123. this will copy the definition of GUILE_FLAGS into your aclocal.m4
  8124. file.
  8125. * Changes to Scheme functions and syntax
  8126. ** Multi-byte strings have been removed, as have multi-byte and wide
  8127. ports. We felt that these were the wrong approach to
  8128. internationalization support.
  8129. ** New function: readline [PROMPT]
  8130. Read a line from the terminal, and allow the user to edit it,
  8131. prompting with PROMPT. READLINE provides a large set of Emacs-like
  8132. editing commands, lets the user recall previously typed lines, and
  8133. works on almost every kind of terminal, including dumb terminals.
  8134. READLINE assumes that the cursor is at the beginning of the line when
  8135. it is invoked. Thus, you can't print a prompt yourself, and then call
  8136. READLINE; you need to package up your prompt as a string, pass it to
  8137. the function, and let READLINE print the prompt itself. This is
  8138. because READLINE needs to know the prompt's screen width.
  8139. For Guile to provide this function, you must have the readline
  8140. library, version 2.1 or later, installed on your system. Readline is
  8141. available via anonymous FTP from prep.ai.mit.edu in pub/gnu, or from
  8142. any GNU mirror site.
  8143. See also ADD-HISTORY function.
  8144. ** New function: add-history STRING
  8145. Add STRING as the most recent line in the history used by the READLINE
  8146. command. READLINE does not add lines to the history itself; you must
  8147. call ADD-HISTORY to make previous input available to the user.
  8148. ** The behavior of the read-line function has changed.
  8149. This function now uses standard C library functions to read the line,
  8150. for speed. This means that it doesn not respect the value of
  8151. scm-line-incrementors; it assumes that lines are delimited with
  8152. #\newline.
  8153. (Note that this is read-line, the function that reads a line of text
  8154. from a port, not readline, the function that reads a line from a
  8155. terminal, providing full editing capabilities.)
  8156. ** New module (ice-9 getopt-gnu-style): Parse command-line arguments.
  8157. This module provides some simple argument parsing. It exports one
  8158. function:
  8159. Function: getopt-gnu-style ARG-LS
  8160. Parse a list of program arguments into an alist of option
  8161. descriptions.
  8162. Each item in the list of program arguments is examined to see if
  8163. it meets the syntax of a GNU long-named option. An argument like
  8164. `--MUMBLE' produces an element of the form (MUMBLE . #t) in the
  8165. returned alist, where MUMBLE is a keyword object with the same
  8166. name as the argument. An argument like `--MUMBLE=FROB' produces
  8167. an element of the form (MUMBLE . FROB), where FROB is a string.
  8168. As a special case, the returned alist also contains a pair whose
  8169. car is the symbol `rest'. The cdr of this pair is a list
  8170. containing all the items in the argument list that are not options
  8171. of the form mentioned above.
  8172. The argument `--' is treated specially: all items in the argument
  8173. list appearing after such an argument are not examined, and are
  8174. returned in the special `rest' list.
  8175. This function does not parse normal single-character switches.
  8176. You will need to parse them out of the `rest' list yourself.
  8177. ** The read syntax for byte vectors and short vectors has changed.
  8178. Instead of #bytes(...), write #y(...).
  8179. Instead of #short(...), write #h(...).
  8180. This may seem nutty, but, like the other uniform vectors, byte vectors
  8181. and short vectors want to have the same print and read syntax (and,
  8182. more basic, want to have read syntax!). Changing the read syntax to
  8183. use multiple characters after the hash sign breaks with the
  8184. conventions used in R5RS and the conventions used for the other
  8185. uniform vectors. It also introduces complexity in the current reader,
  8186. both on the C and Scheme levels. (The Right solution is probably to
  8187. change the syntax and prototypes for uniform vectors entirely.)
  8188. ** The new module (ice-9 session) provides useful interactive functions.
  8189. *** New procedure: (apropos REGEXP OPTION ...)
  8190. Display a list of top-level variables whose names match REGEXP, and
  8191. the modules they are imported from. Each OPTION should be one of the
  8192. following symbols:
  8193. value --- Show the value of each matching variable.
  8194. shadow --- Show bindings shadowed by subsequently imported modules.
  8195. full --- Same as both `shadow' and `value'.
  8196. For example:
  8197. guile> (apropos "trace" 'full)
  8198. debug: trace #<procedure trace args>
  8199. debug: untrace #<procedure untrace args>
  8200. the-scm-module: display-backtrace #<compiled-closure #<primitive-procedure gsubr-apply>>
  8201. the-scm-module: before-backtrace-hook ()
  8202. the-scm-module: backtrace #<primitive-procedure backtrace>
  8203. the-scm-module: after-backtrace-hook ()
  8204. the-scm-module: has-shown-backtrace-hint? #f
  8205. guile>
  8206. ** There are new functions and syntax for working with macros.
  8207. Guile implements macros as a special object type. Any variable whose
  8208. top-level binding is a macro object acts as a macro. The macro object
  8209. specifies how the expression should be transformed before evaluation.
  8210. *** Macro objects now print in a reasonable way, resembling procedures.
  8211. *** New function: (macro? OBJ)
  8212. True iff OBJ is a macro object.
  8213. *** New function: (primitive-macro? OBJ)
  8214. Like (macro? OBJ), but true only if OBJ is one of the Guile primitive
  8215. macro transformers, implemented in eval.c rather than Scheme code.
  8216. Why do we have this function?
  8217. - For symmetry with procedure? and primitive-procedure?,
  8218. - to allow custom print procedures to tell whether a macro is
  8219. primitive, and display it differently, and
  8220. - to allow compilers and user-written evaluators to distinguish
  8221. builtin special forms from user-defined ones, which could be
  8222. compiled.
  8223. *** New function: (macro-type OBJ)
  8224. Return a value indicating what kind of macro OBJ is. Possible return
  8225. values are:
  8226. The symbol `syntax' --- a macro created by procedure->syntax.
  8227. The symbol `macro' --- a macro created by procedure->macro.
  8228. The symbol `macro!' --- a macro created by procedure->memoizing-macro.
  8229. The boolean #f --- if OBJ is not a macro object.
  8230. *** New function: (macro-name MACRO)
  8231. Return the name of the macro object MACRO's procedure, as returned by
  8232. procedure-name.
  8233. *** New function: (macro-transformer MACRO)
  8234. Return the transformer procedure for MACRO.
  8235. *** New syntax: (use-syntax MODULE ... TRANSFORMER)
  8236. Specify a new macro expander to use in the current module. Each
  8237. MODULE is a module name, with the same meaning as in the `use-modules'
  8238. form; each named module's exported bindings are added to the current
  8239. top-level environment. TRANSFORMER is an expression evaluated in the
  8240. resulting environment which must yield a procedure to use as the
  8241. module's eval transformer: every expression evaluated in this module
  8242. is passed to this function, and the result passed to the Guile
  8243. interpreter.
  8244. *** macro-eval! is removed. Use local-eval instead.
  8245. ** Some magic has been added to the printer to better handle user
  8246. written printing routines (like record printers, closure printers).
  8247. The problem is that these user written routines must have access to
  8248. the current `print-state' to be able to handle fancy things like
  8249. detection of circular references. These print-states have to be
  8250. passed to the builtin printing routines (display, write, etc) to
  8251. properly continue the print chain.
  8252. We didn't want to change all existing print code so that it
  8253. explicitly passes thru a print state in addition to a port. Instead,
  8254. we extented the possible values that the builtin printing routines
  8255. accept as a `port'. In addition to a normal port, they now also take
  8256. a pair of a normal port and a print-state. Printing will go to the
  8257. port and the print-state will be used to control the detection of
  8258. circular references, etc. If the builtin function does not care for a
  8259. print-state, it is simply ignored.
  8260. User written callbacks are now called with such a pair as their
  8261. `port', but because every function now accepts this pair as a PORT
  8262. argument, you don't have to worry about that. In fact, it is probably
  8263. safest to not check for these pairs.
  8264. However, it is sometimes necessary to continue a print chain on a
  8265. different port, for example to get a intermediate string
  8266. representation of the printed value, mangle that string somehow, and
  8267. then to finally print the mangled string. Use the new function
  8268. inherit-print-state OLD-PORT NEW-PORT
  8269. for this. It constructs a new `port' that prints to NEW-PORT but
  8270. inherits the print-state of OLD-PORT.
  8271. ** struct-vtable-offset renamed to vtable-offset-user
  8272. ** New constants: vtable-index-layout, vtable-index-vtable, vtable-index-printer
  8273. ** There is now a third optional argument to make-vtable-vtable
  8274. (and fourth to make-struct) when constructing new types (vtables).
  8275. This argument initializes field vtable-index-printer of the vtable.
  8276. ** The detection of circular references has been extended to structs.
  8277. That is, a structure that -- in the process of being printed -- prints
  8278. itself does not lead to infinite recursion.
  8279. ** There is now some basic support for fluids. Please read
  8280. "libguile/fluid.h" to find out more. It is accessible from Scheme with
  8281. the following functions and macros:
  8282. Function: make-fluid
  8283. Create a new fluid object. Fluids are not special variables or
  8284. some other extension to the semantics of Scheme, but rather
  8285. ordinary Scheme objects. You can store them into variables (that
  8286. are still lexically scoped, of course) or into any other place you
  8287. like. Every fluid has a initial value of `#f'.
  8288. Function: fluid? OBJ
  8289. Test whether OBJ is a fluid.
  8290. Function: fluid-ref FLUID
  8291. Function: fluid-set! FLUID VAL
  8292. Access/modify the fluid FLUID. Modifications are only visible
  8293. within the current dynamic root (that includes threads).
  8294. Function: with-fluids* FLUIDS VALUES THUNK
  8295. FLUIDS is a list of fluids and VALUES a corresponding list of
  8296. values for these fluids. Before THUNK gets called the values are
  8297. installed in the fluids and the old values of the fluids are
  8298. saved in the VALUES list. When the flow of control leaves THUNK
  8299. or reenters it, the values get swapped again. You might think of
  8300. this as a `safe-fluid-excursion'. Note that the VALUES list is
  8301. modified by `with-fluids*'.
  8302. Macro: with-fluids ((FLUID VALUE) ...) FORM ...
  8303. The same as `with-fluids*' but with a different syntax. It looks
  8304. just like `let', but both FLUID and VALUE are evaluated. Remember,
  8305. fluids are not special variables but ordinary objects. FLUID
  8306. should evaluate to a fluid.
  8307. ** Changes to system call interfaces:
  8308. *** close-port, close-input-port and close-output-port now return a
  8309. boolean instead of an `unspecified' object. #t means that the port
  8310. was successfully closed, while #f means it was already closed. It is
  8311. also now possible for these procedures to raise an exception if an
  8312. error occurs (some errors from write can be delayed until close.)
  8313. *** the first argument to chmod, fcntl, ftell and fseek can now be a
  8314. file descriptor.
  8315. *** the third argument to fcntl is now optional.
  8316. *** the first argument to chown can now be a file descriptor or a port.
  8317. *** the argument to stat can now be a port.
  8318. *** The following new procedures have been added (most use scsh
  8319. interfaces):
  8320. *** procedure: close PORT/FD
  8321. Similar to close-port (*note close-port: Closing Ports.), but also
  8322. works on file descriptors. A side effect of closing a file
  8323. descriptor is that any ports using that file descriptor are moved
  8324. to a different file descriptor and have their revealed counts set
  8325. to zero.
  8326. *** procedure: port->fdes PORT
  8327. Returns the integer file descriptor underlying PORT. As a side
  8328. effect the revealed count of PORT is incremented.
  8329. *** procedure: fdes->ports FDES
  8330. Returns a list of existing ports which have FDES as an underlying
  8331. file descriptor, without changing their revealed counts.
  8332. *** procedure: fdes->inport FDES
  8333. Returns an existing input port which has FDES as its underlying
  8334. file descriptor, if one exists, and increments its revealed count.
  8335. Otherwise, returns a new input port with a revealed count of 1.
  8336. *** procedure: fdes->outport FDES
  8337. Returns an existing output port which has FDES as its underlying
  8338. file descriptor, if one exists, and increments its revealed count.
  8339. Otherwise, returns a new output port with a revealed count of 1.
  8340. The next group of procedures perform a `dup2' system call, if NEWFD
  8341. (an integer) is supplied, otherwise a `dup'. The file descriptor to be
  8342. duplicated can be supplied as an integer or contained in a port. The
  8343. type of value returned varies depending on which procedure is used.
  8344. All procedures also have the side effect when performing `dup2' that
  8345. any ports using NEWFD are moved to a different file descriptor and have
  8346. their revealed counts set to zero.
  8347. *** procedure: dup->fdes PORT/FD [NEWFD]
  8348. Returns an integer file descriptor.
  8349. *** procedure: dup->inport PORT/FD [NEWFD]
  8350. Returns a new input port using the new file descriptor.
  8351. *** procedure: dup->outport PORT/FD [NEWFD]
  8352. Returns a new output port using the new file descriptor.
  8353. *** procedure: dup PORT/FD [NEWFD]
  8354. Returns a new port if PORT/FD is a port, with the same mode as the
  8355. supplied port, otherwise returns an integer file descriptor.
  8356. *** procedure: dup->port PORT/FD MODE [NEWFD]
  8357. Returns a new port using the new file descriptor. MODE supplies a
  8358. mode string for the port (*note open-file: File Ports.).
  8359. *** procedure: setenv NAME VALUE
  8360. Modifies the environment of the current process, which is also the
  8361. default environment inherited by child processes.
  8362. If VALUE is `#f', then NAME is removed from the environment.
  8363. Otherwise, the string NAME=VALUE is added to the environment,
  8364. replacing any existing string with name matching NAME.
  8365. The return value is unspecified.
  8366. *** procedure: truncate-file OBJ SIZE
  8367. Truncates the file referred to by OBJ to at most SIZE bytes. OBJ
  8368. can be a string containing a file name or an integer file
  8369. descriptor or port open for output on the file. The underlying
  8370. system calls are `truncate' and `ftruncate'.
  8371. The return value is unspecified.
  8372. *** procedure: setvbuf PORT MODE [SIZE]
  8373. Set the buffering mode for PORT. MODE can be:
  8374. `_IONBF'
  8375. non-buffered
  8376. `_IOLBF'
  8377. line buffered
  8378. `_IOFBF'
  8379. block buffered, using a newly allocated buffer of SIZE bytes.
  8380. However if SIZE is zero or unspecified, the port will be made
  8381. non-buffered.
  8382. This procedure should not be used after I/O has been performed with
  8383. the port.
  8384. Ports are usually block buffered by default, with a default buffer
  8385. size. Procedures e.g., *Note open-file: File Ports, which accept a
  8386. mode string allow `0' to be added to request an unbuffered port.
  8387. *** procedure: fsync PORT/FD
  8388. Copies any unwritten data for the specified output file descriptor
  8389. to disk. If PORT/FD is a port, its buffer is flushed before the
  8390. underlying file descriptor is fsync'd. The return value is
  8391. unspecified.
  8392. *** procedure: open-fdes PATH FLAGS [MODES]
  8393. Similar to `open' but returns a file descriptor instead of a port.
  8394. *** procedure: execle PATH ENV [ARG] ...
  8395. Similar to `execl', but the environment of the new process is
  8396. specified by ENV, which must be a list of strings as returned by
  8397. the `environ' procedure.
  8398. This procedure is currently implemented using the `execve' system
  8399. call, but we call it `execle' because of its Scheme calling
  8400. interface.
  8401. *** procedure: strerror ERRNO
  8402. Returns the Unix error message corresponding to ERRNO, an integer.
  8403. *** procedure: primitive-exit [STATUS]
  8404. Terminate the current process without unwinding the Scheme stack.
  8405. This is would typically be useful after a fork. The exit status
  8406. is STATUS if supplied, otherwise zero.
  8407. *** procedure: times
  8408. Returns an object with information about real and processor time.
  8409. The following procedures accept such an object as an argument and
  8410. return a selected component:
  8411. `tms:clock'
  8412. The current real time, expressed as time units relative to an
  8413. arbitrary base.
  8414. `tms:utime'
  8415. The CPU time units used by the calling process.
  8416. `tms:stime'
  8417. The CPU time units used by the system on behalf of the
  8418. calling process.
  8419. `tms:cutime'
  8420. The CPU time units used by terminated child processes of the
  8421. calling process, whose status has been collected (e.g., using
  8422. `waitpid').
  8423. `tms:cstime'
  8424. Similarly, the CPU times units used by the system on behalf of
  8425. terminated child processes.
  8426. ** Removed: list-length
  8427. ** Removed: list-append, list-append!
  8428. ** Removed: list-reverse, list-reverse!
  8429. ** array-map renamed to array-map!
  8430. ** serial-array-map renamed to serial-array-map!
  8431. ** catch doesn't take #f as first argument any longer
  8432. Previously, it was possible to pass #f instead of a key to `catch'.
  8433. That would cause `catch' to pass a jump buffer object to the procedure
  8434. passed as second argument. The procedure could then use this jump
  8435. buffer objekt as an argument to throw.
  8436. This mechanism has been removed since its utility doesn't motivate the
  8437. extra complexity it introduces.
  8438. ** The `#/' notation for lists now provokes a warning message from Guile.
  8439. This syntax will be removed from Guile in the near future.
  8440. To disable the warning message, set the GUILE_HUSH environment
  8441. variable to any non-empty value.
  8442. ** The newline character now prints as `#\newline', following the
  8443. normal Scheme notation, not `#\nl'.
  8444. * Changes to the gh_ interface
  8445. ** The gh_enter function now takes care of loading the Guile startup files.
  8446. gh_enter works by calling scm_boot_guile; see the remarks below.
  8447. ** Function: void gh_write (SCM x)
  8448. Write the printed representation of the scheme object x to the current
  8449. output port. Corresponds to the scheme level `write'.
  8450. ** gh_list_length renamed to gh_length.
  8451. ** vector handling routines
  8452. Several major changes. In particular, gh_vector() now resembles
  8453. (vector ...) (with a caveat -- see manual), and gh_make_vector() now
  8454. exists and behaves like (make-vector ...). gh_vset() and gh_vref()
  8455. have been renamed gh_vector_set_x() and gh_vector_ref(). Some missing
  8456. vector-related gh_ functions have been implemented.
  8457. ** pair and list routines
  8458. Implemented several of the R4RS pair and list functions that were
  8459. missing.
  8460. ** gh_scm2doubles, gh_doubles2scm, gh_doubles2dvect
  8461. New function. Converts double arrays back and forth between Scheme
  8462. and C.
  8463. * Changes to the scm_ interface
  8464. ** The function scm_boot_guile now takes care of loading the startup files.
  8465. Guile's primary initialization function, scm_boot_guile, now takes
  8466. care of loading `boot-9.scm', in the `ice-9' module, to initialize
  8467. Guile, define the module system, and put together some standard
  8468. bindings. It also loads `init.scm', which is intended to hold
  8469. site-specific initialization code.
  8470. Since Guile cannot operate properly until boot-9.scm is loaded, there
  8471. is no reason to separate loading boot-9.scm from Guile's other
  8472. initialization processes.
  8473. This job used to be done by scm_compile_shell_switches, which didn't
  8474. make much sense; in particular, it meant that people using Guile for
  8475. non-shell-like applications had to jump through hoops to get Guile
  8476. initialized properly.
  8477. ** The function scm_compile_shell_switches no longer loads the startup files.
  8478. Now, Guile always loads the startup files, whenever it is initialized;
  8479. see the notes above for scm_boot_guile and scm_load_startup_files.
  8480. ** Function: scm_load_startup_files
  8481. This new function takes care of loading Guile's initialization file
  8482. (`boot-9.scm'), and the site initialization file, `init.scm'. Since
  8483. this is always called by the Guile initialization process, it's
  8484. probably not too useful to call this yourself, but it's there anyway.
  8485. ** The semantics of smob marking have changed slightly.
  8486. The smob marking function (the `mark' member of the scm_smobfuns
  8487. structure) is no longer responsible for setting the mark bit on the
  8488. smob. The generic smob handling code in the garbage collector will
  8489. set this bit. The mark function need only ensure that any other
  8490. objects the smob refers to get marked.
  8491. Note that this change means that the smob's GC8MARK bit is typically
  8492. already set upon entry to the mark function. Thus, marking functions
  8493. which look like this:
  8494. {
  8495. if (SCM_GC8MARKP (ptr))
  8496. return SCM_BOOL_F;
  8497. SCM_SETGC8MARK (ptr);
  8498. ... mark objects to which the smob refers ...
  8499. }
  8500. are now incorrect, since they will return early, and fail to mark any
  8501. other objects the smob refers to. Some code in the Guile library used
  8502. to work this way.
  8503. ** The semantics of the I/O port functions in scm_ptobfuns have changed.
  8504. If you have implemented your own I/O port type, by writing the
  8505. functions required by the scm_ptobfuns and then calling scm_newptob,
  8506. you will need to change your functions slightly.
  8507. The functions in a scm_ptobfuns structure now expect the port itself
  8508. as their argument; they used to expect the `stream' member of the
  8509. port's scm_port_table structure. This allows functions in an
  8510. scm_ptobfuns structure to easily access the port's cell (and any flags
  8511. it its CAR), and the port's scm_port_table structure.
  8512. Guile now passes the I/O port itself as the `port' argument in the
  8513. following scm_ptobfuns functions:
  8514. int (*free) (SCM port);
  8515. int (*fputc) (int, SCM port);
  8516. int (*fputs) (char *, SCM port);
  8517. scm_sizet (*fwrite) SCM_P ((char *ptr,
  8518. scm_sizet size,
  8519. scm_sizet nitems,
  8520. SCM port));
  8521. int (*fflush) (SCM port);
  8522. int (*fgetc) (SCM port);
  8523. int (*fclose) (SCM port);
  8524. The interfaces to the `mark', `print', `equalp', and `fgets' methods
  8525. are unchanged.
  8526. If you have existing code which defines its own port types, it is easy
  8527. to convert your code to the new interface; simply apply SCM_STREAM to
  8528. the port argument to yield the value you code used to expect.
  8529. Note that since both the port and the stream have the same type in the
  8530. C code --- they are both SCM values --- the C compiler will not remind
  8531. you if you forget to update your scm_ptobfuns functions.
  8532. ** Function: int scm_internal_select (int fds,
  8533. SELECT_TYPE *rfds,
  8534. SELECT_TYPE *wfds,
  8535. SELECT_TYPE *efds,
  8536. struct timeval *timeout);
  8537. This is a replacement for the `select' function provided by the OS.
  8538. It enables I/O blocking and sleeping to happen for one cooperative
  8539. thread without blocking other threads. It also avoids busy-loops in
  8540. these situations. It is intended that all I/O blocking and sleeping
  8541. will finally go through this function. Currently, this function is
  8542. only available on systems providing `gettimeofday' and `select'.
  8543. ** Function: SCM scm_internal_stack_catch (SCM tag,
  8544. scm_catch_body_t body,
  8545. void *body_data,
  8546. scm_catch_handler_t handler,
  8547. void *handler_data)
  8548. A new sibling to the other two C level `catch' functions
  8549. scm_internal_catch and scm_internal_lazy_catch. Use it if you want
  8550. the stack to be saved automatically into the variable `the-last-stack'
  8551. (scm_the_last_stack_var) on error. This is necessary if you want to
  8552. use advanced error reporting, such as calling scm_display_error and
  8553. scm_display_backtrace. (They both take a stack object as argument.)
  8554. ** Function: SCM scm_spawn_thread (scm_catch_body_t body,
  8555. void *body_data,
  8556. scm_catch_handler_t handler,
  8557. void *handler_data)
  8558. Spawns a new thread. It does a job similar to
  8559. scm_call_with_new_thread but takes arguments more suitable when
  8560. spawning threads from application C code.
  8561. ** The hook scm_error_callback has been removed. It was originally
  8562. intended as a way for the user to install his own error handler. But
  8563. that method works badly since it intervenes between throw and catch,
  8564. thereby changing the semantics of expressions like (catch #t ...).
  8565. The correct way to do it is to use one of the C level catch functions
  8566. in throw.c: scm_internal_catch/lazy_catch/stack_catch.
  8567. ** Removed functions:
  8568. scm_obj_length, scm_list_length, scm_list_append, scm_list_append_x,
  8569. scm_list_reverse, scm_list_reverse_x
  8570. ** New macros: SCM_LISTn where n is one of the integers 0-9.
  8571. These can be used for pretty list creation from C. The idea is taken
  8572. from Erick Gallesio's STk.
  8573. ** scm_array_map renamed to scm_array_map_x
  8574. ** mbstrings are now removed
  8575. This means that the type codes scm_tc7_mb_string and
  8576. scm_tc7_mb_substring has been removed.
  8577. ** scm_gen_putc, scm_gen_puts, scm_gen_write, and scm_gen_getc have changed.
  8578. Since we no longer support multi-byte strings, these I/O functions
  8579. have been simplified, and renamed. Here are their old names, and
  8580. their new names and arguments:
  8581. scm_gen_putc -> void scm_putc (int c, SCM port);
  8582. scm_gen_puts -> void scm_puts (char *s, SCM port);
  8583. scm_gen_write -> void scm_lfwrite (char *ptr, scm_sizet size, SCM port);
  8584. scm_gen_getc -> void scm_getc (SCM port);
  8585. ** The macros SCM_TYP7D and SCM_TYP7SD has been removed.
  8586. ** The macro SCM_TYP7S has taken the role of the old SCM_TYP7D
  8587. SCM_TYP7S now masks away the bit which distinguishes substrings from
  8588. strings.
  8589. ** scm_catch_body_t: Backward incompatible change!
  8590. Body functions to scm_internal_catch and friends do not any longer
  8591. take a second argument. This is because it is no longer possible to
  8592. pass a #f arg to catch.
  8593. ** Calls to scm_protect_object and scm_unprotect now nest properly.
  8594. The function scm_protect_object protects its argument from being freed
  8595. by the garbage collector. scm_unprotect_object removes that
  8596. protection.
  8597. These functions now nest properly. That is, for every object O, there
  8598. is a counter which scm_protect_object(O) increments and
  8599. scm_unprotect_object(O) decrements, if the counter is greater than
  8600. zero. Every object's counter is zero when it is first created. If an
  8601. object's counter is greater than zero, the garbage collector will not
  8602. reclaim its storage.
  8603. This allows you to use scm_protect_object in your code without
  8604. worrying that some other function you call will call
  8605. scm_unprotect_object, and allow it to be freed. Assuming that the
  8606. functions you call are well-behaved, and unprotect only those objects
  8607. they protect, you can follow the same rule and have confidence that
  8608. objects will be freed only at appropriate times.
  8609. Changes in Guile 1.2 (released Tuesday, June 24 1997):
  8610. * Changes to the distribution
  8611. ** Nightly snapshots are now available from ftp.red-bean.com.
  8612. The old server, ftp.cyclic.com, has been relinquished to its rightful
  8613. owner.
  8614. Nightly snapshots of the Guile development sources are now available via
  8615. anonymous FTP from ftp.red-bean.com, as /pub/guile/guile-snap.tar.gz.
  8616. Via the web, that's: ftp://ftp.red-bean.com/pub/guile/guile-snap.tar.gz
  8617. For getit, that's: ftp.red-bean.com:/pub/guile/guile-snap.tar.gz
  8618. ** To run Guile without installing it, the procedure has changed a bit.
  8619. If you used a separate build directory to compile Guile, you'll need
  8620. to include the build directory in SCHEME_LOAD_PATH, as well as the
  8621. source directory. See the `INSTALL' file for examples.
  8622. * Changes to the procedure for linking libguile with your programs
  8623. ** The standard Guile load path for Scheme code now includes
  8624. $(datadir)/guile (usually /usr/local/share/guile). This means that
  8625. you can install your own Scheme files there, and Guile will find them.
  8626. (Previous versions of Guile only checked a directory whose name
  8627. contained the Guile version number, so you had to re-install or move
  8628. your Scheme sources each time you installed a fresh version of Guile.)
  8629. The load path also includes $(datadir)/guile/site; we recommend
  8630. putting individual Scheme files there. If you want to install a
  8631. package with multiple source files, create a directory for them under
  8632. $(datadir)/guile.
  8633. ** Guile 1.2 will now use the Rx regular expression library, if it is
  8634. installed on your system. When you are linking libguile into your own
  8635. programs, this means you will have to link against -lguile, -lqt (if
  8636. you configured Guile with thread support), and -lrx.
  8637. If you are using autoconf to generate configuration scripts for your
  8638. application, the following lines should suffice to add the appropriate
  8639. libraries to your link command:
  8640. ### Find Rx, quickthreads and libguile.
  8641. AC_CHECK_LIB(rx, main)
  8642. AC_CHECK_LIB(qt, main)
  8643. AC_CHECK_LIB(guile, scm_shell)
  8644. The Guile 1.2 distribution does not contain sources for the Rx
  8645. library, as Guile 1.0 did. If you want to use Rx, you'll need to
  8646. retrieve it from a GNU FTP site and install it separately.
  8647. * Changes to Scheme functions and syntax
  8648. ** The dynamic linking features of Guile are now enabled by default.
  8649. You can disable them by giving the `--disable-dynamic-linking' option
  8650. to configure.
  8651. (dynamic-link FILENAME)
  8652. Find the object file denoted by FILENAME (a string) and link it
  8653. into the running Guile application. When everything works out,
  8654. return a Scheme object suitable for representing the linked object
  8655. file. Otherwise an error is thrown. How object files are
  8656. searched is system dependent.
  8657. (dynamic-object? VAL)
  8658. Determine whether VAL represents a dynamically linked object file.
  8659. (dynamic-unlink DYNOBJ)
  8660. Unlink the indicated object file from the application. DYNOBJ
  8661. should be one of the values returned by `dynamic-link'.
  8662. (dynamic-func FUNCTION DYNOBJ)
  8663. Search the C function indicated by FUNCTION (a string or symbol)
  8664. in DYNOBJ and return some Scheme object that can later be used
  8665. with `dynamic-call' to actually call this function. Right now,
  8666. these Scheme objects are formed by casting the address of the
  8667. function to `long' and converting this number to its Scheme
  8668. representation.
  8669. (dynamic-call FUNCTION DYNOBJ)
  8670. Call the C function indicated by FUNCTION and DYNOBJ. The
  8671. function is passed no arguments and its return value is ignored.
  8672. When FUNCTION is something returned by `dynamic-func', call that
  8673. function and ignore DYNOBJ. When FUNCTION is a string (or symbol,
  8674. etc.), look it up in DYNOBJ; this is equivalent to
  8675. (dynamic-call (dynamic-func FUNCTION DYNOBJ) #f)
  8676. Interrupts are deferred while the C function is executing (with
  8677. SCM_DEFER_INTS/SCM_ALLOW_INTS).
  8678. (dynamic-args-call FUNCTION DYNOBJ ARGS)
  8679. Call the C function indicated by FUNCTION and DYNOBJ, but pass it
  8680. some arguments and return its return value. The C function is
  8681. expected to take two arguments and return an `int', just like
  8682. `main':
  8683. int c_func (int argc, char **argv);
  8684. ARGS must be a list of strings and is converted into an array of
  8685. `char *'. The array is passed in ARGV and its size in ARGC. The
  8686. return value is converted to a Scheme number and returned from the
  8687. call to `dynamic-args-call'.
  8688. When dynamic linking is disabled or not supported on your system,
  8689. the above functions throw errors, but they are still available.
  8690. Here is a small example that works on GNU/Linux:
  8691. (define libc-obj (dynamic-link "libc.so"))
  8692. (dynamic-args-call 'rand libc-obj '())
  8693. See the file `libguile/DYNAMIC-LINKING' for additional comments.
  8694. ** The #/ syntax for module names is depreciated, and will be removed
  8695. in a future version of Guile. Instead of
  8696. #/foo/bar/baz
  8697. instead write
  8698. (foo bar baz)
  8699. The latter syntax is more consistent with existing Lisp practice.
  8700. ** Guile now does fancier printing of structures. Structures are the
  8701. underlying implementation for records, which in turn are used to
  8702. implement modules, so all of these object now print differently and in
  8703. a more informative way.
  8704. The Scheme printer will examine the builtin variable *struct-printer*
  8705. whenever it needs to print a structure object. When this variable is
  8706. not `#f' it is deemed to be a procedure and will be applied to the
  8707. structure object and the output port. When *struct-printer* is `#f'
  8708. or the procedure return `#f' the structure object will be printed in
  8709. the boring #<struct 80458270> form.
  8710. This hook is used by some routines in ice-9/boot-9.scm to implement
  8711. type specific printing routines. Please read the comments there about
  8712. "printing structs".
  8713. One of the more specific uses of structs are records. The printing
  8714. procedure that could be passed to MAKE-RECORD-TYPE is now actually
  8715. called. It should behave like a *struct-printer* procedure (described
  8716. above).
  8717. ** Guile now supports a new R4RS-compliant syntax for keywords. A
  8718. token of the form #:NAME, where NAME has the same syntax as a Scheme
  8719. symbol, is the external representation of the keyword named NAME.
  8720. Keyword objects print using this syntax as well, so values containing
  8721. keyword objects can be read back into Guile. When used in an
  8722. expression, keywords are self-quoting objects.
  8723. Guile suports this read syntax, and uses this print syntax, regardless
  8724. of the current setting of the `keyword' read option. The `keyword'
  8725. read option only controls whether Guile recognizes the `:NAME' syntax,
  8726. which is incompatible with R4RS. (R4RS says such token represent
  8727. symbols.)
  8728. ** Guile has regular expression support again. Guile 1.0 included
  8729. functions for matching regular expressions, based on the Rx library.
  8730. In Guile 1.1, the Guile/Rx interface was removed to simplify the
  8731. distribution, and thus Guile had no regular expression support. Guile
  8732. 1.2 again supports the most commonly used functions, and supports all
  8733. of SCSH's regular expression functions.
  8734. If your system does not include a POSIX regular expression library,
  8735. and you have not linked Guile with a third-party regexp library such as
  8736. Rx, these functions will not be available. You can tell whether your
  8737. Guile installation includes regular expression support by checking
  8738. whether the `*features*' list includes the `regex' symbol.
  8739. *** regexp functions
  8740. By default, Guile supports POSIX extended regular expressions. That
  8741. means that the characters `(', `)', `+' and `?' are special, and must
  8742. be escaped if you wish to match the literal characters.
  8743. This regular expression interface was modeled after that implemented
  8744. by SCSH, the Scheme Shell. It is intended to be upwardly compatible
  8745. with SCSH regular expressions.
  8746. **** Function: string-match PATTERN STR [START]
  8747. Compile the string PATTERN into a regular expression and compare
  8748. it with STR. The optional numeric argument START specifies the
  8749. position of STR at which to begin matching.
  8750. `string-match' returns a "match structure" which describes what,
  8751. if anything, was matched by the regular expression. *Note Match
  8752. Structures::. If STR does not match PATTERN at all,
  8753. `string-match' returns `#f'.
  8754. Each time `string-match' is called, it must compile its PATTERN
  8755. argument into a regular expression structure. This operation is
  8756. expensive, which makes `string-match' inefficient if the same regular
  8757. expression is used several times (for example, in a loop). For better
  8758. performance, you can compile a regular expression in advance and then
  8759. match strings against the compiled regexp.
  8760. **** Function: make-regexp STR [FLAGS]
  8761. Compile the regular expression described by STR, and return the
  8762. compiled regexp structure. If STR does not describe a legal
  8763. regular expression, `make-regexp' throws a
  8764. `regular-expression-syntax' error.
  8765. FLAGS may be the bitwise-or of one or more of the following:
  8766. **** Constant: regexp/extended
  8767. Use POSIX Extended Regular Expression syntax when interpreting
  8768. STR. If not set, POSIX Basic Regular Expression syntax is used.
  8769. If the FLAGS argument is omitted, we assume regexp/extended.
  8770. **** Constant: regexp/icase
  8771. Do not differentiate case. Subsequent searches using the
  8772. returned regular expression will be case insensitive.
  8773. **** Constant: regexp/newline
  8774. Match-any-character operators don't match a newline.
  8775. A non-matching list ([^...]) not containing a newline matches a
  8776. newline.
  8777. Match-beginning-of-line operator (^) matches the empty string
  8778. immediately after a newline, regardless of whether the FLAGS
  8779. passed to regexp-exec contain regexp/notbol.
  8780. Match-end-of-line operator ($) matches the empty string
  8781. immediately before a newline, regardless of whether the FLAGS
  8782. passed to regexp-exec contain regexp/noteol.
  8783. **** Function: regexp-exec REGEXP STR [START [FLAGS]]
  8784. Match the compiled regular expression REGEXP against `str'. If
  8785. the optional integer START argument is provided, begin matching
  8786. from that position in the string. Return a match structure
  8787. describing the results of the match, or `#f' if no match could be
  8788. found.
  8789. FLAGS may be the bitwise-or of one or more of the following:
  8790. **** Constant: regexp/notbol
  8791. The match-beginning-of-line operator always fails to match (but
  8792. see the compilation flag regexp/newline above) This flag may be
  8793. used when different portions of a string are passed to
  8794. regexp-exec and the beginning of the string should not be
  8795. interpreted as the beginning of the line.
  8796. **** Constant: regexp/noteol
  8797. The match-end-of-line operator always fails to match (but see the
  8798. compilation flag regexp/newline above)
  8799. **** Function: regexp? OBJ
  8800. Return `#t' if OBJ is a compiled regular expression, or `#f'
  8801. otherwise.
  8802. Regular expressions are commonly used to find patterns in one string
  8803. and replace them with the contents of another string.
  8804. **** Function: regexp-substitute PORT MATCH [ITEM...]
  8805. Write to the output port PORT selected contents of the match
  8806. structure MATCH. Each ITEM specifies what should be written, and
  8807. may be one of the following arguments:
  8808. * A string. String arguments are written out verbatim.
  8809. * An integer. The submatch with that number is written.
  8810. * The symbol `pre'. The portion of the matched string preceding
  8811. the regexp match is written.
  8812. * The symbol `post'. The portion of the matched string
  8813. following the regexp match is written.
  8814. PORT may be `#f', in which case nothing is written; instead,
  8815. `regexp-substitute' constructs a string from the specified ITEMs
  8816. and returns that.
  8817. **** Function: regexp-substitute/global PORT REGEXP TARGET [ITEM...]
  8818. Similar to `regexp-substitute', but can be used to perform global
  8819. substitutions on STR. Instead of taking a match structure as an
  8820. argument, `regexp-substitute/global' takes two string arguments: a
  8821. REGEXP string describing a regular expression, and a TARGET string
  8822. which should be matched against this regular expression.
  8823. Each ITEM behaves as in REGEXP-SUBSTITUTE, with the following
  8824. exceptions:
  8825. * A function may be supplied. When this function is called, it
  8826. will be passed one argument: a match structure for a given
  8827. regular expression match. It should return a string to be
  8828. written out to PORT.
  8829. * The `post' symbol causes `regexp-substitute/global' to recurse
  8830. on the unmatched portion of STR. This *must* be supplied in
  8831. order to perform global search-and-replace on STR; if it is
  8832. not present among the ITEMs, then `regexp-substitute/global'
  8833. will return after processing a single match.
  8834. *** Match Structures
  8835. A "match structure" is the object returned by `string-match' and
  8836. `regexp-exec'. It describes which portion of a string, if any, matched
  8837. the given regular expression. Match structures include: a reference to
  8838. the string that was checked for matches; the starting and ending
  8839. positions of the regexp match; and, if the regexp included any
  8840. parenthesized subexpressions, the starting and ending positions of each
  8841. submatch.
  8842. In each of the regexp match functions described below, the `match'
  8843. argument must be a match structure returned by a previous call to
  8844. `string-match' or `regexp-exec'. Most of these functions return some
  8845. information about the original target string that was matched against a
  8846. regular expression; we will call that string TARGET for easy reference.
  8847. **** Function: regexp-match? OBJ
  8848. Return `#t' if OBJ is a match structure returned by a previous
  8849. call to `regexp-exec', or `#f' otherwise.
  8850. **** Function: match:substring MATCH [N]
  8851. Return the portion of TARGET matched by subexpression number N.
  8852. Submatch 0 (the default) represents the entire regexp match. If
  8853. the regular expression as a whole matched, but the subexpression
  8854. number N did not match, return `#f'.
  8855. **** Function: match:start MATCH [N]
  8856. Return the starting position of submatch number N.
  8857. **** Function: match:end MATCH [N]
  8858. Return the ending position of submatch number N.
  8859. **** Function: match:prefix MATCH
  8860. Return the unmatched portion of TARGET preceding the regexp match.
  8861. **** Function: match:suffix MATCH
  8862. Return the unmatched portion of TARGET following the regexp match.
  8863. **** Function: match:count MATCH
  8864. Return the number of parenthesized subexpressions from MATCH.
  8865. Note that the entire regular expression match itself counts as a
  8866. subexpression, and failed submatches are included in the count.
  8867. **** Function: match:string MATCH
  8868. Return the original TARGET string.
  8869. *** Backslash Escapes
  8870. Sometimes you will want a regexp to match characters like `*' or `$'
  8871. exactly. For example, to check whether a particular string represents
  8872. a menu entry from an Info node, it would be useful to match it against
  8873. a regexp like `^* [^:]*::'. However, this won't work; because the
  8874. asterisk is a metacharacter, it won't match the `*' at the beginning of
  8875. the string. In this case, we want to make the first asterisk un-magic.
  8876. You can do this by preceding the metacharacter with a backslash
  8877. character `\'. (This is also called "quoting" the metacharacter, and
  8878. is known as a "backslash escape".) When Guile sees a backslash in a
  8879. regular expression, it considers the following glyph to be an ordinary
  8880. character, no matter what special meaning it would ordinarily have.
  8881. Therefore, we can make the above example work by changing the regexp to
  8882. `^\* [^:]*::'. The `\*' sequence tells the regular expression engine
  8883. to match only a single asterisk in the target string.
  8884. Since the backslash is itself a metacharacter, you may force a
  8885. regexp to match a backslash in the target string by preceding the
  8886. backslash with itself. For example, to find variable references in a
  8887. TeX program, you might want to find occurrences of the string `\let\'
  8888. followed by any number of alphabetic characters. The regular expression
  8889. `\\let\\[A-Za-z]*' would do this: the double backslashes in the regexp
  8890. each match a single backslash in the target string.
  8891. **** Function: regexp-quote STR
  8892. Quote each special character found in STR with a backslash, and
  8893. return the resulting string.
  8894. *Very important:* Using backslash escapes in Guile source code (as
  8895. in Emacs Lisp or C) can be tricky, because the backslash character has
  8896. special meaning for the Guile reader. For example, if Guile encounters
  8897. the character sequence `\n' in the middle of a string while processing
  8898. Scheme code, it replaces those characters with a newline character.
  8899. Similarly, the character sequence `\t' is replaced by a horizontal tab.
  8900. Several of these "escape sequences" are processed by the Guile reader
  8901. before your code is executed. Unrecognized escape sequences are
  8902. ignored: if the characters `\*' appear in a string, they will be
  8903. translated to the single character `*'.
  8904. This translation is obviously undesirable for regular expressions,
  8905. since we want to be able to include backslashes in a string in order to
  8906. escape regexp metacharacters. Therefore, to make sure that a backslash
  8907. is preserved in a string in your Guile program, you must use *two*
  8908. consecutive backslashes:
  8909. (define Info-menu-entry-pattern (make-regexp "^\\* [^:]*"))
  8910. The string in this example is preprocessed by the Guile reader before
  8911. any code is executed. The resulting argument to `make-regexp' is the
  8912. string `^\* [^:]*', which is what we really want.
  8913. This also means that in order to write a regular expression that
  8914. matches a single backslash character, the regular expression string in
  8915. the source code must include *four* backslashes. Each consecutive pair
  8916. of backslashes gets translated by the Guile reader to a single
  8917. backslash, and the resulting double-backslash is interpreted by the
  8918. regexp engine as matching a single backslash character. Hence:
  8919. (define tex-variable-pattern (make-regexp "\\\\let\\\\=[A-Za-z]*"))
  8920. The reason for the unwieldiness of this syntax is historical. Both
  8921. regular expression pattern matchers and Unix string processing systems
  8922. have traditionally used backslashes with the special meanings described
  8923. above. The POSIX regular expression specification and ANSI C standard
  8924. both require these semantics. Attempting to abandon either convention
  8925. would cause other kinds of compatibility problems, possibly more severe
  8926. ones. Therefore, without extending the Scheme reader to support
  8927. strings with different quoting conventions (an ungainly and confusing
  8928. extension when implemented in other languages), we must adhere to this
  8929. cumbersome escape syntax.
  8930. * Changes to the gh_ interface
  8931. * Changes to the scm_ interface
  8932. * Changes to system call interfaces:
  8933. ** The value returned by `raise' is now unspecified. It throws an exception
  8934. if an error occurs.
  8935. *** A new procedure `sigaction' can be used to install signal handlers
  8936. (sigaction signum [action] [flags])
  8937. signum is the signal number, which can be specified using the value
  8938. of SIGINT etc.
  8939. If action is omitted, sigaction returns a pair: the CAR is the current
  8940. signal hander, which will be either an integer with the value SIG_DFL
  8941. (default action) or SIG_IGN (ignore), or the Scheme procedure which
  8942. handles the signal, or #f if a non-Scheme procedure handles the
  8943. signal. The CDR contains the current sigaction flags for the handler.
  8944. If action is provided, it is installed as the new handler for signum.
  8945. action can be a Scheme procedure taking one argument, or the value of
  8946. SIG_DFL (default action) or SIG_IGN (ignore), or #f to restore
  8947. whatever signal handler was installed before sigaction was first used.
  8948. Flags can optionally be specified for the new handler (SA_RESTART is
  8949. always used if the system provides it, so need not be specified.) The
  8950. return value is a pair with information about the old handler as
  8951. described above.
  8952. This interface does not provide access to the "signal blocking"
  8953. facility. Maybe this is not needed, since the thread support may
  8954. provide solutions to the problem of consistent access to data
  8955. structures.
  8956. *** A new procedure `flush-all-ports' is equivalent to running
  8957. `force-output' on every port open for output.
  8958. ** Guile now provides information on how it was built, via the new
  8959. global variable, %guile-build-info. This variable records the values
  8960. of the standard GNU makefile directory variables as an assocation
  8961. list, mapping variable names (symbols) onto directory paths (strings).
  8962. For example, to find out where the Guile link libraries were
  8963. installed, you can say:
  8964. guile -c "(display (assq-ref %guile-build-info 'libdir)) (newline)"
  8965. * Changes to the scm_ interface
  8966. ** The new function scm_handle_by_message_noexit is just like the
  8967. existing scm_handle_by_message function, except that it doesn't call
  8968. exit to terminate the process. Instead, it prints a message and just
  8969. returns #f. This might be a more appropriate catch-all handler for
  8970. new dynamic roots and threads.
  8971. Changes in Guile 1.1 (released Friday, May 16 1997):
  8972. * Changes to the distribution.
  8973. The Guile 1.0 distribution has been split up into several smaller
  8974. pieces:
  8975. guile-core --- the Guile interpreter itself.
  8976. guile-tcltk --- the interface between the Guile interpreter and
  8977. Tcl/Tk; Tcl is an interpreter for a stringy language, and Tk
  8978. is a toolkit for building graphical user interfaces.
  8979. guile-rgx-ctax --- the interface between Guile and the Rx regular
  8980. expression matcher, and the translator for the Ctax
  8981. programming language. These are packaged together because the
  8982. Ctax translator uses Rx to parse Ctax source code.
  8983. This NEWS file describes the changes made to guile-core since the 1.0
  8984. release.
  8985. We no longer distribute the documentation, since it was either out of
  8986. date, or incomplete. As soon as we have current documentation, we
  8987. will distribute it.
  8988. * Changes to the stand-alone interpreter
  8989. ** guile now accepts command-line arguments compatible with SCSH, Olin
  8990. Shivers' Scheme Shell.
  8991. In general, arguments are evaluated from left to right, but there are
  8992. exceptions. The following switches stop argument processing, and
  8993. stash all remaining command-line arguments as the value returned by
  8994. the (command-line) function.
  8995. -s SCRIPT load Scheme source code from FILE, and exit
  8996. -c EXPR evalute Scheme expression EXPR, and exit
  8997. -- stop scanning arguments; run interactively
  8998. The switches below are processed as they are encountered.
  8999. -l FILE load Scheme source code from FILE
  9000. -e FUNCTION after reading script, apply FUNCTION to
  9001. command line arguments
  9002. -ds do -s script at this point
  9003. --emacs enable Emacs protocol (experimental)
  9004. -h, --help display this help and exit
  9005. -v, --version display version information and exit
  9006. \ read arguments from following script lines
  9007. So, for example, here is a Guile script named `ekko' (thanks, Olin)
  9008. which re-implements the traditional "echo" command:
  9009. #!/usr/local/bin/guile -s
  9010. !#
  9011. (define (main args)
  9012. (map (lambda (arg) (display arg) (display " "))
  9013. (cdr args))
  9014. (newline))
  9015. (main (command-line))
  9016. Suppose we invoke this script as follows:
  9017. ekko a speckled gecko
  9018. Through the magic of Unix script processing (triggered by the `#!'
  9019. token at the top of the file), /usr/local/bin/guile receives the
  9020. following list of command-line arguments:
  9021. ("-s" "./ekko" "a" "speckled" "gecko")
  9022. Unix inserts the name of the script after the argument specified on
  9023. the first line of the file (in this case, "-s"), and then follows that
  9024. with the arguments given to the script. Guile loads the script, which
  9025. defines the `main' function, and then applies it to the list of
  9026. remaining command-line arguments, ("a" "speckled" "gecko").
  9027. In Unix, the first line of a script file must take the following form:
  9028. #!INTERPRETER ARGUMENT
  9029. where INTERPRETER is the absolute filename of the interpreter
  9030. executable, and ARGUMENT is a single command-line argument to pass to
  9031. the interpreter.
  9032. You may only pass one argument to the interpreter, and its length is
  9033. limited. These restrictions can be annoying to work around, so Guile
  9034. provides a general mechanism (borrowed from, and compatible with,
  9035. SCSH) for circumventing them.
  9036. If the ARGUMENT in a Guile script is a single backslash character,
  9037. `\', Guile will open the script file, parse arguments from its second
  9038. and subsequent lines, and replace the `\' with them. So, for example,
  9039. here is another implementation of the `ekko' script:
  9040. #!/usr/local/bin/guile \
  9041. -e main -s
  9042. !#
  9043. (define (main args)
  9044. (for-each (lambda (arg) (display arg) (display " "))
  9045. (cdr args))
  9046. (newline))
  9047. If the user invokes this script as follows:
  9048. ekko a speckled gecko
  9049. Unix expands this into
  9050. /usr/local/bin/guile \ ekko a speckled gecko
  9051. When Guile sees the `\' argument, it replaces it with the arguments
  9052. read from the second line of the script, producing:
  9053. /usr/local/bin/guile -e main -s ekko a speckled gecko
  9054. This tells Guile to load the `ekko' script, and apply the function
  9055. `main' to the argument list ("a" "speckled" "gecko").
  9056. Here is how Guile parses the command-line arguments:
  9057. - Each space character terminates an argument. This means that two
  9058. spaces in a row introduce an empty-string argument.
  9059. - The tab character is not permitted (unless you quote it with the
  9060. backslash character, as described below), to avoid confusion.
  9061. - The newline character terminates the sequence of arguments, and will
  9062. also terminate a final non-empty argument. (However, a newline
  9063. following a space will not introduce a final empty-string argument;
  9064. it only terminates the argument list.)
  9065. - The backslash character is the escape character. It escapes
  9066. backslash, space, tab, and newline. The ANSI C escape sequences
  9067. like \n and \t are also supported. These produce argument
  9068. constituents; the two-character combination \n doesn't act like a
  9069. terminating newline. The escape sequence \NNN for exactly three
  9070. octal digits reads as the character whose ASCII code is NNN. As
  9071. above, characters produced this way are argument constituents.
  9072. Backslash followed by other characters is not allowed.
  9073. * Changes to the procedure for linking libguile with your programs
  9074. ** Guile now builds and installs a shared guile library, if your
  9075. system support shared libraries. (It still builds a static library on
  9076. all systems.) Guile automatically detects whether your system
  9077. supports shared libraries. To prevent Guile from buildisg shared
  9078. libraries, pass the `--disable-shared' flag to the configure script.
  9079. Guile takes longer to compile when it builds shared libraries, because
  9080. it must compile every file twice --- once to produce position-
  9081. independent object code, and once to produce normal object code.
  9082. ** The libthreads library has been merged into libguile.
  9083. To link a program against Guile, you now need only link against
  9084. -lguile and -lqt; -lthreads is no longer needed. If you are using
  9085. autoconf to generate configuration scripts for your application, the
  9086. following lines should suffice to add the appropriate libraries to
  9087. your link command:
  9088. ### Find quickthreads and libguile.
  9089. AC_CHECK_LIB(qt, main)
  9090. AC_CHECK_LIB(guile, scm_shell)
  9091. * Changes to Scheme functions
  9092. ** Guile Scheme's special syntax for keyword objects is now optional,
  9093. and disabled by default.
  9094. The syntax variation from R4RS made it difficult to port some
  9095. interesting packages to Guile. The routines which accepted keyword
  9096. arguments (mostly in the module system) have been modified to also
  9097. accept symbols whose names begin with `:'.
  9098. To change the keyword syntax, you must first import the (ice-9 debug)
  9099. module:
  9100. (use-modules (ice-9 debug))
  9101. Then you can enable the keyword syntax as follows:
  9102. (read-set! keywords 'prefix)
  9103. To disable keyword syntax, do this:
  9104. (read-set! keywords #f)
  9105. ** Many more primitive functions accept shared substrings as
  9106. arguments. In the past, these functions required normal, mutable
  9107. strings as arguments, although they never made use of this
  9108. restriction.
  9109. ** The uniform array functions now operate on byte vectors. These
  9110. functions are `array-fill!', `serial-array-copy!', `array-copy!',
  9111. `serial-array-map', `array-map', `array-for-each', and
  9112. `array-index-map!'.
  9113. ** The new functions `trace' and `untrace' implement simple debugging
  9114. support for Scheme functions.
  9115. The `trace' function accepts any number of procedures as arguments,
  9116. and tells the Guile interpreter to display each procedure's name and
  9117. arguments each time the procedure is invoked. When invoked with no
  9118. arguments, `trace' returns the list of procedures currently being
  9119. traced.
  9120. The `untrace' function accepts any number of procedures as arguments,
  9121. and tells the Guile interpreter not to trace them any more. When
  9122. invoked with no arguments, `untrace' untraces all curretly traced
  9123. procedures.
  9124. The tracing in Guile has an advantage over most other systems: we
  9125. don't create new procedure objects, but mark the procedure objects
  9126. themselves. This means that anonymous and internal procedures can be
  9127. traced.
  9128. ** The function `assert-repl-prompt' has been renamed to
  9129. `set-repl-prompt!'. It takes one argument, PROMPT.
  9130. - If PROMPT is #f, the Guile read-eval-print loop will not prompt.
  9131. - If PROMPT is a string, we use it as a prompt.
  9132. - If PROMPT is a procedure accepting no arguments, we call it, and
  9133. display the result as a prompt.
  9134. - Otherwise, we display "> ".
  9135. ** The new function `eval-string' reads Scheme expressions from a
  9136. string and evaluates them, returning the value of the last expression
  9137. in the string. If the string contains no expressions, it returns an
  9138. unspecified value.
  9139. ** The new function `thunk?' returns true iff its argument is a
  9140. procedure of zero arguments.
  9141. ** `defined?' is now a builtin function, instead of syntax. This
  9142. means that its argument should be quoted. It returns #t iff its
  9143. argument is bound in the current module.
  9144. ** The new syntax `use-modules' allows you to add new modules to your
  9145. environment without re-typing a complete `define-module' form. It
  9146. accepts any number of module names as arguments, and imports their
  9147. public bindings into the current module.
  9148. ** The new function (module-defined? NAME MODULE) returns true iff
  9149. NAME, a symbol, is defined in MODULE, a module object.
  9150. ** The new function `builtin-bindings' creates and returns a hash
  9151. table containing copies of all the root module's bindings.
  9152. ** The new function `builtin-weak-bindings' does the same as
  9153. `builtin-bindings', but creates a doubly-weak hash table.
  9154. ** The `equal?' function now considers variable objects to be
  9155. equivalent if they have the same name and the same value.
  9156. ** The new function `command-line' returns the command-line arguments
  9157. given to Guile, as a list of strings.
  9158. When using guile as a script interpreter, `command-line' returns the
  9159. script's arguments; those processed by the interpreter (like `-s' or
  9160. `-c') are omitted. (In other words, you get the normal, expected
  9161. behavior.) Any application that uses scm_shell to process its
  9162. command-line arguments gets this behavior as well.
  9163. ** The new function `load-user-init' looks for a file called `.guile'
  9164. in the user's home directory, and loads it if it exists. This is
  9165. mostly for use by the code generated by scm_compile_shell_switches,
  9166. but we thought it might also be useful in other circumstances.
  9167. ** The new function `log10' returns the base-10 logarithm of its
  9168. argument.
  9169. ** Changes to I/O functions
  9170. *** The functions `read', `primitive-load', `read-and-eval!', and
  9171. `primitive-load-path' no longer take optional arguments controlling
  9172. case insensitivity and a `#' parser.
  9173. Case sensitivity is now controlled by a read option called
  9174. `case-insensitive'. The user can add new `#' syntaxes with the
  9175. `read-hash-extend' function (see below).
  9176. *** The new function `read-hash-extend' allows the user to change the
  9177. syntax of Guile Scheme in a somewhat controlled way.
  9178. (read-hash-extend CHAR PROC)
  9179. When parsing S-expressions, if we read a `#' character followed by
  9180. the character CHAR, use PROC to parse an object from the stream.
  9181. If PROC is #f, remove any parsing procedure registered for CHAR.
  9182. The reader applies PROC to two arguments: CHAR and an input port.
  9183. *** The new functions read-delimited and read-delimited! provide a
  9184. general mechanism for doing delimited input on streams.
  9185. (read-delimited DELIMS [PORT HANDLE-DELIM])
  9186. Read until we encounter one of the characters in DELIMS (a string),
  9187. or end-of-file. PORT is the input port to read from; it defaults to
  9188. the current input port. The HANDLE-DELIM parameter determines how
  9189. the terminating character is handled; it should be one of the
  9190. following symbols:
  9191. 'trim omit delimiter from result
  9192. 'peek leave delimiter character in input stream
  9193. 'concat append delimiter character to returned value
  9194. 'split return a pair: (RESULT . TERMINATOR)
  9195. HANDLE-DELIM defaults to 'peek.
  9196. (read-delimited! DELIMS BUF [PORT HANDLE-DELIM START END])
  9197. A side-effecting variant of `read-delimited'.
  9198. The data is written into the string BUF at the indices in the
  9199. half-open interval [START, END); the default interval is the whole
  9200. string: START = 0 and END = (string-length BUF). The values of
  9201. START and END must specify a well-defined interval in BUF, i.e.
  9202. 0 <= START <= END <= (string-length BUF).
  9203. It returns NBYTES, the number of bytes read. If the buffer filled
  9204. up without a delimiter character being found, it returns #f. If the
  9205. port is at EOF when the read starts, it returns the EOF object.
  9206. If an integer is returned (i.e., the read is successfully terminated
  9207. by reading a delimiter character), then the HANDLE-DELIM parameter
  9208. determines how to handle the terminating character. It is described
  9209. above, and defaults to 'peek.
  9210. (The descriptions of these functions were borrowed from the SCSH
  9211. manual, by Olin Shivers and Brian Carlstrom.)
  9212. *** The `%read-delimited!' function is the primitive used to implement
  9213. `read-delimited' and `read-delimited!'.
  9214. (%read-delimited! DELIMS BUF GOBBLE? [PORT START END])
  9215. This returns a pair of values: (TERMINATOR . NUM-READ).
  9216. - TERMINATOR describes why the read was terminated. If it is a
  9217. character or the eof object, then that is the value that terminated
  9218. the read. If it is #f, the function filled the buffer without finding
  9219. a delimiting character.
  9220. - NUM-READ is the number of characters read into BUF.
  9221. If the read is successfully terminated by reading a delimiter
  9222. character, then the gobble? parameter determines what to do with the
  9223. terminating character. If true, the character is removed from the
  9224. input stream; if false, the character is left in the input stream
  9225. where a subsequent read operation will retrieve it. In either case,
  9226. the character is also the first value returned by the procedure call.
  9227. (The descriptions of this function was borrowed from the SCSH manual,
  9228. by Olin Shivers and Brian Carlstrom.)
  9229. *** The `read-line' and `read-line!' functions have changed; they now
  9230. trim the terminator by default; previously they appended it to the
  9231. returned string. For the old behavior, use (read-line PORT 'concat).
  9232. *** The functions `uniform-array-read!' and `uniform-array-write!' now
  9233. take new optional START and END arguments, specifying the region of
  9234. the array to read and write.
  9235. *** The `ungetc-char-ready?' function has been removed. We feel it's
  9236. inappropriate for an interface to expose implementation details this
  9237. way.
  9238. ** Changes to the Unix library and system call interface
  9239. *** The new fcntl function provides access to the Unix `fcntl' system
  9240. call.
  9241. (fcntl PORT COMMAND VALUE)
  9242. Apply COMMAND to PORT's file descriptor, with VALUE as an argument.
  9243. Values for COMMAND are:
  9244. F_DUPFD duplicate a file descriptor
  9245. F_GETFD read the descriptor's close-on-exec flag
  9246. F_SETFD set the descriptor's close-on-exec flag to VALUE
  9247. F_GETFL read the descriptor's flags, as set on open
  9248. F_SETFL set the descriptor's flags, as set on open to VALUE
  9249. F_GETOWN return the process ID of a socket's owner, for SIGIO
  9250. F_SETOWN set the process that owns a socket to VALUE, for SIGIO
  9251. FD_CLOEXEC not sure what this is
  9252. For details, see the documentation for the fcntl system call.
  9253. *** The arguments to `select' have changed, for compatibility with
  9254. SCSH. The TIMEOUT parameter may now be non-integral, yielding the
  9255. expected behavior. The MILLISECONDS parameter has been changed to
  9256. MICROSECONDS, to more closely resemble the underlying system call.
  9257. The RVEC, WVEC, and EVEC arguments can now be vectors; the type of the
  9258. corresponding return set will be the same.
  9259. *** The arguments to the `mknod' system call have changed. They are
  9260. now:
  9261. (mknod PATH TYPE PERMS DEV)
  9262. Create a new file (`node') in the file system. PATH is the name of
  9263. the file to create. TYPE is the kind of file to create; it should
  9264. be 'fifo, 'block-special, or 'char-special. PERMS specifies the
  9265. permission bits to give the newly created file. If TYPE is
  9266. 'block-special or 'char-special, DEV specifies which device the
  9267. special file refers to; its interpretation depends on the kind of
  9268. special file being created.
  9269. *** The `fork' function has been renamed to `primitive-fork', to avoid
  9270. clashing with various SCSH forks.
  9271. *** The `recv' and `recvfrom' functions have been renamed to `recv!'
  9272. and `recvfrom!'. They no longer accept a size for a second argument;
  9273. you must pass a string to hold the received value. They no longer
  9274. return the buffer. Instead, `recv' returns the length of the message
  9275. received, and `recvfrom' returns a pair containing the packet's length
  9276. and originating address.
  9277. *** The file descriptor datatype has been removed, as have the
  9278. `read-fd', `write-fd', `close', `lseek', and `dup' functions.
  9279. We plan to replace these functions with a SCSH-compatible interface.
  9280. *** The `create' function has been removed; it's just a special case
  9281. of `open'.
  9282. *** There are new functions to break down process termination status
  9283. values. In the descriptions below, STATUS is a value returned by
  9284. `waitpid'.
  9285. (status:exit-val STATUS)
  9286. If the child process exited normally, this function returns the exit
  9287. code for the child process (i.e., the value passed to exit, or
  9288. returned from main). If the child process did not exit normally,
  9289. this function returns #f.
  9290. (status:stop-sig STATUS)
  9291. If the child process was suspended by a signal, this function
  9292. returns the signal that suspended the child. Otherwise, it returns
  9293. #f.
  9294. (status:term-sig STATUS)
  9295. If the child process terminated abnormally, this function returns
  9296. the signal that terminated the child. Otherwise, this function
  9297. returns false.
  9298. POSIX promises that exactly one of these functions will return true on
  9299. a valid STATUS value.
  9300. These functions are compatible with SCSH.
  9301. *** There are new accessors and setters for the broken-out time vectors
  9302. returned by `localtime', `gmtime', and that ilk. They are:
  9303. Component Accessor Setter
  9304. ========================= ============ ============
  9305. seconds tm:sec set-tm:sec
  9306. minutes tm:min set-tm:min
  9307. hours tm:hour set-tm:hour
  9308. day of the month tm:mday set-tm:mday
  9309. month tm:mon set-tm:mon
  9310. year tm:year set-tm:year
  9311. day of the week tm:wday set-tm:wday
  9312. day in the year tm:yday set-tm:yday
  9313. daylight saving time tm:isdst set-tm:isdst
  9314. GMT offset, seconds tm:gmtoff set-tm:gmtoff
  9315. name of time zone tm:zone set-tm:zone
  9316. *** There are new accessors for the vectors returned by `uname',
  9317. describing the host system:
  9318. Component Accessor
  9319. ============================================== ================
  9320. name of the operating system implementation utsname:sysname
  9321. network name of this machine utsname:nodename
  9322. release level of the operating system utsname:release
  9323. version level of the operating system utsname:version
  9324. machine hardware platform utsname:machine
  9325. *** There are new accessors for the vectors returned by `getpw',
  9326. `getpwnam', `getpwuid', and `getpwent', describing entries from the
  9327. system's user database:
  9328. Component Accessor
  9329. ====================== =================
  9330. user name passwd:name
  9331. user password passwd:passwd
  9332. user id passwd:uid
  9333. group id passwd:gid
  9334. real name passwd:gecos
  9335. home directory passwd:dir
  9336. shell program passwd:shell
  9337. *** There are new accessors for the vectors returned by `getgr',
  9338. `getgrnam', `getgrgid', and `getgrent', describing entries from the
  9339. system's group database:
  9340. Component Accessor
  9341. ======================= ============
  9342. group name group:name
  9343. group password group:passwd
  9344. group id group:gid
  9345. group members group:mem
  9346. *** There are new accessors for the vectors returned by `gethost',
  9347. `gethostbyaddr', `gethostbyname', and `gethostent', describing
  9348. internet hosts:
  9349. Component Accessor
  9350. ========================= ===============
  9351. official name of host hostent:name
  9352. alias list hostent:aliases
  9353. host address type hostent:addrtype
  9354. length of address hostent:length
  9355. list of addresses hostent:addr-list
  9356. *** There are new accessors for the vectors returned by `getnet',
  9357. `getnetbyaddr', `getnetbyname', and `getnetent', describing internet
  9358. networks:
  9359. Component Accessor
  9360. ========================= ===============
  9361. official name of net netent:name
  9362. alias list netent:aliases
  9363. net number type netent:addrtype
  9364. net number netent:net
  9365. *** There are new accessors for the vectors returned by `getproto',
  9366. `getprotobyname', `getprotobynumber', and `getprotoent', describing
  9367. internet protocols:
  9368. Component Accessor
  9369. ========================= ===============
  9370. official protocol name protoent:name
  9371. alias list protoent:aliases
  9372. protocol number protoent:proto
  9373. *** There are new accessors for the vectors returned by `getserv',
  9374. `getservbyname', `getservbyport', and `getservent', describing
  9375. internet protocols:
  9376. Component Accessor
  9377. ========================= ===============
  9378. official service name servent:name
  9379. alias list servent:aliases
  9380. port number servent:port
  9381. protocol to use servent:proto
  9382. *** There are new accessors for the sockaddr structures returned by
  9383. `accept', `getsockname', `getpeername', `recvfrom!':
  9384. Component Accessor
  9385. ======================================== ===============
  9386. address format (`family') sockaddr:fam
  9387. path, for file domain addresses sockaddr:path
  9388. address, for internet domain addresses sockaddr:addr
  9389. TCP or UDP port, for internet sockaddr:port
  9390. *** The `getpwent', `getgrent', `gethostent', `getnetent',
  9391. `getprotoent', and `getservent' functions now return #f at the end of
  9392. the user database. (They used to throw an exception.)
  9393. Note that calling MUMBLEent function is equivalent to calling the
  9394. corresponding MUMBLE function with no arguments.
  9395. *** The `setpwent', `setgrent', `sethostent', `setnetent',
  9396. `setprotoent', and `setservent' routines now take no arguments.
  9397. *** The `gethost', `getproto', `getnet', and `getserv' functions now
  9398. provide more useful information when they throw an exception.
  9399. *** The `lnaof' function has been renamed to `inet-lnaof'.
  9400. *** Guile now claims to have the `current-time' feature.
  9401. *** The `mktime' function now takes an optional second argument ZONE,
  9402. giving the time zone to use for the conversion. ZONE should be a
  9403. string, in the same format as expected for the "TZ" environment variable.
  9404. *** The `strptime' function now returns a pair (TIME . COUNT), where
  9405. TIME is the parsed time as a vector, and COUNT is the number of
  9406. characters from the string left unparsed. This function used to
  9407. return the remaining characters as a string.
  9408. *** The `gettimeofday' function has replaced the old `time+ticks' function.
  9409. The return value is now (SECONDS . MICROSECONDS); the fractional
  9410. component is no longer expressed in "ticks".
  9411. *** The `ticks/sec' constant has been removed, in light of the above change.
  9412. * Changes to the gh_ interface
  9413. ** gh_eval_str() now returns an SCM object which is the result of the
  9414. evaluation
  9415. ** gh_scm2str() now copies the Scheme data to a caller-provided C
  9416. array
  9417. ** gh_scm2newstr() now makes a C array, copies the Scheme data to it,
  9418. and returns the array
  9419. ** gh_scm2str0() is gone: there is no need to distinguish
  9420. null-terminated from non-null-terminated, since gh_scm2newstr() allows
  9421. the user to interpret the data both ways.
  9422. * Changes to the scm_ interface
  9423. ** The new function scm_symbol_value0 provides an easy way to get a
  9424. symbol's value from C code:
  9425. SCM scm_symbol_value0 (char *NAME)
  9426. Return the value of the symbol named by the null-terminated string
  9427. NAME in the current module. If the symbol named NAME is unbound in
  9428. the current module, return SCM_UNDEFINED.
  9429. ** The new function scm_sysintern0 creates new top-level variables,
  9430. without assigning them a value.
  9431. SCM scm_sysintern0 (char *NAME)
  9432. Create a new Scheme top-level variable named NAME. NAME is a
  9433. null-terminated string. Return the variable's value cell.
  9434. ** The function scm_internal_catch is the guts of catch. It handles
  9435. all the mechanics of setting up a catch target, invoking the catch
  9436. body, and perhaps invoking the handler if the body does a throw.
  9437. The function is designed to be usable from C code, but is general
  9438. enough to implement all the semantics Guile Scheme expects from throw.
  9439. TAG is the catch tag. Typically, this is a symbol, but this function
  9440. doesn't actually care about that.
  9441. BODY is a pointer to a C function which runs the body of the catch;
  9442. this is the code you can throw from. We call it like this:
  9443. BODY (BODY_DATA, JMPBUF)
  9444. where:
  9445. BODY_DATA is just the BODY_DATA argument we received; we pass it
  9446. through to BODY as its first argument. The caller can make
  9447. BODY_DATA point to anything useful that BODY might need.
  9448. JMPBUF is the Scheme jmpbuf object corresponding to this catch,
  9449. which we have just created and initialized.
  9450. HANDLER is a pointer to a C function to deal with a throw to TAG,
  9451. should one occur. We call it like this:
  9452. HANDLER (HANDLER_DATA, THROWN_TAG, THROW_ARGS)
  9453. where
  9454. HANDLER_DATA is the HANDLER_DATA argument we recevied; it's the
  9455. same idea as BODY_DATA above.
  9456. THROWN_TAG is the tag that the user threw to; usually this is
  9457. TAG, but it could be something else if TAG was #t (i.e., a
  9458. catch-all), or the user threw to a jmpbuf.
  9459. THROW_ARGS is the list of arguments the user passed to the THROW
  9460. function.
  9461. BODY_DATA is just a pointer we pass through to BODY. HANDLER_DATA
  9462. is just a pointer we pass through to HANDLER. We don't actually
  9463. use either of those pointers otherwise ourselves. The idea is
  9464. that, if our caller wants to communicate something to BODY or
  9465. HANDLER, it can pass a pointer to it as MUMBLE_DATA, which BODY and
  9466. HANDLER can then use. Think of it as a way to make BODY and
  9467. HANDLER closures, not just functions; MUMBLE_DATA points to the
  9468. enclosed variables.
  9469. Of course, it's up to the caller to make sure that any data a
  9470. MUMBLE_DATA needs is protected from GC. A common way to do this is
  9471. to make MUMBLE_DATA a pointer to data stored in an automatic
  9472. structure variable; since the collector must scan the stack for
  9473. references anyway, this assures that any references in MUMBLE_DATA
  9474. will be found.
  9475. ** The new function scm_internal_lazy_catch is exactly like
  9476. scm_internal_catch, except:
  9477. - It does not unwind the stack (this is the major difference).
  9478. - If handler returns, its value is returned from the throw.
  9479. - BODY always receives #f as its JMPBUF argument (since there's no
  9480. jmpbuf associated with a lazy catch, because we don't unwind the
  9481. stack.)
  9482. ** scm_body_thunk is a new body function you can pass to
  9483. scm_internal_catch if you want the body to be like Scheme's `catch'
  9484. --- a thunk, or a function of one argument if the tag is #f.
  9485. BODY_DATA is a pointer to a scm_body_thunk_data structure, which
  9486. contains the Scheme procedure to invoke as the body, and the tag
  9487. we're catching. If the tag is #f, then we pass JMPBUF (created by
  9488. scm_internal_catch) to the body procedure; otherwise, the body gets
  9489. no arguments.
  9490. ** scm_handle_by_proc is a new handler function you can pass to
  9491. scm_internal_catch if you want the handler to act like Scheme's catch
  9492. --- call a procedure with the tag and the throw arguments.
  9493. If the user does a throw to this catch, this function runs a handler
  9494. procedure written in Scheme. HANDLER_DATA is a pointer to an SCM
  9495. variable holding the Scheme procedure object to invoke. It ought to
  9496. be a pointer to an automatic variable (i.e., one living on the stack),
  9497. or the procedure object should be otherwise protected from GC.
  9498. ** scm_handle_by_message is a new handler function to use with
  9499. `scm_internal_catch' if you want Guile to print a message and die.
  9500. It's useful for dealing with throws to uncaught keys at the top level.
  9501. HANDLER_DATA, if non-zero, is assumed to be a char * pointing to a
  9502. message header to print; if zero, we use "guile" instead. That
  9503. text is followed by a colon, then the message described by ARGS.
  9504. ** The return type of scm_boot_guile is now void; the function does
  9505. not return a value, and indeed, never returns at all.
  9506. ** The new function scm_shell makes it easy for user applications to
  9507. process command-line arguments in a way that is compatible with the
  9508. stand-alone guile interpreter (which is in turn compatible with SCSH,
  9509. the Scheme shell).
  9510. To use the scm_shell function, first initialize any guile modules
  9511. linked into your application, and then call scm_shell with the values
  9512. of ARGC and ARGV your `main' function received. scm_shell will add
  9513. any SCSH-style meta-arguments from the top of the script file to the
  9514. argument vector, and then process the command-line arguments. This
  9515. generally means loading a script file or starting up an interactive
  9516. command interpreter. For details, see "Changes to the stand-alone
  9517. interpreter" above.
  9518. ** The new functions scm_get_meta_args and scm_count_argv help you
  9519. implement the SCSH-style meta-argument, `\'.
  9520. char **scm_get_meta_args (int ARGC, char **ARGV)
  9521. If the second element of ARGV is a string consisting of a single
  9522. backslash character (i.e. "\\" in Scheme notation), open the file
  9523. named by the following argument, parse arguments from it, and return
  9524. the spliced command line. The returned array is terminated by a
  9525. null pointer.
  9526. For details of argument parsing, see above, under "guile now accepts
  9527. command-line arguments compatible with SCSH..."
  9528. int scm_count_argv (char **ARGV)
  9529. Count the arguments in ARGV, assuming it is terminated by a null
  9530. pointer.
  9531. For an example of how these functions might be used, see the source
  9532. code for the function scm_shell in libguile/script.c.
  9533. You will usually want to use scm_shell instead of calling this
  9534. function yourself.
  9535. ** The new function scm_compile_shell_switches turns an array of
  9536. command-line arguments into Scheme code to carry out the actions they
  9537. describe. Given ARGC and ARGV, it returns a Scheme expression to
  9538. evaluate, and calls scm_set_program_arguments to make any remaining
  9539. command-line arguments available to the Scheme code. For example,
  9540. given the following arguments:
  9541. -e main -s ekko a speckled gecko
  9542. scm_set_program_arguments will return the following expression:
  9543. (begin (load "ekko") (main (command-line)) (quit))
  9544. You will usually want to use scm_shell instead of calling this
  9545. function yourself.
  9546. ** The function scm_shell_usage prints a usage message appropriate for
  9547. an interpreter that uses scm_compile_shell_switches to handle its
  9548. command-line arguments.
  9549. void scm_shell_usage (int FATAL, char *MESSAGE)
  9550. Print a usage message to the standard error output. If MESSAGE is
  9551. non-zero, write it before the usage message, followed by a newline.
  9552. If FATAL is non-zero, exit the process, using FATAL as the
  9553. termination status. (If you want to be compatible with Guile,
  9554. always use 1 as the exit status when terminating due to command-line
  9555. usage problems.)
  9556. You will usually want to use scm_shell instead of calling this
  9557. function yourself.
  9558. ** scm_eval_0str now returns SCM_UNSPECIFIED if the string contains no
  9559. expressions. It used to return SCM_EOL. Earth-shattering.
  9560. ** The macros for declaring scheme objects in C code have been
  9561. rearranged slightly. They are now:
  9562. SCM_SYMBOL (C_NAME, SCHEME_NAME)
  9563. Declare a static SCM variable named C_NAME, and initialize it to
  9564. point to the Scheme symbol whose name is SCHEME_NAME. C_NAME should
  9565. be a C identifier, and SCHEME_NAME should be a C string.
  9566. SCM_GLOBAL_SYMBOL (C_NAME, SCHEME_NAME)
  9567. Just like SCM_SYMBOL, but make C_NAME globally visible.
  9568. SCM_VCELL (C_NAME, SCHEME_NAME)
  9569. Create a global variable at the Scheme level named SCHEME_NAME.
  9570. Declare a static SCM variable named C_NAME, and initialize it to
  9571. point to the Scheme variable's value cell.
  9572. SCM_GLOBAL_VCELL (C_NAME, SCHEME_NAME)
  9573. Just like SCM_VCELL, but make C_NAME globally visible.
  9574. The `guile-snarf' script writes initialization code for these macros
  9575. to its standard output, given C source code as input.
  9576. The SCM_GLOBAL macro is gone.
  9577. ** The scm_read_line and scm_read_line_x functions have been replaced
  9578. by Scheme code based on the %read-delimited! procedure (known to C
  9579. code as scm_read_delimited_x). See its description above for more
  9580. information.
  9581. ** The function scm_sys_open has been renamed to scm_open. It now
  9582. returns a port instead of an FD object.
  9583. * The dynamic linking support has changed. For more information, see
  9584. libguile/DYNAMIC-LINKING.
  9585. Guile 1.0b3
  9586. User-visible changes from Thursday, September 5, 1996 until Guile 1.0
  9587. (Sun 5 Jan 1997):
  9588. * Changes to the 'guile' program:
  9589. ** Guile now loads some new files when it starts up. Guile first
  9590. searches the load path for init.scm, and loads it if found. Then, if
  9591. Guile is not being used to execute a script, and the user's home
  9592. directory contains a file named `.guile', Guile loads that.
  9593. ** You can now use Guile as a shell script interpreter.
  9594. To paraphrase the SCSH manual:
  9595. When Unix tries to execute an executable file whose first two
  9596. characters are the `#!', it treats the file not as machine code to
  9597. be directly executed by the native processor, but as source code
  9598. to be executed by some interpreter. The interpreter to use is
  9599. specified immediately after the #! sequence on the first line of
  9600. the source file. The kernel reads in the name of the interpreter,
  9601. and executes that instead. It passes the interpreter the source
  9602. filename as its first argument, with the original arguments
  9603. following. Consult the Unix man page for the `exec' system call
  9604. for more information.
  9605. Now you can use Guile as an interpreter, using a mechanism which is a
  9606. compatible subset of that provided by SCSH.
  9607. Guile now recognizes a '-s' command line switch, whose argument is the
  9608. name of a file of Scheme code to load. It also treats the two
  9609. characters `#!' as the start of a comment, terminated by `!#'. Thus,
  9610. to make a file of Scheme code directly executable by Unix, insert the
  9611. following two lines at the top of the file:
  9612. #!/usr/local/bin/guile -s
  9613. !#
  9614. Guile treats the argument of the `-s' command-line switch as the name
  9615. of a file of Scheme code to load, and treats the sequence `#!' as the
  9616. start of a block comment, terminated by `!#'.
  9617. For example, here's a version of 'echo' written in Scheme:
  9618. #!/usr/local/bin/guile -s
  9619. !#
  9620. (let loop ((args (cdr (program-arguments))))
  9621. (if (pair? args)
  9622. (begin
  9623. (display (car args))
  9624. (if (pair? (cdr args))
  9625. (display " "))
  9626. (loop (cdr args)))))
  9627. (newline)
  9628. Why does `#!' start a block comment terminated by `!#', instead of the
  9629. end of the line? That is the notation SCSH uses, and although we
  9630. don't yet support the other SCSH features that motivate that choice,
  9631. we would like to be backward-compatible with any existing Guile
  9632. scripts once we do. Furthermore, if the path to Guile on your system
  9633. is too long for your kernel, you can start the script with this
  9634. horrible hack:
  9635. #!/bin/sh
  9636. exec /really/long/path/to/guile -s "$0" ${1+"$@"}
  9637. !#
  9638. Note that some very old Unix systems don't support the `#!' syntax.
  9639. ** You can now run Guile without installing it.
  9640. Previous versions of the interactive Guile interpreter (`guile')
  9641. couldn't start up unless Guile's Scheme library had been installed;
  9642. they used the value of the environment variable `SCHEME_LOAD_PATH'
  9643. later on in the startup process, but not to find the startup code
  9644. itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme
  9645. code.
  9646. To run Guile without installing it, build it in the normal way, and
  9647. then set the environment variable `SCHEME_LOAD_PATH' to a
  9648. colon-separated list of directories, including the top-level directory
  9649. of the Guile sources. For example, if you unpacked Guile so that the
  9650. full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then
  9651. you might say
  9652. export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3
  9653. ** Guile's read-eval-print loop no longer prints #<unspecified>
  9654. results. If the user wants to see this, she can evaluate the
  9655. expression (assert-repl-print-unspecified #t), perhaps in her startup
  9656. file.
  9657. ** Guile no longer shows backtraces by default when an error occurs;
  9658. however, it does display a message saying how to get one, and how to
  9659. request that they be displayed by default. After an error, evaluate
  9660. (backtrace)
  9661. to see a backtrace, and
  9662. (debug-enable 'backtrace)
  9663. to see them by default.
  9664. * Changes to Guile Scheme:
  9665. ** Guile now distinguishes between #f and the empty list.
  9666. This is for compatibility with the IEEE standard, the (possibly)
  9667. upcoming Revised^5 Report on Scheme, and many extant Scheme
  9668. implementations.
  9669. Guile used to have #f and '() denote the same object, to make Scheme's
  9670. type system more compatible with Emacs Lisp's. However, the change
  9671. caused too much trouble for Scheme programmers, and we found another
  9672. way to reconcile Emacs Lisp with Scheme that didn't require this.
  9673. ** Guile's delq, delv, delete functions, and their destructive
  9674. counterparts, delq!, delv!, and delete!, now remove all matching
  9675. elements from the list, not just the first. This matches the behavior
  9676. of the corresponding Emacs Lisp functions, and (I believe) the Maclisp
  9677. functions which inspired them.
  9678. I recognize that this change may break code in subtle ways, but it
  9679. seems best to make the change before the FSF's first Guile release,
  9680. rather than after.
  9681. ** The compiled-library-path function has been deleted from libguile.
  9682. ** The facilities for loading Scheme source files have changed.
  9683. *** The variable %load-path now tells Guile which directories to search
  9684. for Scheme code. Its value is a list of strings, each of which names
  9685. a directory.
  9686. *** The variable %load-extensions now tells Guile which extensions to
  9687. try appending to a filename when searching the load path. Its value
  9688. is a list of strings. Its default value is ("" ".scm").
  9689. *** (%search-load-path FILENAME) searches the directories listed in the
  9690. value of the %load-path variable for a Scheme file named FILENAME,
  9691. with all the extensions listed in %load-extensions. If it finds a
  9692. match, then it returns its full filename. If FILENAME is absolute, it
  9693. returns it unchanged. Otherwise, it returns #f.
  9694. %search-load-path will not return matches that refer to directories.
  9695. *** (primitive-load FILENAME :optional CASE-INSENSITIVE-P SHARP)
  9696. uses %seach-load-path to find a file named FILENAME, and loads it if
  9697. it finds it. If it can't read FILENAME for any reason, it throws an
  9698. error.
  9699. The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the
  9700. `read' function.
  9701. *** load uses the same searching semantics as primitive-load.
  9702. *** The functions %try-load, try-load-with-path, %load, load-with-path,
  9703. basic-try-load-with-path, basic-load-with-path, try-load-module-with-
  9704. path, and load-module-with-path have been deleted. The functions
  9705. above should serve their purposes.
  9706. *** If the value of the variable %load-hook is a procedure,
  9707. `primitive-load' applies its value to the name of the file being
  9708. loaded (without the load path directory name prepended). If its value
  9709. is #f, it is ignored. Otherwise, an error occurs.
  9710. This is mostly useful for printing load notification messages.
  9711. ** The function `eval!' is no longer accessible from the scheme level.
  9712. We can't allow operations which introduce glocs into the scheme level,
  9713. because Guile's type system can't handle these as data. Use `eval' or
  9714. `read-and-eval!' (see below) as replacement.
  9715. ** The new function read-and-eval! reads an expression from PORT,
  9716. evaluates it, and returns the result. This is more efficient than
  9717. simply calling `read' and `eval', since it is not necessary to make a
  9718. copy of the expression for the evaluator to munge.
  9719. Its optional arguments CASE_INSENSITIVE_P and SHARP are interpreted as
  9720. for the `read' function.
  9721. ** The function `int?' has been removed; its definition was identical
  9722. to that of `integer?'.
  9723. ** The functions `<?', `<?', `<=?', `=?', `>?', and `>=?'. Code should
  9724. use the R4RS names for these functions.
  9725. ** The function object-properties no longer returns the hash handle;
  9726. it simply returns the object's property list.
  9727. ** Many functions have been changed to throw errors, instead of
  9728. returning #f on failure. The point of providing exception handling in
  9729. the language is to simplify the logic of user code, but this is less
  9730. useful if Guile's primitives don't throw exceptions.
  9731. ** The function `fileno' has been renamed from `%fileno'.
  9732. ** The function primitive-mode->fdes returns #t or #f now, not 1 or 0.
  9733. * Changes to Guile's C interface:
  9734. ** The library's initialization procedure has been simplified.
  9735. scm_boot_guile now has the prototype:
  9736. void scm_boot_guile (int ARGC,
  9737. char **ARGV,
  9738. void (*main_func) (),
  9739. void *closure);
  9740. scm_boot_guile calls MAIN_FUNC, passing it CLOSURE, ARGC, and ARGV.
  9741. MAIN_FUNC should do all the work of the program (initializing other
  9742. packages, reading user input, etc.) before returning. When MAIN_FUNC
  9743. returns, call exit (0); this function never returns. If you want some
  9744. other exit value, MAIN_FUNC may call exit itself.
  9745. scm_boot_guile arranges for program-arguments to return the strings
  9746. given by ARGC and ARGV. If MAIN_FUNC modifies ARGC/ARGV, should call
  9747. scm_set_program_arguments with the final list, so Scheme code will
  9748. know which arguments have been processed.
  9749. scm_boot_guile establishes a catch-all catch handler which prints an
  9750. error message and exits the process. This means that Guile exits in a
  9751. coherent way when system errors occur and the user isn't prepared to
  9752. handle it. If the user doesn't like this behavior, they can establish
  9753. their own universal catcher in MAIN_FUNC to shadow this one.
  9754. Why must the caller do all the real work from MAIN_FUNC? The garbage
  9755. collector assumes that all local variables of type SCM will be above
  9756. scm_boot_guile's stack frame on the stack. If you try to manipulate
  9757. SCM values after this function returns, it's the luck of the draw
  9758. whether the GC will be able to find the objects you allocate. So,
  9759. scm_boot_guile function exits, rather than returning, to discourage
  9760. people from making that mistake.
  9761. The IN, OUT, and ERR arguments were removed; there are other
  9762. convenient ways to override these when desired.
  9763. The RESULT argument was deleted; this function should never return.
  9764. The BOOT_CMD argument was deleted; the MAIN_FUNC argument is more
  9765. general.
  9766. ** Guile's header files should no longer conflict with your system's
  9767. header files.
  9768. In order to compile code which #included <libguile.h>, previous
  9769. versions of Guile required you to add a directory containing all the
  9770. Guile header files to your #include path. This was a problem, since
  9771. Guile's header files have names which conflict with many systems'
  9772. header files.
  9773. Now only <libguile.h> need appear in your #include path; you must
  9774. refer to all Guile's other header files as <libguile/mumble.h>.
  9775. Guile's installation procedure puts libguile.h in $(includedir), and
  9776. the rest in $(includedir)/libguile.
  9777. ** Two new C functions, scm_protect_object and scm_unprotect_object,
  9778. have been added to the Guile library.
  9779. scm_protect_object (OBJ) protects OBJ from the garbage collector.
  9780. OBJ will not be freed, even if all other references are dropped,
  9781. until someone does scm_unprotect_object (OBJ). Both functions
  9782. return OBJ.
  9783. Note that calls to scm_protect_object do not nest. You can call
  9784. scm_protect_object any number of times on a given object, and the
  9785. next call to scm_unprotect_object will unprotect it completely.
  9786. Basically, scm_protect_object and scm_unprotect_object just
  9787. maintain a list of references to things. Since the GC knows about
  9788. this list, all objects it mentions stay alive. scm_protect_object
  9789. adds its argument to the list; scm_unprotect_object remove its
  9790. argument from the list.
  9791. ** scm_eval_0str now returns the value of the last expression
  9792. evaluated.
  9793. ** The new function scm_read_0str reads an s-expression from a
  9794. null-terminated string, and returns it.
  9795. ** The new function `scm_stdio_to_port' converts a STDIO file pointer
  9796. to a Scheme port object.
  9797. ** The new function `scm_set_program_arguments' allows C code to set
  9798. the value returned by the Scheme `program-arguments' function.
  9799. Older changes:
  9800. * Guile no longer includes sophisticated Tcl/Tk support.
  9801. The old Tcl/Tk support was unsatisfying to us, because it required the
  9802. user to link against the Tcl library, as well as Tk and Guile. The
  9803. interface was also un-lispy, in that it preserved Tcl/Tk's practice of
  9804. referring to widgets by names, rather than exporting widgets to Scheme
  9805. code as a special datatype.
  9806. In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk
  9807. maintainers described some very interesting changes in progress to the
  9808. Tcl/Tk internals, which would facilitate clean interfaces between lone
  9809. Tk and other interpreters --- even for garbage-collected languages
  9810. like Scheme. They expected the new Tk to be publicly available in the
  9811. fall of 1996.
  9812. Since it seems that Guile might soon have a new, cleaner interface to
  9813. lone Tk, and that the old Guile/Tk glue code would probably need to be
  9814. completely rewritten, we (Jim Blandy and Richard Stallman) have
  9815. decided not to support the old code. We'll spend the time instead on
  9816. a good interface to the newer Tk, as soon as it is available.
  9817. Until then, gtcltk-lib provides trivial, low-maintenance functionality.
  9818. Copyright information:
  9819. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
  9820. Permission is granted to anyone to make or distribute verbatim copies
  9821. of this document as received, in any medium, provided that the
  9822. copyright notice and this permission notice are preserved,
  9823. thus giving the recipient permission to redistribute in turn.
  9824. Permission is granted to distribute modified versions
  9825. of this document, or of portions of it,
  9826. under the above conditions, provided also that they
  9827. carry prominent notices stating who last changed them.
  9828. Local variables:
  9829. mode: outline
  9830. paragraph-separate: "[ ]*$"
  9831. end: