NEWS 533 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255
  1. Guile NEWS --- history of user-visible changes.
  2. Copyright (C) 1996-2022 Free Software Foundation, Inc.
  3. See the end for copying conditions.
  4. Please send Guile bug reports to bug-guile@gnu.org.
  5. Changes in 3.0.9 (since 3.0.8)
  6. * Notable changes
  7. * New interfaces and functionality
  8. ** `open-file' now supports an "e" flag for O_CLOEXEC
  9. Until now, the high-level `open-file' facility did not provide a way to
  10. pass O_CLOEXEC to the underlying `open' call. It can now be done by
  11. appending "e" to the `mode' string passed as a second argument. See
  12. "File Ports" in the manual for more info.
  13. ** `pipe' now takes flags as an optional argument
  14. This lets you pass flags such as O_CLOEXEC and O_NONBLOCK, as with the
  15. pipe2(2) system call found on GNU/Linux and GNU/Hurd, instead of having
  16. to call `fnctl' afterwards. See "Ports and File Descriptors" in the
  17. manual for details.
  18. ** Bindings to `openat' and friends
  19. The procedures `openat', `open-fdes-at', `statat', `chownat',
  20. `unlinkat', `chmodat', `renameat', `mkdirat' and `symlinkat' have been
  21. added. They resolve file names relative to a directory passed as a file
  22. port. The procedures `chdir' `readlink' and `utime' have been extended
  23. to support file ports. The related flags `AT_REMOVEDIR' and
  24. `AT_EACCESS' have been added. See `File System' in the manual
  25. ** Abstract Unix-domain sockets are supported
  26. It is now possible to create an AF_UNIX socket with a leading zero byte
  27. in its file name to create an abstract Unix-domain socket. See
  28. "man 7 unix" for information on abstract Unix-domain sockets.
  29. ** New socket-related constants defined
  30. The `IN6ADDR_ANY' and `IN6ADDR_LOOPBACK' are now defined on systems with
  31. IPv6 support; they can be used with `bind'.
  32. Likewise, the `IPPROTO_IPV6' and `IPV6_V6ONLY' constants are defined,
  33. for use with `setsockopt'.
  34. ** Disassembler now shows intrinsic names
  35. Disassembler output now includes the name of intrinsics next to each
  36. `call-' instruction (info "(guile) Intrinsic Call Instructions").
  37. * Bug fixes
  38. ** Type sizes are correctly determined when cross-compiling
  39. (https://bugs.gnu.org/54198)
  40. ** psyntax honors source properties coming from read hash extensions
  41. (https://bugs.gnu.org/54003)
  42. ** ./configure checks whether the linker supports '-flto' (needed on macOS)
  43. ** libguile/srfi-14.i.c is now longer shipped and is instead built from source
  44. (https://bugs.gnu.org/54111)
  45. ** Cross-compilation supports triplets with empty vendor strings
  46. (https://bugs.gnu.org/54915)
  47. ** It is possible to use a 'library-form' inside 'cond-expand' in R7RS libraries
  48. (https://bugs.gnu.org/55934)
  49. ** 'coverage-data->lcov' accepts a #:modules argument as documented
  50. (https://bugs.gnu.org/54911)
  51. ** 'connect' returns #f upon EAGAIN, not just EINPROGRESS
  52. ** (web http) capitalizes the "Basic" authorization header
  53. ** (web http) terminates chunked encoding with an extra \r\n
  54. ** (web client) retries TLS handshake upon non-fatal errors
  55. (<https://bugs.gnu.org/49223>)
  56. ** 'primitive-load' opens files as O_CLOEXEC
  57. (<https://bugs.gnu.org/57567>)
  58. ** Baseline compiler no longer crashes on (not (list 1 2))
  59. (<https://bugs.gnu.org/58217>)
  60. ** Fix documentation of ‘mkdir’
  61. Previously, the documentation implied the umask was ignored if the
  62. mode was set explicitly. However, this is not the case.
  63. Changes in 3.0.8 (since 3.0.7)
  64. * Notable changes
  65. ** Cross-module inlining
  66. Although historically Guile has treated modules as glorified hash
  67. tables, most modules are actually _declarative_ -- they just define
  68. functions and variables and provide them for other modules to use, and
  69. don't manipulate modules as first-class objects. See "Declarative
  70. Modules" in the manual, for more discussion.
  71. Since version 3.0.0, Guile has taken advantage of declarative semantics
  72. to allow a top-level definition to be inlined within its uses in the
  73. same compilation unit, provided the binding is never assigned and
  74. defined exactly once. Guile 3.0.8 extends this to allow some
  75. exported declarative definitions to be inlined into other modules.
  76. This facility is mostly transparent to the user and is enabled at the
  77. default -O2 optimization level. "Small" definitions are available for
  78. cross-module inlining (-Oinlinable-exports, included at -O2). The
  79. actual inlining decision is performed by Guile's partial evaluation pass
  80. (the -Ocross-module-inlining modifier to -Opeval, included at -O2 also),
  81. subject to effort and size growth counters.
  82. Note however that as with macros, when a definition changes in module A,
  83. a separately compiled module B that uses that definition doesn't
  84. automatically get recompiled. This is a limitation in Guile that we
  85. would like to fix.
  86. As another limitation, cross-module inlining is only available for
  87. imports from modules which have already been compiled at -O2 (or
  88. otherwise with -Oinlinable-exports).
  89. When determining whether to enable this facility by default, we weighed
  90. the usability problems of stale inlined bindings against the benefit of
  91. allowing module boundaries to no longer be optimization boundaries, we
  92. ended up on the "let's do it!" side of the equation. However we welcome
  93. feedback from users as to what should be the default behavior, until
  94. such a time as we have a proper notion of when a compiled file is stale
  95. or not.
  96. ** Avoid the need for a custom GMP allocator
  97. In Guile 3.0.6, we fixed a longstanding bug in Guile's use of the
  98. library that Guile uses to implement bignums (large integers), GMP
  99. (https://gmplib.org). See the Guile 3.0.6 release notes. However this
  100. left us with a suboptimal Guile, in which each large integer had to have
  101. a finalizer to free the memory allocated by GMP. Finalizers take time
  102. and space, and so they limit allocation rate, causing bignum performance
  103. to drop. Though you could set an environment variable to go back to the
  104. older, faster behavior, it wasn't the default.
  105. In Guile 3.0.8 we fix this problem comprehensively by avoiding embedding
  106. GMP's mpz_t values in Guile bignums. Instead we embed the bignum digits
  107. directly, avoiding the need for finalizers or custom allocators. This
  108. removes the need for the GUILE_INSTALL_GMP_MEMORY_FUNCTIONS environment
  109. variable mentioned in the Guile 3.0.6 release notes. We also deprecate
  110. the scm_install_gmp_memory_functions variable.
  111. * New interfaces and functionality
  112. ** Typed vector copy functions in (srfi srfi-4 gnu)
  113. The functions `u8vector-copy' `s8vector-copy' `u16vector-copy'
  114. `s16vector-copy' `u32vector-copy' `s32vector-copy' `u64vector-copy'
  115. `s64vector-copy' `f32vector-copy' `f64vector-copy' `c32vector-copy'
  116. `c64vector-copy' `u8vector-copy!' `s8vector-copy!' `u16vector-copy!'
  117. `s16vector-copy!' `u32vector-copy!' `s32vector-copy!'
  118. `u64vector-copy!' `s64vector-copy!' `f32vector-copy!'
  119. `f64vector-copy!' `c32vector-copy!' `c64vector-copy!' have been
  120. added. See SRFI-4 - Guile extensions" in the manual.
  121. ** New function srfi-4-vector-type-size in (srfi srfi-4 gnu)
  122. See SRFI-4 - Guile extensions" in the manual.
  123. ** `bytevector-fill!' supports partial fill through optional arguments
  124. This is an extension to the r6rs procedure. See "Manipulating
  125. Bytevectors" in the manual.
  126. ** `vector-copy!' and `vector-copy' from (rnrs base) included in core
  127. Compared to the previous versions, these accept range arguments. See
  128. "Accessing and Modifying Vector Contents" in the manual.
  129. ** New function bitvector-copy
  130. See "Bit vectors" in the manual.
  131. ** (system foreign) supports C99 complex types
  132. The types `complex-float' and `complex-double' stand for C99 `float
  133. _Complex' and `double _Complex` respectively.
  134. * Other new optimizations
  135. ** Better optimization of "let" in right-hand-side of "letrec"
  136. ** Allow constant-folding for calls to "expt"
  137. Thanks to Maxime Devos.
  138. ** Add ,optimize-cps REPL meta-command
  139. This meta-command is like ,optimize, but at a lower level.
  140. ** Improve alias analysis in common subexpression elimination
  141. ** Avoid argument-count checks for well-typed calls to known procedures
  142. This speeds up calls to lexically bound procedures.
  143. ** Avoid return-value-count checks for calls to known-return-arity procedures
  144. This new optimization, enabled at -O2, speeds up returns from calls to
  145. lexically bound procedures.
  146. * Build system changes
  147. ** Update Gnulib (bugs.gnu.org/49930)
  148. Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6.
  149. ** Compile libguile with -flto if available
  150. By default, if the compiler supports link-time optimization via the
  151. -flto flag, Guile will add it to CFLAGS. This results in a libguile
  152. that is approximately 15% smaller. Pass --disable-lto to configure to
  153. inhibit this behavior.
  154. ** Trim set of prebuilt .go files shipped in the tarball
  155. Guile includes built Scheme files in its tarball to speed up the build,
  156. for casual builders that are less concerned with reproducibility.
  157. However they took a lot of space and we have now trimmed these down to a
  158. more minimal set. As always, you can remove them and build entirely
  159. from source via a `make -C prebuilt clean`.
  160. * New deprecations
  161. ** Vector functions require vector arguments
  162. Passing arrays that are not vectors (arrays for which `(vector? array)'
  163. returns false) to functions `vector-move-left!', `vector-move-right!',
  164. `vector->list', and `vector-copy' is deprecated. Use `array-copy!',
  165. `array-copy', and `array->list' for such arguments.
  166. ** `scm_from_contiguous_typed_array' is deprecated
  167. This function was added during the Guile 2.x series and was not
  168. documented and is no longer used in Guile itself.
  169. ** Deprecate the "simple vector" concept, `scm_is_simple_vector'
  170. This concept meant to indicate "vectors which aren't array slices". Use
  171. scm_is_vector.
  172. ** Deprecate internal contiguous array flag
  173. We still reserve space for the flag to preserve ABI but it has no
  174. effect. As such we also remove the internal SCM_I_ARRAY_CONTIGUOUS,
  175. SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG,
  176. SCM_I_ARRAY_CONTP preprocessor interfaces, as they were internal and
  177. there is no longer a sensible way of using them.
  178. ** Deprecate symbol properties
  179. Symbols used to have a "function slot" and a "property slot", inherited
  180. from Emacs Lisp and early Lisps, which one would access with
  181. 'symbol-pref', 'symbol-fref', 'symbol-pset!', and 'symbol-fset!'. These
  182. procedures have been discouraged in favor of object properties; they are
  183. now deprecated. This saves a few words of memory per symbol.
  184. * Bug fixes
  185. ** Fix compilation of (ash x N), where N is a literal, at -O1 and below
  186. ** Texinfo and XML parsers are now thread-safe (bugs.gnu.org/51264)
  187. ** Fix `filename-completion-function' in (ice-9 readline)
  188. ** Fix trace-calls-to-procedure (bugs.gnu.org/43102, bugs.gnu.org/48412)
  189. ** Fix bug in nftw function (bugs.gnu.org/44182)
  190. ** Fix optimization bug in CSE in eq-constant? if both branches same
  191. ** Fix readline initialization with invalid keymaps
  192. ** Fix crash when reading #nil (bugs.gnu.org/49305)
  193. ** Fix read error when reading #{}}#.
  194. ** Fix Darwin host detection in foreign-library facility.
  195. ** Fix unification of (x ...) patterns in `match'
  196. ** Fix scaling floats with leading zeroes in `format'
  197. ** Improve support for r7rs-style `(srfi N)' and r6rs-style `(srfi :N)
  198. module names (bugs.gnu.org/39601, bugs.gnu.org/40371)
  199. ** Add support for the ARC architecture (bugs.gnu.org/48816)
  200. ** Build fix for const strerror result (bugs.gnu.org/43987)
  201. ** Fix typos in SRFI documentation (bugs.gnu.org/50127)
  202. ** Fix bounds check in `recvfrom!' (bugs.gnu.org/45595)
  203. ** Add support for riscv32
  204. ** Limit `ash' to left-shift by 2^32 bits (bugs.gnu.org/48150)
  205. ** Fix type confusion in heap-numbers-equal? calls from VM
  206. Hearty thanks to Jakub Wojciech, Robin Green, Daniel Llorens, Matija
  207. Obid, RhodiumToad, Rob Browning, Maxime Devos, Aleix Conchillo Flaqué,
  208. Timothy Sample, d4ryus, Fabrice Fontaine, Taylan Kammer, Vineet Gupta,
  209. Philipp Klaus Krause, Arun Isaac, and Alex Shinn.
  210. Changes in 3.0.7 (since 3.0.6)
  211. * New interfaces and functionality
  212. ** More O_* POSIX constants are now defined in Scheme
  213. Guile now defines constants such as `O_NOFOLLOW', `O_CLOEXEC',
  214. `O_TMPFILE', and more on platforms that support them. These may be
  215. passed as arguments to procedures such as `open' and `open-fdes'.
  216. * Bug fixes
  217. ** Fix bugs introduced in 3.0.6 with Scheme `read` re-write
  218. ** Fix deadlock after `primitive-fork' (#41948)
  219. ** Fix duplicates handlers for interfaces that use interfaces (#43025)
  220. ** Fix compile-psyntax.scm for (language tree-il canonicalize) removal
  221. ** Fix prompt compilation bug (#48098)
  222. ** Fix R7RS include-library-declarations, cond-expand (#40252)
  223. ** Fix --enable-mini-gmp on FreeBSD and other targets
  224. ** Fix excessive compile times for vectors >16k elements long
  225. ** Fix use of literal tree-il as source language (#45131)
  226. ** Fix SRFI-64 test-end to not remove globally-installed test runner
  227. Changes in 3.0.6 (since 3.0.5)
  228. * Notable changes
  229. ** Reimplement dynamic library loading ("dlopening") without libltdl
  230. Guile used to load dynamic libraries with libltdl, a library provided by
  231. the Libtool project.
  232. Libltdl provided some compatibility benefits when loading shared
  233. libraries made with older toolchains on older operating systems.
  234. However, no system from the last 10 years or so appears to need such a
  235. thick compatibility layer.
  236. Besides being an unmaintained dependency of limited utility, libltdl
  237. also has the negative aspect that in its search for libraries to load,
  238. it could swallow useful errors for libraries that are found but not
  239. loadable, instead showing just errors for search path candidates that
  240. are not found.
  241. Guile now implements dynamic library loading directly in terms of the
  242. standard "dlopen" interface, providing a limited shim for platforms with
  243. similar functionality exposed under different names (MinGW).
  244. This change has a few practical impacts to Guile users. There is a new
  245. library search path variable, `GUILE_EXTENSIONS_PATH'. Also, errors when
  246. loading a library fails now have better errors. And Guile no longer has
  247. a libltdl dependency.
  248. Although Guile no longer uses libltdl, for backwards compatibility Guile
  249. still adds `LTDL_LIBRARY_PATH' to the loadable library search path, and
  250. includes ad-hoc logic to support uninstalled dynamically loadable
  251. libraries via also adding the ".libs" subdirectories of
  252. `LTDL_LIBRARY_PATH' elements. See "Foreign Libraries" in the
  253. documentation for a full discussion.
  254. ** Fix important incompatibility with GnuTLS
  255. Guile uses the GNU multi-precision (GMP) library to implement
  256. arbitrary-precision integers (bignums) and fractions. Usually Guile is
  257. built to dynamically link to libgmp. In this configuration, any other
  258. user of GMP in the process uses the same libgmp instance, with the same
  259. shared state.
  260. An important piece of shared state is the GMP allocator, responsible for
  261. allocating storage for the digits of large integers. For Guile it's
  262. most efficient to install libgc as the GMP allocator. That way Guile
  263. doesn't need to install finalizers, which have significant overhead, to
  264. free GMP values when Guile bignums are collected. Using libgc to
  265. allocate digits also allows Guile's GC to adequately measure the memory
  266. cost of these values.
  267. However, if the Guile process is linked to some other user of GMP, then
  268. probably the references from the other library to GMP values aren't
  269. visible to the garbage collector. In this case libgc could prematurely
  270. collect values from that other GMP user.
  271. This isn't theoretical, sadly: it happens for Guile-GnuTLS. GnuTLS uses
  272. GMP, and so does Guile. Since Guile 2.0.4, Guile has installed libgc as
  273. the GMP allocator, so since then, Guile-GnuTLS has been buggy.
  274. Therefore, the default is now to not install libgc as the GMP allocator.
  275. This may slow down some uses of bignums. If you know that your Guile
  276. program will never use a library that uses GMP, you can set the
  277. GUILE_INSTALL_GMP_MEMORY_FUNCTIONS=1 in your environment. Guile sets
  278. this environment variable when building Guile, for example. See
  279. "Environment Variables" in the manual, for more.
  280. In some future, Guile may switch to GMP's more low-level "MPN" API for
  281. working with bignums, which would allow us to regain the ability to use
  282. GC-managed digit storage in all configurations.
  283. ** New build option: --enable-mini-gmp
  284. For some users, it would be preferable to bundle a private copy of the
  285. GMP bignum library into Guile. Some users would like to avoid the extra
  286. dependency. Others would like to use libgc to manage GMP values, while
  287. not perturbing the GMP allocator for other GMP users.
  288. For these cases, Guile now has an --enable-mini-gmp configure option,
  289. which will use a stripped-down version of GMP, bundled with Guile. This
  290. code doesn't have all the algorithmic optimizations of full GMP, but
  291. implements the same API in a basic way. It can be more optimal in a
  292. Guile context, given that it can use libgc to allocate its data.
  293. Note that a build with --enable-mini-gmp is not ABI-compatible with a
  294. "stock" build, as functions that use GMP types (scm_to_mpz,
  295. scm_from_mpz) are not exported.
  296. Thanks to Niels Möller and other GMP developers for their mini-gmp
  297. implementation!
  298. ** New `read' implementation in Scheme
  299. Guile's `read' procedure has been rewritten in Scheme. Compared to the
  300. C reader (which still exists for bootstrapping reasons), the new
  301. implementation is more maintainable, more secure, more debuggable, all
  302. while faithfully reproducing all quirks from Guile's previous reader
  303. implemented in C. Also, the Scheme reader is finally compatible with
  304. suspendable ports, allowing REPL implementations to be built with
  305. lightweight concurrency packages such as the third-party "Fibers"
  306. library. Calls to `read' from Scheme as well as calls to `scm_read'
  307. from C use the new reader.
  308. The Scheme implementation is currently about 60% as fast as the
  309. now-inaccessible C implementation, and we hope to close the gap over
  310. time. Bug reports very welcome.
  311. ** Scheme compiler uses `read-syntax' for better debugging
  312. The new Scheme reader also shares implementation with the new
  313. `read-syntax' procedure, which annotates each datum with source location
  314. information. Guile's compiler can use this to provide better
  315. source-level debugging for Scheme programs. Note that this can slightly
  316. increase compiled file sizes, though this is mitigated by some assembler
  317. optimizations.
  318. ** Syntax objects record source locations
  319. When compiling a file that defines a macro, the output will usually
  320. include a number of syntax objects as literals. Previously, these
  321. literals had no source information; now they do. This should improve
  322. debugging.
  323. ** Optimized run-time relocations
  324. The code that patches references between statically-allocated Scheme
  325. data has been optimized to be about 30% shorter than before or so, which
  326. can significantly decrease compiled file size and run-time
  327. initialization latency.
  328. ** Optimized calls to known functions
  329. For calls where the callee is within the compilation unit, Guile can now
  330. skip the argument count check.
  331. ** Reduce code size for calls to module variables
  332. All calls to a given exported or private variable from a module now
  333. dispatch through the same trampoline function. This reduces code size.
  334. ** Updated Gnulib
  335. The Gnulib compatibility library has been updated, for the first time
  336. since 2017 or so. We expect no functional change but look forward to
  337. any bug reports.
  338. * New interfaces and functionality
  339. ** `call-with-port'
  340. See "Ports" in the manual.
  341. ** `call-with-input-bytevector', `call-with-output-bytevector'
  342. See "Bytevector Ports" in the manual.
  343. ** `GUILE_EXTENSIONS_PATH' environment variable.
  344. See "Environment Variables" in the manual.
  345. ** `mkdtemp' and `mkstemp'
  346. See "File System" in the manual. There is still `mkstemp!' but we
  347. recommend that new code uses `mkstemp', which does not mutate the
  348. contents of the "template" argument string. Instead for `mkstemp' you
  349. get the name of the newly-created file by calling `port-filename' on the
  350. returned port.
  351. ** `(system foreign-library)' module
  352. See the newly reorganized "Foreign Function Interface", for details.
  353. These new interfaces replace `dynamic-link', `dynamic-pointer' and
  354. similar, which will eventually be deprecated.
  355. ** `read-syntax'
  356. See "Annotated Scheme Read" in the manual.
  357. ** `quote-syntax'
  358. See "Syntax Case" in the manual.
  359. ** `syntax-sourcev'
  360. See "Syntax Transformer Helpers" in the manual.
  361. * Optimizations
  362. ** eof-object?
  363. ** R6RS vector-map, vector-for-each
  364. * Bug fixes
  365. ** Fix reverse-list->string docstring
  366. ** Fix R7RS "member" result when no item found
  367. ** Fix make-transcoded-port on input+output ports
  368. ** Fix (ice-9 ftw) on filesystems where inode values are meaningless
  369. ** Fix many bugs that prevented Guile from building on MinGW
  370. ** Fix many bugs that prevented Guile from building on MinGW64
  371. ** Fix many bugs that prevented Guile's test suite from running on MinGW
  372. ** Fix srfi-69 merge-hash
  373. ** Fix suspendable-ports implementation of get-bytevector-some!
  374. ** Fix overread in string-locale<?, string-locale-ci<?, and friends
  375. ** Fix handling of parameter lists to elisp defun to allow nil
  376. ** Fix closure-conversion bug for SCC with no free vars and one not-well-known function
  377. ** Fix error when < passed non-real value
  378. ** Fix bug in which exported and private names in a used module could alias each other
  379. ** Fix bug with slot options in redefinable GOOPS classes
  380. ** Fix bugs regarding port buffering for TLS connections in web client
  381. Thanks to Vasilij Schneidermann, Andrey Ivanov, Rob Browning, Erik
  382. Dominikus, Göran Weinholt, Michael Gran, Andrew Whatson, Ricardo
  383. G. Herdt, Jan Nieuwenhuizen, David Thompson, and abcdw.
  384. * New deprecations
  385. ** `dynamic-unlink'
  386. This function now has no effect; Guile will not unload dynamically
  387. linked modules, as that can destabilize the system.
  388. * Incompatible changes
  389. ** `call-with-output-string' closes port on normal exit
  390. This procedure used to leave the port open, even though there was no
  391. useful way to access it. Now we clean it up more promptly, disposing
  392. any possible associated iconv descriptor.
  393. Changes in 3.0.5 (since 3.0.4)
  394. * New interfaces and functionality
  395. ** O(1) compilation of `case' and related expressions
  396. Guile now optimizes chains of eq? comparisons to constants, resulting in
  397. O(1) dispatch time, regardless of the length of the chain. This
  398. optimization is also unlocked in many cases for `match' expressions with
  399. many similar clauses whose first differentiator are constants.
  400. ** New (ice-9 copy-tree) module
  401. This module includes the `copy-tree' procedure that was previously
  402. implemented in C and present in the default `(guile)' module. See
  403. "Copying" in the manual.
  404. ** New warning: use-before-definition
  405. This analysis, enabled at `-W1', issues warnings for programs that use
  406. top-level variables before they are defined.
  407. ** New warning: non-idempotent-definition
  408. This analysis, enabled at `-W1', issues warnings for programs that whose
  409. use of a variable is ambiguous. For example, in the program:
  410. (define saved-add +)
  411. (define + error)
  412. The intention would seem to be to "save" the value of the base `+'
  413. procedure, then override it locally. However if this program is ever
  414. loaded twice, then the second time it is loaded, `+' will be taken from
  415. the local binding instead of the import. Users that want this kind of
  416. behavior should either use lexical bindings instead of top-level
  417. bindings, or otherwise rename important clobbered bindings via modules.
  418. * New deprecations
  419. ** `copy-tree' in the default environment, and `scm_copy_tree' from C
  420. Import the `(ice-9 copy-tree)' module instead.
  421. ** `unbound-variable-analysis`, `macro-use-before-definition-analysis`
  422. These bindings from `(language tree-il analyze)' are replaced by the
  423. use-before-definition analysis, which powers a number of warnings. Use
  424. `make-use-before-definition-analysis', but note that these interfaces
  425. are quite intimate parts of the compiler!
  426. * Incompatible changes
  427. ** `copy' read-option removed
  428. This read option would include a copy of the source expression in the
  429. source-properties of each subexpression. This option has always been
  430. off by default and lost most of its use value with the switch to a
  431. compiler in Guile 2.0.
  432. Changes in 3.0.4 (since 3.0.3)
  433. This release fixes the SONAME of libguile-3.0.so, which was erroneously
  434. bumped in 3.0.3 compared to 3.0.2. Distributions are strongly
  435. encouraged to use 3.0.4 instead of 3.0.3.
  436. Thanks to Chris Vine for reporting the issue.
  437. Changes in 3.0.3 (since 3.0.2)
  438. * New interfaces and functionality
  439. ** New baseline compiler
  440. Guile's CPS-based compiler generates good code, but it takes time and
  441. memory to do so. For users that prioritize speed of compilation over
  442. speed of generated code, Guile now has a new baseline compiler that goes
  443. directly from the high-level Tree-IL to bytecode, skipping CPS and all
  444. of its optimizations. This compiler is used for `guild compile -O0',
  445. and generally runs around ten times as fast as the CPS compiler.
  446. *** New VM intrinsics to support baseline compiler
  447. See "Intrinsic Call Instructions" in the manual.
  448. *** Compiler support for warning and lowering passes
  449. *** Compiler support for choosing different compilation orders
  450. See "Compiler Tower" in the manual. The new per-language "compiler
  451. chooser" facility can choose different compilers based on optimization
  452. level.
  453. *** Better support for specifying optimization and warning levels
  454. The procedural compilation interfaces (`compile', `compile-file', and so
  455. on) now have #:optimization-level and #:warning-level keyword arguments,
  456. which default to corresponding `default-optimization-level' and
  457. `default-warning-level' parameters. You can still specify warning and
  458. optimization passes manually, but we think most users will find the
  459. higher-level interfaces more robust to use.
  460. ** Faster Guile build from source
  461. Guile now uses the baseline compiler for its bootstrap, when building
  462. the first Scheme compiler. Because the baseline compiler runs faster
  463. and includes less code than the CPS compiler, Guile takes less time to
  464. build.
  465. ** New 'pipeline' procedure in (ice-9 popen)
  466. The 'pipeline' procedure provides a simple way to spawn command pipeline
  467. as one would do in a shell.
  468. ** Refreshed bitvector facility
  469. See "Bit Vectors" in the manual, for more on all of these.
  470. *** New bitvector-count, bitvector-count-bits, bitvector-position
  471. procedures
  472. These replace the wonky "bit-count", "bit-count*", and "bit-position"
  473. procedures.
  474. *** New bitvector-bit-set?, bitvector-bit-clear? procedures
  475. These replace bitvector-ref. The reason to migrate is that it's an
  476. opportunity be more efficient in 3.0 (because the new procedures only
  477. work on true bitvectors, and not generic bit arrays), easier to read (no
  478. need for 'not' when checking for false bits), and more consistent with
  479. other bitvector procedures.
  480. *** New bitvector-set-bit!, bitvector-clear-bit! procedures
  481. These replace bitvector-set!, for similar reasons as the bitvector-ref
  482. replacement above.
  483. *** New bitvector-set-all-bits!, bitvector-clear-all-bits! procedures
  484. These replace bitvector-fill!.
  485. *** New bitvector-flip-all-bits! procedure
  486. This replaces bit-invert!.
  487. *** New bitvector-set-bits!, bitvector-clear-bits! procedures
  488. These replace the wonky "bit-set*!" procedure.
  489. * Bug fixes
  490. ** statprof reports the names of primitives
  491. Previously statprof would show strings like "anon #x1234" for primitives
  492. written in C.
  493. ** Compiler reduces 'equal?' when passed a character literal
  494. The compiler now properly reduces expressions such as (equal? c #\x) to
  495. (eq? c #\x). This was not the case in 3.0.2, which could lead to slower
  496. code, especially in 'match' expressions with many clauses with with
  497. character literals.
  498. ** JIT bugs on ARMv7 have been fixed
  499. (<https://bugs.gnu.org/40737>,
  500. <https://gitlab.com/wingo/lightening/-/issues/12>)
  501. ** 'http-get', 'http-post', etc. now honor #:verify-certificates?
  502. (<https://bugs.gnu.org/40486>)
  503. ** web: Accept URI host names consisting only of hex digits
  504. (<https://bugs.gnu.org/40582>)
  505. ** (web http) parser recognizes the CONNECT and PATCH methods
  506. ** Initial revealed count of file ports is now zero
  507. (<https://bugs.gnu.org/41204>)
  508. * New deprecations
  509. ** Old bitvector interfaces deprecated
  510. See "Bit Vectors" in the manual, for details on all of these
  511. replacements.
  512. *** bit-count, bit-position
  513. Use bitvector-count or bitvector-position instead.
  514. *** bitvector-ref
  515. Use 'bitvector-bit-set?' or 'bitvector-bit-clear?' instead.
  516. *** bitvector-set!
  517. Use 'bitvector-set-bit!' or 'bitvector-clear-bit!' instead.
  518. *** bitvector-fill!
  519. Use 'bitvector-set-all-bits!' or 'bitvector-clear-all-bits!' instead.
  520. *** bit-invert!
  521. Use 'bitvector-flip-all-bits! instead.
  522. *** bit-set*!
  523. Use 'bitvector-set-bits!' or 'bitvector-clear-bits!' instead.
  524. *** bit-count*
  525. Use 'bitvector-count-bits' instead, subtracting from 'bitvector-count'
  526. on the mask bitvector if you are counting unset bits.
  527. *** Accessing generic arrays using the bitvector procedures
  528. For the same efficiency reasons that use of 'vector-ref' on generic
  529. arrays was deprecated in Guile 2.0.10, using 'bitvector->list' and
  530. similar procedures on 1-dimensional boolean-typed arrays is now
  531. deprecated. Use 'array-ref' and similar procedures on arrays.
  532. *** scm_istr2bve
  533. This C-only procedure to parse a bitvector from a string should be
  534. replaced by calling `read' on a string port instead, if needed.
  535. Changes in 3.0.2 (since 3.0.1)
  536. * New interfaces and functionality
  537. ** New (srfi srfi-171) module
  538. This module implements "tranducers" as specified in
  539. <https://srfi.schemers.org/srfi-171/srfi-171.html>.
  540. Thanks to Linus Björnstam for this new API!
  541. ** SRFI-14 character data set upgraded to Unicode 13.0.0
  542. * Bug fixes
  543. ** Fix heap corruption when allocating structs
  544. (<https://bugs.gnu.org/39266>)
  545. This bug would cause random crashes; users are invited to upgrade.
  546. Thanks to rr (<https://rr-project.org/>) for being instrumental in
  547. finding this bug!
  548. ** Fix race condition between 'abort-to-prompt' and stack marking
  549. (<https://bugs.gnu.org/28211>)
  550. This bug could occasionally cause crashes in multi-threaded Guile
  551. programs using delimited continuations or exceptions.
  552. ** Ensure weak sets are occasionally vacuumed
  553. (<https://bugs.gnu.org/40194>)
  554. Previously, weak sets, which are used internally for interned symbols
  555. and for ports with SCM_PORT_TYPE_NEEDS_CLOSE_ON_GC, could grow seemingly
  556. indefinitely without being vacuumed.
  557. ** Interpret dynamic library name as literal file name first
  558. (<https://bugs.gnu.org/21076>)
  559. Until now, 'dynamic-link' would always append an extension, such as
  560. ".so", to the user-provided file names. Now, 'dynamic-link' first tries
  561. the file name literally, and only then falls back to adding the OS
  562. shared library file name extension.
  563. This allows users to refer to "libsomething.so.1.2.3" instead of
  564. "libsomething.so", the latter being usually provided by "-dev" packages
  565. of GNU/Linux distributions, unlike the former.
  566. ** <libguile.h> includes <libguile/hooks.h> again
  567. This fixes an omission in Guile 3.0.
  568. ** Fix fixpoint computation in compute-significant-bits
  569. (<https://bugs.gnu.org/38486>)
  570. ** Fix compilation '--without-threads'
  571. (<https://bugs.gnu.org/40075>)
  572. * New deprecations
  573. ** 'tmpnam' is now deprecated
  574. The 'tmpnam' function in the C library has been deprecated for years due
  575. to security concerns; the Scheme procedure 'tmpnam' is now deprecated as
  576. well, in favor of 'mkstemp!'. In addition, a new '--disable-tmpnam'
  577. option has been added to 'configure' for users who would like to disable
  578. it right away.
  579. Changes in 3.0.1 (since 3.0.0):
  580. * New interfaces and functionality
  581. ** Export constructor and predicate for '&quit-exception'
  582. The (ice-9 exceptions) module, new in 3.0.0, now exports
  583. 'quit-exception?' and 'make-quit-exception', which is consistent with
  584. other exception types.
  585. ** (texinfo plain-text) now exports '*line-width*' fluid
  586. The new '*line-width*' fluid allows users to specify the width of a line
  587. for the purposes of line wrapping. See "texinfo plain-text" in the
  588. manual.
  589. ** R7RS support recognizes the '.sld' extension
  590. The '.sld' is what the R7RS suggests as a source file name extension.
  591. It is now recognized when running "guile --r7rs", as well as
  592. the '.guile.sld' extension.
  593. * Bug fixes
  594. ** 'hash' correctly handles keywords, ports, hash tables, etc.
  595. (<https://bugs.gnu.org/39634>)
  596. It used to be that the 'hash' procedure would return the same value for
  597. all keyword objects, the same value for all hash tables, the same value
  598. for all input ports, etc.
  599. ** 'include' no longer rejects relative file names
  600. A bug in 3.0.0 would lead 'include' to error out when passed a relative
  601. file name.
  602. ** Reduce GC pressure when using bignums
  603. Guile no longer installs a finalizer on each bignum (large integer) it
  604. creates. This significantly improves speed and memory usage on
  605. applications that make heavy use of bignums, such as the compiler
  606. itself.
  607. ** Fix expansion of 'error' calls with a non-constant argument
  608. (<https://bugs.gnu.org/39509>)
  609. Calls to the 'error' primitive with a non-constant argument, as in
  610. (error message), would be incorrectly expanded by the compiler, leading
  611. to non-printable errors ("Error while printing exception").
  612. ** Improve source location information for top-level references
  613. (<https://bugs.gnu.org/38388>)
  614. Source location information, as is visible upon "unbound variable"
  615. errors, is now more accurate.
  616. ** Web client treats TLS "premature termination" error as EOF
  617. (<https://bugs.gnu.org/39800>)
  618. This allows 'http-request' from (web client) to gracefully handle
  619. servers that terminate connections abruptly after responding to a
  620. "Connection: close" request.
  621. ** Fix bug restoring a JIT continuation from the interpreter
  622. ** Export C symbols 'scm_sym_lambda', 'scm_sym_quote', etc. again
  623. Those C symbols were inadvertently made private in 3.0.0.
  624. ** Fix build on IA64 and on platforms where the stack grows upwards
  625. ** Fix JIT compilation on 64-bit Cygwin
  626. (<https://bugs.gnu.org/39118>)
  627. ** texinfo properly renders @acronym in plain text
  628. (<https://bugs.gnu.org/37846>)
  629. ** Compiler now optimizes (logior 0 INT)
  630. (<https://bugs.gnu.org/39573>)
  631. ** Fix Readline configure check for the sake of libedit
  632. This fixes builds on macOS against the system-provided libedit.
  633. ** Provided 'GUILE_PKG' Autoconf macro now detects Guile 3.0
  634. (<https://bugs.gnu.org/39437>)
  635. Changes in 3.0.0 (since the stable 2.2 series):
  636. * Notable changes
  637. ** Just-in-time code generation
  638. Guile programs now run up to 4 times faster, relative to Guile 2.2,
  639. thanks to just-in-time (JIT) native code generation. Notably, this
  640. brings the performance of "eval" as written in Scheme back to the level
  641. of "eval" written in C, as in the days of Guile 1.8.
  642. See "Just-In-Time Native Code" in the manual, for more information. JIT
  643. compilation will be enabled automatically and transparently. To disable
  644. JIT compilation, configure Guile with `--enable-jit=no' or
  645. `--disable-jit'. The default is `--enable-jit=auto', which enables the
  646. JIT if it is available. See `./configure --help' for more.
  647. JIT compilation is enabled by default on x86-64, i686, ARMv7, and
  648. AArch64 targets.
  649. ** Lower-level bytecode
  650. Relative to the virtual machine in Guile 2.2, Guile's VM instruction set
  651. is now more low-level. This allows it to express more advanced
  652. optimizations, for example type check elision or integer
  653. devirtualization, and makes the task of JIT code generation easier.
  654. Note that this change can mean that for a given function, the
  655. corresponding number of instructions in Guile 3.0 may be higher than
  656. Guile 2.2, which can lead to slowdowns when the function is interpreted.
  657. We hope that JIT compilation more than makes up for this slight
  658. slowdown.
  659. ** Interleaved internal definitions and expressions allowed
  660. It used to be that internal definitions had to precede all expressions
  661. in their bodies. This restriction has been relaxed. If an expression
  662. precedes an internal definition, it is treated as if it were a
  663. definition of an unreferenced variable. For example, the expression
  664. `(foo)' transforms to the equivalent of `(define _ (begin (foo) #f))',
  665. if it precedes other definitions.
  666. This change improves the readability of Guile programs, as it used to be
  667. that program indentation tended to increase needlessly to allow nested
  668. `let' and `letrec' to re-establish definition contexts after initial
  669. expressions, for example for type-checks on procedure arguments.
  670. ** Record unification
  671. Guile used to have a number of implementations of structured data types
  672. in the form of "records": a core facility, SRFI-9 (records), SRFI-35
  673. (condition types -- a form of records) and R6RS records. These
  674. facilities were not compatible, as they all were built in different
  675. ways. This had the unfortunate corollary that SRFI-35 conditions were
  676. not compatible with R6RS conditions. To fix this problem, we have now
  677. added the union of functionality from all of these record types into
  678. core records: single-inheritance subtyping, mutable and immutable
  679. fields, and so on. See "Records" in the manual, for full details.
  680. R6RS records, SRFI-9 records, and the SRFI-35 and R6RS exception types
  681. have been accordingly "rebased" on top of core records.
  682. ** Reimplementation of exceptions
  683. Since Guile's origins 25 years ago, `throw' and `catch' have been the
  684. primary exception-handling primitives. However these primitives have
  685. two problems. One is that it's hard to handle exceptions in a
  686. structured way using `catch'. Few people remember what the
  687. corresponding `key' and `args' are that an exception handler would see
  688. in response to a call to `error', for example. In practice, this
  689. results in more generic catch-all exception handling than one might
  690. like.
  691. The other problem is that `throw', `catch', and especially
  692. `with-throw-handler' are quite unlike what the rest of the Scheme world
  693. uses. R6RS and R7RS, for example, have mostly converged on
  694. SRFI-34-style `with-exception-handler' and `raise' primitives, and
  695. encourage the use of SRFI-35-style structured exception objects to
  696. describe the error. Guile's R6RS layer incorporates an adapter between
  697. `throw'/`catch' and structured exception handling, but it didn't apply
  698. to SRFI-34/SRFI-35, and we would have to duplicate it for R7RS.
  699. In light of these considerations, Guile has now changed to make
  700. `with-exception-handler' and `raise-exception' its primitives for
  701. exception handling and defined a hierarchy of R6RS-style exception types
  702. in its core. SRFI-34/35, R6RS, and the exception-handling components of
  703. SRFI-18 (threads) have been re-implemented in terms of this core
  704. functionality. There is also a a compatibility layer that makes it so
  705. that exceptions originating in `throw' can be handled by
  706. `with-exception-hander', and vice-versa for `raise-exception' and
  707. `catch'.
  708. Generally speaking, users will see no difference. The one significant
  709. difference is that users of SRFI-34 will see more exceptions flowing
  710. through their `with-exception-handler'/`guard' forms, because whereas
  711. before they would only see exceptions thrown by SRFI-34, now they will
  712. see exceptions thrown by R6RS, R7RS, or indeed `throw'.
  713. Guile's situation is transitional. Most exceptions are still signalled
  714. via `throw'. These will probably migrate over time to
  715. `raise-exception', while preserving compatibility of course.
  716. See "Exceptions" in the manual, for full details on the new API.
  717. ** `guard' no longer unwinds the stack for clause tests
  718. SRFI-34, and then R6RS and R7RS, defines a `guard' form that is a
  719. shorthand for `with-exception-handler'. The cond-like clauses for the
  720. exception handling are specified to run with the continuation of the
  721. `guard', while any re-propagation of the exception happens with the
  722. continuation of the original `raise'.
  723. In practice, this means that one needs full `call-with-continuation' to
  724. implement the specified semantics, to be able to unwind the stack to the
  725. cond clauses, then rewind if none match. This is not only quite
  726. expensive, it is also error-prone as one usually doesn't want to rewind
  727. dynamic-wind guards in an exceptional situation. Additionally, as
  728. continuations bind tightly to the current thread, it makes it impossible
  729. to migrate a subcomputation with a different thread if a `guard' is live
  730. on the stack, as is done in Fibers.
  731. Guile now works around these issues by running the test portion of the
  732. guard expressions within the original `raise' continuation, and only
  733. unwinding once a test matches. This is an incompatible semantic change
  734. but we think the situation is globally much better, and we expect that
  735. very few people will be affected by the change.
  736. ** Optimization of top-level bindings within a compilation unit
  737. At optimization level 2 and above, Guile's compiler is now allowed to
  738. inline top-level definitions within a compilation unit. See
  739. "Declarative Modules" in the manual, for full details. This change can
  740. improve the performance of programs with many small top-level
  741. definitions by quite a bit!
  742. At optimization level 3 and above, Guile will assume that any top-level
  743. binding in a declarative compilation unit that isn't exported from a
  744. module can be completely inlined into its uses. (Prior to this change,
  745. -O3 was the same as -O2.) Note that with this new
  746. `seal-private-bindings' pass, private declarative bindings are no longer
  747. available for access from the first-class module reflection API. The
  748. optimizations afforded by this pass can be useful when you need a speed
  749. boost, but having them enabled at optimization level 3 means they are
  750. not on by default, as they change Guile's behavior in ways that users
  751. might not expect.
  752. ** By default, GOOPS classes are not redefinable
  753. It used to be that all GOOPS classes were redefinable, at least in
  754. theory. This facility was supported by an indirection in all "struct"
  755. instances, even though only a subset of structs would need redefinition.
  756. We wanted to remove this indirection, in order to speed up Guile
  757. records, allow immutable Guile records to eventually be described by
  758. classes, and allow for some optimizations in core GOOPS classes that
  759. shouldn't be redefined anyway.
  760. Thus in GOOPS now there are classes that are redefinable and classes
  761. that aren't. By default, classes created with GOOPS are not
  762. redefinable. To make a class redefinable, it should be an instance of
  763. `<redefinable-class>'. See "Redefining a Class" in the manual for more
  764. information.
  765. ** Define top-level bindings for aux syntax: `else', `=>', `...', `_'
  766. These auxiliary syntax definitions are specified to be defined in the
  767. R6RS and the R7RS. They were previously unbound, even in the R6RS
  768. modules. This change is not anticipated to cause any incompatibility
  769. with existing Guile code, and improves things for R6RS and R7RS users.
  770. ** Conventional gettext alias is now `G_'
  771. Related to the last point, since the "Fix literal matching for
  772. module-bound literals" change in the 2.2 series, it was no longer
  773. possible to use the conventional `_' binding as an alias for `gettext',
  774. because a local `_' definition would prevent `_' from being recognized
  775. as auxiliary syntax for `match', `syntax-rules', and similar. The new
  776. recommended conventional alias for `gettext' is `G_'.
  777. ** Add --r6rs command-line option
  778. The new `install-r6rs!' procedure adapts Guile's defaults to be more
  779. R6RS-compatible. This procedure is called if the user passes `--r6rs'
  780. as a command-line argument. See "R6RS Incompatibilities" in the manual,
  781. for full details.
  782. ** Add support for R7RS
  783. Thanks to Göran Weinholt and OKUMURA Yuki, Guile now implements the R7RS
  784. modules. As the R7RS library syntax is a subset of R6RS, to use R7RS
  785. you just `(import (scheme base))' and off you go. As with R6RS also,
  786. there are some small lexical incompatibilities regarding hex escapes;
  787. see "R6RS Support" in the manual, for full details.
  788. Also as with R6RS, there is an `install-r7rs!' procedure and a `--r7rs'
  789. command-line option.
  790. ** Add #:re-export-and-replace argument to `define-module'
  791. This new keyword specifies a set of bindings to re-export, but also
  792. marks them as intended to replace core bindings. See "Creating Guile
  793. Modules" in the manual, for full details.
  794. Note to make this change, we had to change the way replacement flags are
  795. stored, to being associated with modules instead of individual variable
  796. objects. This means that users who #:re-export an imported binding that
  797. was already marked as #:replace by another module will now see warnings,
  798. as they need to use #:re-export-and-replace instead.
  799. ** `define-module' #:autoload no longer pulls in the whole module
  800. One of the ways that a module can use another is "autoloads". For
  801. example:
  802. (define-module (a) #:autoload (b) (make-b))
  803. In this example, module `(b)' will only be imported when the `make-b'
  804. identifier is referenced. However besides the imprecision about when a
  805. given binding is actually referenced, this mechanism used to cause the
  806. whole imported module to become available, not just the specified
  807. bindings. This has now been changed to only import the specified bindings.
  808. This is a backward-incompatible change. The fix is to mention all
  809. bindings of interest in the autoload clause. Feedback is welcome.
  810. ** Improve SRFI-43 vector-fill!
  811. SRFI-43 vector-fill! now has the same performance whether an optional
  812. range is provided or not, and is also provided in core. As a side
  813. effect, vector-fill! and vector_fill_x no longer work on non-vector
  814. rank-1 arrays. Such cases were handled incorrectly before; for example,
  815. prior to this change:
  816. (define a (make-vector 10 'x))
  817. (define b (make-shared-array a (lambda (i) (list (* 2 i))) 5))
  818. (vector-fill! b 'y)
  819. => #1(y y y x x)
  820. This is now an error. Instead, use array-fill!.
  821. ** `iota' in core and SRFI-1 `iota' are the same
  822. Previously, `iota' in core would not accept start and step arguments and
  823. would return an empty list for negative count. Now there is only one
  824. `iota' function with the extended semantics of SRFI-1. Note that as an
  825. incompatible change, core `iota' no longer accepts a negative count.
  826. ** Improved Transport Layer Security (TLS) support in (web client)
  827. `http-request', `http-get', and related procedures from (web client) are
  828. able to access content over TLS ("HTTPS") since Guile 2.2. However,
  829. that support lacked important facilities, which are now available.
  830. First, these procedures now have a #:verify-certificate? parameter to
  831. enable or disable the verification of X.509 server certificates. The
  832. new `x509-certificate-directory' SRFI-39 parameter specifies where X.509
  833. certificates are searched for. Second, HTTPS proxies are now supported
  834. (in addition to HTTP proxies) and the new `current-https-proxy'
  835. parameter controls that. See "Web Client" in the manual for details.
  836. * New deprecations
  837. ** scm_t_uint8, etc deprecated in favor of C99 stdint.h
  838. It used to be that Guile defined its own `scm_t_uint8' because C99
  839. `uint8_t' wasn't widely enough available. Now Guile finally made the
  840. change to use C99 types, both internally and in Guile's public headers.
  841. Note that this also applies to SCM_T_UINT8_MAX, SCM_T_INT8_MIN, for intN
  842. and uintN for N in 8, 16, 32, and 64. Guile also now uses ptrdiff_t
  843. instead of scm_t_ptrdiff, and similarly for intmax_t, uintmax_t,
  844. intptr_t, and uintptr_t.
  845. ** The two-argument form of `record-constructor'
  846. Calling `record-constructor' with two arguments (the record type and a
  847. list of field names) is deprecated. Instead, call with just one
  848. argument, and provide a wrapper around that constructor if needed.
  849. * Incompatible changes
  850. ** All deprecated code removed
  851. All code deprecated in Guile 2.2 has been removed. See older NEWS, and
  852. check that your programs can compile without linker warnings and run
  853. without runtime warnings. See "Deprecation" in the manual.
  854. In particular, the function `scm_generalized_vector_get_handle' which
  855. was deprecated in 2.0.9 but remained in 2.2, has now finally been
  856. removed. As a replacement, use `scm_array_get_handle' to get a handle
  857. and `scm_array_handle_rank' to check the rank.
  858. ** Remove "self" field from vtables and "redefined" field from classes
  859. These fields were used as part of the machinery for class redefinition
  860. and is no longer needed.
  861. ** VM hook manipulation simplified
  862. The low-level mechanism to instrument a running virtual machine for
  863. debugging and tracing has been simplified. See "VM Hooks" in the
  864. manual, for more.
  865. * Changes to the distribution
  866. ** New effective version
  867. The "effective version" of Guile is now 3.0, which allows parallel
  868. installation with other effective versions (for example, the older Guile
  869. 2.2). See "Parallel Installations" in the manual for full details.
  870. Notably, the `pkg-config' file is now `guile-3.0', and there are new
  871. `guile-3' and `guile-3.0' features for `cond-expand'.
  872. Changes in 2.2.6 (since 2.2.5):
  873. * Bug fixes
  874. ** Fix regression introduced in 2.2.5 that would break HTTP servers
  875. Guile 2.2.5 introduced a bug that would break the built-in HTTP server
  876. provided by the (web server) module. Specifically, HTTP servers would
  877. hang while reading requests. See <https://bugs.gnu.org/36350>.
  878. ** 'strftime' and 'strptime' honor the current locale encoding
  879. Until now these procedures would wrongfully assume that the locale
  880. encoding is always UTF-8. See <https://bugs.gnu.org/35920>.
  881. ** Re-export 'current-load-port'
  882. This procedure was erroneously removed in the 2.2 series but was still
  883. documented.
  884. ** Minor documentation mistakes were fixed
  885. Changes in 2.2.5 (since 2.2.4):
  886. * Notable improvements
  887. ** Greatly improved performance of bidirectional pipes.
  888. The performance of bidirectional pipes, as created using 'open-pipe' or
  889. 'open-pipe*' in OPEN_BOTH mode, has been greatly improved. When reading
  890. large blocks of binary data from a bidirectional pipe, the maximum
  891. bandwidth has been increased by a factor of ~10^3 in some cases.
  892. ** New 'get-bytevector-some!' I/O primitive.
  893. This new I/O primitive is similar to 'get-bytevector-some' from the
  894. R6RS, except that it writes its data to a user-specified range of
  895. indices in an existing bytevector. As a corollary, it is also now
  896. possible to specify a maximum number of bytes to read. Note that
  897. 'get-bytevector-some', and now 'get-bytevector-some!', are unique among
  898. Guile's I/O primitives in their support of efficient binary reads of
  899. potentially large blocks while also allowing for short reads, to avoid
  900. undesired blocking. Now these operations can be performed while also
  901. avoiding heap-allocation.
  902. 'get-bytevector-some!' is needed to efficiently implement the new
  903. bidirectional pipes, which are built upon R6RS custom binary
  904. input/output ports.
  905. ** get-bytevector-{n!,some,some!} now support suspendable I/O.
  906. Scheme implementations of 'get-bytevector-n!', 'get-bytevector-some',
  907. and 'get-bytevector-some!' have been added to (ice-9 suspendable-ports).
  908. As a result, these I/O operations now support suspendable I/O.
  909. * Compiler improvements
  910. ** guild compile: Add -Wshadowed-toplevel.
  911. Top-level definitions that shadow previous top-level definitions from
  912. the same compilation unit will now trigger a compile-time warning, if
  913. -Wshadowed-toplevel is enabled. It is enabled by default.
  914. ** guild compile: Add '-x' flag.
  915. Passing "-x EXT" to 'guild compile' will now cause EXT to be recognized
  916. as a valid source file name extension. For example, to compile R6RS
  917. code, you might want to pass "-x .sls" so that files ending in ".sls"
  918. can be found.
  919. * Miscellaneous improvements
  920. ** Bootstrap optimization
  921. eval.go and psyntax-pp.go are now built before the rest of the .go files
  922. so that they are processed by a fast macro expander. This saves time
  923. when using parallel builds.
  924. ** put-u8 now always writes a single byte, regardless of the port encoding.
  925. Previously, (put-u8 PORT OCTET) worked as expected only when writing to
  926. binary ports, i.e. those with port encoding "ISO-8859-1" a.k.a. Latin-1.
  927. Strictly speaking, this meets the requirements of the R6RS 'put-u8',
  928. which need only support binary ports. However, Guile in fact allows
  929. binary I/O to be performed on any port, and yet 'put-u8' behaved in a
  930. surprising way with other port encodings: it would perform a _textual_
  931. I/O operation, writing the character with Unicode scalar value OCTET.
  932. Now, 'put-u8' always writes a single byte with value OCTET, regardless
  933. of the port encoding.
  934. ** Optimize fixnum exact integer square roots.
  935. 'exact-integer-sqrt' now avoids heap allocation when applied to a
  936. fixnum. 'sqrt' now avoids heap allocation when applied to a fixnum
  937. that's a perfect square. Fewer heap allocations are now required when
  938. applying 'sqrt' to a square of an exact rational whose numerator or
  939. denominator are fixnums.
  940. ** scm_mkstrport: Optimize the POS -> BYTE_POS conversion.
  941. scm_mkstrport now avoids an unnecessary heap allocation and conversion
  942. to UTF-8, when STR is provided and POS is non-zero.
  943. ** SRFI-19: Support ~N in string->date.
  944. Support for the ~N escape, which allows fractions of a second to be
  945. parsed, is now supported in SRFI-19 'string->date'.
  946. ** SRFI-19: Update the leap second table.
  947. The leap on 1 January 2017 was added to SRFI-19's leap second table.
  948. ** stexi->shtml: Add support for @i, @math, @tie and @dots.
  949. stexi->shtml is now able to convert @i, @math, @tie and @dots to HTML.
  950. ** Define AT_SYMLINK_NOFOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH.
  951. AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH are now available
  952. from Scheme, if supported on the platform.
  953. ** Improvements to the 'time' macro from (ice-9 time).
  954. The 'time' macro now supports expressions that return multiple values.
  955. It has also been rewritten as a hygienic 'syntax-rules' macro.
  956. Previously, it was built using 'define-macro', and was therefore
  957. unhygienic. This is not merely an internal implementation detail, but
  958. is potentially relevant to any user of the 'time' macro, since it could
  959. lead to unintended variable capture and other problems.
  960. ** Clarify the documentation for 'nil?'.
  961. See commit b44f505f1571fc9c42e58982f161a9cfc81fb7f4.
  962. ** Clarify the manual's "Processes" section.
  963. See commit 8cdd3a0773930ca872a13aada7a1344f03bb382b.
  964. ** Avoid 'with-latin1-locale' in binary I/O tests.
  965. See commit 162a031e5f2c64cd23fcf069fb7b5071196f9527.
  966. ** Update user-visible copyright years.
  967. * Bug fixes
  968. ** Avoid regexp ranges in HTTP inter-protocol exploitation check.
  969. The regular expression used to check for HTTP inter-protocol
  970. exploitation attacks previously used a character range '0-9', whose
  971. meaning depends on the current locale. This has now been fixed.
  972. ** Fixes to the SRFI-19 time/date library.
  973. *** TAI-to-UTC conversion leaps at the wrong time.
  974. <https://bugs.gnu.org/21911>
  975. *** time-utc->date shows bogus zone-dependent leap second.
  976. <https://bugs.gnu.org/22034>
  977. *** Manual incorrectly describes Julian Date.
  978. <https://bugs.gnu.org/21902>
  979. *** date->string duff ISO 8601 negative years.
  980. <https://bugs.gnu.org/21903>
  981. *** date->string duff ISO 8601 format for non-4-digit years.
  982. <https://bugs.gnu.org/21904>
  983. *** julian-day->date negative input breakage.
  984. <https://bugs.gnu.org/21906>
  985. *** time-duration screws up negative durations.
  986. <https://bugs.gnu.org/26162>
  987. *** time-difference doesn't detect error of differing time types.
  988. <https://bugs.gnu.org/26163>
  989. ** Improve overflow checks in bytevector, string, and I/O operations.
  990. Several numerical computations, performed using primitive C arithmetic
  991. in Guile's core bytevector, string, and I/O operations, have been
  992. rewritten to avoid overflows.
  993. ** Fix type inferencing for 'nil?' and 'null?' predicates.
  994. Previously, the compiler would sometimes miscompile certain combinations
  995. of 'nil?' and 'null?' predicates present within the same top-level form.
  996. See <https://bugs.gnu.org/33036>.
  997. ** Fix 'atomic-box-compare-and-swap!'.
  998. Previously, 'atomic-box-compare-and-swap!' would sometimes spuriously
  999. fail on architectures based on Load-Linked/Store-Conditional (LL/SC)
  1000. synchronication primitives (e.g. ARM, PowerPC, and MIPS) in a way that
  1001. was undetectable by the caller. See <https://bugs.gnu.org/32786>.
  1002. ** Make URI handling locale independent.
  1003. Previously, procedures in (web uri) would misbehave in some locales
  1004. including sv_SE. See <https://bugs.gnu.org/35785>.
  1005. ** Strings, i18n: Limit the use of alloca to approximately 8 kilobytes.
  1006. Previously, 'string-locale-ci=?', 'string-locale-ci<?',
  1007. 'string-locale<?', 'string-locale-{downcase,upcase,titlecase}' and
  1008. 'string-normalize-{nfd,nfc,nfkd,nfkc}' would overflow the C stack when
  1009. applied to very large strings.
  1010. ** Fix documentation of R6RS 'binary-port?' to reflect reality.
  1011. Previously, the documentation incorrectly stated that 'binary-port?'
  1012. always returns #t. In fact, it returns #t if and only if the port
  1013. encoding is "ISO-8859-1". The documentation for 'binary-port?' and
  1014. 'textual-port?' has been rewritten to reflect the current reality, and
  1015. also to leave open the possibility of changing the behavior of these
  1016. predicates in a future version of Guile.
  1017. ** Avoid passing NULL to 'memcpy' and 'memcmp'.
  1018. Previously, NULL was sometimes passed to 'memcpy' or 'memcmp' when the
  1019. size argument was 0.
  1020. ** Save and restore errno in the signal handler.
  1021. Previously, Guile's synchronous C signal handler failed to save and
  1022. restore 'errno', although it might change its value. This could
  1023. potentially lead to spurious corruptions of 'errno' within threads
  1024. interrupted by signals.
  1025. ** scm_to_stringn: Avoid passing NULL to c_strcasecmp.
  1026. <https://lists.gnu.org/archive/html/guile-user/2019-05/msg00070.html>
  1027. ** r6rs-ports: Accept 'port-position' values greater than 2^32.
  1028. <https://bugs.gnu.org/32161>
  1029. ** r6rs-ports: 'put-bytevector' accepts 64-bit integers.
  1030. Fixed in commit 741c45458da0831a12a4f8d729814bf9f2cb6571.
  1031. ** Fix R6RS call-with-{input,output}-file to open textual ports.
  1032. <https://bugs.gnu.org/32329>
  1033. ** Update (ice-9 match) to include selected bug fixes from upstream.
  1034. *** ice-9/match named match-let is not working
  1035. <https://bugs.gnu.org/22925>
  1036. ** open-process: Fix dup(2) and execvp(2) error handling.
  1037. Fixed in commit 521f1ab4709217407496004019c00005d2a82f78.
  1038. ** bytevectors: Support large indices in integer accessors.
  1039. Fixed in commit b9cf3517efd4643670d970d2692bc7bede9a85e8.
  1040. ** bytevectors: Fix list validation of *list->bytevector procedures.
  1041. <https://bugs.gnu.org/32938>
  1042. ** Gracefully handle huge shift counts in 'ash' and 'round-ash'.
  1043. <https://bugs.gnu.org/32644>
  1044. ** In 'ash' and 'round-ash', handle right shift count of LONG_MIN.
  1045. <https://bugs.gnu.org/21901>
  1046. ** Use 'scm_from_utf8_{string,symbol,keyword}' for C string literals.
  1047. <https://bugs.gnu.org/33044>
  1048. ** web: Add support for HTTP header continuation lines.
  1049. Fixed in commit 73cde5ed7218a090ecee888870908af5445796f0.
  1050. ** scm_seed_to_random_state: Support wide string arguments.
  1051. <https://bugs.gnu.org/33044>
  1052. ** Do not warn the user when 'madvise' returns ENOSYS.
  1053. Fixed in commit 45e4ace6603e00b297e6542362273041aebe7305.
  1054. ** Add 'texinfo' as a dependency in the README.
  1055. Fixed in commit 1bbce71501198c3c7abdf07941f5cdc1434858c2.
  1056. ** Don't mutate read-only string in ports test.
  1057. Fixed in commit 552f007e91a97f136aad1b22918688b61d03a4a3.
  1058. ** Remove redefinition of when & unless in snarf-check-and-output-texi.
  1059. Fixed in commit 1ba5d6f47a54dceee4452a1e7726d2635e5b3449.
  1060. ** Fix strftime when Guile is built without threading support.
  1061. Fixed in commit 139c702fc8b61fdeb813c3428fef3701ea8677f9.
  1062. ** Avoid leaking a file descriptor in test-unwind.
  1063. Fixed in commit 1437b76777e576b3d000e2f80c5ecdb33a74ac33.
  1064. ** Fix binary output on files created by mkstemp!.
  1065. Fixed in commit 78468baa118d316050a27e43250966e52ffd3d54.
  1066. ** Fix crypt-on-glibc test error.
  1067. Fixed in commit 27ffbfb0235de466016ea5a6421508f6548971b6.
  1068. ** Fix race when expanding syntax-parameterize and define-syntax-parameter.
  1069. <https://bugs.gnu.org/27476#102>
  1070. ** Add a fallback value for the locale-monetary-decimal-point.
  1071. Fixed in commit 9ba449643d4c2ac1d2174befca7d765af222bcc0.
  1072. ** Handle newlib C library's langinfo constant names.
  1073. Fixed in commit 92105d13ad1363b511214589b7d62d95304beb17.
  1074. ** Make locale monetary conversion tests be less strict on terminal whitespace.
  1075. Fixed in commit 2a3ccfb66714efc1c081ea6e921336f80b756d3c.
  1076. ** Disable test for current value of setitimer on Cygwin.
  1077. Fixed in commit 3a64c504caaf83e9faf2ec9b7d0e031e1a6a09b9.
  1078. ** Fix gc.test "after-gc-hook gets called" failures.
  1079. <https://bugs.gnu.org/31776#17>
  1080. ** Update iconv.m4 from gnulib, to fix an iconv leak during configure.
  1081. <https://lists.gnu.org/archive/html/guile-devel/2019-05/msg00011.html>
  1082. ** guild compile: Add missing newline in "unrecognized option" error message.
  1083. Fixed in commit 85c5bae4fd94f8686d26fd792b7c0f588c23bd94.
  1084. ** 'basename' now correctly handles "/" and "//".
  1085. Fixed in commit 36ad1d24b3d2c174a64c445502a36f19605dbd65.
  1086. ** Make srfi-71 visible through 'cond-expand'.
  1087. Fixed in commit 59a06d8392234fbec8b3605cec266a7a0a7b7a56.
  1088. Changes in 2.2.4 (since 2.2.3):
  1089. * New interfaces and functionality
  1090. ** SRFI-71 (Extended LET-syntax for multiple values)
  1091. Guile now includes SRFI-71, which extends let, let*, and letrec to
  1092. support assigning multiple values. See "SRFI-71" in the manual for
  1093. details.
  1094. ** (web client) export 'http-request' procedure
  1095. The 'http-request' procedure is the generalized procedure underneath
  1096. 'http-get', 'http-post', etc.
  1097. ** GDB support now registers the 'guile-backtrace' GDB command
  1098. The 'guile-backtrace' GDB command displays a backtrace of the VM stack
  1099. for the current thread.
  1100. ** Recognize RISC-V compilation targets in (system base target)
  1101. * Bug fixes
  1102. ** Fix stack-marking bug affecting multi-threaded programs
  1103. (<https://bugs.gnu.org/28211>)
  1104. ** Add missing SYNC_IP calls in the VM
  1105. These could cause multi-threaded code to crash.
  1106. ** Fix multi-threaded access to modules
  1107. (<https://bugs.gnu.org/30602>, <https://bugs.gnu.org/31879>,
  1108. and <https://bugs.gnu.org/31878>)
  1109. ** (ice-9 match) now has better documentation
  1110. ** 'get-bytevector-n' and 'get-bytevector-n!' can now read more than 4 GB
  1111. ** Fix cross-compilation support for elisp
  1112. ** Fix error reporting in 'load-thunk-from-memory'
  1113. ** Fix GOOPS 'instance?' to work on objects that aren't structs
  1114. (<https://bugs.gnu.org/31606>)
  1115. ** Fix type inference for bitwise logical operators
  1116. (<https://bugs.gnu.org/31474>)
  1117. ** Avoid inexact arithmetic in the type inferrer for 'sqrt'
  1118. ** Fix floating point unboxing regression in 2.2.3
  1119. (<https://bugs.gnu.org/30020>)
  1120. ** Fix eta-conversion edge cases in peval (<https://bugs.gnu.org/29520>)
  1121. ** Correctly interpret SRFI-18 timeout parameters
  1122. (<https://bugs.gnu.org/29704>)
  1123. ** 'select' returns empty sets upon EINTR and EAGAIN
  1124. (<https://bugs.gnu.org/30368>)
  1125. ** Restore pre-2.2.3 '%fresh-auto-compile' behavior
  1126. This reverts an incorrect fix for <https://bugs.gnu.org/29226>.
  1127. Changes in 2.2.3 (since 2.2.2):
  1128. * New interfaces and functionality
  1129. ** (web uri) module has better support for RFC 3986
  1130. The URI standard, RFC 3986, defines additional "relative-ref" and
  1131. "URI-reference" data types. Thanks to Daniel Hartwig, Guile's support
  1132. for these URI subtypes has been improved. See "Universal Resource
  1133. Identifiers" in the manual, for more.
  1134. ** `struct-ref/unboxed' and `struct-set!/unboxed'
  1135. These procedures should be used when accessing struct fields with type
  1136. `u' (unboxed). See "Structure Basics" in the manual, for full details.
  1137. ** Improved support for arrays with non-zero lower bounds
  1138. Thanks to work by Daniel Llorens, Guile no longer exhibits buggy
  1139. behavior in "sort" or "sort!" on arrays with non-zero lower dimension
  1140. bounds. Arrays with non-zero lower dimension bounds are now allowed for
  1141. array-slice-for-each, and truncated-print now supports bitvectors and
  1142. arrays with non-zero lower bounds. General arrays are now supported as
  1143. well for random:hollow-sphere!.
  1144. ** Add `uintptr_t' and `intptr_t' to FFI types.
  1145. See "Foreign Types" in the manual for full details.
  1146. * Compiler improvements
  1147. ** Improve speed of compiler backend for functions without loops
  1148. This is a marginal speed improvement, especially for code compiled with
  1149. optimization level "-O1" or below.
  1150. ** Disable slot pre-coloring for optimization level "-O1" or below
  1151. This improves the speed of the compiler backend.
  1152. ** Improve complexity of constant subexpression elimination pass
  1153. This is a large speed improvement when compiling large files with the
  1154. default "-O2" pass.
  1155. ** CPS conversion avoids generating return arity adapters if possible
  1156. In Guile, the expression in (define a EXP) may return 1 or more values.
  1157. This value elision in "value" context is implicit earlier in the Guile
  1158. compiler, in Tree-IL, but is made explicit in the CPS middle-end
  1159. language by the addition of the equivalent of explicit call-with-values
  1160. continuations that ignore additional values. However in many cases we
  1161. can avoid generating these extra continuations if we know that EXP is
  1162. single-valued, as is the case for example for constants or variable
  1163. references or the like.
  1164. Although these "arity-adapting continuations" would be removed by dead
  1165. code elimination at optimization level "-O2" or above, they were still
  1166. being needlessly generated in the first place. Guile now avoids
  1167. generating them, speeding up not only the optimizer at -O2 but also the
  1168. entire compiler pipeline at -O1 or below, as well as improving the
  1169. residual code at -O1 or below.
  1170. * New deprecations
  1171. ** Using `uri?' as a predicate on relative-refs deprecated
  1172. If you don't care whether the URI is a relative-ref or not, use
  1173. `uri-reference?'. If you do, use `uri-reference?' and `relative-ref?'.
  1174. In the future `uri?' will return a true value only for URIs that specify
  1175. a scheme.
  1176. ** Struct tail arrays deprecated
  1177. Guile's structures used to have a facility whereby each instance of a
  1178. vtable can contain a variable-length tail array of values. The length
  1179. of the tail array was stored in the structure. This facility was
  1180. originally intended to allow C code to expose raw C structures with
  1181. word-sized tail arrays to Scheme.
  1182. However, the tail array facility was confusing and doesn't work very
  1183. well. It was very rarely used, but it insinuates itself into all
  1184. invocations of `make-struct'. For this reason the clumsily-named
  1185. `make-struct/no-tail' procedure can actually be more elegant in actual
  1186. use, because it doesn't have a random `0' argument stuck in the middle.
  1187. Tail arrays also inhibit optimization by allowing instances to affect
  1188. their shapes. In the absence of tail arrays, all instances of a given
  1189. vtable have the same number and kinds of fields. This uniformity can be
  1190. exploited by the runtime and the optimizer. The presence of tail arrays
  1191. make some of these optimizations more difficult.
  1192. Finally, the tail array facility is ad-hoc and does not compose with the
  1193. rest of Guile. If a Guile user wants an array with user-specified
  1194. length, it's best to use a vector. It is more clear in the code, and
  1195. the standard optimization techniques will do a good job with it.
  1196. For all of these reasons, tail arrays are deprecated in Guile 2.2 and
  1197. will be removed from Guile 3.0. Likewise, `make-struct' /
  1198. `scm_make_struct' is deprecated in favor of `make-struct/no-tail' /
  1199. `scm_make_struct_no_tail'. Perhaps one day we will be able to reclaim
  1200. the `make-struct' name!
  1201. ** Struct "self" slots deprecated
  1202. It used to be that you could make a structure vtable that had "self"
  1203. slots. Instances of that vtable would have those slots initialized to
  1204. the instance itself. This can be useful in C code where you might have
  1205. a pointer to the data array, and want to get the `SCM' handle for the
  1206. structure. However this was a little used complication without any use
  1207. in Scheme code. To replace it, just use "p" slots and initialize the
  1208. slot values manually on initialization.
  1209. ** Struct fields with opaque ("o") protection deprecated
  1210. Struct fields are declared with a "protection", meaning read-only ('r'),
  1211. read-write ('w'), or opaque ('o'). There is also "hidden" ('h') which
  1212. is read-write but which isn't initialized by arguments passed to
  1213. `make-struct/no-tail', but that's a detail. Opaque struct fields were
  1214. used to allocate storage in a struct that could only be accessed by C.
  1215. This facility was very rarely used (unused in Guile itself) but now that
  1216. we are implementing more and more in Scheme, it is completely useless.
  1217. To enforce permissions on struct fields, instead layer on an abstraction
  1218. at a higher level, in the same way that immutable record fields are
  1219. simply those which don't have an accessor.
  1220. ** Using `struct-ref' and `struct-set!' on unboxed fields is deprecated
  1221. Use the new `struct-ref/unboxed' and `struct-set!/unboxed' instead.
  1222. * Bug fixes
  1223. ** guile.m4 now checks for Guile 2.2 by default
  1224. Before, it was still preferring Guile 2.0. It now also supports the
  1225. Guile 3.0 prereleases.
  1226. ** Fix setting breakpoints from the REPL
  1227. ** Allow GDB support to be used with GDB linked against Guile 2.0.
  1228. ** Fix deadlock in `readdir' on error.
  1229. ** Fix crash on ia64 during thread switches.
  1230. ** Fix bug inferring range of `logand' computations with negative numbers
  1231. ** Fix bug when issuing HTTP requests through proxies.
  1232. ** Refactor weak hash table implementation to be more robust
  1233. Guile 2.2's weak hash table implementation had three big problems. The
  1234. first was a bug causing these tables to leak memory when they would be
  1235. resized. The second was that the implementation was designed so that
  1236. tables should be visited by the mark phase of the garbage collector in
  1237. one big piece. This could cause the garbage collector to see too many
  1238. newly marked objects at once, causing inefficies in garbage collection.
  1239. Finally, the way in which lost weak references were ultimately removed
  1240. from weak tables caused a race between the finalizer threads and the
  1241. mutator threads, leading to unbounded excess space retention in
  1242. pathological cases. All of this problems have been fixed.
  1243. ** Allow garbage collection of revealed file ports
  1244. Guile can mark a file port as "revealed" if Scheme has been given access
  1245. to the file descriptor. In that case, the file descriptor will not be
  1246. closed when the port is garbage-collected. However we had a bug that
  1247. for revealed ports prevented the port from ever being garbage-collected,
  1248. leading to memory leaks of Guile's internal port buffers. This is now
  1249. fixed.
  1250. ** Fix put-bytevector, unget-bytevector with start == bytevector length
  1251. ** Enable GNU Readline 7.0's support for "bracketed paste".
  1252. Before, when pasting an expression that contained TAB characters into
  1253. Guile's REPL with GNU Readline support enabled, the pasted TAB
  1254. characters would trigger autocompletion in Readline. This was never
  1255. what you wanted. Guile now sets the new "bracketed-paste" option in GNU
  1256. Readline 7.0 to on by default, making readline treat pastes into the
  1257. terminal as atomic units without control characters. See "Readline
  1258. Options" in the manual for full details.
  1259. ** Fix time-monotonic from SRFI-19; broken in 2.2.1.
  1260. Changes in 2.2.2 (since 2.2.1):
  1261. * Bug fixes
  1262. ** Syntax objects are once more comparable with 'equal?'
  1263. The syntax object change in 2.2.1 had the unintended effect of making
  1264. syntax objects no longer comparable with equal?. This release restores
  1265. the previous behavior.
  1266. ** Restore libgc dependency
  1267. The change to throw exceptions when mutating literal constants partly
  1268. relied on an interface that was added to our garbage collector (BDW-GC)
  1269. after its 7.2 release. Guile 2.2.2 adds a workaround to allow Guile to
  1270. continue be used with libgc as old as 7.2.
  1271. ** SRFI-37 bug fix to not error on empty-string arguments.
  1272. Thanks to Thomas Danckaert for fixing this long-standing bug.
  1273. Changes in 2.2.1 (since 2.2.0):
  1274. * Notable changes
  1275. ** New sandboxed evaluation facility
  1276. Guile now has a way to execute untrusted code in a safe way. See
  1277. "Sandboxed Evaluation" in the manual for full details, including some
  1278. important notes on limitations on the sandbox's ability to prevent
  1279. resource exhaustion.
  1280. ** All literal constants are read-only
  1281. According to the Scheme language definition, it is an error to attempt
  1282. to mutate a "constant literal". A constant literal is data that is a
  1283. literal quoted part of a program. For example, all of these are errors:
  1284. (set-car! '(1 . 2) 42)
  1285. (append! '(1 2 3) '(4 5 6))
  1286. (vector-set! '#(a b c) 1 'B)
  1287. Guile takes advantage of this provision of Scheme to deduplicate shared
  1288. structure in constant literals within a compilation unit, and to
  1289. allocate constant data directly in the compiled object file. If the
  1290. data needs no relocation at run-time, as is the case for pairs or
  1291. vectors that only contain immediate values, then the data can actually
  1292. be shared between different Guile processes, using the operating
  1293. system's virtual memory facilities.
  1294. However, in Guile 2.2.0, constants that needed relocation were actually
  1295. mutable -- though (vector-set! '#(a b c) 1 'B) was an error, Guile
  1296. wouldn't actually cause an exception to be raised, silently allowing the
  1297. mutation. This could affect future users of this constant, or indeed of
  1298. any constant in the compilation unit that shared structure with the
  1299. original vector.
  1300. Additionally, attempting to mutate constant literals mapped in the
  1301. read-only section of files would actually cause a segmentation fault, as
  1302. the operating system prohibits writes to read-only memory. "Don't do
  1303. that" isn't a very nice solution :)
  1304. Both of these problems have been fixed. Any attempt to mutate a
  1305. constant literal will now raise an exception, whether the constant needs
  1306. relocation or not.
  1307. ** Syntax objects are now a distinct type
  1308. It used to be that syntax objects were represented as a tagged vector.
  1309. These values could be forged by users to break scoping abstractions,
  1310. preventing the implementation of sandboxing facilities in Guile. We are
  1311. as embarrassed about the previous situation as we pleased are about the
  1312. fact that we've fixed it.
  1313. Unfortunately, during the 2.2 stable series (or at least during part of
  1314. it), we need to support files compiled with Guile 2.2.0. These files
  1315. may contain macros that contain legacy syntax object constants. See the
  1316. discussion of "allow-legacy-syntax-objects?" in "Syntax Transformer
  1317. Helpers" in the manual for full details.
  1318. * Bug fixes
  1319. *** Fix snarfing with -ggdb3 (#25803)
  1320. *** Fix spurious snarf warnings for net_db.c
  1321. *** Output statprof flat display to correct port
  1322. *** Document guile-2.2 cond-expand feature
  1323. *** Add --with-bdw-gc for BSDs that use bdw-gc-threaded (see README)
  1324. *** Documentation typo fixes (#26188)
  1325. *** Fix SRFI-9 date->string bugs with ~N and ~F (#26261, #26260, #26259)
  1326. *** SRFI-19 current-time-monotonic returns time of right type (#26329)
  1327. *** Avoid causing GC when looking up exception handler
  1328. *** Increment objcode version, in a compatible way
  1329. *** Fix compile warning in (system base types)
  1330. *** Only run tests that require fork if it is provided
  1331. *** Speed up procedure-minimum-arity for fixed arity
  1332. *** REPL server tests catch ECONNABORTED
  1333. *** Avoid deprecated argument to setvbuf in (web client)
  1334. *** Remove non-existent 'open-connection-for-uri' export from (web client)
  1335. Changes in 2.2.0 (changes since the 2.0.x stable release series):
  1336. * Notable changes
  1337. ** Speed
  1338. The biggest change in Guile 2.2 is a complete rewrite of its virtual
  1339. machine and compiler internals. The result is faster startup time,
  1340. better memory usage, and faster execution of user code. See the
  1341. "Performance improvements" section below for more details.
  1342. ** Better thread-safety
  1343. This new release series takes the ABI-break opportunity to fix some
  1344. interfaces that were difficult to use correctly from multiple threads.
  1345. Notably, weak hash tables and ports are now transparently thread-safe.
  1346. See "Scheduling" in the manual, for updated documentation on threads and
  1347. communications primitives.
  1348. ** Better space-safety
  1349. It used to be the case that, when calling a Scheme procedure, the
  1350. procedure and arguments were always preserved against garbage
  1351. collection. This is no longer the case; Guile is free to collect the
  1352. procedure and arguments if they become unreachable, or to re-use their
  1353. slots for other local variables. Guile still offers good-quality
  1354. backtraces by determining the procedure being called from the
  1355. instruction pointer instead of from the value in slot 0 of an
  1356. application frame, and by using a live variable map that allows the
  1357. debugger to know which locals are live at all points in a frame.
  1358. ** Off-main-thread finalization
  1359. Following Guile 2.0.6's change to invoke finalizers via asyncs, Guile
  1360. 2.2 takes the additional step of invoking finalizers from a dedicated
  1361. finalizer thread, if threads are enabled. This avoids concurrency
  1362. issues between finalizers and application code, and also speeds up
  1363. finalization. If your application's finalizers are not robust to the
  1364. presence of threads, see "Foreign Objects" in the manual for information
  1365. on how to disable automatic finalization and instead run finalizers
  1366. manually.
  1367. ** Better locale support in Guile scripts
  1368. When Guile is invoked directly, either from the command line or via a
  1369. hash-bang line (e.g. "#!/usr/bin/guile"), it now installs the current
  1370. locale via a call to `(setlocale LC_ALL "")'. For users with a unicode
  1371. locale, this makes all ports unicode-capable by default, without the
  1372. need to call `setlocale' in your program. This behavior may be
  1373. controlled via the GUILE_INSTALL_LOCALE environment variable; see
  1374. "Environment Variables" in the manual, for more.
  1375. ** Complete Emacs-compatible Elisp implementation
  1376. Thanks to the work of Robin Templeton, Guile's Elisp implementation is
  1377. now fully Emacs-compatible, implementing all of Elisp's features and
  1378. quirks in the same way as the editor we know and love.
  1379. ** Dynamically expandable stacks
  1380. Instead of allocating fixed stack sizes for running Scheme code, Guile
  1381. now starts off each thread with only one page of stack, and expands and
  1382. shrinks it dynamically as needed. Guile will throw an exception for
  1383. stack overflows if growing the stack fails. It is also possible to
  1384. impose a stack limit during the extent of a function call. See "Stack
  1385. Overflow" in the manual, for more.
  1386. This change allows users to write programs that use the stack as a data
  1387. structure for pending computations, as it was meant to be, without
  1388. reifying that data out to the heap. Where you would previously make a
  1389. loop that collect its results in reverse order only to re-reverse them
  1390. at the end, now you can just recurse without worrying about stack
  1391. overflows.
  1392. Using the stack also allows more code to be continuation-safe. For
  1393. example, returning multiple times from a `map' procedure in Guile 2.0
  1394. would change the value of previously returned result lists, because
  1395. `map' built its result list in reverse order then used `reverse!' to
  1396. return the proper result. Now in Guile 2.2, `map' is implemented using
  1397. straightforward recursion, which eliminates this bug while maintaining
  1398. good performance as well as good space complexity.
  1399. ** Out-of-memory improvements
  1400. Instead of aborting, failures to allocate memory will now raise an
  1401. unwind-only `out-of-memory' exception, and cause the corresponding
  1402. `catch' expression to run garbage collection in order to free up memory.
  1403. ** GOOPS core reimplemented in Scheme
  1404. Guile's object orientation system, GOOPS, has been mostly reimplemented
  1405. in Scheme. This decreases its maintenance burden on the rest of Guile,
  1406. while also makes it possible to implement new features in the future,
  1407. such as method combinations or `eqv?' specializers.
  1408. ** Better handling of GUILE_LOAD_COMPILED_PATH
  1409. It used to be that Guile would stop at the first .go file it found in
  1410. the GUILE_LOAD_COMPILED_PATH. If that file turned out to be out of
  1411. date, then no .go file would be loaded. Now Guile will continue to
  1412. search the path for a file which is both present and up-to-date, with
  1413. respect to the .scm file.
  1414. ** C99 required
  1415. Following Emacs, you must use a C99-capable compiler when building
  1416. Guile. In the future we also expect require C99 to use Guile's C
  1417. interface, at least for `stdint' support.
  1418. ** Lightweight pre-emptive threading primitives
  1419. The compiler now inserts special "handle-interrupts" opcodes before each
  1420. call, return, and backwards jump target. This allows the user to
  1421. interrupt any computation and to accurately profile code using
  1422. interrupts. It used to be that interrupts were run by calling a C
  1423. function from the VM; now interrupt thunks are run directly from the VM.
  1424. This allows interrupts to save a delimited continuation and, if the
  1425. continuation was established from the same VM invocation (the usual
  1426. restriction), that continuation can then be resumed. In this way users
  1427. can implement lightweight pre-emptive threading facilities.
  1428. ** with-dynamic-state in VM
  1429. Similarly, `with-dynamic-state' no longer recurses out of the VM,
  1430. allowing captured delimited continuations that include a
  1431. `with-dynamic-state' invocation to be resumed. This is a precondition
  1432. to allow lightweight threading libraries to establish a dynamic state
  1433. per lightweight fiber.
  1434. * Performance improvements
  1435. ** Faster programs via new virtual machine
  1436. Guile now compiles programs to instructions for a new virtual machine.
  1437. The new virtual machine's instructions can address their source and
  1438. destination operands by "name" (slot). This makes access to named
  1439. temporary values much faster than in Guile 2.0, and removes a lot of
  1440. value-shuffling that the old virtual machine had to do. The end result
  1441. is that loop-heavy code can be two or three times as fast with Guile 2.2
  1442. as in 2.0. Your mileage may vary, of course; see "A Virtual Machine for
  1443. Guile" in the manual for the nitties and the gritties.
  1444. ** Better startup time, memory usage with ELF object file format
  1445. Guile now uses the standard ELF format for its compiled code. (Guile
  1446. has its own loader and linker, so this does not imply a dependency on
  1447. any particular platform's ELF toolchain.) The benefit is that Guile is
  1448. now able to statically allocate more data in the object files. ELF also
  1449. enables more sharing of data between processes, and decreases startup
  1450. time (about 40% faster than the already fast startup of the Guile 2.0
  1451. series). Guile also uses DWARF for some of its debugging information.
  1452. Much of the debugging information can be stripped from the object files
  1453. as well. See "Object File Format" in the manual, for full details.
  1454. ** Better optimizations via compiler rewrite
  1455. Guile's compiler now uses a Continuation-Passing Style (CPS)
  1456. intermediate language, allowing it to reason easily about temporary
  1457. values and control flow. Examples of optimizations that this permits
  1458. are optimal contification, optimal common subexpression elimination,
  1459. dead code elimination, loop-invariant code motion, loop peeling, loop
  1460. inversion, parallel moves with at most one temporary, allocation of
  1461. stack slots using precise liveness information, unboxing of 64-bit
  1462. integers and floating point values, and closure optimization. For more,
  1463. see "Continuation-Passing Style" in the manual.
  1464. ** Faster interpreter
  1465. Combined with a number of optimizations to the interpreter itself,
  1466. simply compiling `eval.scm' with the new compiler yields an interpreter
  1467. that is consistently two or three times faster than the one in Guile
  1468. 2.0.
  1469. ** Allocation-free dynamic stack
  1470. Guile now implements the dynamic stack with an actual stack instead of a
  1471. list of heap objects, avoiding most allocation. This speeds up prompts,
  1472. the `scm_dynwind_*' family of functions, fluids, and `dynamic-wind'.
  1473. ** Optimized UTF-8 and Latin-1 ports, symbols, and strings
  1474. Guile 2.2 is faster at reading and writing UTF-8 and Latin-1 strings
  1475. from ports, and at converting symbols and strings to and from these
  1476. encodings.
  1477. ** Optimized hash functions
  1478. Guile 2.2 now uses Bob Jenkins' `hashword2' (from his `lookup3.c') for
  1479. its string hash, and Thomas Wang's integer hash function for `hashq' and
  1480. `hashv'. These functions produce much better hash values across all
  1481. available fixnum bits.
  1482. ** Optimized generic array facility
  1483. Thanks to work by Daniel Llorens, the generic array facility is much
  1484. faster now, as it is internally better able to dispatch on the type of
  1485. the underlying backing store.
  1486. ** All ports are now buffered, can be targets of `setvbuf'
  1487. See "Buffering" in the manual, for more. A port with a buffer size of 1
  1488. is equivalent to an unbuffered port. Ports may set their default buffer
  1489. sizes, and some ports (for example soft ports) are unbuffered by default
  1490. for historical reasons.
  1491. ** Mutexes are now faster under contention
  1492. Guile implements its own mutexes, so that threads that are trying to
  1493. acquire a mutex can be interrupted. These mutexes used to be quite
  1494. inefficient when many threads were trying to acquire them, causing many
  1495. spurious wakeups and contention. This has been fixed.
  1496. * New interfaces
  1497. ** New `cond-expand' feature: `guile-2.2'
  1498. Use this feature if you need to check for Guile 2.2 from Scheme code.
  1499. ** New predicate: `nil?'
  1500. See "Nil" in the manual.
  1501. ** New compiler modules
  1502. Since the compiler was rewritten, there are new modules for the back-end
  1503. of the compiler and the low-level loader and introspection interfaces.
  1504. See the "Guile Implementation" chapter in the manual for all details.
  1505. ** Add "tree" display mode for statprof.
  1506. See the newly updated "Statprof" section of the manual, for more.
  1507. ** Support for non-blocking I/O
  1508. See "Non-Blocking I/O" in the manual, for more.
  1509. ** Implement R6RS custom binary input/output ports
  1510. See "Custom Ports" in the manual.
  1511. ** Implement R6RS output-buffer-mode
  1512. ** Implement R6RS bytevector->string, string->bytevector
  1513. See "R6RS Transcoders" in the manual.
  1514. ** `accept' now takes optional flags argument
  1515. These flags can include `SOCK_NONBLOCK' and `SOCK_CLOEXEC', indicating
  1516. options to apply to the returned socket, potentially removing the need
  1517. for additional system calls to set these options. See "Network Sockets
  1518. and Communication" in the manual, for more.
  1519. ** Thread-safe atomic boxes (references)
  1520. See "Atomics" in the manual.
  1521. ** Thread-local fluids
  1522. Guile now has support for fluids whose values are not captured by
  1523. `current-dynamic-state' and not inheritied by child threads, and thus
  1524. are local to the kernel thread they run on. See "Thread-Local
  1525. Variables" in the manual, for more.
  1526. ** suspendable-continuation?
  1527. This predicate returns true if the delimited continuation captured by
  1528. aborting to a prompt would be able to be resumed. See "Prompt
  1529. Primitives" in the manual for more.
  1530. ** scm_c_prepare_to_wait_on_fd, scm_c_prepare_to_wait_on_cond,
  1531. ** scm_c_wait_finished
  1532. See "Asyncs" in the manual for more.
  1533. ** File descriptor finalizers
  1534. See "Ports and File Descriptors" in the manual.
  1535. ** New inline functions: `scm_new_smob', `scm_new_double_smob'
  1536. These can replace many uses of SCM_NEWSMOB, SCM_RETURN_NEWSMOB2, and the
  1537. like. See XXX in the manual, for more.
  1538. ** New low-level type accessors
  1539. For more on `SCM_HAS_TYP7', `SCM_HAS_TYP7S', `SCM_HAS_TYP16', see XXX.
  1540. `SCM_HEAP_OBJECT_P' is now an alias for the inscrutable `SCM_NIMP'.
  1541. `SCM_UNPACK_POINTER' and `SCM_PACK_POINTER' are better-named versions of
  1542. the old `SCM2PTR' and `PTR2SCM'. Also, `SCM_UNPACK_POINTER' yields a
  1543. void*.
  1544. ** `TCP_NODELAY' and `TCP_CORK' socket options, if provided by the system
  1545. ** `scm_c_put_latin1_chars', `scm_c_put_utf32_chars'
  1546. Use these instead of `scm_lfwrite'. See the new "Using Ports from C"
  1547. section of the manual, for more.
  1548. ** <standard-vtable>, standard-vtable-fields
  1549. See "Structures" in the manual for more on these.
  1550. ** Convenience utilities for ports and strings.
  1551. See "Conversion to/from C" for more on `scm_from_port_string',
  1552. `scm_from_port_stringn', `scm_to_port_string', and
  1553. `scm_to_port_stringn'.
  1554. ** New expressive PEG parser
  1555. See "PEG Parsing" in the manual for more. Thanks to Michael Lucy for
  1556. originally writing these, and to Noah Lavine for integration work.
  1557. ** `make-stack' now also works on delimited continuations
  1558. ** Better URI-reference support
  1559. The `(web uri)' module now has interfaces for handling URI references,
  1560. which might not have a scheme. The Location header of a web request or
  1561. response is now a URI reference instead of a URI. Also,
  1562. `request-absolute-uri' now has an optional default scheme argument. See
  1563. "Web" in the manual for full details.
  1564. ** formal-name->char, char->formal-name
  1565. See "Characters", in the manual.
  1566. * Incompatible changes
  1567. ** ASCII is not ISO-8859-1
  1568. In Guile 2.0, if a user set "ASCII" or "ANSI_X3.4-1968" as the encoding
  1569. of a port, Guile would treat it as ISO-8859-1. While these encodings
  1570. are the same for codepoints 0 to 127, ASCII does not extend past that
  1571. range, whereas ISO-8859-1 goes up to 255. Guile 2.2 no longer treats
  1572. ASCII as ISO-8859-1. This is likely to be a problem only if the user's
  1573. locale is set to ASCII, and the user or a program writes non-ASCII
  1574. codepoints to a port.
  1575. ** Decoding errors do not advance the read pointer before erroring
  1576. When the user sets a port's conversion strategy to "error", indicating
  1577. that Guile should throw an error if it tries to read from a port whose
  1578. incoming bytes are not valid for the port's encoding, it used to be that
  1579. Guile would advance the read pointer past the bad bytes, and then throw
  1580. an error. This would allow the following `read-char' invocation to
  1581. proceed after the bad bytes. This behavior is incompatible with the
  1582. final R6RS standard, and besides contravenes the user's intention to
  1583. raise an error on bad input. Guile now raises an error without
  1584. advancing the read pointer. To skip over a bad encoding, set the port
  1585. conversion strategy to "substitute" and read a substitute character.
  1586. ** Decoding errors with `substitute' strategy return U+FFFD
  1587. It used to be that decoding errors with the `substitute' conversion
  1588. strategy would replace the bad bytes with a `?' character. This has
  1589. been changed to use the standard U+FFFD REPLACEMENT CHARACTER, in
  1590. accordance with the Unicode recommendations.
  1591. ** API to define new port types from C has changed
  1592. Guile's ports have been completely overhauled to allow Guile developers
  1593. and eventually Guile users to write low-level input and output routines
  1594. in Scheme. The new internals will eventually allow for user-space
  1595. tasklets or green threads that suspend to a scheduler when they would
  1596. cause blocking I/O, allowing users to write straightforward network
  1597. services that parse their input and send their output as if it were
  1598. blocking, while under the hood Guile can multiplex many active
  1599. connections at once.
  1600. At the same time, this change makes Guile's ports implementation much
  1601. more maintainable, rationalizing the many legacy port internals and
  1602. making sure that the abstractions between the user, Guile's core ports
  1603. facility, and the port implementations result in a system that is as
  1604. performant and expressive as possible.
  1605. The interface to the user has no significant change, neither on the C
  1606. side nor on the Scheme side. However this refactoring has changed the
  1607. interface to the port implementor in an incompatible way. See the newly
  1608. expanded "I/O Extensions" in the manual, for full details.
  1609. *** Remove `scm_set_port_mark'
  1610. Port mark functions have not been called since the switch to the BDW
  1611. garbage collector.
  1612. *** Remove `scm_set_port_equalp'
  1613. Likewise port equal functions weren't being called. Given that ports
  1614. have their own internal buffers, it doesn't make sense to hook them into
  1615. equal? anyway.
  1616. *** Remove `scm_set_port_free'
  1617. It used to be that if an open port became unreachable, a special "free"
  1618. function would be called instead of the "close" function. Now that the
  1619. BDW-GC collector allows us to run arbitrary code in finalizers, we can
  1620. simplify to just call "close" on the port and remove the separate free
  1621. functions. Note that hooking into the garbage collector has some
  1622. overhead. For that reason Guile exposes a new interface,
  1623. `scm_set_port_needs_close_on_gc', allowing port implementations to
  1624. indicate to Guile whether they need closing on GC or not.
  1625. *** Remove `scm_set_port_end_input', `scm_set_port_flush'
  1626. As buffering is handled by Guile itself, these functions which were to
  1627. manage an implementation-side buffer are no longer needed.
  1628. *** Change prototype of `scm_make_port_type'
  1629. The `read' (renamed from `fill_input') and `write' functions now operate
  1630. on bytevectors. Also the `mode_bits' argument now inplicitly includes
  1631. SCM_OPN, so you don't need to include these.
  1632. *** Change prototype of port `close' function
  1633. The port close function now returns void.
  1634. *** Port and port type data structures are now opaque
  1635. Port type implementations should now use API to access port state.
  1636. However, since the change to handle port buffering centrally, port type
  1637. implementations rarely need to access unrelated port state.
  1638. *** Port types are now `scm_t_port_type*', not a tc16 value
  1639. `scm_make_port_type' now returns an opaque pointer, not a tc16.
  1640. Relatedly, the limitation that there only be 256 port types has been
  1641. lifted.
  1642. ** String ports default to UTF-8
  1643. Guile 2.0 would use the `%default-port-encoding' when creating string
  1644. ports. This resulted in ports that could only accept a subset of valid
  1645. characters, which was surprising to users. Now string ports default to
  1646. the UTF-8 encoding. Sneaky users can still play encoding conversion
  1647. games with string ports by explicitly setting the encoding of a port
  1648. after it is open. See "Ports" in the manual for more.
  1649. ** `scm_from_stringn' and `scm_to_stringn' encoding arguments are never NULL
  1650. These functions now require a valid `encoding' argument, and will abort
  1651. if given `NULL'.
  1652. ** All r6rs ports are both textual and binary
  1653. Because R6RS ports are a thin layer on top of Guile's ports, and Guile's
  1654. ports are both textual and binary, Guile's R6RS ports are also both
  1655. textual and binary, and thus both kinds have port transcoders. This is
  1656. an incompatibility with respect to R6RS.
  1657. ** Threading facilities moved to (ice-9 threads)
  1658. It used to be that call-with-new-thread and other threading primitives
  1659. were available in the default environment. This is no longer the case;
  1660. they have been moved to (ice-9 threads) instead. Existing code will not
  1661. break, however; we used the deprecation facility to signal a warning
  1662. message while also providing these bindings in the root environment for
  1663. the duration of the 2.2 series.
  1664. ** cancel-thread uses asynchronous interrupts, not pthread_cancel
  1665. See "Asyncs" in the manual, for more on asynchronous interrupts.
  1666. ** SRFI-18 threads, mutexes, cond vars disjoint from Guile
  1667. When we added support for the SRFI-18 threading library in Guile 2.0, we
  1668. did so in a way that made SRFI-18 mutexes the same as Guile mutexes.
  1669. This was a mistake. In Guile our goal is to provide basic,
  1670. well-thought-out, well-implemented, minimal primitives, on top of which
  1671. we can build a variety of opinionated frameworks. Incorporating SRFI-18
  1672. functionality into core Guile caused us to bloat and slow down our core
  1673. threading primitives. Worse, they became very hard to describe; they
  1674. did many things, did them poorly, and all that they did was never
  1675. adequately specified.
  1676. For all of these reasons we have returned to a situation where SRFI-18
  1677. concepts are implemented only in the `(srfi srfi-18)' module. This
  1678. means that SRFI-18 threads are built on Guile threads, but aren't the
  1679. same as Guile threads; calling Guile `thread?' on a thread no longer
  1680. returns true.
  1681. We realize this causes inconvenience to users who use both Guile
  1682. threading interfaces and SRFI-18 interfaces, and we lament the change --
  1683. but we are better off now. We hope the newly revised "Scheduling"
  1684. section in the manual compensates for the headache.
  1685. ** Remove `lock-mutex' "owner" argument
  1686. Mutex owners are a SRFI-18 concept; use SRFI-18 mutexes instead.
  1687. Relatedly, `scm_lock_mutex_timed' taking the owner argument is now
  1688. deprecated; use `scm_timed_lock_mutex' instead.
  1689. ** Remove `unlock-mutex' cond var and timeout arguments
  1690. It used to be that `unlock-mutex' included `wait-condition-variable'
  1691. functionality. This has been deprecated; use SRFI-18 if you want this
  1692. behavior from `mutex-unlock!'. Relatedly, `scm_unlock_mutex_timed' is
  1693. deprecated; use `scm_unlock_mutex' instead.
  1694. ** Removed `unchecked-unlock' mutex flag
  1695. This flag was introduced for internal use by SRFI-18; use SRFI-18
  1696. mutexes if you need this behaviour.
  1697. ** SRFI-18 mutexes no longer recursive
  1698. Contrary to specification, SRFI-18 mutexes in Guile were recursive.
  1699. This is no longer the case.
  1700. ** Thread cleanup handlers removed
  1701. The `set-thread-cleanup!' and `thread-cleanup' functions that were added
  1702. in Guile 2.0 to support cleanup after thread cancellation are no longer
  1703. needed, since threads can declare cleanup handlers via `dynamic-wind'.
  1704. ** Only threads created by Guile are joinable
  1705. `join-thread' used to work on "foreign" threads that were not created by
  1706. Guile itself, though their join value was always `#f'. This is no
  1707. longer the case; attempting to join a foreign thread will throw an
  1708. error.
  1709. ** Dynamic states capture values, not locations
  1710. Dynamic states used to capture the locations of fluid-value
  1711. associations. Capturing the current dynamic state then setting a fluid
  1712. would result in a mutation of that captured state. Now capturing a
  1713. dynamic state simply captures the current values, and calling
  1714. `with-dynamic-state' copies those values into the Guile virtual machine
  1715. instead of aliasing them in a way that could allow them to be mutated in
  1716. place. This change allows Guile's fluid variables to be thread-safe.
  1717. To capture the locations of a dynamic state, capture a
  1718. `with-dynamic-state' invocation using partial continuations instead.
  1719. ** Remove `frame-procedure'
  1720. Several optimizations in Guile make `frame-procedure' an interface that
  1721. we can no longer support. For background, `frame-procedure' used to
  1722. return the value at slot 0 in a frame, which usually corresponds to the
  1723. SCM value of the procedure being applied. However it could be that this
  1724. slot is re-used for some other value, because the closure was not needed
  1725. in the function. Such a re-use might even be for an untagged value, in
  1726. which case treating slot 0 as a SCM value is quite dangerous. It's also
  1727. possible that so-called "well-known" closures (closures whose callers
  1728. are all known) are optimized in such a way that slot 0 is not a
  1729. procedure but some optimized representation of the procedure's free
  1730. variables. Instead, developers building debugging tools that would like
  1731. access to `frame-procedure' are invited to look at the source for the
  1732. `(system vm frame)' module for alternate interfaces, including the new
  1733. `frame-procedure-name'.
  1734. ** Remove `,procedure' REPL command
  1735. Not all procedures have values, so it doesn't make sense to expose this
  1736. interface to the user. Instead, the `,locals' REPL command will include
  1737. the callee, if it is live.
  1738. ** Remove `frame-local-ref', `frame-local-set!', `frame-num-locals'
  1739. These procedures reference values in a frame on the stack. Since we now
  1740. have unboxed values of different kinds, it is now necessary to specify
  1741. the type when reference locals, and once this incompatible change needs
  1742. to be made, we might as well make these interfaces private. See
  1743. "Frames' in the manual, for more information on the replacements for
  1744. these low-level interfaces.
  1745. ** Vtable hierarchy changes
  1746. In an attempt to make Guile's structure and record types integrate
  1747. better with GOOPS by unifying the vtable hierarchy, `make-vtable-vtable'
  1748. is now deprecated. Instead, users should just use `make-vtable' with
  1749. appropriate arguments. See "Structures" in the manual for all of the
  1750. details. As such, `record-type-vtable' and `%condition-type-vtable' now
  1751. have a parent vtable and are no longer roots of the vtable hierarchy.
  1752. ** Syntax parameters are a distinct type
  1753. Guile 2.0's transitional implementation of `syntax-parameterize' was
  1754. based on the `fluid-let-syntax' interface inherited from the psyntax
  1755. expander. This interface allowed any binding to be dynamically rebound
  1756. -- even bindings like `lambda'. This is no longer the case in Guile
  1757. 2.2. Syntax parameters must be defined via `define-syntax-parameter',
  1758. and only such bindings may be parameterized. See "Syntax Parameters" in
  1759. the manual for more.
  1760. ** Defined identifiers scoped in the current module
  1761. Sometimes Guile's expander would attach incorrect module scoping
  1762. information for top-level bindings made by an expansion. For example,
  1763. given the following R6RS library:
  1764. (library (defconst)
  1765. (export defconst)
  1766. (import (guile))
  1767. (define-syntax-rule (defconst name val)
  1768. (begin
  1769. (define t val)
  1770. (define-syntax-rule (name) t))))
  1771. Attempting to use it would produce an error:
  1772. (import (defconst))
  1773. (defconst foo 42)
  1774. (foo)
  1775. =| Unbound variable: t
  1776. It wasn't clear that we could fix this in Guile 2.0 without breaking
  1777. someone's delicate macros, so the fix is only coming out now.
  1778. ** Pseudo-hygienically rename macro-introduced bindings
  1779. Bindings introduced by macros, like `t' in the `defconst' example above,
  1780. are now given pseudo-fresh names. This allows
  1781. (defconst foo 42)
  1782. (defconst bar 37)
  1783. to introduce different bindings for `t'. These pseudo-fresh names are
  1784. made in such a way that if the macro is expanded again, for example as
  1785. part of a simple recompilation, the introduced identifiers get the same
  1786. pseudo-fresh names. See "Hygiene and the Top-Level" in the manual, for
  1787. details.
  1788. ** Fix literal matching for module-bound literals
  1789. `syntax-rules' and `syntax-case' macros can take a set of "literals":
  1790. bound or unbound keywords that the syntax matcher treats specially.
  1791. Before, literals were always matched symbolically (by name). Now they
  1792. are matched by binding. This allows literals to be reliably bound to
  1793. values, renamed by imports or exports, et cetera. See "Syntax-rules
  1794. Macros" in the manual for more on literals.
  1795. ** Fix bug importing specific bindings with #:select
  1796. It used to be that if #:select didn't find a binding in the public
  1797. interface of a module, it would actually grovel in the module's
  1798. unexported private bindings. This was not intended and is now fixed.
  1799. ** Statically scoped module duplicate handlers
  1800. It used to be that if a module did not specify a #:duplicates handler,
  1801. when a name was first referenced in that module and multiple imported
  1802. modules provide that name, the value of the
  1803. `default-duplicate-binding-handlers' parameter would be used to resolve
  1804. the duplicate bindings. We have changed so that instead a module
  1805. defaults to the set of handlers described in the manual. If the module
  1806. specifies #:duplicates, of course we use that. The
  1807. `default-duplicate-binding-handlers' parameter now simply accesses the
  1808. handlers of the current module, instead of some global value.
  1809. ** Fix too-broad capture of dynamic stack by delimited continuations
  1810. Guile was using explicit stacks to represent, for example, the chain of
  1811. current exception handlers. This means that a delimited continuation
  1812. that captured a "catch" expression would capture the whole stack of
  1813. exception handlers, not just the exception handler added by the "catch".
  1814. This led to strangeness when resuming the continuation in some other
  1815. context like other threads; "throw" could see an invalid stack of
  1816. exception handlers. This has been fixed by the addition of the new
  1817. "fluid-ref*" procedure that can access older values of fluids; in this
  1818. way the exception handler stack is now implicit. See "Fluids and
  1819. Dynamic States" in the manual, for more on fluid-ref*.
  1820. ** `dynamic-wind' doesn't check that guards are thunks
  1821. Checking that the dynamic-wind out-guard procedure was actually a thunk
  1822. before doing the wind was slow, unreliable, and not strictly needed.
  1823. ** All deprecated code removed
  1824. All code deprecated in Guile 2.0 has been removed. See older NEWS, and
  1825. check that your programs can compile without linker warnings and run
  1826. without runtime warnings. See "Deprecation" in the manual.
  1827. In particular, the following functions, which were deprecated in 2.0.10
  1828. but not specifically mentioned earlier in this file, have been removed:
  1829. *** `uniform-vector-read!' and `uniform-vector-write' have been
  1830. removed. Use `get-bytevector-n!' and `put-bytevector' from (rnrs io
  1831. ports) instead.
  1832. ** Remove miscellaneous unused interfaces
  1833. We have removed accidentally public, undocumented interfaces that we
  1834. think are not used, and not useful. This includes `scm_markstream',
  1835. `SCM_FLUSH_REGISTER_WINDOWS', `SCM_THREAD_SWITCHING_CODE', `SCM_FENCE',
  1836. `scm_call_generic_0', `scm_call_generic_1', `scm_call_generic_2'
  1837. `scm_call_generic_3', `scm_apply_generic', and `scm_program_source'.
  1838. `scm_async_click' was renamed to `scm_async_tick', and `SCM_ASYNC_TICK'
  1839. was made private (use `SCM_TICK' instead).
  1840. ** Many internal compiler / VM changes
  1841. As the compiler and virtual machine were re-written, there are many
  1842. changes in the back-end of Guile to interfaces that were introduced in
  1843. Guile 2.0. These changes are only only of interest if you wrote a
  1844. language on Guile 2.0 or a tool using Guile 2.0 internals. If this is
  1845. the case, drop by the IRC channel to discuss the changes.
  1846. ** Defining a SMOB or port type no longer mucks exports of `(oop goops)'
  1847. It used to be that defining a SMOB or port type added an export to
  1848. GOOPS, for the wrapper class of the smob type. This violated
  1849. modularity, though, so we have removed this behavior.
  1850. ** Bytecode replaces objcode as a target language
  1851. One way in which people may have used details of Guile's runtime in
  1852. Guile 2.0 is in compiling code to thunks for later invocation. Instead
  1853. of compiling to objcode and then calling `make-program', now the way to
  1854. do it is to compile to `bytecode' and then call `load-thunk-from-memory'
  1855. from `(system vm loader)'.
  1856. ** Weak pairs removed
  1857. Weak pairs were not safe to access with `car' and `cdr', and so were
  1858. removed.
  1859. ** Weak alist vectors removed
  1860. Use weak hash tables instead.
  1861. ** Weak vectors may no longer be accessed via `vector-ref' et al
  1862. Weak vectors may no longer be accessed with the vector interface. This
  1863. was a source of bugs in the 2.0 Guile implementation, and a limitation
  1864. on using vectors as building blocks for other abstractions. Vectors in
  1865. Guile are now a concrete type; for an abstract interface, use the
  1866. generic array facility (`array-ref' et al).
  1867. ** scm_t_array_implementation removed
  1868. This interface was introduced in 2.0 but never documented. It was a
  1869. failed attempt to layer the array implementation that actually
  1870. introduced too many layers, as it prevented the "vref" and "vset"
  1871. members of scm_t_array_handle (called "ref" and "set" in 1.8, not
  1872. present in 2.0) from specializing on array backing stores.
  1873. Notably, the definition of scm_t_array_handle has now changed, to not
  1874. include the (undocumented) "impl" member. We are sorry for any
  1875. inconvenience this may cause.
  1876. ** `scm_make' is now equivalent to Scheme `make'
  1877. It used to be that `scm_make' only implemented a hard-wired object
  1878. allocation and initialization protocol. This was because `scm_make' was
  1879. used while GOOPS booted its own, more complete `make' implementation in
  1880. Scheme. Now that we've re-implemented everything in Scheme, the C
  1881. `scm_make' now dispatches directly to Scheme `make', which implements
  1882. the full protocol. This change is incompatible in some ways, but on the
  1883. whole is good news for GOOPS users.
  1884. ** GOOPS slot definitions are now objects
  1885. Slot definitions are now instances of a <slot> class, instead of being
  1886. specially formatted lists. To most user code, this is transparent, as
  1887. the slot definition accessors like `slot-definition-name' continue to
  1888. work. However, code that for example uses `car' to get the name of a
  1889. slot definition will need to be updated to use the accessors.
  1890. ** Class slot changes
  1891. Class objects no longer have a `default-slot-definition-class' slot,
  1892. which was never used. They also no longer have slots for hashsets
  1893. (`h0', `h1', and so on up to `h7'), which have been unused since Guile
  1894. 2.0 and were not a great idea.
  1895. There is a new class option, `#:static-slot-allocation?'. See the
  1896. manual for details.
  1897. ** Removal of internal, unintentionally exposed GOOPS C interfaces
  1898. These include: `scm_sys_fast_slot_ref', `scm_sys_fast_slot_set_x'
  1899. `scm_basic_basic_make_class', `scm_sys_compute_slots',
  1900. `scm_sys_prep_layout_x' `scm_t_method', `SCM_METHOD',
  1901. `scm_s_slot_set_x', `SCM_CLASS_CLASS_LAYOUT', `scm_si_slotdef_class',
  1902. `scm_si_generic_function', `scm_si_specializers', `scm_si_procedure',
  1903. `scm_si_formals', `scm_si_body', `scm_si_make_procedure',
  1904. `SCM_CLASS_CLASS_LAYOUT', `SCM_INSTANCE_HASH', `SCM_SET_HASHSET', `union
  1905. scm_t_debug_info', `scm_pure_generic_p', `SCM_PUREGENERICP',
  1906. `SCM_VALIDATE_PUREGENERIC', `SCM_VTABLE_FLAG_GOOPS_PURE_GENERIC',
  1907. `SCM_CLASSF_PURE_GENERIC', `scm_c_extend_primitive_generic',
  1908. `scm_sys_initialize_object', `SCM_CLASS_CLASS_LAYOUT',
  1909. `scm_si_redefined', `scm_si_direct_supers', `scm_si_direct_slots',
  1910. `scm_si_direct_subclasses', `scm_si_direct_methods', `scm_si_cpl'
  1911. `scm_si_slots', `scm_si_getters_n_setters', `SCM_N_CLASS_SLOTS',
  1912. `SCM_OBJ_CLASS_REDEF', `SCM_INST', `SCM_ACCESSORS_OF',
  1913. `scm_sys_allocate_instance', and `scm_sys_invalidate_class_x'.
  1914. * New deprecations
  1915. ** `SCM_FDES_RANDOM_P'
  1916. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1917. ** `_IONBF', `_IOLBF', and `_IOFBF'
  1918. Instead, use the symbol values `none', `line', or `block', respectively,
  1919. as arguments to the `setvbuf' function.
  1920. ** `SCM_FDES_RANDOM_P'
  1921. Instead, use `lseek (fd, 0, SEEK_CUR)' directly.
  1922. ** Arbiters
  1923. Arbiters were an experimental mutual exclusion facility from 20 years
  1924. ago that didn't survive the test of time. Use mutexes or atomic boxes
  1925. instead.
  1926. ** User asyncs
  1927. Guile had (and still has) "system asyncs", which are asynchronous
  1928. interrupts, and also had this thing called "user asyncs", which was a
  1929. trivial unused data structure. Now that we have deprecated the old
  1930. `async', `async-mark', and `run-asyncs' procedures that comprised the
  1931. "user async" facility, we have been able to clarify our documentation to
  1932. only refer to "asyncs".
  1933. ** Critical sections
  1934. Critical sections have long been just a fancy way to lock a mutex and
  1935. defer asynchronous interrupts. Instead of SCM_CRITICAL_SECTION_START,
  1936. make sure you're in a "scm_dynwind_begin (0)" and use
  1937. scm_dynwind_pthread_mutex_lock instead, possibly also with
  1938. scm_dynwind_block_asyncs.
  1939. ** `scm_make_mutex_with_flags'
  1940. Use `scm_make_mutex_with_kind' instead. See "Mutexes and Condition
  1941. Variables" in the manual, for more.
  1942. ** Dynamic roots
  1943. This was a facility that predated threads, was unused as far as we can
  1944. tell, and was never documented. Still, a grep of your code for
  1945. dynamic-root or dynamic_root would not be amiss.
  1946. ** `make-dynamic-state'
  1947. Use `current-dynamic-state' to get an immutable copy of the current
  1948. fluid-value associations.
  1949. ** `with-statprof' macro
  1950. Use the `statprof' procedure instead.
  1951. ** SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1, SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_N
  1952. ** SCM_GASSERT0, SCM_GASSERT1, SCM_GASSERT2, SCM_GASSERTn
  1953. ** SCM_WTA_DISPATCH_1_SUBR
  1954. These macros were used in dispatching primitive generics. They can be
  1955. replaced by using C functions (the same name but in lower case), if
  1956. needed, but this is a hairy part of Guile that perhaps you shouldn't be
  1957. using.
  1958. ** scm_compute_applicable_methods and scm_find_method
  1959. Use `compute-applicable-methods' from Scheme instead.
  1960. ** scm_no_applicable_method
  1961. Fetch no-applicable-method from the GOOPS exports if you need it.
  1962. ** scm_class_boolean, scm_class_char, scm_class_pair
  1963. ** scm_class_procedure, scm_class_string, scm_class_symbol
  1964. ** scm_class_primitive_generic, scm_class_vector, scm_class_null
  1965. ** scm_class_real, scm_class_complex, scm_class_integer
  1966. ** scm_class_fraction, scm_class_unknown, scm_class_top
  1967. ** scm_class_object, scm_class_class, scm_class_applicable
  1968. ** scm_class_applicable_struct, scm_class_applicable_struct_with_setter
  1969. ** scm_class_generic, scm_class_generic_with_setter, scm_class_accessor
  1970. ** scm_class_extended_generic, scm_class_extended_generic_with_setter
  1971. ** scm_class_extended_accessor, scm_class_method
  1972. ** scm_class_accessor_method, scm_class_procedure_class
  1973. ** scm_class_applicable_struct_class, scm_class_number, scm_class_list
  1974. ** scm_class_keyword, scm_class_port, scm_class_input_output_port
  1975. ** scm_class_input_port, scm_class_output_port, scm_class_foreign_slot
  1976. ** scm_class_self, scm_class_protected, scm_class_hidden
  1977. ** scm_class_opaque, scm_class_read_only, scm_class_protected_hidden
  1978. ** scm_class_protected_opaque, scm_class_protected_read_only
  1979. ** scm_class_scm, scm_class_int, scm_class_float, scm_class_double
  1980. ** scm_port_class, scm_smob_class
  1981. These class exports are now deprecated. Instead, look up the ones you
  1982. need from the GOOPS module, or use `scm_class_of' on particular values.
  1983. ** scm_get_keyword
  1984. Instead from Scheme use kw-arg-ref or real keyword arguments, and from C
  1985. use `scm_c_bind_keyword_arguments'.
  1986. ** scm_slot_ref_using_class, scm_slot_set_using_class_x
  1987. ** scm_slot_bound_using_class_p, scm_slot_exists_using_class_p
  1988. Instead use the normal `scm_slot_ref' and similar procedures.
  1989. * Changes to the distribution
  1990. ** Pre-built binary files in the tarball
  1991. Building Guile from a tarball can now take advantage of a "prebuilt/"
  1992. tree of prebuilt .go files. These compiled files are created when a
  1993. tarball is made, and are used to speed up the build for users of
  1994. official releases.
  1995. These pre-built binaries are not necessary, however: they are not stored
  1996. in revision control and can always be re-created from the source, given
  1997. that Guile can bootstrap itself from its minimal bootstrap C
  1998. interpreter. If you do not want to depend on these pre-built binaries,
  1999. you can "make -C prebuilt clean" before building.
  2000. ** New minor version
  2001. The "effective version" of Guile is now 2.2, which allows parallel
  2002. installation with other effective versions (for example, the older Guile
  2003. 2.0). See "Parallel Installations" in the manual for full details.
  2004. Notably, the `pkg-config' file is now `guile-2.2'.
  2005. ** Bump required libgc version to 7.2, released March 2012.
  2006. ** GUILE_PROGS searches for versioned Guile
  2007. The GUILE_PROGS autoconf macro can take a required version argument. As
  2008. a new change, that version argument is additionally searched for as a
  2009. suffix. For example, GUILE_PROGS(2.2) would look for guile-2.2,
  2010. guile2.2, guile-2, guile2, and then guile. The found prefix is also
  2011. applied to guild, guile-config, and the like. Thanks to Freja Nordsiek
  2012. for this work.
  2013. ** The readline extension is now installed in the extensionsdir
  2014. The shared library that implements Guile's readline extension is no
  2015. longer installed to the libdir. This change should be transparent to
  2016. users, but packagers may be interested.
  2017. Changes in 2.0.14 (since 2.0.13):
  2018. * Bug fixes
  2019. ** Builds of .go files and of Guile itself are now bit-reproducible
  2020. (<http://bugs.gnu.org/20272>)
  2021. ** 'number->locale-string' and 'monetary-amount->locale-string' fixes
  2022. (<http://bugs.gnu.org/24990>)
  2023. ** (system base target) now recognizes "sh3" as a cross-compilation target
  2024. ** Fix race condition in '00-repl-server.test'
  2025. (<http://bugs.gnu.org/24769>)
  2026. ** 'scandir' from (ice-9 ftw) no longer calls 'stat' for each entry
  2027. ** Several documentation improvements
  2028. Changes in 2.0.13 (since 2.0.12):
  2029. * Security fixes
  2030. ** CVE-2016-8606: REPL server now protects against HTTP inter-protocol
  2031. attacks
  2032. Guile 2.x provides a "REPL server" started by the '--listen'
  2033. command-line option or equivalent API (see "REPL Servers" in the
  2034. manual).
  2035. The REPL server is vulnerable to the HTTP inter-protocol attack as
  2036. described at
  2037. <https://en.wikipedia.org/wiki/Inter-protocol_exploitation>, notably the
  2038. HTML form protocol attack described at
  2039. <https://www.jochentopf.com/hfpa/hfpa.pdf>. A "DNS rebinding attack"
  2040. can be combined with this attack and allow an attacker to send arbitrary
  2041. Guile code to the REPL server through web pages accessed by the
  2042. developer, even though the REPL server is listening to a loopback device
  2043. ("localhost"). This was demonstrated in an article entitled "How to
  2044. steal any developer's local database" available at
  2045. <http://bouk.co/blog/hacking-developers/>.
  2046. The REPL server in Guile 2.0.13 now detects attempts to exploit this
  2047. vulnerability. It immediately closes the connection when it receives a
  2048. line that looks like an HTTP request.
  2049. Nevertheless, we recommend binding the REPL server to a Unix-domain
  2050. socket, for instance by running:
  2051. guile --listen=/tmp/guile-socket
  2052. ** CVE-2016-8605: 'mkdir' procedure no longer calls umask(2)
  2053. (<http://bugs.gnu.org/24659>)
  2054. When the second argument to the 'mkdir' procedure was omitted, it would
  2055. call umask(0) followed by umask(previous_umask) and apply the umask to
  2056. mode #o777.
  2057. This was unnecessary and a security issue for multi-threaded
  2058. applications: during a small window the process' umask was set to zero,
  2059. so other threads calling mkdir(2) or open(2) could end up creating
  2060. world-readable/writable/executable directories or files.
  2061. * New interfaces
  2062. ** mkstemp! takes optional "mode" argument
  2063. See "File System" in the manual, for more.
  2064. ** New 'scm_to_uintptr_t' and 'scm_from_uintptr_t' C functions
  2065. * Bug fixes
  2066. ** Fix optimizer bug when compiling fixpoint operator
  2067. ** Fix build error on MinGW
  2068. ** Update 'uname' implementation on MinGW
  2069. ** 'port-encoding' and 'set-port-encoding!' ensure they are passed an
  2070. open port
  2071. ** (system base target) now recognizes Alpha as a cross-compilation target
  2072. Changes in 2.0.12 (since 2.0.11):
  2073. * Notable changes
  2074. ** FFI: Add support for functions that set 'errno'
  2075. When accessing POSIX functions from a system's libc via Guile's dynamic
  2076. FFI, you commonly want to access the 'errno' variable to be able to
  2077. produce useful diagnostic messages.
  2078. This is now possible using 'pointer->procedure' or
  2079. 'scm_pointer_to_procedure_with_errno'. See "Dynamic FFI" in the manual.
  2080. ** The #!r6rs directive now influences read syntax
  2081. The #!r6rs directive now changes the per-port reader options to make
  2082. Guile's reader conform more closely to the R6RS syntax. In particular:
  2083. - It makes the reader case sensitive.
  2084. - It disables the recognition of keyword syntax in conflict with the
  2085. R6RS (and R5RS).
  2086. - It enables the `square-brackets', `hungry-eol-escapes' and
  2087. `r6rs-hex-escapes' reader options.
  2088. ** 'read' now accepts "\(" as equivalent to "("
  2089. This is indented for use at the beginning of lines in multi-line strings
  2090. to avoid confusing Emacs' lisp modes. Previously "\(" was an error.
  2091. ** SRFI-14 character data set upgraded to Unicode 8.0.0
  2092. ** SRFI-19 table of leap seconds updated
  2093. ** 'string-hash', 'read-string', and 'write' have been optimized
  2094. ** GOOPS bug fix for inherited accessor methods
  2095. In the port of GOOPS to Guile 2.0, we introduced a bug related to
  2096. accessor methods. The bug resulted in GOOPS assuming that a slot S in
  2097. an object whose class is C would always be present in instances of all
  2098. subclasses C, and allocated to the same struct index. This is not the
  2099. case for multiple inheritance. This behavior has been fixed to be as it
  2100. was in 1.8.
  2101. One aspect of this change may cause confusion among users. Previously
  2102. if you defined a class C:
  2103. (use-modules (oop goops))
  2104. (define-class C ()
  2105. (a #:getter get-a))
  2106. And now you define a subclass, intending to provide an #:init-value for
  2107. the slot A:
  2108. (define-class D (A)
  2109. (a #:init-value 42))
  2110. Really what you have done is define in D a new slot with the same name,
  2111. overriding the existing slot. The problem comes in that before fixing
  2112. this bug (but not in 1.8), the getter 'get-a' would succeed for
  2113. instances of D, even though 'get-a' should only work for the slot 'a'
  2114. that is defined on class C, not any other slot that happens to have the
  2115. same name and be in a class with C as a superclass.
  2116. It would be possible to "merge" the slot definitions on C and D, but
  2117. that part of the meta-object protocol (`compute-slots' et al) is not
  2118. fully implemented.
  2119. Somewhat relatedly, GOOPS also had a fix around #:init-value on
  2120. class-allocated slots. GOOPS was re-initializing the value of slots
  2121. with #:class or #:each-subclass allocation every time instances of that
  2122. class was allocated. This has been fixed.
  2123. * New interfaces
  2124. ** New SRFI-28 string formatting implementation
  2125. See "SRFI-28" in the manual.
  2126. ** New (ice-9 unicode) module
  2127. See "Characters" in the manual.
  2128. ** Web server
  2129. The (web server) module now exports 'make-server-impl', 'server-impl?',
  2130. and related procedures. Likewise, (web server http) exports 'http'.
  2131. ** New procedures: 'string-utf8-length' and 'scm_c_string_utf8_length'
  2132. See "Bytevectors as Strings" in the manual, for more.
  2133. ** New 'EXIT_SUCCESS' and 'EXIT_FAILURE' Scheme variables
  2134. See "Processes" in the manual.
  2135. ** New C functions to disable automatic SMOB finalization
  2136. The new 'scm_set_automatic_finalization_enabled' C function allows you
  2137. to choose whether automatic object finalization should be enabled (as
  2138. was the case until now, and still is by default.) This is meant for
  2139. applications that are not thread-safe nor async-safe; such applications
  2140. can disable automatic finalization and call the new 'scm_run_finalizers'
  2141. function when appropriate.
  2142. See the "Garbage Collecting Smobs" and "Smobs" sections in the manual.
  2143. ** Cross-compilation to ARM
  2144. More ARM cross-compilation targets are supported: "arm.*eb",
  2145. "^aarch64.*be", and "aarch64".
  2146. * New deprecation
  2147. ** The undocumented and unused C function 'scm_string_hash' is now deprecated
  2148. * Bugs fixed
  2149. ** Compiler
  2150. *** 'call-with-prompt' does not truncate multiple-value returns
  2151. (<http://bugs.gnu.org/14347>)
  2152. *** Use permissions of source file for compiled file
  2153. (<http://bugs.gnu.org/18477>)
  2154. *** Fix bug when inlining some functions with optional arguments
  2155. (<http://bugs.gnu.org/17634>)
  2156. *** Avoid quadratic expansion time in 'and' and 'or' macros
  2157. (<http://bugs.gnu.org/17147>)
  2158. *** Fix expander bug introduced when adding support for tail patterns
  2159. (<http://lists.gnu.org/archive/html/guile-user/2015-09/msg00017.html>)
  2160. *** Handle ~p in 'format' warnings (<http://bugs.gnu.org/18299>)
  2161. *** Fix bug that exposed `list' invocations to CSE
  2162. (<http://bugs.gnu.org/21899>)
  2163. *** Reduce eq? and eqv? over constants using equal?
  2164. (<http://bugs.gnu.org/21855>)
  2165. *** Skip invalid .go files found in GUILE_LOAD_COMPILED_PATH
  2166. ** Threads
  2167. *** Fix data races leading to corruption (<http://bugs.gnu.org/22152>)
  2168. ** Memory management
  2169. *** Fix race between SMOB marking and finalization
  2170. (<http://bugs.gnu.org/19883>)
  2171. ** Ports
  2172. *** Fix port position handling on binary input ports
  2173. (<http://bugs.gnu.org/20302>)
  2174. *** Bytevector and custom binary ports to use ISO-8859-1
  2175. (<http://bugs.gnu.org/20200>)
  2176. *** Fix buffer overrun with unbuffered custom binary input ports
  2177. (<http://bugs.gnu.org/19621>)
  2178. *** Fix memory corruption that arose when using 'get-bytevector-n'
  2179. (<http://bugs.gnu.org/17466>)
  2180. ** System
  2181. *** {get,set}sockopt now expect type 'int' for SO_SNDBUF/SO_RCVBUF
  2182. *** 'system*' now available on MS-Windows
  2183. *** 'open-pipe' now available on MS-Windows
  2184. *** Better support for file names containing backslashes on Windows
  2185. ** Web
  2186. *** 'split-and-decode-uri-path' no longer decodes "+" to space
  2187. *** HTTP: Support date strings with a leading space for hours
  2188. (<http://bugs.gnu.org/23421>)
  2189. *** HTTP: Accept empty reason phrases (<http://bugs.gnu.org/22273>)
  2190. *** HTTP: 'Location' header can now contain URI references, not just
  2191. absolute URIs
  2192. *** HTTP: Improve chunked-mode support (<http://bugs.gnu.org/19939>)
  2193. *** HTTP: 'open-socket-for-uri' now sets better OS buffering parameters
  2194. (<http://bugs.gnu.org/15368>)
  2195. ** Miscellaneous
  2196. *** Fix 'atan' procedure when applied to complex numbers
  2197. *** Fix Texinfo to HTML conversion for @itemize and @acronym
  2198. (<http://bugs.gnu.org/21772>)
  2199. *** 'bytevector-fill!' accepts fill arguments greater than 127
  2200. (<http://bugs.gnu.org/19027>)
  2201. *** 'bytevector-copy' correctly copies SRFI-4 homogeneous vectors
  2202. (<http://bugs.gnu.org/18866>)
  2203. *** 'strerror' no longer hangs when passed a non-integer argument
  2204. (<http://bugs.gnu.org/18065>)
  2205. *** 'scm_boot_guile' now gracefully handles argc == 0
  2206. (<http://bugs.gnu.org/18680>)
  2207. *** Fix 'SCM_SMOB_OBJECT_LOC' definition (<http://bugs.gnu.org/18495>)
  2208. *** Fix bug where 'bit-count*' was not using its second argument
  2209. *** SRFI-1 'length+' raises an error for non-lists and dotted lists
  2210. (<http://bugs.gnu.org/17296>)
  2211. *** Add documentation for SXPath (<http://bugs.gnu.org/19478>)
  2212. Changes in 2.0.11 (since 2.0.10):
  2213. This release fixes an embarrassing regression introduced in the C
  2214. interface to SRFI-4 vectors. See
  2215. <https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00047.html>
  2216. for details.
  2217. Changes in 2.0.10 (since 2.0.9):
  2218. * Notable changes
  2219. ** New GDB extension to support Guile
  2220. Guile now comes with an extension for GDB 7.8 or later (unreleased at
  2221. the time of writing) that simplifies debugging of C code that uses
  2222. Guile. See "GDB Support" in the manual.
  2223. ** Improved integration between R6RS and native Guile exceptions
  2224. R6RS exception handlers, established using 'with-exception-handler' or
  2225. 'guard', are now able to catch native Guile exceptions, which are
  2226. automatically converted into appropriate R6RS condition objects.
  2227. ** Support for HTTP proxies
  2228. Guile's built-in web client now honors the 'http_proxy' environment
  2229. variable, as well as the new 'current-http-proxy' parameter. See
  2230. "Web Client" in the manual for details.
  2231. ** Lexical syntax improvements
  2232. *** Support |...| symbol notation.
  2233. Guile's core reader and printer now support the R7RS |...| notation
  2234. for writing symbols with arbitrary characters, as a more portable and
  2235. attractive alternative to Guile's native #{...}# notation. To enable
  2236. this notation by default, put one or both of the following in your
  2237. ~/.guile:
  2238. (read-enable 'r7rs-symbols)
  2239. (print-enable 'r7rs-symbols)
  2240. *** Support '#true' and '#false' notation for booleans.
  2241. The booleans '#t' and '#f' may now be written as '#true' and '#false'
  2242. for improved readability, per R7RS.
  2243. *** Recognize '#\escape' character name.
  2244. The escape character '#\esc' may now be written as '#\escape', per R7RS.
  2245. *** Accept "\|" in string literals.
  2246. The pipe character may now be preceded by a backslash, per R7RS.
  2247. ** Custom binary input ports now support 'setvbuf'.
  2248. Until now, ports returned by 'make-custom-binary-input-port' were always
  2249. full-buffered. Now, their buffering mode can be changed using 'setvbuf'.
  2250. ** SRFI-4 predicates and length accessors no longer accept arrays.
  2251. Given that the SRFI-4 accessors don't work for arrays, the fact that the
  2252. predicates and length accessors returned true for arrays was a bug.
  2253. ** GUILE_PROGS now supports specifying a minimum required version.
  2254. The 'GUILE_PROGS' autoconf macro in guile.m4 now allows an optional
  2255. argument to specify a minimum required Guile version. By default, it
  2256. requires Guile >= 2.0. A micro version can also be specified, e.g.:
  2257. GUILE_PROGS([2.0.10])
  2258. ** Error reporting improvements
  2259. *** Improved run-time error reporting in (ice-9 match).
  2260. If no pattern matches in a 'match' form, the datum that failed to match
  2261. is printed along with the location of the failed 'match' invocation.
  2262. *** Print the faulty object upon invalid-keyword errors.
  2263. *** Improved error reporting of procedures defined by define-inlinable.
  2264. *** Improved error reporting for misplaced ellipses in macro definitions.
  2265. *** Improved error checking in 'define-public' and 'module-add!'.
  2266. *** Improved error when 'include' form with relative path is not in a file.
  2267. ** Speed improvements
  2268. *** 'scm_c_read' on ISO-8859-1 (e.g. binary) unbuffered ports is faster.
  2269. *** New inline asm for VM fixnum multiply, for faster overflow checking.
  2270. *** New inline asm for VM fixnum operations on ARM and 32-bit x86.
  2271. *** 'positive?' and 'negative?' are now compiled to VM primitives.
  2272. *** Numerical comparisons with more than 2 arguments are compiled to VM code.
  2273. *** Several R6RS bitwise operators have been optimized.
  2274. ** Miscellaneous
  2275. *** Web: 'content-disposition' headers are now supported.
  2276. *** Web: 'uri-encode' hexadecimal percent-encoding is now uppercase.
  2277. *** Size argument to 'make-doubly-weak-hash-table' is now optional.
  2278. *** Timeout for 'unlock-mutex' and SRFI-18 'mutex-unlock!' may now be #f.
  2279. ** Gnulib update
  2280. Guile's copy of Gnulib was updated to v0.1-92-g546ff82. The following
  2281. modules were imported from Gnulib: copysign, fsync, isfinite, link,
  2282. lstat, mkdir, mkstemp, readlink, rename, rmdir, and unistd.
  2283. * New interfaces
  2284. ** Cooperative REPL servers
  2285. This new facility supports REPLs that run at specified times within an
  2286. existing thread, for example in programs utilizing an event loop or in
  2287. single-threaded programs. This allows for safe access and mutation of
  2288. a program's data structures from the REPL without concern for thread
  2289. synchronization. See "Cooperative REPL Servers" in the manual for
  2290. details.
  2291. ** SRFI-43 (Vector Library)
  2292. Guile now includes SRFI-43, a comprehensive library of vector operations
  2293. analogous to the SRFI-1 list library. See "SRFI-43" in the manual for
  2294. details.
  2295. ** SRFI-64 (A Scheme API for test suites)
  2296. Guile now includes SRFI-64, a flexible framework for creating test
  2297. suites. The reference implementation of SRFI-64 has also been updated
  2298. to fully support earlier versions of Guile.
  2299. ** SRFI-111 (Boxes)
  2300. See "SRFI-111" in the manual.
  2301. ** 'define-values'
  2302. See "Binding multiple return values" in the manual.
  2303. ** Custom ellipsis identifiers using 'with-ellipsis' or SRFI-46.
  2304. Guile now allows macro definitions to use identifiers other than '...'
  2305. as the ellipsis. This is convenient when writing macros that generate
  2306. macro definitions. The desired ellipsis identifier can be given as the
  2307. first operand to 'syntax-rules', as specified in SRFI-46 and R7RS, or by
  2308. using the new 'with-ellipsis' special form in procedural macros. With
  2309. this addition, Guile now fully supports SRFI-46.
  2310. See "Specifying a Custom Ellipsis Identifier" and "Custom Ellipsis
  2311. Identifiers for syntax-case Macros" in the manual for details.
  2312. ** R7RS 'syntax-error'
  2313. Guile now supports 'syntax-error', as specified by R7RS, allowing for
  2314. improved compile-time error reporting from 'syntax-rules' macros. See
  2315. "Reporting Syntax Errors in Macros" in the manual for details.
  2316. ** New procedures to convert association lists into hash tables
  2317. Guile now includes the convenience procedures 'alist->hash-table',
  2318. 'alist->hashq-table', 'alist->hashv-table', and 'alist->hashx-table'.
  2319. See "Hash Table Reference" in the manual.
  2320. ** New predicates: 'exact-integer?' and 'scm_is_exact_integer'
  2321. See "Integers" in the manual.
  2322. ** 'weak-vector-length', 'weak-vector-ref', and 'weak-vector-set!'
  2323. These should now be used to access weak vectors, instead of
  2324. 'vector-length', 'vector-ref', and 'vector-set!'.
  2325. * Manual updates
  2326. ** Improve docs for 'eval-when'.
  2327. Each 'eval-when' condition is now explained in detail, including
  2328. 'expand' which was previously undocumented. (expand load eval) is now
  2329. the recommended set of conditions, instead of (compile load eval).
  2330. See "Eval When" in the manual, for details.
  2331. ** Update the section on SMOBs and memory management.
  2332. See "Defining New Types (Smobs)" in the manual.
  2333. ** Fixes
  2334. *** GOOPS: #:dsupers is the init keyword for the dsupers slot.
  2335. *** 'unfold-right' takes a tail, not a tail generator.
  2336. *** Clarify that 'append!' and 'reverse!' might not mutate.
  2337. *** Fix doc that incorrectly claimed (integer? +inf.0) => #t.
  2338. (http://bugs.gnu.org/16356)
  2339. *** Document that we support SRFI-62 (S-expression comments).
  2340. *** Document that we support SRFI-87 (=> in case clauses).
  2341. *** Document 'equal?' in the list of R6RS incompatibilities.
  2342. *** Remove outdated documentation of LTDL_LIBRARY_PATH.
  2343. *** Fix 'weak-vector?' doc: Weak hash tables are not weak vectors.
  2344. *** Fix 'my-or' examples to use let-bound variable.
  2345. (http://bugs.gnu.org/14203)
  2346. * New deprecations
  2347. ** General 'uniform-vector' interface
  2348. This interface lacked both generality and specificity. The general
  2349. replacements are 'array-length', 'array-ref', and friends on the scheme
  2350. side, and the array handle interface on the C side. On the specific
  2351. side of things, there are the specific bytevector, SRFI-4, and bitvector
  2352. interfaces.
  2353. ** Use of the vector interface on arrays
  2354. ** 'vector-length', 'vector-ref', and 'vector-set!' on weak vectors
  2355. ** 'vector-length', 'vector-ref', and 'vector-set!' as primitive-generics
  2356. Making the vector interface operate only on a single representation will
  2357. allow future versions of Guile to compile loops involving vectors to
  2358. more efficient native code.
  2359. ** 'htons', 'htonl', 'ntohs', 'ntohl'
  2360. These procedures, like their C counterpart, were used to convert numbers
  2361. to/from network byte order, typically in conjunction with the
  2362. now-deprecated uniform vector API.
  2363. This functionality is now covered by the bytevector and binary I/O APIs.
  2364. See "Interpreting Bytevector Contents as Integers" in the manual.
  2365. ** 'gc-live-object-stats'
  2366. It hasn't worked in the whole 2.0 series. There is no replacement,
  2367. unfortunately.
  2368. ** 'scm_c_program_source'
  2369. This internal VM function was not meant to be public. Use
  2370. 'scm_procedure_source' instead.
  2371. * Build fixes
  2372. ** Fix build with Clang 3.4.
  2373. ** MinGW build fixes
  2374. *** Do not add $(EXEEXT) to guild or guile-tools.
  2375. *** tests: Use double quotes around shell arguments, for Windows.
  2376. *** tests: Don't rely on $TMPDIR and /tmp on Windows.
  2377. *** tests: Skip FFI tests that use `qsort' when it's not accessible.
  2378. *** tests: Remove symlink only when it exists.
  2379. *** tests: Don't rely on `scm_call_2' being visible.
  2380. ** Fix computation of LIBLOBJS so dependencies work properly.
  2381. (http://bugs.gnu.org/14193)
  2382. * Bug fixes
  2383. ** Web: Fix web client with methods other than GET.
  2384. (http://bugs.gnu.org/15908)
  2385. ** Web: Add Content-Length header for empty bodies.
  2386. ** Web: Accept "UTC" as the zone offset in date headers.
  2387. (http://bugs.gnu.org/14128)
  2388. ** Web: Don't throw if a response is longer than its Content-Length says.
  2389. ** Web: Write out HTTP Basic auth headers correctly.
  2390. (http://bugs.gnu.org/14370)
  2391. ** Web: Always print a path component in 'write-request-line'.
  2392. ** Fix 'define-public' from (ice-9 curried-definitions).
  2393. ** psyntax: toplevel variable definitions discard previous syntactic binding.
  2394. (http://bugs.gnu.org/11988)
  2395. ** Fix thread-unsafe lazy initializations.
  2396. ** Make (ice-9 popen) thread-safe.
  2397. (http://bugs.gnu.org/15683)
  2398. ** Make guardians thread-safe.
  2399. ** Make regexp_exec thread-safe.
  2400. (http://bugs.gnu.org/14404)
  2401. ** vm: Gracefully handle stack overflows.
  2402. (http://bugs.gnu.org/15065)
  2403. ** Fix 'rationalize'.
  2404. (http://bugs.gnu.org/14905)
  2405. ** Fix inline asm for VM fixnum operations on x32.
  2406. ** Fix 'SCM_SYSCALL' to really swallow EINTR.
  2407. ** Hide EINTR returns from 'accept'.
  2408. ** SRFI-19: Update the table of leap seconds.
  2409. ** Add missing files to the test-suite Makefile.
  2410. ** Make sure 'ftw' allows directory traversal when running as root.
  2411. ** Fix 'hash-for-each' for weak hash tables.
  2412. ** SRFI-18: Export 'current-thread'.
  2413. (http://bugs.gnu.org/16890)
  2414. ** Fix inlining of tail list to apply.
  2415. (http://bugs.gnu.org/15533)
  2416. ** Fix bug in remqueue in threads.c when removing last element.
  2417. ** Fix build when '>>' on negative integers is not arithmetic.
  2418. ** Fix 'bitwise-bit-count' for negative arguments.
  2419. (http://bugs.gnu.org/14864)
  2420. ** Fix VM 'ash' for right shifts by large amounts.
  2421. (http://bugs.gnu.org/14864)
  2422. ** Fix rounding in scm_i_divide2double for negative arguments.
  2423. ** Avoid lossy conversion from inum to double in numerical comparisons.
  2424. ** Fix numerical comparison of fractions to infinities.
  2425. ** Allow fl+ and fl* to accept zero arguments.
  2426. (http://bugs.gnu.org/14869)
  2427. ** flonum? returns false for complex number objects.
  2428. (http://bugs.gnu.org/14866)
  2429. ** flfinite? applied to a NaN returns false.
  2430. (http://bugs.gnu.org/14868)
  2431. ** Flonum operations always return flonums.
  2432. (http://bugs.gnu.org/14871)
  2433. ** min and max: NaNs beat infinities, per R6RS errata.
  2434. (http://bugs.gnu.org/14865)
  2435. ** Fix 'fxbit-count' for negative arguments.
  2436. ** 'gcd' and 'lcm' support inexact integer arguments.
  2437. (http://bugs.gnu.org/14870)
  2438. ** Fix R6RS 'fixnum-width'.
  2439. (http://bugs.gnu.org/14879)
  2440. ** tests: Use shell constructs that /bin/sh on Solaris 10 can understand.
  2441. (http://bugs.gnu.org/14042)
  2442. ** Fix display of symbols containing backslashes.
  2443. (http://bugs.gnu.org/15033)
  2444. ** Fix truncated-print for uniform vectors.
  2445. ** Define `AF_UNIX' only when Unix-domain sockets are supported.
  2446. ** Decompiler: fix handling of empty 'case-lambda' expressions.
  2447. ** Fix handling of signed zeroes and infinities in 'numerator' and 'denominator'.
  2448. ** dereference-pointer: check for null pointer.
  2449. ** Optimizer: Numerical comparisons are not negatable, for correct NaN handling.
  2450. ** Compiler: Evaluate '-' and '/' in left-to-right order.
  2451. (for more robust floating-point arithmetic)
  2452. ** snarf.h: Declare static const function name vars as SCM_UNUSED.
  2453. ** chars.c: Remove duplicate 'const' specifiers.
  2454. ** Modify SCM_UNPACK type check to avoid warnings in clang.
  2455. ** Arrange so that 'file-encoding' does not truncate the encoding name.
  2456. (http://bugs.gnu.org/16463)
  2457. ** Improve error checking in bytevector->uint-list and bytevector->sint-list.
  2458. (http://bugs.gnu.org/15100)
  2459. ** Fix (ash -1 SCM_I_FIXNUM_BIT-1) to return a fixnum instead of a bignum.
  2460. ** i18n: Fix null pointer dereference when locale info is missing.
  2461. ** Fix 'string-copy!' to work properly with overlapping src/dest.
  2462. ** Fix hashing of vectors to run in bounded time.
  2463. ** 'port-position' works on CBIPs that do not support 'set-port-position!'.
  2464. ** Custom binary input ports sanity-check the return value of 'read!'.
  2465. ** bdw-gc.h: Check SCM_USE_PTHREAD_THREADS using #if not #ifdef.
  2466. ** REPL Server: Don't establish a SIGINT handler.
  2467. ** REPL Server: Redirect warnings to client socket.
  2468. ** REPL Server: Improve robustness of 'stop-server-and-clients!'.
  2469. ** Add srfi-16, srfi-30, srfi-46, srfi-62, srfi-87 to %cond-expand-features.
  2470. ** Fix trap handlers to handle applicable structs.
  2471. (http://bugs.gnu.org/15691)
  2472. ** Fix optional end argument in `uniform-vector-read!'.
  2473. (http://bugs.gnu.org/15370)
  2474. ** Fix brainfuck->scheme compiler.
  2475. ** texinfo: Fix newline preservation in @example with lines beginning with @
  2476. ** C standards conformance improvements
  2477. Improvements and bug fixes were made to the C part of Guile's run-time
  2478. support (libguile).
  2479. *** Don't use the identifier 'noreturn'.
  2480. (http://bugs.gnu.org/15798)
  2481. *** Rewrite SCM_I_INUM to avoid unspecified behavior when not using GNU C.
  2482. *** Improve fallback implemention of SCM_SRS to avoid unspecified behavior.
  2483. *** SRFI-60: Reimplement 'rotate-bit-field' on inums to be more portable.
  2484. *** Improve compliance with C standards regarding signed integer shifts.
  2485. *** Avoid signed overflow in random.c.
  2486. *** VM: Avoid signed overflows in 'add1' and 'sub1'.
  2487. *** VM: Avoid overflow in ASM_ADD when the result is most-positive-fixnum.
  2488. *** read: Avoid signed integer overflow in 'read_decimal_integer'.
  2489. Changes in 2.0.9 (since 2.0.7):
  2490. Note: 2.0.8 was a brown paper bag release that was never announced, but
  2491. some mirrors may have picked it up. Please do not use it.
  2492. * Notable changes
  2493. ** New keyword arguments for procedures that open files
  2494. The following procedures that open files now support keyword arguments
  2495. to request binary I/O or to specify the character encoding for text
  2496. files: `open-file', `open-input-file', `open-output-file',
  2497. `call-with-input-file', `call-with-output-file', `with-input-from-file',
  2498. `with-output-to-file', and `with-error-to-file'.
  2499. It is also now possible to specify whether Guile should scan files for
  2500. Emacs-style coding declarations. This scan was done by default in
  2501. versions 2.0.0 through 2.0.7, but now must be explicitly requested.
  2502. See "File Ports" in the manual for details.
  2503. ** Rewritten guile.m4
  2504. The `guile.m4' autoconf macros have been rewritten to use `guild' and
  2505. `pkg-config' instead of the deprecated `guile-config' (which itself
  2506. calls pkg-config).
  2507. There is also a new macro, `GUILE_PKG', which allows packages to select
  2508. the version of Guile that they want to compile against. See "Autoconf
  2509. Macros" in the manual, for more information.
  2510. ** Better Windows support
  2511. Guile now correctly identifies absolute paths on Windows (MinGW), and
  2512. creates files on that platform according to its path conventions. See
  2513. "File System" in the manual, for all details.
  2514. In addition, the new Gnulib imports provide `select' and `poll' on
  2515. Windows builds.
  2516. As an incompatible change, systems that are missing <sys/select.h> were
  2517. previously provided a public `scm_std_select' C function that defined a
  2518. version of `select', but unhappily it also provided its own incompatible
  2519. definitions for FD_SET, FD_ZERO, and other system interfaces. Guile
  2520. should not be setting these macros in public API, so this interface was
  2521. removed on those plaforms (basically only MinGW).
  2522. ** Numerics improvements
  2523. `number->string' now reliably outputs enough digits to produce the same
  2524. number when read back in. Previously, it mishandled subnormal numbers
  2525. (printing them as "#.#"), and failed to distinguish between some
  2526. distinct inexact numbers, e.g. 1.0 and (+ 1.0 (expt 2.0 -52)). These
  2527. problems had far-reaching implications, since the compiler uses
  2528. `number->string' to serialize numeric constants into .go files.
  2529. `sqrt' now produces exact rational results when possible, and handles
  2530. very large or very small numbers more robustly.
  2531. A number (ahem) of operations involving exact rationals have been
  2532. optimized, most notably `integer-expt' and `expt'.
  2533. `exact->inexact' now performs correct IEEE rounding.
  2534. ** New optimizations
  2535. There were a number of improvements to the partial evaluator, allowing
  2536. complete reduction of forms such as:
  2537. ((let ((_ 10)) (lambda () _)))
  2538. ((lambda _ _))
  2539. (apply (lambda _ _) 1 2 3 '(4))
  2540. (call-with-values (lambda () (values 1 2)) (lambda _ _))
  2541. `string-join' now handles huge lists efficiently.
  2542. `get-bytevector-some' now uses buffered input, which is much faster.
  2543. Finally, `array-ref', `array-set!' on arrays of rank 1 or 2 is now
  2544. faster, because it avoids building a rest list. Similarly, the
  2545. one-argument case of `array-for-each' and `array-map!' has been
  2546. optimized, and `array-copy!' and `array-fill!' are faster.
  2547. ** `peek-char' no longer consumes EOF
  2548. As required by the R5RS, if `peek-char' returns EOF, then the next read
  2549. will also return EOF. Previously `peek-char' would consume the EOF.
  2550. This makes a difference for terminal devices where it is possible to
  2551. read past an EOF.
  2552. ** Gnulib update
  2553. Guile's copy of Gnulib was updated to v0.0-7865-ga828bb2. The following
  2554. modules were imported from Gnulib: select, times, pipe-posix, fstat,
  2555. getlogin, poll, and c-strcase.
  2556. ** `include' resolves relative file names relative to including file
  2557. Given a relative file name, `include' will look for it relative to the
  2558. directory of the including file. This harmonizes the behavior of
  2559. `include' with that of `load'.
  2560. ** SLIB compatibility restored
  2561. Guile 2.0.8 is now compatible with SLIB. You will have to use a
  2562. development version of SLIB, however, until a new version of SLIB is
  2563. released.
  2564. ** Better ,trace REPL command
  2565. Sometimes the ,trace output for nested function calls could overflow the
  2566. terminal width, which wasn't useful. Now there is a limit to the amount
  2567. of space the prefix will take. See the documentation for ",trace" for
  2568. more information.
  2569. ** Better docstring syntax supported for `case-lambda'
  2570. Docstrings can now be placed immediately after the `case-lambda' or
  2571. `case-lambda*' keyword. See "Case-lambda" in the manual.
  2572. ** Improved handling of Unicode byte order marks
  2573. See "BOM Handling" in the manual for details.
  2574. ** Update predefined character sets to Unicode 6.2
  2575. ** GMP 4.2 or later required
  2576. Guile used to require GMP at least version 4.1 (released in May 2002),
  2577. and now requires at least version 4.2 (released in March 2006).
  2578. * Manual updates
  2579. ** Better SXML documentation
  2580. The documentation for SXML modules was much improved, though there is
  2581. still far to go. See "SXML" in manual.
  2582. ** Style updates
  2583. Use of "iff" was replaced with standard English. Keyword arguments are
  2584. now documented consistently, along with their default values.
  2585. ** An end to the generated-documentation experiment
  2586. When Guile 2.0 imported some modules from Guile-Lib, they came with a
  2587. system that generated documentation from docstrings and module
  2588. commentaries. This produced terrible documentation. We finally bit the
  2589. bullet and incorporated these modules into the main text, and will be
  2590. improving them manually over time, as is the case with SXML. Help is
  2591. appreciated.
  2592. ** New documentation
  2593. There is now documentation for `scm_array_type', and `scm_array_ref', as
  2594. well as for the new `array-length' / 'scm_c_array_length' /
  2595. `scm_array_length' functions. `array-in-bounds?' has better
  2596. documentation as well. The `program-arguments-alist' and
  2597. `program-lambda-list' functions are now documented, as well as `and=>',
  2598. `exit', and `quit'. The (system repl server) module is now documented
  2599. (see REPL Servers). Finally, the GOOPS class hierarchy diagram has been
  2600. regenerated for the web and print output formats.
  2601. * New deprecations
  2602. ** Deprecate generalized vector interface
  2603. The generalized vector interface, introduced in 1.8.0, is simply a
  2604. redundant, verbose interface to arrays of rank 1. `array-ref' and
  2605. similar functions are entirely sufficient. Thus,
  2606. `scm_generalized_vector_p', `scm_generalized_vector_length',
  2607. `scm_generalized_vector_ref', `scm_generalized_vector_set_x', and
  2608. `scm_generalized_vector_to_list' are now deprecated.
  2609. ** Deprecate SCM_CHAR_CODE_LIMIT and char-code-limit
  2610. These constants were defined to 256, which is not the highest codepoint
  2611. supported by Guile. Given that they were useless and incorrect, they
  2612. have been deprecated.
  2613. ** Deprecate `http-get*'
  2614. The new `#:streaming?' argument to `http-get' subsumes the functionality
  2615. of `http-get*' (introduced in 2.0.7). Also, the `#:extra-headers'
  2616. argument is deprecated in favor of `#:headers'.
  2617. ** Deprecate (ice-9 mapping)
  2618. This module, present in Guile since 1996 but never used or documented,
  2619. has never worked in Guile 2.0. It has now been deprecated and will be
  2620. removed in Guile 2.2.
  2621. ** Deprecate undocumented array-related C functions
  2622. These are `scm_array_fill_int', `scm_ra_eqp', `scm_ra_lessp',
  2623. `scm_ra_leqp', `scm_ra_grp', `scm_ra_greqp', `scm_ra_sum',
  2624. `scm_ra_product', `scm_ra_difference', `scm_ra_divide', and
  2625. `scm_array_identity'.
  2626. * New interfaces
  2627. ** SRFI-41 Streams
  2628. See "SRFI-41" in the manual.
  2629. ** SRFI-45 exports `promise?'
  2630. SRFI-45 now exports a `promise?' procedure that works with its promises.
  2631. Also, its promises now print more nicely.
  2632. ** New HTTP client procedures
  2633. See "Web Client" for documentation on the new `http-head', `http-post',
  2634. `http-put', `http-delete', `http-trace', and `http-options' procedures,
  2635. and also for more options to `http-get'.
  2636. ** Much more capable `xml->sxml'
  2637. See "Reading and Writing XML" for information on how the `xml->sxml'
  2638. parser deals with namespaces, processed entities, doctypes, and literal
  2639. strings. Incidentally, `current-ssax-error-port' is now a parameter
  2640. object.
  2641. ** New procedures for converting strings to and from bytevectors
  2642. See "Representing Strings as Bytes" for documention on the new `(ice-9
  2643. iconv)' module and its `bytevector->string' and `string->bytevector'
  2644. procedures.
  2645. ** Escape continuations with `call/ec' and `let/ec'
  2646. See "Prompt Primitives".
  2647. ** New procedures to read all characters from a port
  2648. See "Line/Delimited" in the manual for documentation on `read-string'
  2649. and `read-string!'.
  2650. ** New procedure `sendfile'
  2651. See "File System".
  2652. ** New procedure `unget-bytevector'
  2653. See "R6RS Binary Input".
  2654. ** New C helper: `scm_c_bind_keyword_arguments'
  2655. See "Keyword Procedures".
  2656. ** New command-line arguments: `--language' and `-C'
  2657. See "Command-line Options" in the manual.
  2658. ** New environment variables: `GUILE_STACK_SIZE', `GUILE_INSTALL_LOCALE'
  2659. See "Environment Variables".
  2660. ** New procedures for dealing with file names
  2661. See "File System" for documentation on `system-file-name-convention',
  2662. `file-name-separator?', `absolute-file-name?', and
  2663. `file-name-separator-string'.
  2664. ** `array-length', an array's first dimension
  2665. See "Array Procedures".
  2666. ** `hash-count', for hash tables
  2667. See "Hash Tables".
  2668. ** `round-ash', a bit-shifting operator that rounds on right-shift
  2669. See "Bitwise Operations".
  2670. ** New foreign types: `ssize_t', `ptrdiff_t'
  2671. See "Foreign Types".
  2672. ** New C helpers: `scm_from_ptrdiff_t', `scm_to_ptrdiff_t'
  2673. See "Integers".
  2674. ** Socket option `SO_REUSEPORT' now available from Scheme
  2675. If supported on the platform, `SO_REUSEPORT' is now available from
  2676. Scheme as well. See "Network Sockets and Communication".
  2677. ** `current-language' in default environment
  2678. Previously defined only in `(system base language)', `current-language'
  2679. is now defined in the default environment, and is used to determine the
  2680. language for the REPL, and for `compile-and-load'.
  2681. ** New procedure: `fluid->parameter'
  2682. See "Parameters", for information on how to convert a fluid to a
  2683. parameter.
  2684. ** New `print' REPL option
  2685. See "REPL Commands" in the manual for information on the new
  2686. user-customizable REPL printer.
  2687. ** New variable: %site-ccache-dir
  2688. The "Installing Site Packages" and "Build Config" manual sections now
  2689. refer to this variable to describe where users should install their
  2690. `.go' files.
  2691. * Build fixes
  2692. ** Fix compilation against libgc 7.3.
  2693. ** Fix cross-compilation of `c-tokenize.o'.
  2694. ** Fix warning when compiling against glibc 2.17.
  2695. ** Fix documentation build against Texinfo 5.0.
  2696. ** Fix building Guile from a directory with non-ASCII characters.
  2697. ** Fix native MinGW build.
  2698. ** Fix --disable-posix build.
  2699. ** Fix MinGW builds with networking, POSIX, and thread support.
  2700. * Bug fixes
  2701. ** Fix inexact number printer.
  2702. (http://bugs.gnu.org/13757)
  2703. ** Fix infinite loop when parsing optional-argument short options (SRFI-37).
  2704. (http://bugs.gnu.org/13176)
  2705. ** web: Support non-GMT date headers in the HTTP client.
  2706. (http://bugs.gnu.org/13544)
  2707. ** web: support IP-literal (IPv6 address) in Host header.
  2708. ** Avoid stack overflows with `par-map' and nested futures in general.
  2709. (http://bugs.gnu.org/13188)
  2710. ** Peek-char no longer consumes EOF.
  2711. (http://bugs.gnu.org/12216)
  2712. ** Avoid swallowing multiple EOFs in R6RS binary-input procedures.
  2713. ** A fork when multiple threads are running will now print a warning.
  2714. ** Allow for spurious wakeups from pthread_cond_wait.
  2715. (http://bugs.gnu.org/10641)
  2716. ** Warn and ignore module autoload failures.
  2717. (http://bugs.gnu.org/12202)
  2718. ** Use chmod portably in (system base compile).
  2719. (http://bugs.gnu.org/10474)
  2720. ** Fix response-body-port for HTTP responses without content-length.
  2721. (http://bugs.gnu.org/13857)
  2722. ** Allow case-lambda expressions with no clauses.
  2723. (http://bugs.gnu.org/9776)
  2724. ** Improve standards conformance of string->number.
  2725. (http://bugs.gnu.org/11887)
  2726. ** Support calls and tail-calls with more than 255 formals.
  2727. ** ,option evaluates its right-hand-side.
  2728. (http://bugs.gnu.org/13076)
  2729. ** Structs with tail arrays are not simple.
  2730. (http://bugs.gnu.org/12808)
  2731. ** Make `SCM_LONG_BIT' usable in preprocessor conditionals.
  2732. (http://bugs.gnu.org/13848)
  2733. ** Fix thread-unsafe lazy initializations.
  2734. ** Allow SMOB mark procedures to be called from parallel markers.
  2735. (http://bugs.gnu.org/13611)
  2736. ** Fix later-bindings-win logic in with-fluids.
  2737. (http://bugs.gnu.org/13843)
  2738. ** Fix duplicate removal of with-fluids.
  2739. (http://bugs.gnu.org/13838)
  2740. ** Support calling foreign functions of 10 arguments or more.
  2741. (http://bugs.gnu.org/13809)
  2742. ** Let reverse! accept arbitrary types as second argument.
  2743. (http://bugs.gnu.org/13835)
  2744. ** Recognize the `x86_64.*-gnux32' triplet.
  2745. ** Check whether a triplet's OS part specifies an ABI.
  2746. ** Recognize mips64* as having 32-bit pointers by default.
  2747. ** Use portable sed constructs.
  2748. (http://bugs.gnu.org/14042)
  2749. ** Remove language/glil/decompile-assembly.scm.
  2750. (http://bugs.gnu.org/10622)
  2751. ** Use O_BINARY in `copy-file', `load-objcode', `mkstemp'.
  2752. ** Use byte-oriented functions in `get-bytevector*'.
  2753. ** Fix abort when iconv swallows BOM from UTF-16 or UTF-32 stream.
  2754. ** Fix compilation of functions with more than 255 local variables.
  2755. ** Fix `getgroups' for when zero supplementary group IDs exist.
  2756. ** Allow (define-macro name (lambda ...)).
  2757. ** Various fixes to the (texinfo) modules.
  2758. ** guild: Gracefully handle failures to install the locale.
  2759. ** Fix format string warnings for ~!, ~|, ~/, ~q, ~Q, and ~^.
  2760. (http://bugs.gnu.org/13485)
  2761. ** Fix source annotation bug in psyntax 'expand-body'.
  2762. ** Ecmascript: Fix conversion to boolean for non-numbers.
  2763. ** Use case-insensitive comparisons for encoding names.
  2764. ** Add missing cond-expand feature identifiers.
  2765. ** A failure to find a module's file does not prevent future loading.
  2766. ** Many (oop goops save) fixes.
  2767. ** `http-get': don't shutdown write end of socket.
  2768. (http://bugs.gnu.org/13095)
  2769. ** Avoid signed integer overflow in scm_product.
  2770. ** http: read-response-body always returns bytevector or #f, never EOF.
  2771. ** web: Correctly detect "No route to host" conditions.
  2772. ** `system*': failure to execvp no longer leaks dangling processes.
  2773. (http://bugs.gnu.org/13166)
  2774. ** More sensible case-lambda* dispatch.
  2775. (http://bugs.gnu.org/12929)
  2776. ** Do not defer expansion of internal define-syntax forms.
  2777. (http://bugs.gnu.org/13509)
  2778. Changes in 2.0.7 (since 2.0.6):
  2779. * Notable changes
  2780. ** SRFI-105 curly infix expressions are supported
  2781. Curly infix expressions as described at
  2782. http://srfi.schemers.org/srfi-105/srfi-105.html are now supported by
  2783. Guile's reader. This allows users to write things like {a * {b + c}}
  2784. instead of (* a (+ b c)). SRFI-105 support is enabled by using the
  2785. `#!curly-infix' directive in source code, or the `curly-infix' reader
  2786. option. See the manual for details.
  2787. ** Reader options may now be per-port
  2788. Historically, `read-options' and related procedures would manipulate
  2789. global options, affecting the `read' procedure for all threads, and all
  2790. current uses of `read'.
  2791. Guile can now associate `read' options with specific ports, allowing
  2792. different ports to use different options. For instance, the
  2793. `#!fold-case' and `#!no-fold-case' reader directives have been
  2794. implemented, and their effect is to modify the current read options of
  2795. the current port only; similarly for `#!curly-infix'. Thus, it is
  2796. possible, for instance, to have one port reading case-sensitive code,
  2797. while another port reads case-insensitive code.
  2798. ** Futures may now be nested
  2799. Futures may now be nested: a future can itself spawn and then `touch'
  2800. other futures. In addition, any thread that touches a future that has
  2801. not completed now processes other futures while waiting for the touched
  2802. future to completed. This allows all threads to be kept busy, and was
  2803. made possible by the use of delimited continuations (see the manual for
  2804. details.)
  2805. Consequently, `par-map' and `par-for-each' have been rewritten and can
  2806. now use all cores.
  2807. ** `GUILE_LOAD_PATH' et al can now add directories to the end of the path
  2808. `GUILE_LOAD_PATH' and `GUILE_LOAD_COMPILED_PATH' can now be used to add
  2809. directories to both ends of the load path. If the special path
  2810. component `...' (ellipsis) is present in these environment variables,
  2811. then the default path is put in place of the ellipsis, otherwise the
  2812. default path is placed at the end. See "Environment Variables" in the
  2813. manual for details.
  2814. ** `load-in-vicinity' search for `.go' files in `%load-compiled-path'
  2815. Previously, `load-in-vicinity' would look for compiled files in the
  2816. auto-compilation cache, but not in `%load-compiled-path'. This is now
  2817. fixed. This affects `load', and the `-l' command-line flag. See
  2818. <http://bugs.gnu.org/12519> for details.
  2819. ** Extension search order fixed, and LD_LIBRARY_PATH preserved
  2820. Up to 2.0.6, Guile would modify the `LD_LIBRARY_PATH' environment
  2821. variable (or whichever is relevant for the host OS) to insert its own
  2822. default extension directories in the search path (using GNU libltdl
  2823. facilities was not possible here.) This approach was problematic in two
  2824. ways.
  2825. First, the `LD_LIBRARY_PATH' modification would be visible to
  2826. sub-processes, and would also affect future calls to `dlopen', which
  2827. could lead to subtle bugs in the application or sub-processes. Second,
  2828. when the installation prefix is /usr, the `LD_LIBRARY_PATH' modification
  2829. would typically end up inserting /usr/lib before /usr/local/lib in the
  2830. search path, which is often the opposite of system-wide settings such as
  2831. `ld.so.conf'.
  2832. Both issues have now been fixed.
  2833. ** `make-vtable-vtable' is now deprecated
  2834. Programs should instead use `make-vtable' and `<standard-vtable>'.
  2835. ** The `-Wduplicate-case-datum' and `-Wbad-case-datum' are enabled
  2836. These recently introduced warnings have been documented and are now
  2837. enabled by default when auto-compiling.
  2838. ** Optimize calls to `equal?' or `eqv?' with a constant argument
  2839. The compiler simplifies calls to `equal?' or `eqv?' with a constant
  2840. argument to use `eq?' instead, when applicable.
  2841. * Manual updates
  2842. ** SRFI-9 records now documented under "Compound Data Types"
  2843. The documentation of SRFI-9 record types has been moved in the "Compound
  2844. Data Types", next to Guile's other record APIs. A new section
  2845. introduces the various record APIs, and describes the trade-offs they
  2846. make. These changes were made in an attempt to better guide users
  2847. through the maze of records API, and to recommend SRFI-9 as the main
  2848. API.
  2849. The documentation of Guile's raw `struct' API has also been improved.
  2850. ** (ice-9 and-let-star) and (ice-9 curried-definitions) now documented
  2851. These modules were missing from the manual.
  2852. * New interfaces
  2853. ** New "functional record setters" as a GNU extension of SRFI-9
  2854. The (srfi srfi-9 gnu) module now provides three new macros to deal with
  2855. "updates" of immutable records: `define-immutable-record-type',
  2856. `set-field', and `set-fields'.
  2857. The first one allows record type "functional setters" to be defined;
  2858. such setters keep the record unchanged, and instead return a new record
  2859. with only one different field. The remaining macros provide the same
  2860. functionality, and also optimize updates of multiple or nested fields.
  2861. See the manual for details.
  2862. ** web: New `http-get*', `response-body-port', and `text-content-type?'
  2863. procedures
  2864. These procedures return a port from which to read the response's body.
  2865. Unlike `http-get' and `read-response-body', they allow the body to be
  2866. processed incrementally instead of being stored entirely in memory.
  2867. The `text-content-type?' predicate allows users to determine whether the
  2868. content type of a response is textual.
  2869. See the manual for details.
  2870. ** `string-split' accepts character sets and predicates
  2871. The `string-split' procedure can now be given a SRFI-14 character set or
  2872. a predicate, instead of just a character.
  2873. ** R6RS SRFI support
  2874. Previously, in R6RS modules, Guile incorrectly ignored components of
  2875. SRFI module names after the SRFI number, making it impossible to specify
  2876. sub-libraries. This release corrects this, bringing us into accordance
  2877. with SRFI 97.
  2878. ** `define-public' is no a longer curried definition by default
  2879. The (ice-9 curried-definitions) should be used for such uses. See the
  2880. manual for details.
  2881. * Build fixes
  2882. ** Remove reference to `scm_init_popen' when `fork' is unavailable
  2883. This fixes a MinGW build issue (http://bugs.gnu.org/12477).
  2884. ** Fix race between installing `guild' and the `guile-tools' symlink
  2885. * Bug fixes
  2886. ** Procedures returned by `eval' now have docstrings
  2887. (http://bugs.gnu.org/12173)
  2888. ** web client: correctly handle uri-query, etc. in relative URI headers
  2889. (http://bugs.gnu.org/12827)
  2890. ** Fix docs for R6RS `hashtable-copy'
  2891. ** R6RS `string-for-each' now accepts multiple string arguments
  2892. ** Fix out-of-range error in the compiler's CSE pass
  2893. (http://bugs.gnu.org/12883)
  2894. ** Add missing R6RS `open-file-input/output-port' procedure
  2895. ** Futures: Avoid creating the worker pool more than once
  2896. ** Fix invalid assertion about mutex ownership in threads.c
  2897. (http://bugs.gnu.org/12719)
  2898. ** Have `SCM_NUM2FLOAT' and `SCM_NUM2DOUBLE' use `scm_to_double'
  2899. ** The `scandir' procedure now uses `lstat' instead of `stat'
  2900. ** Fix `generalized-vector->list' indexing bug with shared arrays
  2901. (http://bugs.gnu.org/12465)
  2902. ** web: Change `http-get' to try all the addresses for the given URI
  2903. ** Implement `hash' for structs
  2904. (http://lists.gnu.org/archive/html/guile-devel/2012-10/msg00031.html)
  2905. ** `read' now adds source properties for data types beyond pairs
  2906. ** Improve error reporting in `append!'
  2907. ** In fold-matches, set regexp/notbol unless matching string start
  2908. ** Don't stat(2) and access(2) the .go location before using it
  2909. ** SRFI-19: use zero padding for hours in ISO 8601 format, not blanks
  2910. ** web: Fix uri-encoding for strings with no unreserved chars, and octets 0-15
  2911. ** More robust texinfo alias handling
  2912. ** Optimize `format' and `simple-format'
  2913. (http://bugs.gnu.org/12033)
  2914. ** Angle of -0.0 is pi, not zero
  2915. Changes in 2.0.6 (since 2.0.5):
  2916. * Notable changes
  2917. ** New optimization pass: common subexpression elimination (CSE)
  2918. Guile's optimizer will now run a CSE pass after partial evaluation.
  2919. This pass propagates static information about branches taken, bound
  2920. lexicals, and effects from an expression's dominators. It can replace
  2921. common subexpressions with their boolean values (potentially enabling
  2922. dead code elimination), equivalent bound lexicals, or it can elide them
  2923. entirely, depending on the context in which they are executed. This
  2924. pass is especially useful in removing duplicate type checks, such as
  2925. those produced by SRFI-9 record accessors.
  2926. ** Improvements to the partial evaluator
  2927. Peval can now hoist tests that are common to both branches of a
  2928. conditional into the test. This can help with long chains of
  2929. conditionals, such as those generated by the `match' macro. Peval can
  2930. now do simple beta-reductions of procedures with rest arguments. It
  2931. also avoids residualizing degenerate lexical aliases, even when full
  2932. inlining is not possible. Finally, peval now uses the effects analysis
  2933. introduced for the CSE pass. More precise effects analysis allows peval
  2934. to move more code.
  2935. ** Run finalizers asynchronously in asyncs
  2936. Finalizers are now run asynchronously, via an async. See Asyncs in the
  2937. manual. This allows Guile and user code to safely allocate memory while
  2938. holding a mutex.
  2939. ** Update SRFI-14 character sets to Unicode 6.1
  2940. Note that this update causes the Latin-1 characters `§' and `¶' to be
  2941. reclassified as punctuation. They were previously considered to be part
  2942. of `char-set:symbol'.
  2943. ** Better source information for datums
  2944. When the `positions' reader option is on, as it is by default, Guile's
  2945. reader will record source information for more kinds of datums.
  2946. ** Improved error and warning messages
  2947. `syntax-violation' errors now prefer `subform' for source info, with
  2948. `form' as fallback. Syntactic errors in `cond' and `case' now produce
  2949. better errors. `case' can now warn on duplicate datums, or datums that
  2950. cannot be usefully compared with `eqv?'. `-Warity-mismatch' now handles
  2951. applicable structs. `-Wformat' is more robust in the presence of
  2952. `gettext'. Finally, various exceptions thrown by the Web modules now
  2953. define appropriate exception printers.
  2954. ** A few important bug fixes in the HTTP modules.
  2955. Guile's web server framework now checks if an application returns a body
  2956. where it is not permitted, for example in response to a HEAD request,
  2957. and warn or truncate the response as appropriate. Bad requests now
  2958. cause a 400 Bad Request response to be printed before closing the port.
  2959. Finally, some date-printing and URL-parsing bugs were fixed.
  2960. ** Pretty-print improvements
  2961. When Guile needs to pretty-print Tree-IL, it will try to reconstruct
  2962. `cond', `or`, and other derived syntax forms from the primitive tree-IL
  2963. forms. It also uses the original names instead of the fresh unique
  2964. names, when it is unambiguous to do so. This can be seen in the output
  2965. of REPL commands like `,optimize'.
  2966. Also, the `pretty-print' procedure has a new keyword argument,
  2967. `#:max-expr-width'.
  2968. ** Fix memory leak involving applicable SMOBs
  2969. At some point in the 1.9.x series, Guile began leaking any applicable
  2970. SMOB that was actually applied. (There was a weak-key map from SMOB to
  2971. trampoline functions, where the value had a strong reference on the
  2972. key.) This has been fixed. There was much rejoicing!
  2973. ** Support for HTTP/1.1 chunked transfer coding
  2974. See "Transfer Codings" in the manual, for more.
  2975. ** Micro-optimizations
  2976. A pile of micro-optimizations: the `string-trim' function when called
  2977. with `char-set:whitespace'; the `(web http)' parsers; SMOB application;
  2978. conversion of raw UTF-8 and UTF-32 data to and from SCM strings; vlists
  2979. and vhashes; `read' when processing string literals.
  2980. ** Incompatible change to `scandir'
  2981. As was the original intention, `scandir' now runs the `select?'
  2982. procedure on all items, including subdirectories and the `.' and `..'
  2983. entries. It receives the basename of the file in question instead of
  2984. the full name. We apologize for this incompatible change to this
  2985. function introduced in the 2.0.4 release.
  2986. * Manual updates
  2987. The manual has been made much more consistent in its naming conventions
  2988. with regards to formal parameters of functions. Thanks to Bake Timmons.
  2989. * New interfaces
  2990. ** New C function: `scm_to_pointer'
  2991. ** New C inline functions: `scm_new_smob', `scm_new_double_smob'
  2992. ** (ice-9 format): Add ~h specifier for localized number output.
  2993. ** (web response): New procedure: `response-must-not-include-body?'
  2994. ** New predicate: 'supports-source-properties?'
  2995. ** New C helpers: `scm_c_values', `scm_c_nvalues'
  2996. ** Newly public inline C function: `scm_unget_byte'
  2997. ** (language tree-il): New functions: `tree-il=?', `tree-il-hash'
  2998. ** New fluid: `%default-port-conversion-strategy'
  2999. ** New syntax: `=>' within `case'
  3000. ** (web http): `make-chunked-input-port', `make-chunked-output-port'
  3001. ** (web http): `declare-opaque-header!'
  3002. Search the manual for these identifiers, for more information.
  3003. * New deprecations
  3004. ** `close-io-port' deprecated
  3005. Use `close-port'.
  3006. ** `scm_sym2var' deprecated
  3007. In most cases, replace with `scm_lookup' or `scm_module_variable'. Use
  3008. `scm_define' or `scm_module_ensure_local_variable' if the second
  3009. argument is nonzero. See "Accessing Modules from C" in the manual, for
  3010. full details.
  3011. ** Lookup closures deprecated
  3012. These were never documented. See "Module System Reflection" in the
  3013. manual for replacements.
  3014. * Build fixes
  3015. ** Fix compilation against uninstalled Guile on non-GNU platforms.
  3016. ** Fix `SCM_I_ERROR' definition for MinGW without networking.
  3017. ** Fix compilation with the Sun C compiler.
  3018. ** Fix check for `clock_gettime' on OpenBSD and some other systems.
  3019. ** Fix build with --enable-debug-malloc.
  3020. ** Honor $(program_transform_name) for the `guile-tools' symlink.
  3021. ** Fix cross-compilation of GOOPS-using code.
  3022. * Bug fixes
  3023. ** Fix use of unitialized stat buffer in search-path of absolute paths.
  3024. ** Avoid calling `freelocale' with a NULL argument.
  3025. ** Work around erroneous tr_TR locale in Darwin 8 in tests.
  3026. ** Fix `getaddrinfo' test for Darwin 8.
  3027. ** Use Gnulib's `regex' module for better regex portability.
  3028. ** `source-properties' and friends work on any object
  3029. ** Rewrite open-process in C, for robustness related to threads and fork
  3030. ** Fix <TAG>vector-length when applied to other uniform vector types
  3031. ** Fix escape-only prompt optimization (was disabled previously)
  3032. ** Fix a segfault when /dev/urandom is not accessible
  3033. ** Fix flush on soft ports, so that it actually runs.
  3034. ** Better compatibility of SRFI-9 records with core records
  3035. ** Fix and clarify documentation of `sorted?'.
  3036. ** Fix IEEE-754 endianness conversion in bytevectors.
  3037. ** Correct thunk check in the `wind' instruction.
  3038. ** Add @acronym support to texinfo modules
  3039. ** Fix docbook->texi for <ulink> without URL
  3040. ** Fix `setvbuf' to leave the line/column number unchanged.
  3041. ** Add missing public declaration for `scm_take_from_input_buffers'.
  3042. ** Fix relative file name canonicalization with empty %LOAD-PATH entries.
  3043. ** Import newer (ice-9 match) from Chibi-Scheme.
  3044. ** Fix unbound variables and unbound values in ECMAScript runtime.
  3045. ** Make SRFI-6 string ports Unicode-capable.
  3046. Changes in 2.0.5 (since 2.0.4):
  3047. This release fixes the binary interface information (SONAME) of
  3048. libguile, which was incorrect in 2.0.4. It does not contain other
  3049. changes.
  3050. Changes in 2.0.4 (since 2.0.3):
  3051. * Notable changes
  3052. ** Better debuggability for interpreted procedures.
  3053. Guile 2.0 came with a great debugging experience for compiled
  3054. procedures, but the story for interpreted procedures was terrible. Now,
  3055. at least, interpreted procedures have names, and the `arity' procedure
  3056. property is always correct (or, as correct as it can be, in the presence
  3057. of `case-lambda').
  3058. ** Support for cross-compilation.
  3059. One can now use a native Guile to cross-compile `.go' files for a
  3060. different architecture. See the documentation for `--target' in the
  3061. "Compilation" section of the manual, for information on how to use the
  3062. cross-compiler. See the "Cross building Guile" section of the README,
  3063. for more on how to cross-compile Guile itself.
  3064. ** The return of `local-eval'.
  3065. Back by popular demand, `the-environment' and `local-eval' allow the
  3066. user to capture a lexical environment, and then evaluate arbitrary
  3067. expressions in that context. There is also a new `local-compile'
  3068. command. See "Local Evaluation" in the manual, for more. Special
  3069. thanks to Mark Weaver for an initial implementation of this feature.
  3070. ** Fluids can now have default values.
  3071. Fluids are used for dynamic and thread-local binding. They have always
  3072. inherited their values from the context or thread that created them.
  3073. However, there was a case in which a new thread would enter Guile, and
  3074. the default values of all the fluids would be `#f' for that thread.
  3075. This has now been fixed so that `make-fluid' has an optional default
  3076. value for fluids in unrelated dynamic roots, which defaults to `#f'.
  3077. ** Garbage collector tuning.
  3078. The garbage collector has now been tuned to run more often under some
  3079. circumstances.
  3080. *** Unmanaged allocation
  3081. The new `scm_gc_register_allocation' function will notify the collector
  3082. of unmanaged allocation. This will cause the collector to run sooner.
  3083. Guile's `scm_malloc', `scm_calloc', and `scm_realloc' unmanaged
  3084. allocators eventually call this function. This leads to better
  3085. performance under steady-state unmanaged allocation.
  3086. *** Transient allocation
  3087. When the collector runs, it will try to record the total memory
  3088. footprint of a process, if the platform supports this information. If
  3089. the memory footprint is growing, the collector will run more frequently.
  3090. This reduces the increase of the resident size of a process in response
  3091. to a transient increase in allocation.
  3092. *** Management of threads, bignums
  3093. Creating a thread will allocate a fair amount of memory. Guile now does
  3094. some GC work (using `GC_collect_a_little') when allocating a thread.
  3095. This leads to a better memory footprint when creating many short-lived
  3096. threads.
  3097. Similarly, bignums can occupy a lot of memory. Guile now offers hooks
  3098. to enable custom GMP allocators that end up calling
  3099. `scm_gc_register_allocation'. These allocators are enabled by default
  3100. when running Guile from the command-line. To enable them in libraries,
  3101. set the `scm_install_gmp_memory_functions' variable to a nonzero value
  3102. before loading Guile.
  3103. ** SRFI-39 parameters are available by default.
  3104. Guile now includes support for parameters, as defined by SRFI-39, in the
  3105. default environment. See "Parameters" in the manual, for more
  3106. information. `current-input-port', `current-output-port', and
  3107. `current-error-port' are now parameters.
  3108. ** Add `current-warning-port'.
  3109. Guile now outputs warnings on a separate port, `current-warning-port',
  3110. initialized to the value that `current-error-port' has on startup.
  3111. ** Syntax parameters.
  3112. Following Racket's lead, Guile now supports syntax parameters. See
  3113. "Syntax parameters" in the manual, for more.
  3114. Also see Barzilay, Culpepper, and Flatt's 2011 SFP workshop paper,
  3115. "Keeping it Clean with syntax-parameterize".
  3116. ** Parse command-line arguments from the locale encoding.
  3117. Guile now attempts to parse command-line arguments using the user's
  3118. locale. However for backwards compatibility with other 2.0.x releases,
  3119. it does so without actually calling `setlocale'. Please report any bugs
  3120. in this facility to bug-guile@gnu.org.
  3121. ** One-armed conditionals: `when' and `unless'
  3122. Guile finally has `when' and `unless' in the default environment. Use
  3123. them whenever you would use an `if' with only one branch. See
  3124. "Conditionals" in the manual, for more.
  3125. ** `current-filename', `add-to-load-path'
  3126. There is a new form, `(current-filename)', which expands out to the
  3127. source file in which it occurs. Combined with the new
  3128. `add-to-load-path', this allows simple scripts to easily add nearby
  3129. directories to the load path. See "Load Paths" in the manual, for more.
  3130. ** `random-state-from-platform'
  3131. This procedure initializes a random seed using good random sources
  3132. available on your platform, such as /dev/urandom. See "Random Number
  3133. Generation" in the manual, for more.
  3134. ** Warn about unsupported `simple-format' options.
  3135. The `-Wformat' compilation option now reports unsupported format options
  3136. passed to `simple-format'.
  3137. ** Manual updates
  3138. Besides the sections already mentioned, the following manual sections
  3139. are new in this release: "Modules and the File System", "Module System
  3140. Reflection", "Syntax Transformer Helpers", and "Local Inclusion".
  3141. * New interfaces
  3142. ** (ice-9 session): `apropos-hook'
  3143. ** New print option: `escape-newlines', defaults to #t.
  3144. ** (ice-9 ftw): `file-system-fold', `file-system-tree', `scandir'
  3145. ** `scm_c_value_ref': access to multiple returned values from C
  3146. ** scm_call (a varargs version), scm_call_7, scm_call_8, scm_call_9
  3147. ** Some new syntax helpers in (system syntax)
  3148. Search the manual for these identifiers and modules, for more.
  3149. * Build fixes
  3150. ** FreeBSD build fixes.
  3151. ** OpenBSD compilation fixes.
  3152. ** Solaris 2.10 test suite fixes.
  3153. ** IA64 compilation fix.
  3154. ** MinGW build fixes.
  3155. ** Work around instruction reordering on SPARC and HPPA in the VM.
  3156. ** Gnulib updates: added `dirfd', `setenv' modules.
  3157. * Bug fixes
  3158. ** Add a deprecated alias for $expt.
  3159. ** Add an exception printer for `getaddrinfo-error'.
  3160. ** Add deprecated shim for `scm_display_error' with stack as first argument.
  3161. ** Add warnings for unsupported `simple-format' options.
  3162. ** Allow overlapping regions to be passed to `bytevector-copy!'.
  3163. ** Better function prologue disassembly
  3164. ** Compiler: fix miscompilation of (values foo ...) in some contexts.
  3165. ** Compiler: fix serialization of #nil-terminated lists.
  3166. ** Compiler: allow values bound in non-tail let expressions to be collected.
  3167. ** Deprecate SCM_ASRTGO.
  3168. ** Document invalidity of (begin) as expression; add back-compat shim.
  3169. ** Don't leak file descriptors when mmaping objcode.
  3170. ** Empty substrings no longer reference the original stringbuf.
  3171. ** FFI: Fix `set-pointer-finalizer!' to leave the type cell unchanged.
  3172. ** FFI: Hold a weak reference to the CIF made by `procedure->pointer'.
  3173. ** FFI: Hold a weak reference to the procedure passed to `procedure->pointer'.
  3174. ** FFI: Properly unpack small integer return values in closure call.
  3175. ** Fix R6RS `fold-left' so the accumulator is the first argument.
  3176. ** Fix bit-set*! bug from 2005.
  3177. ** Fix bug in `make-repl' when `lang' is actually a <language>.
  3178. ** Fix bugs related to mutation, the null string, and shared substrings.
  3179. ** Fix <dynwind> serialization.
  3180. ** Fix erroneous check in `set-procedure-properties!'.
  3181. ** Fix generalized-vector-{ref,set!} for slices.
  3182. ** Fix error messages involving definition forms.
  3183. ** Fix primitive-eval to return #<unspecified> for definitions.
  3184. ** HTTP: Extend handling of "Cache-Control" header.
  3185. ** HTTP: Fix qstring writing of cache-extension values
  3186. ** HTTP: Fix validators for various list-style headers.
  3187. ** HTTP: Permit non-date values for Expires header.
  3188. ** HTTP: `write-request-line' writes absolute paths, not absolute URIs.
  3189. ** Hack the port-column of current-output-port after printing a prompt.
  3190. ** Make sure `regexp-quote' tests use Unicode-capable string ports.
  3191. ** Peval: Fix bugs in the new optimizer.
  3192. ** Statistically unique marks and labels, for robust hygiene across sessions.
  3193. ** Web: Allow URIs with empty authorities, like "file:///etc/hosts".
  3194. ** `,language' at REPL sets the current-language fluid.
  3195. ** `primitive-load' returns the value(s) of the last expression.
  3196. ** `scm_from_stringn' always returns unique strings.
  3197. ** `scm_i_substring_copy' tries to narrow the substring.
  3198. ** i18n: Fix gc_malloc/free mismatch on non-GNU systems.
  3199. Changes in 2.0.3 (since 2.0.2):
  3200. * Speed improvements
  3201. ** Guile has a new optimizer, `peval'.
  3202. `Peval' is a partial evaluator that performs constant folding, dead code
  3203. elimination, copy propagation, and inlining. By default it runs on
  3204. every piece of code that Guile compiles, to fold computations that can
  3205. happen at compile-time, so they don't have to happen at runtime.
  3206. If we did our job right, the only impact you would see would be your
  3207. programs getting faster. But if you notice slowdowns or bloated code,
  3208. please send a mail to bug-guile@gnu.org with details.
  3209. Thanks to William R. Cook, Oscar Waddell, and Kent Dybvig for inspiring
  3210. peval and its implementation.
  3211. You can see what peval does on a given piece of code by running the new
  3212. `,optimize' REPL meta-command, and comparing it to the output of
  3213. `,expand'. See "Compile Commands" in the manual, for more.
  3214. ** Fewer calls to `stat'.
  3215. Guile now stats only the .go file and the .scm file when loading a fresh
  3216. compiled file.
  3217. * Notable changes
  3218. ** New module: `(web client)', a simple synchronous web client.
  3219. See "Web Client" in the manual, for more.
  3220. ** Users can now install compiled `.go' files.
  3221. See "Installing Site Packages" in the manual.
  3222. ** Remove Front-Cover and Back-Cover text from the manual.
  3223. The manual is still under the GNU Free Documentation License, but no
  3224. longer has any invariant sections.
  3225. ** More helpful `guild help'.
  3226. `guild' is Guile's multi-tool, for use in shell scripting. Now it has a
  3227. nicer interface for querying the set of existing commands, and getting
  3228. help on those commands. Try it out and see!
  3229. ** New macro: `define-syntax-rule'
  3230. `define-syntax-rule' is a shorthand to make a `syntax-rules' macro with
  3231. one clause. See "Syntax Rules" in the manual, for more.
  3232. ** The `,time' REPL meta-command now has more precision.
  3233. The output of this command now has microsecond precision, instead of
  3234. 10-millisecond precision.
  3235. ** `(ice-9 match)' can now match records.
  3236. See "Pattern Matching" in the manual, for more on matching records.
  3237. ** New module: `(language tree-il debug)'.
  3238. This module provides a tree-il verifier. This is useful for people that
  3239. generate tree-il, usually as part of a language compiler.
  3240. ** New functions: `scm_is_exact', `scm_is_inexact'.
  3241. These provide a nice C interface for Scheme's `exact?' and `inexact?',
  3242. respectively.
  3243. * Bugs fixed
  3244. See the git log (or the ChangeLog) for more details on these bugs.
  3245. ** Fix order of importing modules and resolving duplicates handlers.
  3246. ** Fix a number of bugs involving extended (merged) generics.
  3247. ** Fix invocation of merge-generics duplicate handler.
  3248. ** Fix write beyond array end in arrays.c.
  3249. ** Fix read beyond end of hashtable size array in hashtab.c.
  3250. ** (web http): Locale-independent parsing and serialization of dates.
  3251. ** Ensure presence of Host header in HTTP/1.1 requests.
  3252. ** Fix take-right and drop-right for improper lists.
  3253. ** Fix leak in get_current_locale().
  3254. ** Fix recursive define-inlinable expansions.
  3255. ** Check that srfi-1 procedure arguments are procedures.
  3256. ** Fix r6rs `map' for multiple returns.
  3257. ** Fix scm_tmpfile leak on POSIX platforms.
  3258. ** Fix a couple of leaks (objcode->bytecode, make-boot-program).
  3259. ** Fix guile-lib back-compatibility for module-stexi-documentation.
  3260. ** Fix --listen option to allow other ports.
  3261. ** Fix scm_to_latin1_stringn for substrings.
  3262. ** Fix compilation of untyped arrays of rank not 1.
  3263. ** Fix unparse-tree-il of <dynset>.
  3264. ** Fix reading of #||||#.
  3265. ** Fix segfault in GOOPS when class fields are redefined.
  3266. ** Prefer poll(2) over select(2) to allow file descriptors above FD_SETSIZE.
  3267. Changes in 2.0.2 (since 2.0.1):
  3268. * Notable changes
  3269. ** `guile-tools' renamed to `guild'
  3270. The new name is shorter. Its intended future use is for a CPAN-like
  3271. system for Guile wizards and journeyfolk to band together to share code;
  3272. hence the name. `guile-tools' is provided as a backward-compatible
  3273. symbolic link. See "Using Guile Tools" in the manual, for more.
  3274. ** New control operators: `shift' and `reset'
  3275. See "Shift and Reset" in the manual, for more information.
  3276. ** `while' as an expression
  3277. Previously the return value of `while' was unspecified. Now its
  3278. values are specified both in the case of normal termination, and via
  3279. termination by invoking `break', possibly with arguments. See "while
  3280. do" in the manual for more.
  3281. ** Disallow access to handles of weak hash tables
  3282. `hash-get-handle' and `hash-create-handle!' are no longer permitted to
  3283. be called on weak hash tables, because the fields in a weak handle could
  3284. be nulled out by the garbage collector at any time, but yet they are
  3285. otherwise indistinguishable from pairs. Use `hash-ref' and `hash-set!'
  3286. instead.
  3287. ** More precision for `get-internal-run-time', `get-internal-real-time'
  3288. On 64-bit systems which support POSIX clocks, Guile's internal timing
  3289. procedures offer nanosecond resolution instead of the 10-millisecond
  3290. resolution previously available. 32-bit systems now use 1-millisecond
  3291. timers.
  3292. ** Guile now measures time spent in GC
  3293. `gc-stats' now returns a meaningful value for `gc-time-taken'.
  3294. ** Add `gcprof'
  3295. The statprof profiler now exports a `gcprof' procedure, driven by the
  3296. `after-gc-hook', to see which parts of your program are causing GC. Let
  3297. us know if you find it useful.
  3298. ** `map', `for-each' and some others now implemented in Scheme
  3299. We would not mention this in NEWS, as it is not a user-visible change,
  3300. if it were not for one thing: `map' and `for-each' are no longer
  3301. primitive generics. Instead they are normal bindings, which can be
  3302. wrapped by normal generics. This fixes some modularity issues between
  3303. core `map', SRFI-1 `map', and GOOPS.
  3304. Also it's pretty cool that we can do this without a performance impact.
  3305. ** Add `scm_peek_byte_or_eof'.
  3306. This helper is like `scm_peek_char_or_eof', but for bytes instead of
  3307. full characters.
  3308. ** Implement #:stop-at-first-non-option option for getopt-long
  3309. See "getopt-long Reference" in the manual, for more information.
  3310. ** Improve R6RS conformance for conditions in the I/O libraries
  3311. The `(rnrs io simple)' module now raises the correct R6RS conditions in
  3312. error cases. `(rnrs io ports)' is also more correct now, though it is
  3313. still a work in progress.
  3314. ** All deprecated routines emit warnings
  3315. A few deprecated routines were lacking deprecation warnings. This has
  3316. been fixed now.
  3317. * Speed improvements
  3318. ** Constants in compiled code now share state better
  3319. Constants with shared state, like `("foo")' and `"foo"', now share state
  3320. as much as possible, in the entire compilation unit. This cuts compiled
  3321. `.go' file sizes in half, generally, and speeds startup.
  3322. ** VLists: optimize `vlist-fold-right', and add `vhash-fold-right'
  3323. These procedures are now twice as fast as they were.
  3324. ** UTF-8 ports to bypass `iconv' entirely
  3325. This reduces memory usage in a very common case.
  3326. ** Compiler speedups
  3327. The compiler is now about 40% faster. (Note that this is only the case
  3328. once the compiler is itself compiled, so the build still takes as long
  3329. as it did before.)
  3330. ** VM speed tuning
  3331. Some assertions that were mostly useful for sanity-checks on the
  3332. bytecode compiler are now off for both "regular" and "debug" engines.
  3333. This together with a fix to cache a TLS access and some other tweaks
  3334. improve the VM's performance by about 20%.
  3335. ** SRFI-1 list-set optimizations
  3336. lset-adjoin and lset-union now have fast paths for eq? sets.
  3337. ** `memq', `memv' optimizations
  3338. These procedures are now at least twice as fast than in 2.0.1.
  3339. * Deprecations
  3340. ** Deprecate scm_whash API
  3341. `scm_whash_get_handle', `SCM_WHASHFOUNDP', `SCM_WHASHREF',
  3342. `SCM_WHASHSET', `scm_whash_create_handle', `scm_whash_lookup', and
  3343. `scm_whash_insert' are now deprecated. Use the normal hash table API
  3344. instead.
  3345. ** Deprecate scm_struct_table
  3346. `SCM_STRUCT_TABLE_NAME', `SCM_SET_STRUCT_TABLE_NAME',
  3347. `SCM_STRUCT_TABLE_CLASS', `SCM_SET_STRUCT_TABLE_CLASS',
  3348. `scm_struct_table', and `scm_struct_create_handle' are now deprecated.
  3349. These routines formed part of the internals of the map between structs
  3350. and classes.
  3351. ** Deprecate scm_internal_dynamic_wind
  3352. The `scm_t_inner' type and `scm_internal_dynamic_wind' are deprecated,
  3353. as the `scm_dynwind' API is better, and this API encourages users to
  3354. stuff SCM values into pointers.
  3355. ** Deprecate scm_immutable_cell, scm_immutable_double_cell
  3356. These routines are deprecated, as the GC_STUBBORN API doesn't do
  3357. anything any more.
  3358. * Manual updates
  3359. Andreas Rottman kindly transcribed the missing parts of the `(rnrs io
  3360. ports)' documentation from the R6RS documentation. Thanks Andreas!
  3361. * Bugs fixed
  3362. ** Fix double-loading of script in -ds case
  3363. ** -x error message fix
  3364. ** iconveh-related cross-compilation fixes
  3365. ** Fix small integer return value packing on big endian machines.
  3366. ** Fix hash-set! in weak-value table from non-immediate to immediate
  3367. ** Fix call-with-input-file & relatives for multiple values
  3368. ** Fix `hash' for inf and nan
  3369. ** Fix libguile internal type errors caught by typing-strictness==2
  3370. ** Fix compile error in MinGW fstat socket detection
  3371. ** Fix generation of auto-compiled file names on MinGW
  3372. ** Fix multithreaded access to internal hash tables
  3373. ** Emit a 1-based line number in error messages
  3374. ** Fix define-module ordering
  3375. ** Fix several POSIX functions to use the locale encoding
  3376. ** Add type and range checks to the complex generalized vector accessors
  3377. ** Fix unaligned accesses for bytevectors of complex numbers
  3378. ** Fix '(a #{.} b)
  3379. ** Fix erroneous VM stack overflow for canceled threads
  3380. Changes in 2.0.1 (since 2.0.0):
  3381. * Notable changes
  3382. ** guile.m4 supports linking with rpath
  3383. The GUILE_FLAGS macro now sets GUILE_LIBS and GUILE_LTLIBS, which
  3384. include appropriate directives to the linker to include libguile-2.0.so
  3385. in the runtime library lookup path.
  3386. ** `begin' expands macros in its body before other expressions
  3387. This enables support for programs like the following:
  3388. (begin
  3389. (define even?
  3390. (lambda (x)
  3391. (or (= x 0) (odd? (- x 1)))))
  3392. (define-syntax odd?
  3393. (syntax-rules ()
  3394. ((odd? x) (not (even? x)))))
  3395. (even? 10))
  3396. ** REPL reader usability enhancements
  3397. The REPL now flushes input after a read error, which should prevent one
  3398. error from causing other errors. The REPL also now interprets comments
  3399. as whitespace.
  3400. ** REPL output has configurable width
  3401. The REPL now defaults to output with the current terminal's width, in
  3402. columns. See "Debug Commands" in the manual for more information on
  3403. the ,width command.
  3404. ** Better C access to the module system
  3405. Guile now has convenient C accessors to look up variables or values in
  3406. modules and their public interfaces. See `scm_c_public_ref' and friends
  3407. in "Accessing Modules from C" in the manual.
  3408. ** Added `scm_call_5', `scm_call_6'
  3409. See "Fly Evaluation" in the manual.
  3410. ** Added `scm_from_latin1_keyword', `scm_from_utf8_keyword'
  3411. See "Keyword Procedures" in the manual, for more. Note that
  3412. `scm_from_locale_keyword' should not be used when the name is a C string
  3413. constant.
  3414. ** R6RS unicode and string I/O work
  3415. Added efficient implementations of `get-string-n' and `get-string-n!'
  3416. for binary ports. Exported `current-input-port', `current-output-port'
  3417. and `current-error-port' from `(rnrs io ports)', and enhanced support
  3418. for transcoders.
  3419. ** Added `pointer->scm', `scm->pointer' to `(system foreign)'
  3420. These procedure are useful if one needs to pass and receive SCM values
  3421. to and from foreign functions. See "Foreign Variables" in the manual,
  3422. for more.
  3423. ** Added `heap-allocated-since-gc' to `(gc-stats)'
  3424. Also fixed the long-standing bug in the REPL `,stat' command.
  3425. ** Add `on-error' REPL option
  3426. This option controls what happens when an error occurs at the REPL, and
  3427. defaults to `debug', indicating that Guile should enter the debugger.
  3428. Other values include `report', which will simply print a backtrace
  3429. without entering the debugger. See "System Commands" in the manual.
  3430. ** Enforce immutability of string literals
  3431. Attempting to mutate a string literal now causes a runtime error.
  3432. ** Fix pthread redirection
  3433. Guile 2.0.0 shipped with headers that, if configured with pthread
  3434. support, would re-define `pthread_create', `pthread_join', and other API
  3435. to redirect to the BDW-GC wrappers, `GC_pthread_create', etc. This was
  3436. unintended, and not necessary: because threads must enter Guile with
  3437. `scm_with_guile', Guile can handle thread registration itself, without
  3438. needing to make the GC aware of all threads. This oversight has been
  3439. fixed.
  3440. ** `with-continuation-barrier' now unwinds on `quit'
  3441. A throw to `quit' in a continuation barrier will cause Guile to exit.
  3442. Before, it would do so before unwinding to the barrier, which would
  3443. prevent cleanup handlers from running. This has been fixed so that it
  3444. exits only after unwinding.
  3445. ** `string->pointer' and `pointer->string' have optional encoding arg
  3446. This allows users of the FFI to more easily deal in strings with
  3447. particular (non-locale) encodings, like "utf-8". See "Void Pointers and
  3448. Byte Access" in the manual, for more.
  3449. ** R6RS fixnum arithmetic optimizations
  3450. R6RS fixnum operations are are still slower than generic arithmetic,
  3451. however.
  3452. ** New procedure: `define-inlinable'
  3453. See "Inlinable Procedures" in the manual, for more.
  3454. ** New procedure: `exact-integer-sqrt'
  3455. See "Integer Operations" in the manual, for more.
  3456. ** "Extended read syntax" for symbols parses better
  3457. In #{foo}# symbols, backslashes are now treated as escapes, as the
  3458. symbol-printing code intended. Additionally, "\x" within #{foo}# is now
  3459. interpreted as starting an R6RS hex escape. This is backward compatible
  3460. because the symbol printer would never produce a "\x" before. The
  3461. printer also works better too.
  3462. ** Added `--fresh-auto-compile' option
  3463. This allows a user to invalidate the auto-compilation cache. It's
  3464. usually not needed. See "Compilation" in the manual, for a discussion.
  3465. * Manual updates
  3466. ** GOOPS documentation updates
  3467. ** New man page
  3468. Thanks to Mark Harig for improvements to guile.1.
  3469. ** SRFI-23 documented
  3470. The humble `error' SRFI now has an entry in the manual.
  3471. * New modules
  3472. ** `(ice-9 binary-ports)': "R6RS I/O Ports", in the manual
  3473. ** `(ice-9 eval-string)': "Fly Evaluation", in the manual
  3474. ** `(ice-9 command-line)', not documented yet
  3475. * Bugs fixed
  3476. ** Fixed `iconv_t' memory leak on close-port
  3477. ** Fixed some leaks with weak hash tables
  3478. ** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
  3479. ** `after-gc-hook' works again
  3480. ** `define-record-type' now allowed in nested contexts
  3481. ** `exact-integer-sqrt' now handles large integers correctly
  3482. ** Fixed C extension examples in manual
  3483. ** `vhash-delete' honors HASH argument
  3484. ** Make `locale-digit-grouping' more robust
  3485. ** Default exception printer robustness fixes
  3486. ** Fix presence of non-I CPPFLAGS in `guile-2.0.pc'
  3487. ** `read' updates line/column numbers when reading SCSH block comments
  3488. ** Fix imports of multiple custom interfaces of same module
  3489. ** Fix encoding scanning for non-seekable ports
  3490. ** Fix `setter' when called with a non-setter generic
  3491. ** Fix f32 and f64 bytevectors to not accept rationals
  3492. ** Fix description of the R6RS `finite?' in manual
  3493. ** Quotient, remainder and modulo accept inexact integers again
  3494. ** Fix `continue' within `while' to take zero arguments
  3495. ** Fix alignment for structures in FFI
  3496. ** Fix port-filename of stdin, stdout, stderr to match the docs
  3497. ** Fix weak hash table-related bug in `define-wrapped-pointer-type'
  3498. ** Fix partial continuation application with pending procedure calls
  3499. ** scm_{to,from}_locale_string use current locale, not current ports
  3500. ** Fix thread cleanup, by using a pthread_key destructor
  3501. ** Fix `quit' at the REPL
  3502. ** Fix a failure to sync regs in vm bytevector ops
  3503. ** Fix (texinfo reflection) to handle nested structures like syntax patterns
  3504. ** Fix stexi->html double translation
  3505. ** Fix tree-il->scheme fix for <prompt>
  3506. ** Fix compilation of <prompt> in <fix> in single-value context
  3507. ** Fix race condition in ensure-writable-dir
  3508. ** Fix error message on ,disassemble "non-procedure"
  3509. ** Fix prompt and abort with the boot evaluator
  3510. ** Fix `procedure->pointer' for functions returning `void'
  3511. ** Fix error reporting in dynamic-pointer
  3512. ** Fix problems detecting coding: in block comments
  3513. ** Fix duplicate load-path and load-compiled-path in compilation environment
  3514. ** Add fallback read(2) suppport for .go files if mmap(2) unavailable
  3515. ** Fix c32vector-set!, c64vector-set!
  3516. ** Fix mistakenly deprecated read syntax for uniform complex vectors
  3517. ** Fix parsing of exact numbers with negative exponents
  3518. ** Ignore SIGPIPE in (system repl server)
  3519. ** Fix optional second arg to R6RS log function
  3520. ** Fix R6RS `assert' to return true value.
  3521. ** Fix fencepost error when seeking in bytevector input ports
  3522. ** Gracefully handle `setlocale' errors when starting the REPL
  3523. ** Improve support of the `--disable-posix' configure option
  3524. ** Make sure R6RS binary ports pass `binary-port?' regardless of the locale
  3525. ** Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'
  3526. Changes in 2.0.0 (changes since the 1.8.x series):
  3527. * New modules (see the manual for details)
  3528. ** `(srfi srfi-18)', more sophisticated multithreading support
  3529. ** `(srfi srfi-27)', sources of random bits
  3530. ** `(srfi srfi-38)', External Representation for Data With Shared Structure
  3531. ** `(srfi srfi-42)', eager comprehensions
  3532. ** `(srfi srfi-45)', primitives for expressing iterative lazy algorithms
  3533. ** `(srfi srfi-67)', compare procedures
  3534. ** `(ice-9 i18n)', internationalization support
  3535. ** `(ice-9 futures)', fine-grain parallelism
  3536. ** `(rnrs bytevectors)', the R6RS bytevector API
  3537. ** `(rnrs io ports)', a subset of the R6RS I/O port API
  3538. ** `(system xref)', a cross-referencing facility (FIXME undocumented)
  3539. ** `(ice-9 vlist)', lists with constant-time random access; hash lists
  3540. ** `(system foreign)', foreign function interface
  3541. ** `(sxml match)', a pattern matcher for SXML
  3542. ** `(srfi srfi-9 gnu)', extensions to the SRFI-9 record library
  3543. ** `(system vm coverage)', a line-by-line code coverage library
  3544. ** `(web uri)', URI data type, parser, and unparser
  3545. ** `(web http)', HTTP header parsers and unparsers
  3546. ** `(web request)', HTTP request data type, reader, and writer
  3547. ** `(web response)', HTTP response data type, reader, and writer
  3548. ** `(web server)', Generic HTTP server
  3549. ** `(ice-9 poll)', a poll wrapper
  3550. ** `(web server http)', HTTP-over-TCP web server implementation
  3551. ** Replaced `(ice-9 match)' with Alex Shinn's compatible, hygienic matcher.
  3552. Guile's copy of Andrew K. Wright's `match' library has been replaced by
  3553. a compatible hygienic implementation by Alex Shinn. It is now
  3554. documented, see "Pattern Matching" in the manual.
  3555. Compared to Andrew K. Wright's `match', the new `match' lacks
  3556. `match-define', `match:error-control', `match:set-error-control',
  3557. `match:error', `match:set-error', and all structure-related procedures.
  3558. ** Imported statprof, SSAX, and texinfo modules from Guile-Lib
  3559. The statprof statistical profiler, the SSAX XML toolkit, and the texinfo
  3560. toolkit from Guile-Lib have been imported into Guile proper. See
  3561. "Standard Library" in the manual for more details.
  3562. ** Integration of lalr-scm, a parser generator
  3563. Guile has included Dominique Boucher's fine `lalr-scm' parser generator
  3564. as `(system base lalr)'. See "LALR(1) Parsing" in the manual, for more
  3565. information.
  3566. * Changes to the stand-alone interpreter
  3567. ** Guile now can compile Scheme to bytecode for a custom virtual machine.
  3568. Compiled code loads much faster than Scheme source code, and runs around
  3569. 3 or 4 times as fast, generating much less garbage in the process.
  3570. ** Evaluating Scheme code does not use the C stack.
  3571. Besides when compiling Guile itself, Guile no longer uses a recursive C
  3572. function as an evaluator. This obviates the need to check the C stack
  3573. pointer for overflow. Continuations still capture the C stack, however.
  3574. ** New environment variables: GUILE_LOAD_COMPILED_PATH,
  3575. GUILE_SYSTEM_LOAD_COMPILED_PATH
  3576. GUILE_LOAD_COMPILED_PATH is for compiled files what GUILE_LOAD_PATH is
  3577. for source files. It is a different path, however, because compiled
  3578. files are architecture-specific. GUILE_SYSTEM_LOAD_COMPILED_PATH is like
  3579. GUILE_SYSTEM_PATH.
  3580. ** New read-eval-print loop (REPL) implementation
  3581. Running Guile with no arguments drops the user into the new REPL. See
  3582. "Using Guile Interactively" in the manual, for more information.
  3583. ** Remove old Emacs interface
  3584. Guile had an unused `--emacs' command line argument that was supposed to
  3585. help when running Guile inside Emacs. This option has been removed, and
  3586. the helper functions `named-module-use!' and `load-emacs-interface' have
  3587. been deprecated.
  3588. ** Add `(system repl server)' module and `--listen' command-line argument
  3589. The `(system repl server)' module exposes procedures to listen on
  3590. sockets for connections, and serve REPLs to those clients. The --listen
  3591. command-line argument allows any Guile program to thus be remotely
  3592. debuggable.
  3593. See "Invoking Guile" for more information on `--listen'.
  3594. ** Command line additions
  3595. The guile binary now supports a new switch "-x", which can be used to
  3596. extend the list of filename extensions tried when loading files
  3597. (%load-extensions).
  3598. ** New reader options: `square-brackets', `r6rs-hex-escapes',
  3599. `hungry-eol-escapes'
  3600. The reader supports a new option (changeable via `read-options'),
  3601. `square-brackets', which instructs it to interpret square brackets as
  3602. parentheses. This option is on by default.
  3603. When the new `r6rs-hex-escapes' reader option is enabled, the reader
  3604. will recognize string escape sequences as defined in R6RS. R6RS string
  3605. escape sequences are incompatible with Guile's existing escapes, though,
  3606. so this option is off by default.
  3607. Additionally, Guile follows the R6RS newline escaping rules when the
  3608. `hungry-eol-escapes' option is enabled.
  3609. See "String Syntax" in the manual, for more information.
  3610. ** Function profiling and tracing at the REPL
  3611. The `,profile FORM' REPL meta-command can now be used to statistically
  3612. profile execution of a form, to see which functions are taking the most
  3613. time. See `,help profile' for more information.
  3614. Similarly, `,trace FORM' traces all function applications that occur
  3615. during the execution of `FORM'. See `,help trace' for more information.
  3616. ** Recursive debugging REPL on error
  3617. When Guile sees an error at the REPL, instead of saving the stack, Guile
  3618. will directly enter a recursive REPL in the dynamic context of the
  3619. error. See "Error Handling" in the manual, for more information.
  3620. A recursive REPL is the same as any other REPL, except that it
  3621. has been augmented with debugging information, so that one can inspect
  3622. the context of the error. The debugger has been integrated with the REPL
  3623. via a set of debugging meta-commands.
  3624. For example, one may access a backtrace with `,backtrace' (or
  3625. `,bt'). See "Interactive Debugging" in the manual, for more
  3626. information.
  3627. ** New `guile-tools' commands: `compile', `disassemble'
  3628. Pass the `--help' command-line option to these commands for more
  3629. information.
  3630. ** Guile now adds its install prefix to the LTDL_LIBRARY_PATH
  3631. Users may now install Guile to nonstandard prefixes and just run
  3632. `/path/to/bin/guile', instead of also having to set LTDL_LIBRARY_PATH to
  3633. include `/path/to/lib'.
  3634. ** Guile's Emacs integration is now more keyboard-friendly
  3635. Backtraces may now be disclosed with the keyboard in addition to the
  3636. mouse.
  3637. ** Load path change: search in version-specific paths before site paths
  3638. When looking for a module, Guile now searches first in Guile's
  3639. version-specific path (the library path), *then* in the site dir. This
  3640. allows Guile's copy of SSAX to override any Guile-Lib copy the user has
  3641. installed. Also it should cut the number of `stat' system calls by half,
  3642. in the common case.
  3643. ** Value history in the REPL on by default
  3644. By default, the REPL will save computed values in variables like `$1',
  3645. `$2', and the like. There are programmatic and interactive interfaces to
  3646. control this. See "Value History" in the manual, for more information.
  3647. ** Readline tab completion for arguments
  3648. When readline is enabled, tab completion works for arguments too, not
  3649. just for the operator position.
  3650. ** Expression-oriented readline history
  3651. Guile's readline history now tries to operate on expressions instead of
  3652. input lines. Let us know what you think!
  3653. ** Interactive Guile follows GNU conventions
  3654. As recommended by the GPL, Guile now shows a brief copyright and
  3655. warranty disclaimer on startup, along with pointers to more information.
  3656. * Changes to Scheme functions and syntax
  3657. ** Support for R6RS libraries
  3658. The `library' and `import' forms from the latest Scheme report have been
  3659. added to Guile, in such a way that R6RS libraries share a namespace with
  3660. Guile modules. R6RS modules may import Guile modules, and are available
  3661. for Guile modules to import via use-modules and all the rest. See "R6RS
  3662. Libraries" in the manual for more information.
  3663. ** Implementations of R6RS libraries
  3664. Guile now has implementations for all of the libraries defined in the
  3665. R6RS. Thanks to Julian Graham for this excellent hack. See "R6RS
  3666. Standard Libraries" in the manual for a full list of libraries.
  3667. ** Partial R6RS compatibility
  3668. Guile now has enough support for R6RS to run a reasonably large subset
  3669. of R6RS programs.
  3670. Guile is not fully R6RS compatible. Many incompatibilities are simply
  3671. bugs, though some parts of Guile will remain R6RS-incompatible for the
  3672. foreseeable future. See "R6RS Incompatibilities" in the manual, for more
  3673. information.
  3674. Please contact bug-guile@gnu.org if you have found an issue not
  3675. mentioned in that compatibility list.
  3676. ** New implementation of `primitive-eval'
  3677. Guile's `primitive-eval' is now implemented in Scheme. Actually there is
  3678. still a C evaluator, used when building a fresh Guile to interpret the
  3679. compiler, so we can compile eval.scm. Thereafter all calls to
  3680. primitive-eval are implemented by VM-compiled code.
  3681. This allows all of Guile's procedures, be they interpreted or compiled,
  3682. to execute on the same stack, unifying multiple-value return semantics,
  3683. providing for proper tail recursion between interpreted and compiled
  3684. code, and simplifying debugging.
  3685. As part of this change, the evaluator no longer mutates the internal
  3686. representation of the code being evaluated in a thread-unsafe manner.
  3687. There are two negative aspects of this change, however. First, Guile
  3688. takes a lot longer to compile now. Also, there is less debugging
  3689. information available for debugging interpreted code. We hope to improve
  3690. both of these situations.
  3691. There are many changes to the internal C evalator interface, but all
  3692. public interfaces should be the same. See the ChangeLog for details. If
  3693. we have inadvertantly changed an interface that you were using, please
  3694. contact bug-guile@gnu.org.
  3695. ** Procedure removed: `the-environment'
  3696. This procedure was part of the interpreter's execution model, and does
  3697. not apply to the compiler.
  3698. ** No more `local-eval'
  3699. `local-eval' used to exist so that one could evaluate code in the
  3700. lexical context of a function. Since there is no way to get the lexical
  3701. environment any more, as that concept has no meaning for the compiler,
  3702. and a different meaning for the interpreter, we have removed the
  3703. function.
  3704. If you think you need `local-eval', you should probably implement your
  3705. own metacircular evaluator. It will probably be as fast as Guile's
  3706. anyway.
  3707. ** Scheme source files will now be compiled automatically.
  3708. If a compiled .go file corresponding to a .scm file is not found or is
  3709. not fresh, the .scm file will be compiled on the fly, and the resulting
  3710. .go file stored away. An advisory note will be printed on the console.
  3711. Note that this mechanism depends on the timestamp of the .go file being
  3712. newer than that of the .scm file; if the .scm or .go files are moved
  3713. after installation, care should be taken to preserve their original
  3714. timestamps.
  3715. Auto-compiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
  3716. directory, where $XDG_CACHE_HOME defaults to ~/.cache. This directory
  3717. will be created if needed.
  3718. To inhibit automatic compilation, set the GUILE_AUTO_COMPILE environment
  3719. variable to 0, or pass --no-auto-compile on the Guile command line.
  3720. ** New POSIX procedures: `getrlimit' and `setrlimit'
  3721. Note however that the interface of these functions is likely to change
  3722. in the next prerelease.
  3723. ** New POSIX procedure: `getsid'
  3724. Scheme binding for the `getsid' C library call.
  3725. ** New POSIX procedure: `getaddrinfo'
  3726. Scheme binding for the `getaddrinfo' C library function.
  3727. ** Multicast socket options
  3728. Support was added for the IP_MULTICAST_TTL and IP_MULTICAST_IF socket
  3729. options. See "Network Sockets and Communication" in the manual, for
  3730. more information.
  3731. ** `recv!', `recvfrom!', `send', `sendto' now deal in bytevectors
  3732. These socket procedures now take bytevectors as arguments, instead of
  3733. strings. There is some deprecated string support, however.
  3734. ** New GNU procedures: `setaffinity' and `getaffinity'.
  3735. See "Processes" in the manual, for more information.
  3736. ** New procedures: `compose', `negate', and `const'
  3737. See "Higher-Order Functions" in the manual, for more information.
  3738. ** New procedure in `(oops goops)': `method-formals'
  3739. ** New procedures in (ice-9 session): `add-value-help-handler!',
  3740. `remove-value-help-handler!', `add-name-help-handler!'
  3741. `remove-name-help-handler!', `procedure-arguments'
  3742. The value and name help handlers provide some minimal extensibility to
  3743. the help interface. Guile-lib's `(texinfo reflection)' uses them, for
  3744. example, to make stexinfo help documentation available. See those
  3745. procedures' docstrings for more information.
  3746. `procedure-arguments' describes the arguments that a procedure can take,
  3747. combining arity and formals. For example:
  3748. (procedure-arguments resolve-interface)
  3749. => ((required . (name)) (rest . args))
  3750. Additionally, `module-commentary' is now publically exported from
  3751. `(ice-9 session).
  3752. ** Removed: `procedure->memoizing-macro', `procedure->syntax'
  3753. These procedures created primitive fexprs for the old evaluator, and are
  3754. no longer supported. If you feel that you need these functions, you
  3755. probably need to write your own metacircular evaluator (which will
  3756. probably be as fast as Guile's, anyway).
  3757. ** New language: ECMAScript
  3758. Guile now ships with one other high-level language supported,
  3759. ECMAScript. The goal is to support all of version 3.1 of the standard,
  3760. but not all of the libraries are there yet. This support is not yet
  3761. documented; ask on the mailing list if you are interested.
  3762. ** New language: Brainfuck
  3763. Brainfuck is a toy language that closely models Turing machines. Guile's
  3764. brainfuck compiler is meant to be an example of implementing other
  3765. languages. See the manual for details, or
  3766. http://en.wikipedia.org/wiki/Brainfuck for more information about the
  3767. Brainfuck language itself.
  3768. ** New language: Elisp
  3769. Guile now has an experimental Emacs Lisp compiler and runtime. You can
  3770. now switch to Elisp at the repl: `,language elisp'. All kudos to Daniel
  3771. Kraft and Brian Templeton, and all bugs to bug-guile@gnu.org.
  3772. ** Better documentation infrastructure for macros
  3773. It is now possible to introspect on the type of a macro, e.g.
  3774. syntax-rules, identifier-syntax, etc, and extract information about that
  3775. macro, such as the syntax-rules patterns or the defmacro arguments.
  3776. `(texinfo reflection)' takes advantage of this to give better macro
  3777. documentation.
  3778. ** Support for arbitrary procedure metadata
  3779. Building on its support for docstrings, Guile now supports multiple
  3780. docstrings, adding them to the tail of a compiled procedure's
  3781. properties. For example:
  3782. (define (foo)
  3783. "one"
  3784. "two"
  3785. 3)
  3786. (procedure-properties foo)
  3787. => ((name . foo) (documentation . "one") (documentation . "two"))
  3788. Also, vectors of pairs are now treated as additional metadata entries:
  3789. (define (bar)
  3790. #((quz . #f) (docstring . "xyzzy"))
  3791. 3)
  3792. (procedure-properties bar)
  3793. => ((name . bar) (quz . #f) (docstring . "xyzzy"))
  3794. This allows arbitrary literals to be embedded as metadata in a compiled
  3795. procedure.
  3796. ** The psyntax expander now knows how to interpret the @ and @@ special
  3797. forms.
  3798. ** The psyntax expander is now hygienic with respect to modules.
  3799. Free variables in a macro are scoped in the module that the macro was
  3800. defined in, not in the module the macro is used in. For example, code
  3801. like this works now:
  3802. (define-module (foo) #:export (bar))
  3803. (define (helper x) ...)
  3804. (define-syntax bar
  3805. (syntax-rules () ((_ x) (helper x))))
  3806. (define-module (baz) #:use-module (foo))
  3807. (bar qux)
  3808. It used to be you had to export `helper' from `(foo)' as well.
  3809. Thankfully, this has been fixed.
  3810. ** Support for version information in Guile's `module' form
  3811. Guile modules now have a `#:version' field. See "R6RS Version
  3812. References", "General Information about Modules", "Using Guile Modules",
  3813. and "Creating Guile Modules" in the manual for more information.
  3814. ** Support for renaming bindings on module export
  3815. Wherever Guile accepts a symbol as an argument to specify a binding to
  3816. export, it now also accepts a pair of symbols, indicating that a binding
  3817. should be renamed on export. See "Creating Guile Modules" in the manual
  3818. for more information.
  3819. ** New procedure: `module-export-all!'
  3820. This procedure exports all current and future bindings from a module.
  3821. Use as `(module-export-all! (current-module))'.
  3822. ** New procedure `reload-module', and `,reload' REPL command
  3823. See "Module System Reflection" and "Module Commands" in the manual, for
  3824. more information.
  3825. ** `eval-case' has been deprecated, and replaced by `eval-when'.
  3826. The semantics of `eval-when' are easier to understand. See "Eval When"
  3827. in the manual, for more information.
  3828. ** Guile is now more strict about prohibiting definitions in expression
  3829. contexts.
  3830. Although previous versions of Guile accepted it, the following
  3831. expression is not valid, in R5RS or R6RS:
  3832. (if test (define foo 'bar) (define foo 'baz))
  3833. In this specific case, it would be better to do:
  3834. (define foo (if test 'bar 'baz))
  3835. It is possible to circumvent this restriction with e.g.
  3836. `(module-define! (current-module) 'foo 'baz)'. Contact the list if you
  3837. have any questions.
  3838. ** Support for `letrec*'
  3839. Guile now supports `letrec*', a recursive lexical binding operator in
  3840. which the identifiers are bound in order. See "Local Bindings" in the
  3841. manual, for more details.
  3842. ** Internal definitions now expand to `letrec*'
  3843. Following the R6RS, internal definitions now expand to letrec* instead
  3844. of letrec. The following program is invalid for R5RS, but valid for
  3845. R6RS:
  3846. (define (foo)
  3847. (define bar 10)
  3848. (define baz (+ bar 20))
  3849. baz)
  3850. ;; R5RS and Guile <= 1.8:
  3851. (foo) => Unbound variable: bar
  3852. ;; R6RS and Guile >= 2.0:
  3853. (foo) => 30
  3854. This change should not affect correct R5RS programs, or programs written
  3855. in earlier Guile dialects.
  3856. ** Macro expansion produces structures instead of s-expressions
  3857. In the olden days, macroexpanding an s-expression would yield another
  3858. s-expression. Though the lexical variables were renamed, expansions of
  3859. core forms like `if' and `begin' were still non-hygienic, as they relied
  3860. on the toplevel definitions of `if' et al being the conventional ones.
  3861. The solution is to expand to structures instead of s-expressions. There
  3862. is an `if' structure, a `begin' structure, a `toplevel-ref' structure,
  3863. etc. The expander already did this for compilation, producing Tree-IL
  3864. directly; it has been changed now to do so when expanding for the
  3865. evaluator as well.
  3866. ** Defmacros must now produce valid Scheme expressions.
  3867. It used to be that defmacros could unquote in Scheme values, as a way of
  3868. supporting partial evaluation, and avoiding some hygiene issues. For
  3869. example:
  3870. (define (helper x) ...)
  3871. (define-macro (foo bar)
  3872. `(,helper ,bar))
  3873. Assuming this macro is in the `(baz)' module, the direct translation of
  3874. this code would be:
  3875. (define (helper x) ...)
  3876. (define-macro (foo bar)
  3877. `((@@ (baz) helper) ,bar))
  3878. Of course, one could just use a hygienic macro instead:
  3879. (define-syntax foo
  3880. (syntax-rules ()
  3881. ((_ bar) (helper bar))))
  3882. ** Guile's psyntax now supports docstrings and internal definitions.
  3883. The following Scheme is not strictly legal:
  3884. (define (foo)
  3885. "bar"
  3886. (define (baz) ...)
  3887. (baz))
  3888. However its intent is fairly clear. Guile interprets "bar" to be the
  3889. docstring of `foo', and the definition of `baz' is still in definition
  3890. context.
  3891. ** Support for settable identifier syntax
  3892. Following the R6RS, "variable transformers" are settable
  3893. identifier-syntax. See "Identifier macros" in the manual, for more
  3894. information.
  3895. ** syntax-case treats `_' as a placeholder
  3896. Following R6RS, a `_' in a syntax-rules or syntax-case pattern matches
  3897. anything, and binds no pattern variables. Unlike the R6RS, Guile also
  3898. permits `_' to be in the literals list for a pattern.
  3899. ** Macros need to be defined before their first use.
  3900. It used to be that with lazy memoization, this might work:
  3901. (define (foo x)
  3902. (ref x))
  3903. (define-macro (ref x) x)
  3904. (foo 1) => 1
  3905. But now, the body of `foo' is interpreted to mean a call to the toplevel
  3906. `ref' function, instead of a macro expansion. The solution is to define
  3907. macros before code that uses them.
  3908. ** Functions needed by macros at expand-time need to be present at
  3909. expand-time.
  3910. For example, this code will work at the REPL:
  3911. (define (double-helper x) (* x x))
  3912. (define-macro (double-literal x) (double-helper x))
  3913. (double-literal 2) => 4
  3914. But it will not work when a file is compiled, because the definition of
  3915. `double-helper' is not present at expand-time. The solution is to wrap
  3916. the definition of `double-helper' in `eval-when':
  3917. (eval-when (load compile eval)
  3918. (define (double-helper x) (* x x)))
  3919. (define-macro (double-literal x) (double-helper x))
  3920. (double-literal 2) => 4
  3921. See the documentation for eval-when for more information.
  3922. ** `macroexpand' produces structures, not S-expressions.
  3923. Given the need to maintain referential transparency, both lexically and
  3924. modular, the result of expanding Scheme expressions is no longer itself
  3925. an s-expression. If you want a human-readable approximation of the
  3926. result of `macroexpand', call `tree-il->scheme' from `(language
  3927. tree-il)'.
  3928. ** Removed function: `macroexpand-1'
  3929. It is unclear how to implement `macroexpand-1' with syntax-case, though
  3930. PLT Scheme does prove that it is possible.
  3931. ** New reader macros: #' #` #, #,@
  3932. These macros translate, respectively, to `syntax', `quasisyntax',
  3933. `unsyntax', and `unsyntax-splicing'. See the R6RS for more information.
  3934. These reader macros may be overridden by `read-hash-extend'.
  3935. ** Incompatible change to #'
  3936. Guile did have a #' hash-extension, by default, which just returned the
  3937. subsequent datum: #'foo => foo. In the unlikely event that anyone
  3938. actually used this, this behavior may be reinstated via the
  3939. `read-hash-extend' mechanism.
  3940. ** `unquote' and `unquote-splicing' accept multiple expressions
  3941. As per the R6RS, these syntax operators can now accept any number of
  3942. expressions to unquote.
  3943. ** Scheme expresssions may be commented out with #;
  3944. #; comments out an entire expression. See SRFI-62 or the R6RS for more
  3945. information.
  3946. ** Prompts: Delimited, composable continuations
  3947. Guile now has prompts as part of its primitive language. See "Prompts"
  3948. in the manual, for more information.
  3949. Expressions entered in at the REPL, or from the command line, are
  3950. surrounded by a prompt with the default prompt tag.
  3951. ** `make-stack' with a tail-called procedural narrowing argument no longer
  3952. works (with compiled procedures)
  3953. It used to be the case that a captured stack could be narrowed to select
  3954. calls only up to or from a certain procedure, even if that procedure
  3955. already tail-called another procedure. This was because the debug
  3956. information from the original procedure was kept on the stack.
  3957. Now with the new compiler, the stack only contains active frames from
  3958. the current continuation. A narrow to a procedure that is not in the
  3959. stack will result in an empty stack. To fix this, narrow to a procedure
  3960. that is active in the current continuation, or narrow to a specific
  3961. number of stack frames.
  3962. ** Backtraces through compiled procedures only show procedures that are
  3963. active in the current continuation
  3964. Similarly to the previous issue, backtraces in compiled code may be
  3965. different from backtraces in interpreted code. There are no semantic
  3966. differences, however. Please mail bug-guile@gnu.org if you see any
  3967. deficiencies with Guile's backtraces.
  3968. ** `positions' reader option enabled by default
  3969. This change allows primitive-load without --auto-compile to also
  3970. propagate source information through the expander, for better errors and
  3971. to let macros know their source locations. The compiler was already
  3972. turning it on anyway.
  3973. ** New macro: `current-source-location'
  3974. The macro returns the current source location (to be documented).
  3975. ** syntax-rules and syntax-case macros now propagate source information
  3976. through to the expanded code
  3977. This should result in better backtraces.
  3978. ** The currying behavior of `define' has been removed.
  3979. Before, `(define ((f a) b) (* a b))' would translate to
  3980. (define f (lambda (a) (lambda (b) (* a b))))
  3981. Now a syntax error is signaled, as this syntax is not supported by
  3982. default. Use the `(ice-9 curried-definitions)' module to get back the
  3983. old behavior.
  3984. ** New procedure, `define!'
  3985. `define!' is a procedure that takes two arguments, a symbol and a value,
  3986. and binds the value to the symbol in the current module. It's useful to
  3987. programmatically make definitions in the current module, and is slightly
  3988. less verbose than `module-define!'.
  3989. ** All modules have names now
  3990. Before, you could have anonymous modules: modules without names. Now,
  3991. because of hygiene and macros, all modules have names. If a module was
  3992. created without a name, the first time `module-name' is called on it, a
  3993. fresh name will be lazily generated for it.
  3994. ** The module namespace is now separate from the value namespace
  3995. It was a little-known implementation detail of Guile's module system
  3996. that it was built on a single hierarchical namespace of values -- that
  3997. if there was a module named `(foo bar)', then in the module named
  3998. `(foo)' there was a binding from `bar' to the `(foo bar)' module.
  3999. This was a neat trick, but presented a number of problems. One problem
  4000. was that the bindings in a module were not apparent from the module
  4001. itself; perhaps the `(foo)' module had a private binding for `bar', and
  4002. then an external contributor defined `(foo bar)'. In the end there can
  4003. be only one binding, so one of the two will see the wrong thing, and
  4004. produce an obtuse error of unclear provenance.
  4005. Also, the public interface of a module was also bound in the value
  4006. namespace, as `%module-public-interface'. This was a hack from the early
  4007. days of Guile's modules.
  4008. Both of these warts have been fixed by the addition of fields in the
  4009. `module' data type. Access to modules and their interfaces from the
  4010. value namespace has been deprecated, and all accessors use the new
  4011. record accessors appropriately.
  4012. When Guile is built with support for deprecated code, as is the default,
  4013. the value namespace is still searched for modules and public interfaces,
  4014. and a deprecation warning is raised as appropriate.
  4015. Finally, to support lazy loading of modules as one used to be able to do
  4016. with module binder procedures, Guile now has submodule binders, called
  4017. if a given submodule is not found. See boot-9.scm for more information.
  4018. ** New procedures: module-ref-submodule, module-define-submodule,
  4019. nested-ref-module, nested-define-module!, local-ref-module,
  4020. local-define-module
  4021. These new accessors are like their bare variants, but operate on
  4022. namespaces instead of values.
  4023. ** The (app modules) module tree is officially deprecated
  4024. It used to be that one could access a module named `(foo bar)' via
  4025. `(nested-ref the-root-module '(app modules foo bar))'. The `(app
  4026. modules)' bit was a never-used and never-documented abstraction, and has
  4027. been deprecated. See the following mail for a full discussion:
  4028. http://lists.gnu.org/archive/html/guile-devel/2010-04/msg00168.html
  4029. The `%app' binding is also deprecated.
  4030. ** `module-filename' field and accessor
  4031. Modules now record the file in which they are defined. This field may be
  4032. accessed with the new `module-filename' procedure.
  4033. ** Modules load within a known environment
  4034. It takes a few procedure calls to define a module, and those procedure
  4035. calls need to be in scope. Now we ensure that the current module when
  4036. loading a module is one that has the needed bindings, instead of relying
  4037. on chance.
  4038. ** `load' is a macro (!) that resolves paths relative to source file dir
  4039. The familiar Schem `load' procedure is now a macro that captures the
  4040. name of the source file being expanded, and dispatches to the new
  4041. `load-in-vicinity'. Referencing `load' by bare name returns a closure
  4042. that embeds the current source file name.
  4043. This fix allows `load' of relative paths to be resolved with respect to
  4044. the location of the file that calls `load'.
  4045. ** Many syntax errors have different texts now
  4046. Syntax errors still throw to the `syntax-error' key, but the arguments
  4047. are often different now. Perhaps in the future, Guile will switch to
  4048. using standard SRFI-35 conditions.
  4049. ** Returning multiple values to compiled code will silently truncate the
  4050. values to the expected number
  4051. For example, the interpreter would raise an error evaluating the form,
  4052. `(+ (values 1 2) (values 3 4))', because it would see the operands as
  4053. being two compound "values" objects, to which `+' does not apply.
  4054. The compiler, on the other hand, receives multiple values on the stack,
  4055. not as a compound object. Given that it must check the number of values
  4056. anyway, if too many values are provided for a continuation, it chooses
  4057. to truncate those values, effectively evaluating `(+ 1 3)' instead.
  4058. The idea is that the semantics that the compiler implements is more
  4059. intuitive, and the use of the interpreter will fade out with time.
  4060. This behavior is allowed both by the R5RS and the R6RS.
  4061. ** Multiple values in compiled code are not represented by compound
  4062. objects
  4063. This change may manifest itself in the following situation:
  4064. (let ((val (foo))) (do-something) val)
  4065. In the interpreter, if `foo' returns multiple values, multiple values
  4066. are produced from the `let' expression. In the compiler, those values
  4067. are truncated to the first value, and that first value is returned. In
  4068. the compiler, if `foo' returns no values, an error will be raised, while
  4069. the interpreter would proceed.
  4070. Both of these behaviors are allowed by R5RS and R6RS. The compiler's
  4071. behavior is more correct, however. If you wish to preserve a potentially
  4072. multiply-valued return, you will need to set up a multiple-value
  4073. continuation, using `call-with-values'.
  4074. ** Defmacros are now implemented in terms of syntax-case.
  4075. The practical ramification of this is that the `defmacro?' predicate has
  4076. been removed, along with `defmacro-transformer', `macro-table',
  4077. `xformer-table', `assert-defmacro?!', `set-defmacro-transformer!' and
  4078. `defmacro:transformer'. This is because defmacros are simply macros. If
  4079. any of these procedures provided useful facilities to you, we encourage
  4080. you to contact the Guile developers.
  4081. ** Hygienic macros documented as the primary syntactic extension mechanism.
  4082. The macro documentation was finally fleshed out with some documentation
  4083. on `syntax-rules' and `syntax-case' macros, and other parts of the macro
  4084. expansion process. See "Macros" in the manual, for details.
  4085. ** psyntax is now the default expander
  4086. Scheme code is now expanded by default by the psyntax hygienic macro
  4087. expander. Expansion is performed completely before compilation or
  4088. interpretation.
  4089. Notably, syntax errors will be signalled before interpretation begins.
  4090. In the past, many syntax errors were only detected at runtime if the
  4091. code in question was memoized.
  4092. As part of its expansion, psyntax renames all lexically-bound
  4093. identifiers. Original identifier names are preserved and given to the
  4094. compiler, but the interpreter will see the renamed variables, e.g.,
  4095. `x432' instead of `x'.
  4096. Note that the psyntax that Guile uses is a fork, as Guile already had
  4097. modules before incompatible modules were added to psyntax -- about 10
  4098. years ago! Thus there are surely a number of bugs that have been fixed
  4099. in psyntax since then. If you find one, please notify bug-guile@gnu.org.
  4100. ** syntax-rules and syntax-case are available by default.
  4101. There is no longer any need to import the `(ice-9 syncase)' module
  4102. (which is now deprecated). The expander may be invoked directly via
  4103. `macroexpand', though it is normally searched for via the current module
  4104. transformer.
  4105. Also, the helper routines for syntax-case are available in the default
  4106. environment as well: `syntax->datum', `datum->syntax',
  4107. `bound-identifier=?', `free-identifier=?', `generate-temporaries',
  4108. `identifier?', and `syntax-violation'. See the R6RS for documentation.
  4109. ** Tail patterns in syntax-case
  4110. Guile has pulled in some more recent changes from the psyntax portable
  4111. syntax expander, to implement support for "tail patterns". Such patterns
  4112. are supported by syntax-rules and syntax-case. This allows a syntax-case
  4113. match clause to have ellipses, then a pattern at the end. For example:
  4114. (define-syntax case
  4115. (syntax-rules (else)
  4116. ((_ val match-clause ... (else e e* ...))
  4117. [...])))
  4118. Note how there is MATCH-CLAUSE, which is ellipsized, then there is a
  4119. tail pattern for the else clause. Thanks to Andreas Rottmann for the
  4120. patch, and Kent Dybvig for the code.
  4121. ** Lexical bindings introduced by hygienic macros may not be referenced
  4122. by nonhygienic macros.
  4123. If a lexical binding is introduced by a hygienic macro, it may not be
  4124. referenced by a nonhygienic macro. For example, this works:
  4125. (let ()
  4126. (define-macro (bind-x val body)
  4127. `(let ((x ,val)) ,body))
  4128. (define-macro (ref x)
  4129. x)
  4130. (bind-x 10 (ref x)))
  4131. But this does not:
  4132. (let ()
  4133. (define-syntax bind-x
  4134. (syntax-rules ()
  4135. ((_ val body) (let ((x val)) body))))
  4136. (define-macro (ref x)
  4137. x)
  4138. (bind-x 10 (ref x)))
  4139. It is not normal to run into this situation with existing code. However,
  4140. if you have defmacros that expand to hygienic macros, it is possible to
  4141. run into situations like this. For example, if you have a defmacro that
  4142. generates a `while' expression, the `break' bound by the `while' may not
  4143. be visible within other parts of your defmacro. The solution is to port
  4144. from defmacros to syntax-rules or syntax-case.
  4145. ** Macros may no longer be referenced as first-class values.
  4146. In the past, you could evaluate e.g. `if', and get its macro value. Now,
  4147. expanding this form raises a syntax error.
  4148. Macros still /exist/ as first-class values, but they must be
  4149. /referenced/ via the module system, e.g. `(module-ref (current-module)
  4150. 'if)'.
  4151. ** Macros may now have docstrings.
  4152. `object-documentation' from `(ice-9 documentation)' may be used to
  4153. retrieve the docstring, once you have a macro value -- but see the above
  4154. note about first-class macros. Docstrings are associated with the syntax
  4155. transformer procedures.
  4156. ** `case-lambda' is now available in the default environment.
  4157. The binding in the default environment is equivalent to the one from the
  4158. `(srfi srfi-16)' module. Use the srfi-16 module explicitly if you wish
  4159. to maintain compatibility with Guile 1.8 and earlier.
  4160. ** Procedures may now have more than one arity.
  4161. This can be the case, for example, in case-lambda procedures. The
  4162. arities of compiled procedures may be accessed via procedures from the
  4163. `(system vm program)' module; see "Compiled Procedures", "Optional
  4164. Arguments", and "Case-lambda" in the manual.
  4165. ** Deprecate arity access via (procedure-properties proc 'arity)
  4166. Instead of accessing a procedure's arity as a property, use the new
  4167. `procedure-minimum-arity' function, which gives the most permissive
  4168. arity that the function has, in the same format as the old arity
  4169. accessor.
  4170. ** `lambda*' and `define*' are now available in the default environment
  4171. As with `case-lambda', `(ice-9 optargs)' continues to be supported, for
  4172. compatibility purposes. No semantic change has been made (we hope).
  4173. Optional and keyword arguments now dispatch via special VM operations,
  4174. without the need to cons rest arguments, making them very fast.
  4175. ** New syntax: define-once
  4176. `define-once' is like Lisp's `defvar': it creates a toplevel binding,
  4177. but only if one does not exist already.
  4178. ** New function, `truncated-print', with `format' support
  4179. `(ice-9 pretty-print)' now exports `truncated-print', a printer that
  4180. will ensure that the output stays within a certain width, truncating the
  4181. output in what is hopefully an intelligent manner. See the manual for
  4182. more details.
  4183. There is a new `format' specifier, `~@y', for doing a truncated
  4184. print (as opposed to `~y', which does a pretty-print). See the `format'
  4185. documentation for more details.
  4186. ** Better pretty-printing
  4187. Indentation recognizes more special forms, like `syntax-case', and read
  4188. macros like `quote' are printed better.
  4189. ** Passing a number as the destination of `format' is deprecated
  4190. The `format' procedure in `(ice-9 format)' now emits a deprecation
  4191. warning if a number is passed as its first argument.
  4192. Also, it used to be that you could omit passing a port to `format', in
  4193. some cases. This still works, but has been formally deprecated.
  4194. ** SRFI-4 vectors reimplemented in terms of R6RS bytevectors
  4195. Guile now implements SRFI-4 vectors using bytevectors. Often when you
  4196. have a numeric vector, you end up wanting to write its bytes somewhere,
  4197. or have access to the underlying bytes, or read in bytes from somewhere
  4198. else. Bytevectors are very good at this sort of thing. But the SRFI-4
  4199. APIs are nicer to use when doing number-crunching, because they are
  4200. addressed by element and not by byte.
  4201. So as a compromise, Guile allows all bytevector functions to operate on
  4202. numeric vectors. They address the underlying bytes in the native
  4203. endianness, as one would expect.
  4204. Following the same reasoning, that it's just bytes underneath, Guile
  4205. also allows uniform vectors of a given type to be accessed as if they
  4206. were of any type. One can fill a u32vector, and access its elements with
  4207. u8vector-ref. One can use f64vector-ref on bytevectors. It's all the
  4208. same to Guile.
  4209. In this way, uniform numeric vectors may be written to and read from
  4210. input/output ports using the procedures that operate on bytevectors.
  4211. Calls to SRFI-4 accessors (ref and set functions) from Scheme are now
  4212. inlined to the VM instructions for bytevector access.
  4213. See "SRFI-4" in the manual, for more information.
  4214. ** Nonstandard SRFI-4 procedures now available from `(srfi srfi-4 gnu)'
  4215. Guile's `(srfi srfi-4)' now only exports those srfi-4 procedures that
  4216. are part of the standard. Complex uniform vectors and the
  4217. `any->FOOvector' family are now available only from `(srfi srfi-4 gnu)'.
  4218. Guile's default environment imports `(srfi srfi-4)', and probably should
  4219. import `(srfi srfi-4 gnu)' as well.
  4220. See "SRFI-4 Extensions" in the manual, for more information.
  4221. ** New syntax: include-from-path.
  4222. `include-from-path' is like `include', except it looks for its file in
  4223. the load path. It can be used to compile other files into a file.
  4224. ** New syntax: quasisyntax.
  4225. `quasisyntax' is to `syntax' as `quasiquote' is to `quote'. See the R6RS
  4226. documentation for more information. Thanks to Andre van Tonder for the
  4227. implementation.
  4228. ** `*unspecified*' is identifier syntax
  4229. `*unspecified*' is no longer a variable, so it is optimized properly by
  4230. the compiler, and is not `set!'-able.
  4231. ** Changes and bugfixes in numerics code
  4232. *** Added six new sets of fast quotient and remainder operators
  4233. Added six new sets of fast quotient and remainder operator pairs with
  4234. different semantics than the R5RS operators. They support not only
  4235. integers, but all reals, including exact rationals and inexact
  4236. floating point numbers.
  4237. These procedures accept two real numbers N and D, where the divisor D
  4238. must be non-zero. Each set of operators computes an integer quotient
  4239. Q and a real remainder R such that N = Q*D + R and |R| < |D|. They
  4240. differ only in how N/D is rounded to produce Q.
  4241. `euclidean-quotient' returns the integer Q and `euclidean-remainder'
  4242. returns the real R such that N = Q*D + R and 0 <= R < |D|. `euclidean/'
  4243. returns both Q and R, and is more efficient than computing each
  4244. separately. Note that when D > 0, `euclidean-quotient' returns
  4245. floor(N/D), and when D < 0 it returns ceiling(N/D).
  4246. `centered-quotient', `centered-remainder', and `centered/' are similar
  4247. except that the range of remainders is -abs(D/2) <= R < abs(D/2), and
  4248. `centered-quotient' rounds N/D to the nearest integer. Note that these
  4249. operators are equivalent to the R6RS integer division operators `div',
  4250. `mod', `div-and-mod', `div0', `mod0', and `div0-and-mod0'.
  4251. `floor-quotient' and `floor-remainder' compute Q and R, respectively,
  4252. where Q has been rounded toward negative infinity. `floor/' returns
  4253. both Q and R, and is more efficient than computing each separately.
  4254. Note that when applied to integers, `floor-remainder' is equivalent to
  4255. the R5RS integer-only `modulo' operator. `ceiling-quotient',
  4256. `ceiling-remainder', and `ceiling/' are similar except that Q is
  4257. rounded toward positive infinity.
  4258. For `truncate-quotient', `truncate-remainder', and `truncate/', Q is
  4259. rounded toward zero. Note that when applied to integers,
  4260. `truncate-quotient' and `truncate-remainder' are equivalent to the
  4261. R5RS integer-only operators `quotient' and `remainder'.
  4262. For `round-quotient', `round-remainder', and `round/', Q is rounded to
  4263. the nearest integer, with ties going to the nearest even integer.
  4264. *** Complex number changes
  4265. Guile is now able to represent non-real complex numbers whose
  4266. imaginary part is an _inexact_ zero (0.0 or -0.0), per R6RS.
  4267. Previously, such numbers were immediately changed into inexact reals.
  4268. (real? 0.0+0.0i) now returns #f, per R6RS, although (zero? 0.0+0.0i)
  4269. still returns #t, per R6RS. (= 0 0.0+0.0i) and (= 0.0 0.0+0.0i) are
  4270. #t, but the same comparisons using `eqv?' or `equal?' are #f.
  4271. Like other non-real numbers, these complex numbers with inexact zero
  4272. imaginary part will raise exceptions is passed to procedures requiring
  4273. reals, such as `<', `>', `<=', `>=', `min', `max', `positive?',
  4274. `negative?', `inf?', `nan?', `finite?', etc.
  4275. **** `make-rectangular' changes
  4276. scm_make_rectangular `make-rectangular' now returns a real number only
  4277. if the imaginary part is an _exact_ 0. Previously, it would return a
  4278. real number if the imaginary part was an inexact zero.
  4279. scm_c_make_rectangular now always returns a non-real complex number,
  4280. even if the imaginary part is zero. Previously, it would return a
  4281. real number if the imaginary part was zero.
  4282. **** `make-polar' changes
  4283. scm_make_polar `make-polar' now returns a real number only if the
  4284. angle or magnitude is an _exact_ 0. If the magnitude is an exact 0,
  4285. it now returns an exact 0. Previously, it would return a real
  4286. number if the imaginary part was an inexact zero.
  4287. scm_c_make_polar now always returns a non-real complex number, even if
  4288. the imaginary part is 0.0. Previously, it would return a real number
  4289. if the imaginary part was 0.0.
  4290. **** `imag-part' changes
  4291. scm_imag_part `imag-part' now returns an exact 0 if applied to an
  4292. inexact real number. Previously it returned an inexact zero in this
  4293. case.
  4294. *** `eqv?' and `equal?' now compare numbers equivalently
  4295. scm_equal_p `equal?' now behaves equivalently to scm_eqv_p `eqv?' for
  4296. numeric values, per R5RS. Previously, equal? worked differently,
  4297. e.g. `(equal? 0.0 -0.0)' returned #t but `(eqv? 0.0 -0.0)' returned #f,
  4298. and `(equal? +nan.0 +nan.0)' returned #f but `(eqv? +nan.0 +nan.0)'
  4299. returned #t.
  4300. *** `(equal? +nan.0 +nan.0)' now returns #t
  4301. Previously, `(equal? +nan.0 +nan.0)' returned #f, although
  4302. `(let ((x +nan.0)) (equal? x x))' and `(eqv? +nan.0 +nan.0)'
  4303. both returned #t. R5RS requires that `equal?' behave like
  4304. `eqv?' when comparing numbers.
  4305. *** Change in handling products `*' involving exact 0
  4306. scm_product `*' now handles exact 0 differently. A product containing
  4307. an exact 0 now returns an exact 0 if and only if the other arguments
  4308. are all exact. An inexact zero is returned if and only if the other
  4309. arguments are all finite but not all exact. If an infinite or NaN
  4310. value is present, a NaN value is returned. Previously, any product
  4311. containing an exact 0 yielded an exact 0, regardless of the other
  4312. arguments.
  4313. *** `expt' and `integer-expt' changes when the base is 0
  4314. While `(expt 0 0)' is still 1, and `(expt 0 N)' for N > 0 is still
  4315. zero, `(expt 0 N)' for N < 0 is now a NaN value, and likewise for
  4316. integer-expt. This is more correct, and conforming to R6RS, but seems
  4317. to be incompatible with R5RS, which would return 0 for all non-zero
  4318. values of N.
  4319. *** `expt' and `integer-expt' are more generic, less strict
  4320. When raising to an exact non-negative integer exponent, `expt' and
  4321. `integer-expt' are now able to exponentiate any object that can be
  4322. multiplied using `*'. They can also raise an object to an exact
  4323. negative integer power if its reciprocal can be taken using `/'.
  4324. In order to allow this, the type of the first argument is no longer
  4325. checked when raising to an exact integer power. If the exponent is 0
  4326. or 1, the first parameter is not manipulated at all, and need not
  4327. even support multiplication.
  4328. *** Infinities are no longer integers, nor rationals
  4329. scm_integer_p `integer?' and scm_rational_p `rational?' now return #f
  4330. for infinities, per R6RS. Previously they returned #t for real
  4331. infinities. The real infinities and NaNs are still considered real by
  4332. scm_real `real?' however, per R6RS.
  4333. *** NaNs are no longer rationals
  4334. scm_rational_p `rational?' now returns #f for NaN values, per R6RS.
  4335. Previously it returned #t for real NaN values. They are still
  4336. considered real by scm_real `real?' however, per R6RS.
  4337. *** `inf?' and `nan?' now throw exceptions for non-reals
  4338. The domain of `inf?' and `nan?' is the real numbers. Guile now signals
  4339. an error when a non-real number or non-number is passed to these
  4340. procedures. (Note that NaNs _are_ considered numbers by scheme, despite
  4341. their name).
  4342. *** `rationalize' bugfixes and changes
  4343. Fixed bugs in scm_rationalize `rationalize'. Previously, it returned
  4344. exact integers unmodified, although that was incorrect if the epsilon
  4345. was at least 1 or inexact, e.g. (rationalize 4 1) should return 3 per
  4346. R5RS and R6RS, but previously it returned 4. It also now handles
  4347. cases involving infinities and NaNs properly, per R6RS.
  4348. *** Trigonometric functions now return exact numbers in some cases
  4349. scm_sin `sin', scm_cos `cos', scm_tan `tan', scm_asin `asin', scm_acos
  4350. `acos', scm_atan `atan', scm_sinh `sinh', scm_cosh `cosh', scm_tanh
  4351. `tanh', scm_sys_asinh `asinh', scm_sys_acosh `acosh', and
  4352. scm_sys_atanh `atanh' now return exact results in some cases.
  4353. *** New procedure: `finite?'
  4354. Add scm_finite_p `finite?' from R6RS to guile core, which returns #t
  4355. if and only if its argument is neither infinite nor a NaN. Note that
  4356. this is not the same as (not (inf? x)) or (not (infinite? x)), since
  4357. NaNs are neither finite nor infinite.
  4358. *** Improved exactness handling for complex number parsing
  4359. When parsing non-real complex numbers, exactness specifiers are now
  4360. applied to each component, as is done in PLT Scheme. For complex
  4361. numbers written in rectangular form, exactness specifiers are applied
  4362. to the real and imaginary parts before calling scm_make_rectangular.
  4363. For complex numbers written in polar form, exactness specifiers are
  4364. applied to the magnitude and angle before calling scm_make_polar.
  4365. Previously, exactness specifiers were applied to the number as a whole
  4366. _after_ calling scm_make_rectangular or scm_make_polar.
  4367. For example, (string->number "#i5.0+0i") now does the equivalent of:
  4368. (make-rectangular (exact->inexact 5.0) (exact->inexact 0))
  4369. which yields 5.0+0.0i. Previously it did the equivalent of:
  4370. (exact->inexact (make-rectangular 5.0 0))
  4371. which yielded 5.0.
  4372. ** Unicode characters
  4373. Unicode characters may be entered in octal format via e.g. `#\454', or
  4374. created via (integer->char 300). A hex external representation will
  4375. probably be introduced at some point.
  4376. ** Unicode strings
  4377. Internally, strings are now represented either in the `latin-1'
  4378. encoding, one byte per character, or in UTF-32, with four bytes per
  4379. character. Strings manage their own allocation, switching if needed.
  4380. Extended characters may be written in a literal string using the
  4381. hexadecimal escapes `\xXX', `\uXXXX', or `\UXXXXXX', for 8-bit, 16-bit,
  4382. or 24-bit codepoints, respectively, or entered directly in the native
  4383. encoding of the port on which the string is read.
  4384. ** Unicode symbols
  4385. One may now use U+03BB (GREEK SMALL LETTER LAMBDA) as an identifier.
  4386. ** Support for non-ASCII source code files
  4387. The default reader now handles source code files for some of the
  4388. non-ASCII character encodings, such as UTF-8. A non-ASCII source file
  4389. should have an encoding declaration near the top of the file. Also,
  4390. there is a new function, `file-encoding', that scans a port for a coding
  4391. declaration. See the section of the manual entitled, "Character Encoding
  4392. of Source Files".
  4393. The pre-1.9.3 reader handled 8-bit clean but otherwise unspecified source
  4394. code. This use is now discouraged. Binary input and output is
  4395. currently supported by opening ports in the ISO-8859-1 locale.
  4396. ** Source files default to UTF-8.
  4397. If source files do not specify their encoding via a `coding:' block,
  4398. the default encoding is UTF-8, instead of being taken from the current
  4399. locale.
  4400. ** Interactive Guile installs the current locale.
  4401. Instead of leaving the user in the "C" locale, running the Guile REPL
  4402. installs the current locale. [FIXME xref?]
  4403. ** Support for locale transcoding when reading from and writing to ports
  4404. Ports now have an associated character encoding, and port read and write
  4405. operations do conversion to and from locales automatically. Ports also
  4406. have an associated strategy for how to deal with locale conversion
  4407. failures.
  4408. See the documentation in the manual for the four new support functions,
  4409. `set-port-encoding!', `port-encoding', `set-port-conversion-strategy!',
  4410. and `port-conversion-strategy'.
  4411. ** String and SRFI-13 functions can operate on Unicode strings
  4412. ** Unicode support for SRFI-14 character sets
  4413. The default character sets are no longer locale dependent and contain
  4414. characters from the whole Unicode range. There is a new predefined
  4415. character set, `char-set:designated', which contains all assigned
  4416. Unicode characters. There is a new debugging function, `%char-set-dump'.
  4417. ** Character functions operate on Unicode characters
  4418. `char-upcase' and `char-downcase' use default Unicode casing rules.
  4419. Character comparisons such as `char<?' and `char-ci<?' now sort based on
  4420. Unicode code points.
  4421. ** Global variables `scm_charnames' and `scm_charnums' are removed
  4422. These variables contained the names of control characters and were
  4423. used when writing characters. While these were global, they were
  4424. never intended to be public API. They have been replaced with private
  4425. functions.
  4426. ** EBCDIC support is removed
  4427. There was an EBCDIC compile flag that altered some of the character
  4428. processing. It appeared that full EBCDIC support was never completed
  4429. and was unmaintained.
  4430. ** Compile-time warnings
  4431. Guile can warn about potentially unbound free variables. Pass the
  4432. -Wunbound-variable on the `guile-tools compile' command line, or add
  4433. `#:warnings '(unbound-variable)' to your `compile' or `compile-file'
  4434. invocation. Warnings are also enabled by default for expressions entered
  4435. at the REPL.
  4436. Guile can also warn when you pass the wrong number of arguments to a
  4437. procedure, with -Warity-mismatch, or `arity-mismatch' in the
  4438. `#:warnings' as above.
  4439. Other warnings include `-Wunused-variable' and `-Wunused-toplevel', to
  4440. warn about unused local or global (top-level) variables, and `-Wformat',
  4441. to check for various errors related to the `format' procedure.
  4442. ** A new `memoize-symbol' evaluator trap has been added.
  4443. This trap can be used for efficiently implementing a Scheme code
  4444. coverage.
  4445. ** Duplicate bindings among used modules are resolved lazily.
  4446. This slightly improves program startup times.
  4447. ** New thread cancellation and thread cleanup API
  4448. See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'.
  4449. ** New threads are in `(guile-user)' by default, not `(guile)'
  4450. It used to be that a new thread entering Guile would do so in the
  4451. `(guile)' module, unless this was the first time Guile was initialized,
  4452. in which case it was `(guile-user)'. This has been fixed to have all
  4453. new threads unknown to Guile default to `(guile-user)'.
  4454. ** New helpers: `print-exception', `set-exception-printer!'
  4455. These functions implement an extensible exception printer. Guile
  4456. registers printers for all of the exceptions it throws. Users may add
  4457. their own printers. There is also `scm_print_exception', for use by C
  4458. programs. Pleasantly, this allows SRFI-35 and R6RS exceptions to be
  4459. printed appropriately.
  4460. ** GOOPS dispatch in scheme
  4461. As an implementation detail, GOOPS dispatch is no longer implemented by
  4462. special evaluator bytecodes, but rather directly via a Scheme function
  4463. associated with an applicable struct. There is some VM support for the
  4464. underlying primitives, like `class-of'.
  4465. This change will in the future allow users to customize generic function
  4466. dispatch without incurring a performance penalty, and allow us to
  4467. implement method combinations.
  4468. ** Applicable struct support
  4469. One may now make structs from Scheme that may be applied as procedures.
  4470. To do so, make a struct whose vtable is `<applicable-struct-vtable>'.
  4471. That struct will be the vtable of your applicable structs; instances of
  4472. that new struct are assumed to have the procedure in their first slot.
  4473. `<applicable-struct-vtable>' is like Common Lisp's
  4474. `funcallable-standard-class'. Likewise there is
  4475. `<applicable-struct-with-setter-vtable>', which looks for the setter in
  4476. the second slot. This needs to be better documented.
  4477. ** GOOPS cleanups.
  4478. GOOPS had a number of concepts that were relevant to the days of Tcl,
  4479. but not any more: operators and entities, mainly. These objects were
  4480. never documented, and it is unlikely that they were ever used. Operators
  4481. were a kind of generic specific to the Tcl support. Entities were
  4482. replaced by applicable structs, mentioned above.
  4483. ** New struct slot allocation: "hidden"
  4484. A hidden slot is readable and writable, but will not be initialized by a
  4485. call to make-struct. For example in your layout you would say "ph"
  4486. instead of "pw". Hidden slots are useful for adding new slots to a
  4487. vtable without breaking existing invocations to make-struct.
  4488. ** eqv? not a generic
  4489. One used to be able to extend `eqv?' as a primitive-generic, but no
  4490. more. Because `eqv?' is in the expansion of `case' (via `memv'), which
  4491. should be able to compile to static dispatch tables, it doesn't make
  4492. sense to allow extensions that would subvert this optimization.
  4493. ** `inet-ntop' and `inet-pton' are always available.
  4494. Guile now use a portable implementation of `inet_pton'/`inet_ntop', so
  4495. there is no more need to use `inet-aton'/`inet-ntoa'. The latter
  4496. functions are deprecated.
  4497. ** `getopt-long' parsing errors throw to `quit', not `misc-error'
  4498. This change should inhibit backtraces on argument parsing errors.
  4499. `getopt-long' has been modified to print out the error that it throws
  4500. itself.
  4501. ** New primitive: `tmpfile'.
  4502. See "File System" in the manual.
  4503. ** Random generator state may be serialized to a datum
  4504. `random-state->datum' will serialize a random state to a datum, which
  4505. may be written out, read back in later, and revivified using
  4506. `datum->random-state'. See "Random" in the manual, for more details.
  4507. ** Fix random number generator on 64-bit platforms
  4508. There was a nasty bug on 64-bit platforms in which asking for a random
  4509. integer with a range between 2**32 and 2**64 caused a segfault. After
  4510. many embarrassing iterations, this was fixed.
  4511. ** Fast bit operations.
  4512. The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
  4513. have dedicated bytecodes. Guile is not just for symbolic computation,
  4514. it's for number crunching too.
  4515. ** Faster SRFI-9 record access
  4516. SRFI-9 records are now implemented directly on top of Guile's structs,
  4517. and their accessors are defined in such a way that normal call-sites
  4518. inline to special VM opcodes, while still allowing for the general case
  4519. (e.g. passing a record accessor to `apply').
  4520. ** R6RS block comment support
  4521. Guile now supports R6RS nested block comments. The start of a comment is
  4522. marked with `#|', and the end with `|#'.
  4523. ** `guile-2' cond-expand feature
  4524. To test if your code is running under Guile 2.0 (or its alpha releases),
  4525. test for the `guile-2' cond-expand feature. Like this:
  4526. (cond-expand (guile-2 (eval-when (compile)
  4527. ;; This must be evaluated at compile time.
  4528. (fluid-set! current-reader my-reader)))
  4529. (guile
  4530. ;; Earlier versions of Guile do not have a
  4531. ;; separate compilation phase.
  4532. (fluid-set! current-reader my-reader)))
  4533. ** New global variables: %load-compiled-path, %load-compiled-extensions
  4534. These are analogous to %load-path and %load-extensions.
  4535. ** New fluid: `%file-port-name-canonicalization'
  4536. This fluid parameterizes the file names that are associated with file
  4537. ports. If %file-port-name-canonicalization is 'absolute, then file names
  4538. are canonicalized to be absolute paths. If it is 'relative, then the
  4539. name is canonicalized, but any prefix corresponding to a member of
  4540. `%load-path' is stripped off. Otherwise the names are passed through
  4541. unchanged.
  4542. In addition, the `compile-file' and `compile-and-load' procedures bind
  4543. %file-port-name-canonicalization to their `#:canonicalization' keyword
  4544. argument, which defaults to 'relative. In this way, one might compile
  4545. "../module/ice-9/boot-9.scm", but the path that gets residualized into
  4546. the .go is "ice-9/boot-9.scm".
  4547. ** New procedure, `make-promise'
  4548. `(make-promise (lambda () foo))' is equivalent to `(delay foo)'.
  4549. ** `defined?' may accept a module as its second argument
  4550. Previously it only accepted internal structures from the evaluator.
  4551. ** New entry into %guile-build-info: `ccachedir'
  4552. ** Fix bug in `module-bound?'.
  4553. `module-bound?' was returning true if a module did have a local
  4554. variable, but one that was unbound, but another imported module bound
  4555. the variable. This was an error, and was fixed.
  4556. ** `(ice-9 syncase)' has been deprecated.
  4557. As syntax-case is available by default, importing `(ice-9 syncase)' has
  4558. no effect, and will trigger a deprecation warning.
  4559. ** New readline history functions
  4560. The (ice-9 readline) module now provides add-history, read-history,
  4561. write-history and clear-history, which wrap the corresponding GNU
  4562. History library functions.
  4563. ** Removed deprecated uniform array procedures:
  4564. dimensions->uniform-array, list->uniform-array, array-prototype
  4565. Instead, use make-typed-array, list->typed-array, or array-type,
  4566. respectively.
  4567. ** Deprecate the old `scm-style-repl'
  4568. The following bindings from boot-9 are now found in `(ice-9
  4569. scm-style-repl)': `scm-style-repl', `error-catching-loop',
  4570. `error-catching-repl', `bad-throw', `scm-repl-silent'
  4571. `assert-repl-silence', `repl-print-unspecified',
  4572. `assert-repl-print-unspecified', `scm-repl-verbose',
  4573. `assert-repl-verbosity', `scm-repl-prompt', `set-repl-prompt!', `repl',
  4574. `default-pre-unwind-handler', `handle-system-error',
  4575. The following bindings have been deprecated, with no replacement:
  4576. `pre-unwind-handler-dispatch'.
  4577. The following bindings have been totally removed:
  4578. `before-signal-stack'.
  4579. Deprecated forwarding shims have been installed so that users that
  4580. expect these bindings in the main namespace will still work, but receive
  4581. a deprecation warning.
  4582. ** `set-batch-mode?!' replaced by `ensure-batch-mode!'
  4583. "Batch mode" is a flag used to tell a program that it is not running
  4584. interactively. One usually turns it on after a fork. It may not be
  4585. turned off. `ensure-batch-mode!' deprecates the old `set-batch-mode?!',
  4586. because it is a better interface, as it can only turn on batch mode, not
  4587. turn it off.
  4588. ** Deprecate `save-stack', `the-last-stack'
  4589. It used to be that the way to debug programs in Guile was to capture the
  4590. stack at the time of error, drop back to the REPL, then debug that
  4591. stack. But this approach didn't compose, was tricky to get right in the
  4592. presence of threads, and was not very powerful.
  4593. So `save-stack', `stack-saved?', and `the-last-stack' have been moved to
  4594. `(ice-9 save-stack)', with deprecated bindings left in the root module.
  4595. ** `top-repl' has its own module
  4596. The `top-repl' binding, called with Guile is run interactively, is now
  4597. is its own module, `(ice-9 top-repl)'. A deprecated forwarding shim was
  4598. left in the default environment.
  4599. ** `display-error' takes a frame
  4600. The `display-error' / `scm_display_error' helper now takes a frame as an
  4601. argument instead of a stack. Stacks are still supported in deprecated
  4602. builds. Additionally, `display-error' will again source location
  4603. information for the error.
  4604. ** No more `(ice-9 debug)'
  4605. This module had some debugging helpers that are no longer applicable to
  4606. the current debugging model. Importing this module will produce a
  4607. deprecation warning. Users should contact bug-guile for support.
  4608. ** Remove obsolete debug-options
  4609. Removed `breakpoints', `trace', `procnames', `indent', `frames',
  4610. `maxdepth', and `debug' debug-options.
  4611. ** `backtrace' debug option on by default
  4612. Given that Guile 2.0 can always give you a backtrace, backtraces are now
  4613. on by default.
  4614. ** `turn-on-debugging' deprecated
  4615. ** Remove obsolete print-options
  4616. The `source' and `closure-hook' print options are obsolete, and have
  4617. been removed.
  4618. ** Remove obsolete read-options
  4619. The "elisp-strings" and "elisp-vectors" read options were unused and
  4620. obsolete, so they have been removed.
  4621. ** Remove eval-options and trap-options
  4622. Eval-options and trap-options are obsolete with the new VM and
  4623. evaluator.
  4624. ** Remove (ice-9 debugger) and (ice-9 debugging)
  4625. See "Traps" and "Interactive Debugging" in the manual, for information
  4626. on their replacements.
  4627. ** Remove the GDS Emacs integration
  4628. See "Using Guile in Emacs" in the manual, for info on how we think you
  4629. should use Guile with Emacs.
  4630. ** Deprecated: `lazy-catch'
  4631. `lazy-catch' was a form that captured the stack at the point of a
  4632. `throw', but the dynamic state at the point of the `catch'. It was a bit
  4633. crazy. Please change to use `catch', possibly with a throw-handler, or
  4634. `with-throw-handler'.
  4635. ** Deprecated: primitive properties
  4636. The `primitive-make-property', `primitive-property-set!',
  4637. `primitive-property-ref', and `primitive-property-del!' procedures were
  4638. crufty and only used to implement object properties, which has a new,
  4639. threadsafe implementation. Use object properties or weak hash tables
  4640. instead.
  4641. ** Deprecated `@bind' syntax
  4642. `@bind' was part of an older implementation of the Emacs Lisp language,
  4643. and is no longer used.
  4644. ** Miscellaneous other deprecations
  4645. `cuserid' has been deprecated, as it only returns 8 bytes of a user's
  4646. login. Use `(passwd:name (getpwuid (geteuid)))' instead.
  4647. Additionally, the procedures `apply-to-args', `has-suffix?', `scheme-file-suffix'
  4648. `get-option', `for-next-option', `display-usage-report',
  4649. `transform-usage-lambda', `collect', and `set-batch-mode?!' have all
  4650. been deprecated.
  4651. ** Add support for unbound fluids
  4652. See `make-unbound-fluid', `fluid-unset!', and `fluid-bound?' in the
  4653. manual.
  4654. ** Add `variable-unset!'
  4655. See "Variables" in the manual, for more details.
  4656. ** Last but not least, the `λ' macro can be used in lieu of `lambda'
  4657. * Changes to the C interface
  4658. ** Guile now uses libgc, the Boehm-Demers-Weiser garbage collector
  4659. The semantics of `scm_gc_malloc ()' have been changed, in a
  4660. backward-compatible way. A new allocation routine,
  4661. `scm_gc_malloc_pointerless ()', was added.
  4662. Libgc is a conservative GC, which we hope will make interaction with C
  4663. code easier and less error-prone.
  4664. ** New procedures: `scm_to_stringn', `scm_from_stringn'
  4665. ** New procedures: scm_{to,from}_{utf8,latin1}_symbol{n,}
  4666. ** New procedures: scm_{to,from}_{utf8,utf32,latin1}_string{n,}
  4667. These new procedures convert to and from string representations in
  4668. particular encodings.
  4669. Users should continue to use locale encoding for user input, user
  4670. output, or interacting with the C library.
  4671. Use the Latin-1 functions for ASCII, and for literals in source code.
  4672. Use UTF-8 functions for interaction with modern libraries which deal in
  4673. UTF-8, and UTF-32 for interaction with utf32-using libraries.
  4674. Otherwise, use scm_to_stringn or scm_from_stringn with a specific
  4675. encoding.
  4676. ** New type definitions for `scm_t_intptr' and friends.
  4677. `SCM_T_UINTPTR_MAX', `SCM_T_INTPTR_MIN', `SCM_T_INTPTR_MAX',
  4678. `SIZEOF_SCM_T_BITS', `scm_t_intptr' and `scm_t_uintptr' are now
  4679. available to C. Have fun!
  4680. ** The GH interface (deprecated in version 1.6, 2001) was removed.
  4681. ** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
  4682. This makes these internal functions technically not callable from
  4683. application code.
  4684. ** Functions for handling `scm_option' now no longer require an argument
  4685. indicating length of the `scm_t_option' array.
  4686. ** Procedures-with-setters are now implemented using applicable structs
  4687. From a user's perspective this doesn't mean very much. But if, for some
  4688. odd reason, you used the SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE, or
  4689. SCM_SETTER macros, know that they're deprecated now. Also, scm_tc7_pws
  4690. is gone.
  4691. ** Remove old evaluator closures
  4692. There used to be ranges of typecodes allocated to interpreted data
  4693. structures, but that it no longer the case, given that interpreted
  4694. procedure are now just regular VM closures. As a result, there is a
  4695. newly free tc3, and a number of removed macros. See the ChangeLog for
  4696. details.
  4697. ** Primitive procedures are now VM trampoline procedures
  4698. It used to be that there were something like 12 different typecodes
  4699. allocated to primitive procedures, each with its own calling convention.
  4700. Now there is only one, the gsubr. This may affect user code if you were
  4701. defining a procedure using scm_c_make_subr rather scm_c_make_gsubr. The
  4702. solution is to switch to use scm_c_make_gsubr. This solution works well
  4703. both with the old 1.8 and with the current 1.9 branch.
  4704. Guile's old evaluator used to have special cases for applying "gsubrs",
  4705. primitive procedures with specified numbers of required, optional, and
  4706. rest arguments. Now, however, Guile represents gsubrs as normal VM
  4707. procedures, with appropriate bytecode to parse out the correct number of
  4708. arguments, including optional and rest arguments, and then with a
  4709. special bytecode to apply the gsubr.
  4710. This allows primitive procedures to appear on the VM stack, allowing
  4711. them to be accurately counted in profiles. Also they now have more
  4712. debugging information attached to them -- their number of arguments, for
  4713. example. In addition, the VM can completely inline the application
  4714. mechanics, allowing for faster primitive calls.
  4715. However there are some changes on the C level. There is no more
  4716. `scm_tc7_gsubr' or `scm_tcs_subrs' typecode for primitive procedures, as
  4717. they are just VM procedures. Likewise the macros `SCM_GSUBR_TYPE',
  4718. `SCM_GSUBR_MAKTYPE', `SCM_GSUBR_REQ', `SCM_GSUBR_OPT', and
  4719. `SCM_GSUBR_REST' are gone, as are `SCM_SUBR_META_INFO', `SCM_SUBR_PROPS'
  4720. `SCM_SET_SUBR_GENERIC_LOC', and `SCM_SUBR_ARITY_TO_TYPE'.
  4721. Perhaps more significantly, `scm_c_make_subr',
  4722. `scm_c_make_subr_with_generic', `scm_c_define_subr', and
  4723. `scm_c_define_subr_with_generic'. They all operated on subr typecodes,
  4724. and there are no more subr typecodes. Use the scm_c_make_gsubr family
  4725. instead.
  4726. Normal users of gsubrs should not be affected, though, as the
  4727. scm_c_make_gsubr family still is the correct way to create primitive
  4728. procedures.
  4729. ** Remove deprecated array C interfaces
  4730. Removed the deprecated array functions `scm_i_arrayp',
  4731. `scm_i_array_ndim', `scm_i_array_mem', `scm_i_array_v',
  4732. `scm_i_array_base', `scm_i_array_dims', and the deprecated macros
  4733. `SCM_ARRAYP', `SCM_ARRAY_NDIM', `SCM_ARRAY_CONTP', `SCM_ARRAY_MEM',
  4734. `SCM_ARRAY_V', `SCM_ARRAY_BASE', and `SCM_ARRAY_DIMS'.
  4735. ** Remove unused snarf macros
  4736. `SCM_DEFINE1', `SCM_PRIMITIVE_GENERIC_1', `SCM_PROC1, and `SCM_GPROC1'
  4737. are no more. Use SCM_DEFINE or SCM_PRIMITIVE_GENERIC instead.
  4738. ** New functions: `scm_call_n', `scm_c_run_hookn'
  4739. `scm_call_n' applies to apply a function to an array of arguments.
  4740. `scm_c_run_hookn' runs a hook with an array of arguments.
  4741. ** Some SMOB types changed to have static typecodes
  4742. Fluids, dynamic states, and hash tables used to be SMOB objects, but now
  4743. they have statically allocated tc7 typecodes.
  4744. ** Preparations for changing SMOB representation
  4745. If things go right, we'll be changing the SMOB representation soon. To
  4746. that end, we did a lot of cleanups to calls to e.g. SCM_CELL_WORD_2(x) when
  4747. the code meant SCM_SMOB_DATA_2(x); user code will need similar changes
  4748. in the future. Code accessing SMOBs using SCM_CELL macros was never
  4749. correct, but until now things still worked. Users should be aware of
  4750. such changes.
  4751. ** Changed invocation mechanics of applicable SMOBs
  4752. Guile's old evaluator used to have special cases for applying SMOB
  4753. objects. Now, with the VM, when Guile sees a SMOB, it looks up a VM
  4754. trampoline procedure for it, and use the normal mechanics to apply the
  4755. trampoline. This simplifies procedure application in the normal,
  4756. non-SMOB case.
  4757. The upshot is that the mechanics used to apply a SMOB are different from
  4758. 1.8. Descriptors no longer have `apply_0', `apply_1', `apply_2', and
  4759. `apply_3' functions, and the macros SCM_SMOB_APPLY_0 and friends are now
  4760. deprecated. Just use the scm_call_0 family of procedures.
  4761. ** Removed support shlibs for SRFIs 1, 4, 13, 14, and 60
  4762. Though these SRFI support libraries did expose API, they encoded a
  4763. strange version string into their library names. That version was never
  4764. programmatically exported, so there was no way people could use the
  4765. libs.
  4766. This was a fortunate oversight, as it allows us to remove the need for
  4767. extra, needless shared libraries --- the C support code for SRFIs 4, 13,
  4768. and 14 was already in core --- and allow us to incrementally return the
  4769. SRFI implementation to Scheme.
  4770. ** New C function: scm_module_public_interface
  4771. This procedure corresponds to Scheme's `module-public-interface'.
  4772. ** Undeprecate `scm_the_root_module ()'
  4773. It's useful to be able to get the root module from C without doing a
  4774. full module lookup.
  4775. ** Inline vector allocation
  4776. Instead of having vectors point out into the heap for their data, their
  4777. data is now allocated inline to the vector object itself. The same is
  4778. true for bytevectors, by default, though there is an indirection
  4779. available which should allow for making a bytevector from an existing
  4780. memory region.
  4781. ** New struct constructors that don't involve making lists
  4782. `scm_c_make_struct' and `scm_c_make_structv' are new varargs and array
  4783. constructors, respectively, for structs. You might find them useful.
  4784. ** Stack refactor
  4785. In Guile 1.8, there were debugging frames on the C stack. Now there is
  4786. no more need to explicitly mark the stack in this way, because Guile has
  4787. a VM stack that it knows how to walk, which simplifies the C API
  4788. considerably. See the ChangeLog for details; the relevant interface is
  4789. in libguile/stacks.h. The Scheme API has not been changed significantly.
  4790. ** Removal of Guile's primitive object system.
  4791. There were a number of pieces in `objects.[ch]' that tried to be a
  4792. minimal object system, but were never documented, and were quickly
  4793. obseleted by GOOPS' merge into Guile proper. So `scm_make_class_object',
  4794. `scm_make_subclass_object', `scm_metaclass_standard', and like symbols
  4795. from objects.h are no more. In the very unlikely case in which these
  4796. were useful to you, we urge you to contact guile-devel.
  4797. ** No future.
  4798. Actually the future is still in the state that it was, is, and ever
  4799. shall be, Amen, except that `futures.c' and `futures.h' are no longer a
  4800. part of it. These files were experimental, never compiled, and would be
  4801. better implemented in Scheme anyway. In the future, that is.
  4802. ** Deprecate trampolines
  4803. There used to be C functions `scm_trampoline_0', `scm_trampoline_1', and
  4804. so on. The point was to do some precomputation on the type of the
  4805. procedure, then return a specialized "call" procedure. However this
  4806. optimization wasn't actually an optimization, so it is now deprecated.
  4807. Just use `scm_call_0', etc instead.
  4808. ** Deprecated `scm_badargsp'
  4809. This function is unused in Guile, but was part of its API.
  4810. ** Better support for Lisp `nil'.
  4811. The bit representation of `nil' has been tweaked so that it is now very
  4812. efficient to check e.g. if a value is equal to Scheme's end-of-list or
  4813. Lisp's nil. Additionally there are a heap of new, specific predicates
  4814. like scm_is_null_or_nil.
  4815. ** Better integration of Lisp `nil'.
  4816. `scm_is_boolean', `scm_is_false', and `scm_is_null' all return true now
  4817. for Lisp's `nil'. This shouldn't affect any Scheme code at this point,
  4818. but when we start to integrate more with Emacs, it is possible that we
  4819. break code that assumes that, for example, `(not x)' implies that `x' is
  4820. `eq?' to `#f'. This is not a common assumption. Refactoring affected
  4821. code to rely on properties instead of identities will improve code
  4822. correctness. See "Nil" in the manual, for more details.
  4823. ** Support for static allocation of strings, symbols, and subrs.
  4824. Calls to snarfing CPP macros like SCM_DEFINE macro will now allocate
  4825. much of their associated data as static variables, reducing Guile's
  4826. memory footprint.
  4827. ** `scm_stat' has an additional argument, `exception_on_error'
  4828. ** `scm_primitive_load_path' has an additional argument `exception_on_not_found'
  4829. ** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type
  4830. Previously they would use the `off_t' type, which is fragile since its
  4831. definition depends on the application's value for `_FILE_OFFSET_BITS'.
  4832. ** The `long_long' C type, deprecated in 1.8, has been removed
  4833. ** Removed deprecated uniform array procedures: scm_make_uve,
  4834. scm_array_prototype, scm_list_to_uniform_array,
  4835. scm_dimensions_to_uniform_array, scm_make_ra, scm_shap2ra, scm_cvref,
  4836. scm_ra_set_contp, scm_aind, scm_raprin1
  4837. These functions have been deprecated since early 2005.
  4838. * Changes to the distribution
  4839. ** Guile's license is now LGPLv3+
  4840. In other words the GNU Lesser General Public License, version 3 or
  4841. later (at the discretion of each person that chooses to redistribute
  4842. part of Guile).
  4843. ** AM_SILENT_RULES
  4844. Guile's build is visually quieter, due to the use of Automake 1.11's
  4845. AM_SILENT_RULES. Build as `make V=1' to see all of the output.
  4846. ** GOOPS documentation folded into Guile reference manual
  4847. GOOPS, Guile's object system, used to be documented in separate manuals.
  4848. This content is now included in Guile's manual directly.
  4849. ** `guile-config' will be deprecated in favor of `pkg-config'
  4850. `guile-config' has been rewritten to get its information from
  4851. `pkg-config', so this should be a transparent change. Note however that
  4852. guile.m4 has yet to be modified to call pkg-config instead of
  4853. guile-config.
  4854. ** Guile now provides `guile-2.0.pc' instead of `guile-1.8.pc'
  4855. Programs that use `pkg-config' to find Guile or one of its Autoconf
  4856. macros should now require `guile-2.0' instead of `guile-1.8'.
  4857. ** New installation directory: $(pkglibdir)/1.9/ccache
  4858. If $(libdir) is /usr/lib, for example, Guile will install its .go files
  4859. to /usr/lib/guile/1.9/ccache. These files are architecture-specific.
  4860. ** Parallel installability fixes
  4861. Guile now installs its header files to a effective-version-specific
  4862. directory, and includes the effective version (e.g. 2.0) in the library
  4863. name (e.g. libguile-2.0.so).
  4864. This change should be transparent to users, who should detect Guile via
  4865. the guile.m4 macro, or the guile-2.0.pc pkg-config file. It will allow
  4866. parallel installs for multiple versions of Guile development
  4867. environments.
  4868. ** Dynamically loadable extensions may be placed in a Guile-specific path
  4869. Before, Guile only searched the system library paths for extensions
  4870. (e.g. /usr/lib), which meant that the names of Guile extensions had to
  4871. be globally unique. Installing them to a Guile-specific extensions
  4872. directory is cleaner. Use `pkg-config --variable=extensiondir
  4873. guile-2.0' to get the location of the extensions directory.
  4874. ** User Scheme code may be placed in a version-specific path
  4875. Before, there was only one way to install user Scheme code to a
  4876. version-specific Guile directory: install to Guile's own path,
  4877. e.g. /usr/share/guile/2.0. The site directory,
  4878. e.g. /usr/share/guile/site, was unversioned. This has been changed to
  4879. add a version-specific site directory, e.g. /usr/share/guile/site/2.0,
  4880. searched before the global site directory.
  4881. ** New dependency: libgc
  4882. See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for more information.
  4883. ** New dependency: GNU libunistring
  4884. See http://www.gnu.org/software/libunistring/, for more information. Our
  4885. Unicode support uses routines from libunistring.
  4886. ** New dependency: libffi
  4887. See http://sourceware.org/libffi/, for more information.
  4888. Changes in 1.8.8 (since 1.8.7)
  4889. * Bugs fixed
  4890. ** Fix possible buffer overruns when parsing numbers
  4891. ** Avoid clash with system setjmp/longjmp on IA64
  4892. ** Fix `wrong type arg' exceptions with IPv6 addresses
  4893. Changes in 1.8.7 (since 1.8.6)
  4894. * New modules (see the manual for details)
  4895. ** `(srfi srfi-98)', an interface to access environment variables
  4896. * Bugs fixed
  4897. ** Fix compilation with `--disable-deprecated'
  4898. ** Fix %fast-slot-ref/set!, to avoid possible segmentation fault
  4899. ** Fix MinGW build problem caused by HAVE_STRUCT_TIMESPEC confusion
  4900. ** Fix build problem when scm_t_timespec is different from struct timespec
  4901. ** Fix build when compiled with -Wundef -Werror
  4902. ** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
  4903. ** Build fixes for `powerpc-ibm-aix5.3.0.0' (AIX 5.3)
  4904. ** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
  4905. ** Better diagnose broken `(strftime "%z" ...)' in `time.test' (bug #24130)
  4906. ** Fix parsing of SRFI-88/postfix keywords longer than 128 characters
  4907. ** Fix reading of complex numbers where both parts are inexact decimals
  4908. ** Allow @ macro to work with (ice-9 syncase)
  4909. Previously, use of the @ macro in a module whose code is being
  4910. transformed by (ice-9 syncase) would cause an "Invalid syntax" error.
  4911. Now it works as you would expect (giving the value of the specified
  4912. module binding).
  4913. ** Have `scm_take_locale_symbol ()' return an interned symbol (bug #25865)
  4914. Changes in 1.8.6 (since 1.8.5)
  4915. * New features (see the manual for details)
  4916. ** New convenience function `scm_c_symbol_length ()'
  4917. ** Single stepping through code from Emacs
  4918. When you use GDS to evaluate Scheme code from Emacs, you can now use
  4919. `C-u' to indicate that you want to single step through that code. See
  4920. `Evaluating Scheme Code' in the manual for more details.
  4921. ** New "guile(1)" man page!
  4922. * Changes to the distribution
  4923. ** Automake's `AM_MAINTAINER_MODE' is no longer used
  4924. Thus, the `--enable-maintainer-mode' configure option is no longer
  4925. available: Guile is now always configured in "maintainer mode".
  4926. ** `ChangeLog' files are no longer updated
  4927. Instead, changes are detailed in the version control system's logs. See
  4928. the top-level `ChangeLog' files for details.
  4929. * Bugs fixed
  4930. ** `symbol->string' now returns a read-only string, as per R5RS
  4931. ** Fix incorrect handling of the FLAGS argument of `fold-matches'
  4932. ** `guile-config link' now prints `-L$libdir' before `-lguile'
  4933. ** Fix memory corruption involving GOOPS' `class-redefinition'
  4934. ** Fix possible deadlock in `mutex-lock'
  4935. ** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
  4936. ** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
  4937. ** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
  4938. ** Fix build issue on i386-unknown-freebsd7.0 ("break strict-aliasing rules")
  4939. ** Fix misleading output from `(help rationalize)'
  4940. ** Fix build failure on Debian hppa architecture (bad stack growth detection)
  4941. ** Fix `gcd' when called with a single, negative argument.
  4942. ** Fix `Stack overflow' errors seen when building on some platforms
  4943. ** Fix bug when `scm_with_guile ()' was called several times from the
  4944. same thread
  4945. ** The handler of SRFI-34 `with-exception-handler' is now invoked in the
  4946. dynamic environment of the call to `raise'
  4947. ** Fix potential deadlock in `make-struct'
  4948. ** Fix compilation problem with libltdl from Libtool 2.2.x
  4949. ** Fix sloppy bound checking in `string-{ref,set!}' with the empty string
  4950. Changes in 1.8.5 (since 1.8.4)
  4951. * Infrastructure changes
  4952. ** Guile repository switched from CVS to Git
  4953. The new repository can be accessed using
  4954. "git-clone git://git.sv.gnu.org/guile.git", or can be browsed on-line at
  4955. http://git.sv.gnu.org/gitweb/?p=guile.git . See `README' for details.
  4956. ** Add support for `pkg-config'
  4957. See "Autoconf Support" in the manual for details.
  4958. * New modules (see the manual for details)
  4959. ** `(srfi srfi-88)'
  4960. * New features (see the manual for details)
  4961. ** New `postfix' read option, for SRFI-88 keyword syntax
  4962. ** Some I/O primitives have been inlined, which improves I/O performance
  4963. ** New object-based traps infrastructure
  4964. This is a GOOPS-based infrastructure that builds on Guile's low-level
  4965. evaluator trap calls and facilitates the development of debugging
  4966. features like single-stepping, breakpoints, tracing and profiling.
  4967. See the `Traps' node of the manual for details.
  4968. ** New support for working on Guile code from within Emacs
  4969. Guile now incorporates the `GDS' library (previously distributed
  4970. separately) for working on Guile code from within Emacs. See the
  4971. `Using Guile In Emacs' node of the manual for details.
  4972. * Bugs fixed
  4973. ** `scm_add_slot ()' no longer segfaults (fixes bug #22369)
  4974. ** Fixed `(ice-9 match)' for patterns like `((_ ...) ...)'
  4975. Previously, expressions like `(match '((foo) (bar)) (((_ ...) ...) #t))'
  4976. would trigger an unbound variable error for `match:andmap'.
  4977. ** `(oop goops describe)' now properly provides the `describe' feature
  4978. ** Fixed `args-fold' from `(srfi srfi-37)'
  4979. Previously, parsing short option names of argument-less options would
  4980. lead to a stack overflow.
  4981. ** `(srfi srfi-35)' is now visible through `cond-expand'
  4982. ** Fixed type-checking for the second argument of `eval'
  4983. ** Fixed type-checking for SRFI-1 `partition'
  4984. ** Fixed `struct-ref' and `struct-set!' on "light structs"
  4985. ** Honor struct field access rights in GOOPS
  4986. ** Changed the storage strategy of source properties, which fixes a deadlock
  4987. ** Allow compilation of Guile-using programs in C99 mode with GCC 4.3 and later
  4988. ** Fixed build issue for GNU/Linux on IA64
  4989. ** Fixed build issues on NetBSD 1.6
  4990. ** Fixed build issue on Solaris 2.10 x86_64
  4991. ** Fixed build issue with DEC/Compaq/HP's compiler
  4992. ** Fixed `scm_from_complex_double' build issue on FreeBSD
  4993. ** Fixed `alloca' build issue on FreeBSD 6
  4994. ** Removed use of non-portable makefile constructs
  4995. ** Fixed shadowing of libc's <random.h> on Tru64, which broke compilation
  4996. ** Make sure all tests honor `$TMPDIR'
  4997. Changes in 1.8.4 (since 1.8.3)
  4998. * Bugs fixed
  4999. ** CR (ASCII 0x0d) is (again) recognized as a token delimiter by the reader
  5000. ** Fixed a segmentation fault which occurred when displaying the
  5001. backtrace of a stack with a promise object (made by `delay') in it.
  5002. ** Make `accept' leave guile mode while blocking
  5003. ** `scm_c_read ()' and `scm_c_write ()' now type-check their port argument
  5004. ** Fixed a build problem on AIX (use of func_data identifier)
  5005. ** Fixed a segmentation fault which occurred when hashx-ref or hashx-set! was
  5006. called with an associator proc that returns neither a pair nor #f.
  5007. ** Secondary threads now always return a valid module for (current-module).
  5008. ** Avoid MacOS build problems caused by incorrect combination of "64"
  5009. system and library calls.
  5010. ** `guile-snarf' now honors `$TMPDIR'
  5011. ** `guile-config compile' now reports CPPFLAGS used at compile-time
  5012. ** Fixed build with Sun Studio (Solaris 9)
  5013. ** Fixed wrong-type-arg errors when creating zero length SRFI-4
  5014. uniform vectors on AIX.
  5015. ** Fixed a deadlock that occurs upon GC with multiple threads.
  5016. ** Fixed compile problem with GCC on Solaris and AIX (use of _Complex_I)
  5017. ** Fixed autotool-derived build problems on AIX 6.1.
  5018. ** Fixed NetBSD/alpha support
  5019. ** Fixed MacOS build problem caused by use of rl_get_keymap(_name)
  5020. * New modules (see the manual for details)
  5021. ** `(srfi srfi-69)'
  5022. * Documentation fixes and improvements
  5023. ** Removed premature breakpoint documentation
  5024. The features described are not available in the series of 1.8.x
  5025. releases, so the documentation was misleading and has been removed.
  5026. ** More about Guile's default *random-state* variable
  5027. ** GOOPS: more about how to use `next-method'
  5028. * Changes to the distribution
  5029. ** Corrected a few files that referred incorrectly to the old GPL + special exception licence
  5030. In fact Guile since 1.8.0 has been licensed with the GNU Lesser
  5031. General Public License, and the few incorrect files have now been
  5032. fixed to agree with the rest of the Guile distribution.
  5033. ** Removed unnecessary extra copies of COPYING*
  5034. The distribution now contains a single COPYING.LESSER at its top level.
  5035. Changes in 1.8.3 (since 1.8.2)
  5036. * New modules (see the manual for details)
  5037. ** `(srfi srfi-35)'
  5038. ** `(srfi srfi-37)'
  5039. * Bugs fixed
  5040. ** The `(ice-9 slib)' module now works as expected
  5041. ** Expressions like "(set! 'x #t)" no longer yield a crash
  5042. ** Warnings about duplicate bindings now go to stderr
  5043. ** A memory leak in `make-socket-address' was fixed
  5044. ** Alignment issues (e.g., on SPARC) in network routines were fixed
  5045. ** A threading issue that showed up at least on NetBSD was fixed
  5046. ** Build problems on Solaris and IRIX fixed
  5047. * Implementation improvements
  5048. ** The reader is now faster, which reduces startup time
  5049. ** Procedures returned by `record-accessor' and `record-modifier' are faster
  5050. Changes in 1.8.2 (since 1.8.1):
  5051. * New procedures (see the manual for details)
  5052. ** set-program-arguments
  5053. ** make-vtable
  5054. * Incompatible changes
  5055. ** The body of a top-level `define' no longer sees the binding being created
  5056. In a top-level `define', the binding being created is no longer visible
  5057. from the `define' body. This breaks code like
  5058. "(define foo (begin (set! foo 1) (+ foo 1)))", where `foo' is now
  5059. unbound in the body. However, such code was not R5RS-compliant anyway,
  5060. per Section 5.2.1.
  5061. * Bugs fixed
  5062. ** Fractions were not `equal?' if stored in unreduced form.
  5063. (A subtle problem, since printing a value reduced it, making it work.)
  5064. ** srfi-60 `copy-bit' failed on 64-bit systems
  5065. ** "guile --use-srfi" option at the REPL can replace core functions
  5066. (Programs run with that option were ok, but in the interactive REPL
  5067. the core bindings got priority, preventing SRFI replacements or
  5068. extensions.)
  5069. ** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
  5070. ** `kill' on mingw throws an error for a PID other than oneself
  5071. ** Procedure names are attached to procedure-with-setters
  5072. ** Array read syntax works with negative lower bound
  5073. ** `array-in-bounds?' fix if an array has different lower bounds on each index
  5074. ** `*' returns exact 0 for "(* inexact 0)"
  5075. This follows what it always did for "(* 0 inexact)".
  5076. ** SRFI-19: Value returned by `(current-time time-process)' was incorrect
  5077. ** SRFI-19: `date->julian-day' did not account for timezone offset
  5078. ** `ttyname' no longer crashes when passed a non-tty argument
  5079. ** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address
  5080. ** Small memory leaks have been fixed in `make-fluid' and `add-history'
  5081. ** GOOPS: Fixed a bug in `method-more-specific?'
  5082. ** Build problems on Solaris fixed
  5083. ** Build problems on HP-UX IA64 fixed
  5084. ** Build problems on MinGW fixed
  5085. Changes in 1.8.1 (since 1.8.0):
  5086. * LFS functions are now used to access 64-bit files on 32-bit systems.
  5087. * New procedures (see the manual for details)
  5088. ** primitive-_exit - [Scheme] the-root-module
  5089. ** scm_primitive__exit - [C]
  5090. ** make-completion-function - [Scheme] (ice-9 readline)
  5091. ** scm_c_locale_stringn_to_number - [C]
  5092. ** scm_srfi1_append_reverse [C]
  5093. ** scm_srfi1_append_reverse_x [C]
  5094. ** scm_log - [C]
  5095. ** scm_log10 - [C]
  5096. ** scm_exp - [C]
  5097. ** scm_sqrt - [C]
  5098. * Bugs fixed
  5099. ** Build problems have been fixed on MacOS, SunOS, and QNX.
  5100. ** `strftime' fix sign of %z timezone offset.
  5101. ** A one-dimensional array can now be 'equal?' to a vector.
  5102. ** Structures, records, and SRFI-9 records can now be compared with `equal?'.
  5103. ** SRFI-14 standard char sets are recomputed upon a successful `setlocale'.
  5104. ** `record-accessor' and `record-modifier' now have strict type checks.
  5105. Record accessor and modifier procedures now throw an error if the
  5106. record type of the record they're given is not the type expected.
  5107. (Previously accessors returned #f and modifiers silently did nothing).
  5108. ** It is now OK to use both autoload and use-modules on a given module.
  5109. ** `apply' checks the number of arguments more carefully on "0 or 1" funcs.
  5110. Previously there was no checking on primatives like make-vector that
  5111. accept "one or two" arguments. Now there is.
  5112. ** The srfi-1 assoc function now calls its equality predicate properly.
  5113. Previously srfi-1 assoc would call the equality predicate with the key
  5114. last. According to the SRFI, the key should be first.
  5115. ** A bug in n-par-for-each and n-for-each-par-map has been fixed.
  5116. ** The array-set! procedure no longer segfaults when given a bit vector.
  5117. ** Bugs in make-shared-array have been fixed.
  5118. ** string<? and friends now follow char<? etc order on 8-bit chars.
  5119. ** The format procedure now handles inf and nan values for ~f correctly.
  5120. ** exact->inexact should no longer overflow when given certain large fractions.
  5121. ** srfi-9 accessor and modifier procedures now have strict record type checks.
  5122. This matches the srfi-9 specification.
  5123. ** (ice-9 ftw) procedures won't ignore different files with same inode number.
  5124. Previously the (ice-9 ftw) procedures would ignore any file that had
  5125. the same inode number as a file they had already seen, even if that
  5126. file was on a different device.
  5127. Changes in 1.8.0 (changes since the 1.6.x series):
  5128. * Changes to the distribution
  5129. ** Guile is now licensed with the GNU Lesser General Public License.
  5130. ** The manual is now licensed with the GNU Free Documentation License.
  5131. ** Guile now requires GNU MP (http://swox.com/gmp).
  5132. Guile now uses the GNU MP library for arbitrary precision arithmetic.
  5133. ** Guile now has separate private and public configuration headers.
  5134. That is, things like HAVE_STRING_H no longer leak from Guile's
  5135. headers.
  5136. ** Guile now provides and uses an "effective" version number.
  5137. Guile now provides scm_effective_version and effective-version
  5138. functions which return the "effective" version number. This is just
  5139. the normal full version string without the final micro-version number,
  5140. so the current effective-version is "1.8". The effective version
  5141. should remain unchanged during a stable series, and should be used for
  5142. items like the versioned share directory name
  5143. i.e. /usr/share/guile/1.8.
  5144. Providing an unchanging version number during a stable release for
  5145. things like the versioned share directory can be particularly
  5146. important for Guile "add-on" packages, since it provides a directory
  5147. that they can install to that won't be changed out from under them
  5148. with each micro release during a stable series.
  5149. ** Thread implementation has changed.
  5150. When you configure "--with-threads=null", you will get the usual
  5151. threading API (call-with-new-thread, make-mutex, etc), but you can't
  5152. actually create new threads. Also, "--with-threads=no" is now
  5153. equivalent to "--with-threads=null". This means that the thread API
  5154. is always present, although you might not be able to create new
  5155. threads.
  5156. When you configure "--with-threads=pthreads" or "--with-threads=yes",
  5157. you will get threads that are implemented with the portable POSIX
  5158. threads. These threads can run concurrently (unlike the previous
  5159. "coop" thread implementation), but need to cooperate for things like
  5160. the GC.
  5161. The default is "pthreads", unless your platform doesn't have pthreads,
  5162. in which case "null" threads are used.
  5163. See the manual for details, nodes "Initialization", "Multi-Threading",
  5164. "Blocking", and others.
  5165. ** There is the new notion of 'discouraged' features.
  5166. This is a milder form of deprecation.
  5167. Things that are discouraged should not be used in new code, but it is
  5168. OK to leave them in old code for now. When a discouraged feature is
  5169. used, no warning message is printed like there is for 'deprecated'
  5170. features. Also, things that are merely discouraged are nevertheless
  5171. implemented efficiently, while deprecated features can be very slow.
  5172. You can omit discouraged features from libguile by configuring it with
  5173. the '--disable-discouraged' option.
  5174. ** Deprecation warnings can be controlled at run-time.
  5175. (debug-enable 'warn-deprecated) switches them on and (debug-disable
  5176. 'warn-deprecated) switches them off.
  5177. ** Support for SRFI 61, extended cond syntax for multiple values has
  5178. been added.
  5179. This SRFI is always available.
  5180. ** Support for require-extension, SRFI-55, has been added.
  5181. The SRFI-55 special form `require-extension' has been added. It is
  5182. available at startup, and provides a portable way to load Scheme
  5183. extensions. SRFI-55 only requires support for one type of extension,
  5184. "srfi"; so a set of SRFIs may be loaded via (require-extension (srfi 1
  5185. 13 14)).
  5186. ** New module (srfi srfi-26) provides support for `cut' and `cute'.
  5187. The (srfi srfi-26) module is an implementation of SRFI-26 which
  5188. provides the `cut' and `cute' syntax. These may be used to specialize
  5189. parameters without currying.
  5190. ** New module (srfi srfi-31)
  5191. This is an implementation of SRFI-31 which provides a special form
  5192. `rec' for recursive evaluation.
  5193. ** The modules (srfi srfi-13), (srfi srfi-14) and (srfi srfi-4) have
  5194. been merged with the core, making their functionality always
  5195. available.
  5196. The modules are still available, tho, and you could use them together
  5197. with a renaming import, for example.
  5198. ** Guile no longer includes its own version of libltdl.
  5199. The official version is good enough now.
  5200. ** The --enable-htmldoc option has been removed from 'configure'.
  5201. Support for translating the documentation into HTML is now always
  5202. provided. Use 'make html'.
  5203. ** New module (ice-9 serialize):
  5204. (serialize FORM1 ...) and (parallelize FORM1 ...) are useful when you
  5205. don't trust the thread safety of most of your program, but where you
  5206. have some section(s) of code which you consider can run in parallel to
  5207. other sections. See ice-9/serialize.scm for more information.
  5208. ** The configure option '--disable-arrays' has been removed.
  5209. Support for arrays and uniform numeric arrays is now always included
  5210. in Guile.
  5211. * Changes to the stand-alone interpreter
  5212. ** New command line option `-L'.
  5213. This option adds a directory to the front of the load path.
  5214. ** New command line option `--no-debug'.
  5215. Specifying `--no-debug' on the command line will keep the debugging
  5216. evaluator turned off, even for interactive sessions.
  5217. ** User-init file ~/.guile is now loaded with the debugging evaluator.
  5218. Previously, the normal evaluator would have been used. Using the
  5219. debugging evaluator gives better error messages.
  5220. ** The '-e' option now 'read's its argument.
  5221. This is to allow the new '(@ MODULE-NAME VARIABLE-NAME)' construct to
  5222. be used with '-e'. For example, you can now write a script like
  5223. #! /bin/sh
  5224. exec guile -e '(@ (demo) main)' -s "$0" "$@"
  5225. !#
  5226. (define-module (demo)
  5227. :export (main))
  5228. (define (main args)
  5229. (format #t "Demo: ~a~%" args))
  5230. * Changes to Scheme functions and syntax
  5231. ** Guardians have changed back to their original semantics
  5232. Guardians now behave like described in the paper by Dybvig et al. In
  5233. particular, they no longer make guarantees about the order in which
  5234. they return objects, and they can no longer be greedy.
  5235. They no longer drop cyclic data structures.
  5236. The C function scm_make_guardian has been changed incompatibly and no
  5237. longer takes the 'greedy_p' argument.
  5238. ** New function hashx-remove!
  5239. This function completes the set of 'hashx' functions.
  5240. ** The concept of dynamic roots has been factored into continuation
  5241. barriers and dynamic states.
  5242. Each thread has a current dynamic state that carries the values of the
  5243. fluids. You can create and copy dynamic states and use them as the
  5244. second argument for 'eval'. See "Fluids and Dynamic States" in the
  5245. manual.
  5246. To restrict the influence that captured continuations can have on the
  5247. control flow, you can errect continuation barriers. See "Continuation
  5248. Barriers" in the manual.
  5249. The function call-with-dynamic-root now essentially temporarily
  5250. installs a new dynamic state and errects a continuation barrier.
  5251. ** The default load path no longer includes "." at the end.
  5252. Automatically loading modules from the current directory should not
  5253. happen by default. If you want to allow it in a more controlled
  5254. manner, set the environment variable GUILE_LOAD_PATH or the Scheme
  5255. variable %load-path.
  5256. ** The uniform vector and array support has been overhauled.
  5257. It now complies with SRFI-4 and the weird prototype based uniform
  5258. array creation has been deprecated. See the manual for more details.
  5259. Some non-compatible changes have been made:
  5260. - characters can no longer be stored into byte arrays.
  5261. - strings and bit vectors are no longer considered to be uniform numeric
  5262. vectors.
  5263. - array-rank throws an error for non-arrays instead of returning zero.
  5264. - array-ref does no longer accept non-arrays when no indices are given.
  5265. There is the new notion of 'generalized vectors' and corresponding
  5266. procedures like 'generalized-vector-ref'. Generalized vectors include
  5267. strings, bitvectors, ordinary vectors, and uniform numeric vectors.
  5268. Arrays use generalized vectors as their storage, so that you still
  5269. have arrays of characters, bits, etc. However, uniform-array-read!
  5270. and uniform-array-write can no longer read/write strings and
  5271. bitvectors.
  5272. ** There is now support for copy-on-write substrings, mutation-sharing
  5273. substrings and read-only strings.
  5274. Three new procedures are related to this: substring/shared,
  5275. substring/copy, and substring/read-only. See the manual for more
  5276. information.
  5277. ** Backtraces will now highlight the value that caused the error.
  5278. By default, these values are enclosed in "{...}", such as in this
  5279. example:
  5280. guile> (car 'a)
  5281. Backtrace:
  5282. In current input:
  5283. 1: 0* [car {a}]
  5284. <unnamed port>:1:1: In procedure car in expression (car (quote a)):
  5285. <unnamed port>:1:1: Wrong type (expecting pair): a
  5286. ABORT: (wrong-type-arg)
  5287. The prefix and suffix used for highlighting can be set via the two new
  5288. printer options 'highlight-prefix' and 'highlight-suffix'. For
  5289. example, putting this into ~/.guile will output the bad value in bold
  5290. on an ANSI terminal:
  5291. (print-set! highlight-prefix "\x1b[1m")
  5292. (print-set! highlight-suffix "\x1b[22m")
  5293. ** 'gettext' support for internationalization has been added.
  5294. See the manual for details.
  5295. ** New syntax '@' and '@@':
  5296. You can now directly refer to variables exported from a module by
  5297. writing
  5298. (@ MODULE-NAME VARIABLE-NAME)
  5299. For example (@ (ice-9 pretty-print) pretty-print) will directly access
  5300. the pretty-print variable exported from the (ice-9 pretty-print)
  5301. module. You don't need to 'use' that module first. You can also use
  5302. '@' as a target of 'set!', as in (set! (@ mod var) val).
  5303. The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
  5304. but it can also access variables that have not been exported. It is
  5305. intended only for kluges and temporary fixes and for debugging, not
  5306. for ordinary code.
  5307. ** Keyword syntax has been made more disciplined.
  5308. Previously, the name of a keyword was read as a 'token' but printed as
  5309. a symbol. Now, it is read as a general Scheme datum which must be a
  5310. symbol.
  5311. Previously:
  5312. guile> #:12
  5313. #:#{12}#
  5314. guile> #:#{12}#
  5315. #:#{\#{12}\#}#
  5316. guile> #:(a b c)
  5317. #:#{}#
  5318. ERROR: In expression (a b c):
  5319. Unbound variable: a
  5320. guile> #: foo
  5321. #:#{}#
  5322. ERROR: Unbound variable: foo
  5323. Now:
  5324. guile> #:12
  5325. ERROR: Wrong type (expecting symbol): 12
  5326. guile> #:#{12}#
  5327. #:#{12}#
  5328. guile> #:(a b c)
  5329. ERROR: Wrong type (expecting symbol): (a b c)
  5330. guile> #: foo
  5331. #:foo
  5332. ** The printing of symbols that might look like keywords can be
  5333. controlled.
  5334. The new printer option 'quote-keywordish-symbols' controls how symbols
  5335. are printed that have a colon as their first or last character. The
  5336. default now is to only quote a symbol with #{...}# when the read
  5337. option 'keywords' is not '#f'. Thus:
  5338. guile> (define foo (string->symbol ":foo"))
  5339. guile> (read-set! keywords #f)
  5340. guile> foo
  5341. :foo
  5342. guile> (read-set! keywords 'prefix)
  5343. guile> foo
  5344. #{:foo}#
  5345. guile> (print-set! quote-keywordish-symbols #f)
  5346. guile> foo
  5347. :foo
  5348. ** 'while' now provides 'break' and 'continue'
  5349. break and continue were previously bound in a while loop, but not
  5350. documented, and continue didn't quite work properly. The undocumented
  5351. parameter to break which gave a return value for the while has been
  5352. dropped.
  5353. ** 'call-with-current-continuation' is now also available under the name
  5354. 'call/cc'.
  5355. ** The module system now checks for duplicate bindings.
  5356. The module system now can check for name conflicts among imported
  5357. bindings.
  5358. The behavior can be controlled by specifying one or more 'duplicates'
  5359. handlers. For example, to make Guile return an error for every name
  5360. collision, write:
  5361. (define-module (foo)
  5362. :use-module (bar)
  5363. :use-module (baz)
  5364. :duplicates check)
  5365. The new default behavior of the module system when a name collision
  5366. has been detected is to
  5367. 1. Give priority to bindings marked as a replacement.
  5368. 2. Issue a warning (different warning if overriding core binding).
  5369. 3. Give priority to the last encountered binding (this corresponds to
  5370. the old behavior).
  5371. If you want the old behavior back without replacements or warnings you
  5372. can add the line:
  5373. (default-duplicate-binding-handler 'last)
  5374. to your .guile init file.
  5375. ** New define-module option: :replace
  5376. :replace works as :export, but, in addition, marks the binding as a
  5377. replacement.
  5378. A typical example is `format' in (ice-9 format) which is a replacement
  5379. for the core binding `format'.
  5380. ** Adding prefixes to imported bindings in the module system
  5381. There is now a new :use-module option :prefix. It can be used to add
  5382. a prefix to all imported bindings.
  5383. (define-module (foo)
  5384. :use-module ((bar) :prefix bar:))
  5385. will import all bindings exported from bar, but rename them by adding
  5386. the prefix `bar:'.
  5387. ** Conflicting generic functions can be automatically merged.
  5388. When two imported bindings conflict and they are both generic
  5389. functions, the two functions can now be merged automatically. This is
  5390. activated with the 'duplicates' handler 'merge-generics'.
  5391. ** New function: effective-version
  5392. Returns the "effective" version number. This is just the normal full
  5393. version string without the final micro-version number. See "Changes
  5394. to the distribution" above.
  5395. ** New threading functions: parallel, letpar, par-map, and friends
  5396. These are convenient ways to run calculations in parallel in new
  5397. threads. See "Parallel forms" in the manual for details.
  5398. ** New function 'try-mutex'.
  5399. This function will attempt to lock a mutex but will return immediately
  5400. instead of blocking and indicate failure.
  5401. ** Waiting on a condition variable can have a timeout.
  5402. The function 'wait-condition-variable' now takes a third, optional
  5403. argument that specifies the point in time where the waiting should be
  5404. aborted.
  5405. ** New function 'broadcast-condition-variable'.
  5406. ** New functions 'all-threads' and 'current-thread'.
  5407. ** Signals and system asyncs work better with threads.
  5408. The function 'sigaction' now takes a fourth, optional, argument that
  5409. specifies the thread that the handler should run in. When the
  5410. argument is omitted, the handler will run in the thread that called
  5411. 'sigaction'.
  5412. Likewise, 'system-async-mark' takes a second, optional, argument that
  5413. specifies the thread that the async should run in. When it is
  5414. omitted, the async will run in the thread that called
  5415. 'system-async-mark'.
  5416. C code can use the new functions scm_sigaction_for_thread and
  5417. scm_system_async_mark_for_thread to pass the new thread argument.
  5418. When a thread blocks on a mutex, a condition variable or is waiting
  5419. for IO to be possible, it will still execute system asyncs. This can
  5420. be used to interrupt such a thread by making it execute a 'throw', for
  5421. example.
  5422. ** The function 'system-async' is deprecated.
  5423. You can now pass any zero-argument procedure to 'system-async-mark'.
  5424. The function 'system-async' will just return its argument unchanged
  5425. now.
  5426. ** New functions 'call-with-blocked-asyncs' and
  5427. 'call-with-unblocked-asyncs'
  5428. The expression (call-with-blocked-asyncs PROC) will call PROC and will
  5429. block execution of system asyncs for the current thread by one level
  5430. while PROC runs. Likewise, call-with-unblocked-asyncs will call a
  5431. procedure and will unblock the execution of system asyncs by one
  5432. level for the current thread.
  5433. Only system asyncs are affected by these functions.
  5434. ** The functions 'mask-signals' and 'unmask-signals' are deprecated.
  5435. Use 'call-with-blocked-asyncs' or 'call-with-unblocked-asyncs'
  5436. instead. Those functions are easier to use correctly and can be
  5437. nested.
  5438. ** New function 'unsetenv'.
  5439. ** New macro 'define-syntax-public'.
  5440. It works like 'define-syntax' and also exports the defined macro (but
  5441. only on top-level).
  5442. ** There is support for Infinity and NaNs.
  5443. Following PLT Scheme, Guile can now work with infinite numbers, and
  5444. 'not-a-numbers'.
  5445. There is new syntax for numbers: "+inf.0" (infinity), "-inf.0"
  5446. (negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as
  5447. "+nan.0"). These numbers are inexact and have no exact counterpart.
  5448. Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the
  5449. sign of the dividend. The infinities are integers, and they answer #t
  5450. for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is
  5451. not '=' to itself, but '+nan.0' is 'eqv?' to itself.
  5452. For example
  5453. (/ 1 0.0)
  5454. => +inf.0
  5455. (/ 0 0.0)
  5456. => +nan.0
  5457. (/ 0)
  5458. ERROR: Numerical overflow
  5459. Two new predicates 'inf?' and 'nan?' can be used to test for the
  5460. special values.
  5461. ** Inexact zero can have a sign.
  5462. Guile can now distinguish between plus and minus inexact zero, if your
  5463. platform supports this, too. The two zeros are equal according to
  5464. '=', but not according to 'eqv?'. For example
  5465. (- 0.0)
  5466. => -0.0
  5467. (= 0.0 (- 0.0))
  5468. => #t
  5469. (eqv? 0.0 (- 0.0))
  5470. => #f
  5471. ** Guile now has exact rationals.
  5472. Guile can now represent fractions such as 1/3 exactly. Computing with
  5473. them is also done exactly, of course:
  5474. (* 1/3 3/2)
  5475. => 1/2
  5476. ** 'floor', 'ceiling', 'round' and 'truncate' now return exact numbers
  5477. for exact arguments.
  5478. For example: (floor 2) now returns an exact 2 where in the past it
  5479. returned an inexact 2.0. Likewise, (floor 5/4) returns an exact 1.
  5480. ** inexact->exact no longer returns only integers.
  5481. Without exact rationals, the closest exact number was always an
  5482. integer, but now inexact->exact returns the fraction that is exactly
  5483. equal to a floating point number. For example:
  5484. (inexact->exact 1.234)
  5485. => 694680242521899/562949953421312
  5486. When you want the old behavior, use 'round' explicitly:
  5487. (inexact->exact (round 1.234))
  5488. => 1
  5489. ** New function 'rationalize'.
  5490. This function finds a simple fraction that is close to a given real
  5491. number. For example (and compare with inexact->exact above):
  5492. (rationalize (inexact->exact 1.234) 1/2000)
  5493. => 58/47
  5494. Note that, as required by R5RS, rationalize returns only then an exact
  5495. result when both its arguments are exact.
  5496. ** 'odd?' and 'even?' work also for inexact integers.
  5497. Previously, (odd? 1.0) would signal an error since only exact integers
  5498. were recognized as integers. Now (odd? 1.0) returns #t, (odd? 2.0)
  5499. returns #f and (odd? 1.5) signals an error.
  5500. ** Guile now has uninterned symbols.
  5501. The new function 'make-symbol' will return an uninterned symbol. This
  5502. is a symbol that is unique and is guaranteed to remain unique.
  5503. However, uninterned symbols can not yet be read back in.
  5504. Use the new function 'symbol-interned?' to check whether a symbol is
  5505. interned or not.
  5506. ** pretty-print has more options.
  5507. The function pretty-print from the (ice-9 pretty-print) module can now
  5508. also be invoked with keyword arguments that control things like
  5509. maximum output width. See the manual for details.
  5510. ** Variables have no longer a special behavior for `equal?'.
  5511. Previously, comparing two variables with `equal?' would recursivly
  5512. compare their values. This is no longer done. Variables are now only
  5513. `equal?' if they are `eq?'.
  5514. ** `(begin)' is now valid.
  5515. You can now use an empty `begin' form. It will yield #<unspecified>
  5516. when evaluated and simply be ignored in a definition context.
  5517. ** Deprecated: procedure->macro
  5518. Change your code to use 'define-macro' or r5rs macros. Also, be aware
  5519. that macro expansion will not be done during evaluation, but prior to
  5520. evaluation.
  5521. ** Soft ports now allow a `char-ready?' procedure
  5522. The vector argument to `make-soft-port' can now have a length of
  5523. either 5 or 6. (Previously the length had to be 5.) The optional 6th
  5524. element is interpreted as an `input-waiting' thunk -- i.e. a thunk
  5525. that returns the number of characters that can be read immediately
  5526. without the soft port blocking.
  5527. ** Deprecated: undefine
  5528. There is no replacement for undefine.
  5529. ** The functions make-keyword-from-dash-symbol and keyword-dash-symbol
  5530. have been discouraged.
  5531. They are relics from a time where a keyword like #:foo was used
  5532. directly as a Tcl option "-foo" and thus keywords were internally
  5533. stored as a symbol with a starting dash. We now store a symbol
  5534. without the dash.
  5535. Use symbol->keyword and keyword->symbol instead.
  5536. ** The `cheap' debug option is now obsolete
  5537. Evaluator trap calls are now unconditionally "cheap" - in other words,
  5538. they pass a debug object to the trap handler rather than a full
  5539. continuation. The trap handler code can capture a full continuation
  5540. by using `call-with-current-continuation' in the usual way, if it so
  5541. desires.
  5542. The `cheap' option is retained for now so as not to break existing
  5543. code which gets or sets it, but setting it now has no effect. It will
  5544. be removed in the next major Guile release.
  5545. ** Evaluator trap calls now support `tweaking'
  5546. `Tweaking' means that the trap handler code can modify the Scheme
  5547. expression that is about to be evaluated (in the case of an
  5548. enter-frame trap) or the value that is being returned (in the case of
  5549. an exit-frame trap). The trap handler code indicates that it wants to
  5550. do this by returning a pair whose car is the symbol 'instead and whose
  5551. cdr is the modified expression or return value.
  5552. * Changes to the C interface
  5553. ** The functions scm_hash_fn_remove_x and scm_hashx_remove_x no longer
  5554. take a 'delete' function argument.
  5555. This argument makes no sense since the delete function is used to
  5556. remove a pair from an alist, and this must not be configurable.
  5557. This is an incompatible change.
  5558. ** The GH interface is now subject to the deprecation mechanism
  5559. The GH interface has been deprecated for quite some time but now it is
  5560. actually removed from Guile when it is configured with
  5561. --disable-deprecated.
  5562. See the manual "Transitioning away from GH" for more information.
  5563. ** A new family of functions for converting between C values and
  5564. Scheme values has been added.
  5565. These functions follow a common naming scheme and are designed to be
  5566. easier to use, thread-safe and more future-proof than the older
  5567. alternatives.
  5568. - int scm_is_* (...)
  5569. These are predicates that return a C boolean: 1 or 0. Instead of
  5570. SCM_NFALSEP, you can now use scm_is_true, for example.
  5571. - <type> scm_to_<type> (SCM val, ...)
  5572. These are functions that convert a Scheme value into an appropriate
  5573. C value. For example, you can use scm_to_int to safely convert from
  5574. a SCM to an int.
  5575. - SCM scm_from_<type> (<type> val, ...)
  5576. These functions convert from a C type to a SCM value; for example,
  5577. scm_from_int for ints.
  5578. There is a huge number of these functions, for numbers, strings,
  5579. symbols, vectors, etc. They are documented in the reference manual in
  5580. the API section together with the types that they apply to.
  5581. ** New functions for dealing with complex numbers in C have been added.
  5582. The new functions are scm_c_make_rectangular, scm_c_make_polar,
  5583. scm_c_real_part, scm_c_imag_part, scm_c_magnitude and scm_c_angle.
  5584. They work like scm_make_rectangular etc but take or return doubles
  5585. directly.
  5586. ** The function scm_make_complex has been discouraged.
  5587. Use scm_c_make_rectangular instead.
  5588. ** The INUM macros have been deprecated.
  5589. A lot of code uses these macros to do general integer conversions,
  5590. although the macros only work correctly with fixnums. Use the
  5591. following alternatives.
  5592. SCM_INUMP -> scm_is_integer or similar
  5593. SCM_NINUMP -> !scm_is_integer or similar
  5594. SCM_MAKINUM -> scm_from_int or similar
  5595. SCM_INUM -> scm_to_int or similar
  5596. SCM_VALIDATE_INUM_* -> Do not use these; scm_to_int, etc. will
  5597. do the validating for you.
  5598. ** The scm_num2<type> and scm_<type>2num functions and scm_make_real
  5599. have been discouraged.
  5600. Use the newer scm_to_<type> and scm_from_<type> functions instead for
  5601. new code. The functions have been discouraged since they don't fit
  5602. the naming scheme.
  5603. ** The 'boolean' macros SCM_FALSEP etc have been discouraged.
  5604. They have strange names, especially SCM_NFALSEP, and SCM_BOOLP
  5605. evaluates its argument twice. Use scm_is_true, etc. instead for new
  5606. code.
  5607. ** The macro SCM_EQ_P has been discouraged.
  5608. Use scm_is_eq for new code, which fits better into the naming
  5609. conventions.
  5610. ** The macros SCM_CONSP, SCM_NCONSP, SCM_NULLP, and SCM_NNULLP have
  5611. been discouraged.
  5612. Use the function scm_is_pair or scm_is_null instead.
  5613. ** The functions scm_round and scm_truncate have been deprecated and
  5614. are now available as scm_c_round and scm_c_truncate, respectively.
  5615. These functions occupy the names that scm_round_number and
  5616. scm_truncate_number should have.
  5617. ** The functions scm_c_string2str, scm_c_substring2str, and
  5618. scm_c_symbol2str have been deprecated.
  5619. Use scm_to_locale_stringbuf or similar instead, maybe together with
  5620. scm_substring.
  5621. ** New functions scm_c_make_string, scm_c_string_length,
  5622. scm_c_string_ref, scm_c_string_set_x, scm_c_substring,
  5623. scm_c_substring_shared, scm_c_substring_copy.
  5624. These are like scm_make_string, scm_length, etc. but are slightly
  5625. easier to use from C.
  5626. ** The macros SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_LENGTH,
  5627. SCM_SYMBOL_CHARS, and SCM_SYMBOL_LENGTH have been deprecated.
  5628. They export too many assumptions about the implementation of strings
  5629. and symbols that are no longer true in the presence of
  5630. mutation-sharing substrings and when Guile switches to some form of
  5631. Unicode.
  5632. When working with strings, it is often best to use the normal string
  5633. functions provided by Guile, such as scm_c_string_ref,
  5634. scm_c_string_set_x, scm_string_append, etc. Be sure to look in the
  5635. manual since many more such functions are now provided than
  5636. previously.
  5637. When you want to convert a SCM string to a C string, use the
  5638. scm_to_locale_string function or similar instead. For symbols, use
  5639. scm_symbol_to_string and then work with that string. Because of the
  5640. new string representation, scm_symbol_to_string does not need to copy
  5641. and is thus quite efficient.
  5642. ** Some string, symbol and keyword functions have been discouraged.
  5643. They don't fit into the uniform naming scheme and are not explicit
  5644. about the character encoding.
  5645. Replace according to the following table:
  5646. scm_allocate_string -> scm_c_make_string
  5647. scm_take_str -> scm_take_locale_stringn
  5648. scm_take0str -> scm_take_locale_string
  5649. scm_mem2string -> scm_from_locale_stringn
  5650. scm_str2string -> scm_from_locale_string
  5651. scm_makfrom0str -> scm_from_locale_string
  5652. scm_mem2symbol -> scm_from_locale_symboln
  5653. scm_mem2uninterned_symbol -> scm_from_locale_stringn + scm_make_symbol
  5654. scm_str2symbol -> scm_from_locale_symbol
  5655. SCM_SYMBOL_HASH -> scm_hashq
  5656. SCM_SYMBOL_INTERNED_P -> scm_symbol_interned_p
  5657. scm_c_make_keyword -> scm_from_locale_keyword
  5658. ** The functions scm_keyword_to_symbol and sym_symbol_to_keyword are
  5659. now also available to C code.
  5660. ** SCM_KEYWORDP and SCM_KEYWORDSYM have been deprecated.
  5661. Use scm_is_keyword and scm_keyword_to_symbol instead, but note that
  5662. the latter returns the true name of the keyword, not the 'dash name',
  5663. as SCM_KEYWORDSYM used to do.
  5664. ** A new way to access arrays in a thread-safe and efficient way has
  5665. been added.
  5666. See the manual, node "Accessing Arrays From C".
  5667. ** The old uniform vector and bitvector implementations have been
  5668. unceremoniously removed.
  5669. This implementation exposed the details of the tagging system of
  5670. Guile. Use the new C API explained in the manual in node "Uniform
  5671. Numeric Vectors" and "Bit Vectors", respectively.
  5672. The following macros are gone: SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
  5673. SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
  5674. SCM_SET_UVECTOR_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
  5675. SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
  5676. SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
  5677. SCM_SET_BITVECTOR_LENGTH, SCM_BITVEC_REF, SCM_BITVEC_SET,
  5678. SCM_BITVEC_CLR.
  5679. ** The macros dealing with vectors have been deprecated.
  5680. Use the new functions scm_is_vector, scm_vector_elements,
  5681. scm_vector_writable_elements, etc, or scm_is_simple_vector,
  5682. SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, etc instead. See the
  5683. manual for more details.
  5684. Deprecated are SCM_VECTORP, SCM_VELTS, SCM_VECTOR_MAX_LENGTH,
  5685. SCM_VECTOR_LENGTH, SCM_VECTOR_REF, SCM_VECTOR_SET, SCM_WRITABLE_VELTS.
  5686. The following macros have been removed: SCM_VECTOR_BASE,
  5687. SCM_SET_VECTOR_BASE, SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
  5688. SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS.
  5689. ** Some C functions and macros related to arrays have been deprecated.
  5690. Migrate according to the following table:
  5691. scm_make_uve -> scm_make_typed_array, scm_make_u8vector etc.
  5692. scm_make_ra -> scm_make_array
  5693. scm_shap2ra -> scm_make_array
  5694. scm_cvref -> scm_c_generalized_vector_ref
  5695. scm_ra_set_contp -> do not use
  5696. scm_aind -> scm_array_handle_pos
  5697. scm_raprin1 -> scm_display or scm_write
  5698. SCM_ARRAYP -> scm_is_array
  5699. SCM_ARRAY_NDIM -> scm_c_array_rank
  5700. SCM_ARRAY_DIMS -> scm_array_handle_dims
  5701. SCM_ARRAY_CONTP -> do not use
  5702. SCM_ARRAY_MEM -> do not use
  5703. SCM_ARRAY_V -> scm_array_handle_elements or similar
  5704. SCM_ARRAY_BASE -> do not use
  5705. ** SCM_CELL_WORD_LOC has been deprecated.
  5706. Use the new macro SCM_CELL_OBJECT_LOC instead, which returns a pointer
  5707. to a SCM, as opposed to a pointer to a scm_t_bits.
  5708. This was done to allow the correct use of pointers into the Scheme
  5709. heap. Previously, the heap words were of type scm_t_bits and local
  5710. variables and function arguments were of type SCM, making it
  5711. non-standards-conformant to have a pointer that can point to both.
  5712. ** New macros SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, etc.
  5713. These macros should be used instead of SCM_CELL_WORD_2/3 to access the
  5714. second and third words of double smobs. Likewise for
  5715. SCM_SET_SMOB_DATA_2 and SCM_SET_SMOB_DATA_3.
  5716. Also, there is SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS that should be
  5717. used to get and set the 16 exra bits in the zeroth word of a smob.
  5718. And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for
  5719. accesing the first immediate word of a smob as a SCM value, and there
  5720. is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate
  5721. smob word. Like wise for SCM_SMOB_OBJECT_2, etc.
  5722. ** New way to deal with non-local exits and re-entries.
  5723. There is a new set of functions that essentially do what
  5724. scm_internal_dynamic_wind does, but in a way that is more convenient
  5725. for C code in some situations. Here is a quick example of how to
  5726. prevent a potential memory leak:
  5727. void
  5728. foo ()
  5729. {
  5730. char *mem;
  5731. scm_dynwind_begin (0);
  5732. mem = scm_malloc (100);
  5733. scm_dynwind_unwind_handler (free, mem, SCM_F_WIND_EXPLICITLY);
  5734. /* MEM would leak if BAR throws an error.
  5735. SCM_DYNWIND_UNWIND_HANDLER frees it nevertheless.
  5736. */
  5737. bar ();
  5738. scm_dynwind_end ();
  5739. /* Because of SCM_F_WIND_EXPLICITLY, MEM will be freed by
  5740. SCM_DYNWIND_END as well.
  5741. */
  5742. }
  5743. For full documentation, see the node "Dynamic Wind" in the manual.
  5744. ** New function scm_dynwind_free
  5745. This function calls 'free' on a given pointer when a dynwind context
  5746. is left. Thus the call to scm_dynwind_unwind_handler above could be
  5747. replaced with simply scm_dynwind_free (mem).
  5748. ** New functions scm_c_call_with_blocked_asyncs and
  5749. scm_c_call_with_unblocked_asyncs
  5750. Like scm_call_with_blocked_asyncs etc. but for C functions.
  5751. ** New functions scm_dynwind_block_asyncs and scm_dynwind_unblock_asyncs
  5752. In addition to scm_c_call_with_blocked_asyncs you can now also use
  5753. scm_dynwind_block_asyncs in a 'dynwind context' (see above). Likewise for
  5754. scm_c_call_with_unblocked_asyncs and scm_dynwind_unblock_asyncs.
  5755. ** The macros SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
  5756. SCM_REALLOW_INTS have been deprecated.
  5757. They do no longer fulfill their original role of blocking signal
  5758. delivery. Depending on what you want to achieve, replace a pair of
  5759. SCM_DEFER_INTS and SCM_ALLOW_INTS with a dynwind context that locks a
  5760. mutex, blocks asyncs, or both. See node "Critical Sections" in the
  5761. manual.
  5762. ** The value 'scm_mask_ints' is no longer writable.
  5763. Previously, you could set scm_mask_ints directly. This is no longer
  5764. possible. Use scm_c_call_with_blocked_asyncs and
  5765. scm_c_call_with_unblocked_asyncs instead.
  5766. ** New way to temporarily set the current input, output or error ports
  5767. C code can now use scm_dynwind_current_<foo>_port in a 'dynwind
  5768. context' (see above). <foo> is one of "input", "output" or "error".
  5769. ** New way to temporarily set fluids
  5770. C code can now use scm_dynwind_fluid in a 'dynwind context' (see
  5771. above) to temporarily set the value of a fluid.
  5772. ** New types scm_t_intmax and scm_t_uintmax.
  5773. On platforms that have them, these types are identical to intmax_t and
  5774. uintmax_t, respectively. On other platforms, they are identical to
  5775. the largest integer types that Guile knows about.
  5776. ** The functions scm_unmemocopy and scm_unmemoize have been removed.
  5777. You should not have used them.
  5778. ** Many public #defines with generic names have been made private.
  5779. #defines with generic names like HAVE_FOO or SIZEOF_FOO have been made
  5780. private or renamed with a more suitable public name.
  5781. ** The macro SCM_TYP16S has been deprecated.
  5782. This macro is not intended for public use.
  5783. ** The macro SCM_SLOPPY_INEXACTP has been deprecated.
  5784. Use scm_is_true (scm_inexact_p (...)) instead.
  5785. ** The macro SCM_SLOPPY_REALP has been deprecated.
  5786. Use scm_is_real instead.
  5787. ** The macro SCM_SLOPPY_COMPLEXP has been deprecated.
  5788. Use scm_is_complex instead.
  5789. ** Some preprocessor defines have been deprecated.
  5790. These defines indicated whether a certain feature was present in Guile
  5791. or not. Going forward, assume that the features are always present.
  5792. The macros are: USE_THREADS, GUILE_ISELECT, READER_EXTENSIONS,
  5793. DEBUG_EXTENSIONS, DYNAMIC_LINKING.
  5794. The following macros have been removed completely: MEMOIZE_LOCALS,
  5795. SCM_RECKLESS, SCM_CAUTIOUS.
  5796. ** The preprocessor define STACK_DIRECTION has been deprecated.
  5797. There should be no need to know about the stack direction for ordinary
  5798. programs.
  5799. ** New function: scm_effective_version
  5800. Returns the "effective" version number. This is just the normal full
  5801. version string without the final micro-version number. See "Changes
  5802. to the distribution" above.
  5803. ** The function scm_call_with_new_thread has a new prototype.
  5804. Instead of taking a list with the thunk and handler, these two
  5805. arguments are now passed directly:
  5806. SCM scm_call_with_new_thread (SCM thunk, SCM handler);
  5807. This is an incompatible change.
  5808. ** New snarfer macro SCM_DEFINE_PUBLIC.
  5809. This is like SCM_DEFINE, but also calls scm_c_export for the defined
  5810. function in the init section.
  5811. ** The snarfer macro SCM_SNARF_INIT is now officially supported.
  5812. ** Garbage collector rewrite.
  5813. The garbage collector is cleaned up a lot, and now uses lazy
  5814. sweeping. This is reflected in the output of (gc-stats); since cells
  5815. are being freed when they are allocated, the cells-allocated field
  5816. stays roughly constant.
  5817. For malloc related triggers, the behavior is changed. It uses the same
  5818. heuristic as the cell-triggered collections. It may be tuned with the
  5819. environment variables GUILE_MIN_YIELD_MALLOC. This is the percentage
  5820. for minimum yield of malloc related triggers. The default is 40.
  5821. GUILE_INIT_MALLOC_LIMIT sets the initial trigger for doing a GC. The
  5822. default is 200 kb.
  5823. Debugging operations for the freelist have been deprecated, along with
  5824. the C variables that control garbage collection. The environment
  5825. variables GUILE_MAX_SEGMENT_SIZE, GUILE_INIT_SEGMENT_SIZE_2,
  5826. GUILE_INIT_SEGMENT_SIZE_1, and GUILE_MIN_YIELD_2 should be used.
  5827. For understanding the memory usage of a GUILE program, the routine
  5828. gc-live-object-stats returns an alist containing the number of live
  5829. objects for every type.
  5830. ** The function scm_definedp has been renamed to scm_defined_p
  5831. The name scm_definedp is deprecated.
  5832. ** The struct scm_cell type has been renamed to scm_t_cell
  5833. This is in accordance to Guile's naming scheme for types. Note that
  5834. the name scm_cell is now used for a function that allocates and
  5835. initializes a new cell (see below).
  5836. ** New functions for memory management
  5837. A new set of functions for memory management has been added since the
  5838. old way (scm_must_malloc, scm_must_free, etc) was error prone and
  5839. indeed, Guile itself contained some long standing bugs that could
  5840. cause aborts in long running programs.
  5841. The new functions are more symmetrical and do not need cooperation
  5842. from smob free routines, among other improvements.
  5843. The new functions are scm_malloc, scm_realloc, scm_calloc, scm_strdup,
  5844. scm_strndup, scm_gc_malloc, scm_gc_calloc, scm_gc_realloc,
  5845. scm_gc_free, scm_gc_register_collectable_memory, and
  5846. scm_gc_unregister_collectable_memory. Refer to the manual for more
  5847. details and for upgrading instructions.
  5848. The old functions for memory management have been deprecated. They
  5849. are: scm_must_malloc, scm_must_realloc, scm_must_free,
  5850. scm_must_strdup, scm_must_strndup, scm_done_malloc, scm_done_free.
  5851. ** Declarations of exported features are marked with SCM_API.
  5852. Every declaration of a feature that belongs to the exported Guile API
  5853. has been marked by adding the macro "SCM_API" to the start of the
  5854. declaration. This macro can expand into different things, the most
  5855. common of which is just "extern" for Unix platforms. On Win32, it can
  5856. be used to control which symbols are exported from a DLL.
  5857. If you `#define SCM_IMPORT' before including <libguile.h>, SCM_API
  5858. will expand into "__declspec (dllimport) extern", which is needed for
  5859. linking to the Guile DLL in Windows.
  5860. There are also SCM_RL_IMPORT, SCM_SRFI1314_IMPORT, and
  5861. SCM_SRFI4_IMPORT, for the corresponding libraries.
  5862. ** SCM_NEWCELL and SCM_NEWCELL2 have been deprecated.
  5863. Use the new functions scm_cell and scm_double_cell instead. The old
  5864. macros had problems because with them allocation and initialization
  5865. was separated and the GC could sometimes observe half initialized
  5866. cells. Only careful coding by the user of SCM_NEWCELL and
  5867. SCM_NEWCELL2 could make this safe and efficient.
  5868. ** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated.
  5869. Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p
  5870. instead.
  5871. ** SRCBRKP has been deprecated.
  5872. Use scm_c_source_property_breakpoint_p instead.
  5873. ** Deprecated: scm_makmacro
  5874. Change your code to use either scm_makmmacro or to define macros in
  5875. Scheme, using 'define-macro'.
  5876. ** New function scm_c_port_for_each.
  5877. This function is like scm_port_for_each but takes a pointer to a C
  5878. function as the callback instead of a SCM value.
  5879. ** The names scm_internal_select, scm_thread_sleep, and
  5880. scm_thread_usleep have been discouraged.
  5881. Use scm_std_select, scm_std_sleep, scm_std_usleep instead.
  5882. ** The GC can no longer be blocked.
  5883. The global flags scm_gc_heap_lock and scm_block_gc have been removed.
  5884. The GC can now run (partially) concurrently with other code and thus
  5885. blocking it is not well defined.
  5886. ** Many definitions have been removed that were previously deprecated.
  5887. scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify, s_t_ify,
  5888. scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
  5889. scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2,
  5890. scm_tc16_allocated, SCM_SET_SYMBOL_HASH, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
  5891. SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY, SCM_GC_SET_ALLOCATED,
  5892. scm_debug_newcell, scm_debug_newcell2, SCM_HUP_SIGNAL, SCM_INT_SIGNAL,
  5893. SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL,
  5894. SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG,
  5895. SCM_NUM_SIGS, scm_top_level_lookup_closure_var,
  5896. *top-level-lookup-closure*, scm_system_transformer, scm_eval_3,
  5897. scm_eval2, root_module_lookup_closure, SCM_SLOPPY_STRINGP,
  5898. SCM_RWSTRINGP, scm_read_only_string_p, scm_make_shared_substring,
  5899. scm_tc7_substring, sym_huh, SCM_VARVCELL, SCM_UDVARIABLEP,
  5900. SCM_DEFVARIABLEP, scm_mkbig, scm_big2inum, scm_adjbig, scm_normbig,
  5901. scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl, SCM_FIXNUM_BIT,
  5902. SCM_SETCHARS, SCM_SLOPPY_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
  5903. SCM_LENGTH_MAX, SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH,
  5904. SCM_ROCHARS, SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR,
  5905. scm_sym2vcell, scm_intern, scm_intern0, scm_sysintern, scm_sysintern0,
  5906. scm_sysintern0_no_module_lookup, scm_init_symbols_deprecated,
  5907. scm_vector_set_length_x, scm_contregs, scm_debug_info,
  5908. scm_debug_frame, SCM_DSIDEVAL, SCM_CONST_LONG, SCM_VCELL,
  5909. SCM_GLOBAL_VCELL, SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT,
  5910. SCM_HUGE_LENGTH, SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
  5911. SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
  5912. SCM_VALIDATE_RWSTRING, DIGITS, scm_small_istr2int, scm_istr2int,
  5913. scm_istr2flo, scm_istring2number, scm_istr2int, scm_istr2flo,
  5914. scm_istring2number, scm_vtable_index_vcell, scm_si_vcell, SCM_ECONSP,
  5915. SCM_NECONSP, SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL,
  5916. SCM_GLOC_VAL_LOC, scm_make_gloc, scm_gloc_p, scm_tc16_variable,
  5917. SCM_CHARS, SCM_LENGTH, SCM_SET_STRING_CHARS, SCM_SET_STRING_LENGTH.
  5918. * Changes to bundled modules
  5919. ** (ice-9 debug)
  5920. Using the (ice-9 debug) module no longer automatically switches Guile
  5921. to use the debugging evaluator. If you want to switch to the
  5922. debugging evaluator (which is needed for backtrace information if you
  5923. hit an error), please add an explicit "(debug-enable 'debug)" to your
  5924. code just after the code to use (ice-9 debug).
  5925. Changes since Guile 1.4:
  5926. * Changes to the distribution
  5927. ** A top-level TODO file is included.
  5928. ** Guile now uses a versioning scheme similar to that of the Linux kernel.
  5929. Guile now always uses three numbers to represent the version,
  5930. i.e. "1.6.5". The first number, 1, is the major version number, the
  5931. second number, 6, is the minor version number, and the third number,
  5932. 5, is the micro version number. Changes in major version number
  5933. indicate major changes in Guile.
  5934. Minor version numbers that are even denote stable releases, and odd
  5935. minor version numbers denote development versions (which may be
  5936. unstable). The micro version number indicates a minor sub-revision of
  5937. a given MAJOR.MINOR release.
  5938. In keeping with the new scheme, (minor-version) and scm_minor_version
  5939. no longer return everything but the major version number. They now
  5940. just return the minor version number. Two new functions
  5941. (micro-version) and scm_micro_version have been added to report the
  5942. micro version number.
  5943. In addition, ./GUILE-VERSION now defines GUILE_MICRO_VERSION.
  5944. ** New preprocessor definitions are available for checking versions.
  5945. version.h now #defines SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
  5946. SCM_MICRO_VERSION to the appropriate integer values.
  5947. ** Guile now actively warns about deprecated features.
  5948. The new configure option `--enable-deprecated=LEVEL' and the
  5949. environment variable GUILE_WARN_DEPRECATED control this mechanism.
  5950. See INSTALL and README for more information.
  5951. ** Guile is much more likely to work on 64-bit architectures.
  5952. Guile now compiles and passes "make check" with only two UNRESOLVED GC
  5953. cases on Alpha and ia64 based machines now. Thanks to John Goerzen
  5954. for the use of a test machine, and thanks to Stefan Jahn for ia64
  5955. patches.
  5956. ** New functions: setitimer and getitimer.
  5957. These implement a fairly direct interface to the libc functions of the
  5958. same name.
  5959. ** The #. reader extension is now disabled by default.
  5960. For safety reasons, #. evaluation is disabled by default. To
  5961. re-enable it, set the fluid read-eval? to #t. For example:
  5962. (fluid-set! read-eval? #t)
  5963. but make sure you realize the potential security risks involved. With
  5964. read-eval? enabled, reading a data file from an untrusted source can
  5965. be dangerous.
  5966. ** New SRFI modules have been added:
  5967. SRFI-0 `cond-expand' is now supported in Guile, without requiring
  5968. using a module.
  5969. (srfi srfi-1) is a library containing many useful pair- and list-processing
  5970. procedures.
  5971. (srfi srfi-2) exports and-let*.
  5972. (srfi srfi-4) implements homogeneous numeric vector datatypes.
  5973. (srfi srfi-6) is a dummy module for now, since guile already provides
  5974. all of the srfi-6 procedures by default: open-input-string,
  5975. open-output-string, get-output-string.
  5976. (srfi srfi-8) exports receive.
  5977. (srfi srfi-9) exports define-record-type.
  5978. (srfi srfi-10) exports define-reader-ctor and implements the reader
  5979. extension #,().
  5980. (srfi srfi-11) exports let-values and let*-values.
  5981. (srfi srfi-13) implements the SRFI String Library.
  5982. (srfi srfi-14) implements the SRFI Character-Set Library.
  5983. (srfi srfi-17) implements setter and getter-with-setter and redefines
  5984. some accessor procedures as procedures with getters. (such as car,
  5985. cdr, vector-ref etc.)
  5986. (srfi srfi-19) implements the SRFI Time/Date Library.
  5987. ** New scripts / "executable modules"
  5988. Subdirectory "scripts" contains Scheme modules that are packaged to
  5989. also be executable as scripts. At this time, these scripts are available:
  5990. display-commentary
  5991. doc-snarf
  5992. generate-autoload
  5993. punify
  5994. read-scheme-source
  5995. use2dot
  5996. See README there for more info.
  5997. These scripts can be invoked from the shell with the new program
  5998. "guile-tools", which keeps track of installation directory for you.
  5999. For example:
  6000. $ guile-tools display-commentary srfi/*.scm
  6001. guile-tools is copied to the standard $bindir on "make install".
  6002. ** New module (ice-9 stack-catch):
  6003. stack-catch is like catch, but saves the current state of the stack in
  6004. the fluid the-last-stack. This fluid can be useful when using the
  6005. debugger and when re-throwing an error.
  6006. ** The module (ice-9 and-let*) has been renamed to (ice-9 and-let-star)
  6007. This has been done to prevent problems on lesser operating systems
  6008. that can't tolerate `*'s in file names. The exported macro continues
  6009. to be named `and-let*', of course.
  6010. On systems that support it, there is also a compatibility module named
  6011. (ice-9 and-let*). It will go away in the next release.
  6012. ** New modules (oop goops) etc.:
  6013. (oop goops)
  6014. (oop goops describe)
  6015. (oop goops save)
  6016. (oop goops active-slot)
  6017. (oop goops composite-slot)
  6018. The Guile Object Oriented Programming System (GOOPS) has been
  6019. integrated into Guile. For further information, consult the GOOPS
  6020. manual and tutorial in the `doc' directory.
  6021. ** New module (ice-9 rdelim).
  6022. This exports the following procedures which were previously defined
  6023. in the default environment:
  6024. read-line read-line! read-delimited read-delimited! %read-delimited!
  6025. %read-line write-line
  6026. For backwards compatibility the definitions are still imported into the
  6027. default environment in this version of Guile. However you should add:
  6028. (use-modules (ice-9 rdelim))
  6029. to any program which uses the definitions, since this may change in
  6030. future.
  6031. Alternatively, if guile-scsh is installed, the (scsh rdelim) module
  6032. can be used for similar functionality.
  6033. ** New module (ice-9 rw)
  6034. This is a subset of the (scsh rw) module from guile-scsh. Currently
  6035. it defines two procedures:
  6036. *** New function: read-string!/partial str [port_or_fdes [start [end]]]
  6037. Read characters from a port or file descriptor into a string STR.
  6038. A port must have an underlying file descriptor -- a so-called
  6039. fport. This procedure is scsh-compatible and can efficiently read
  6040. large strings.
  6041. *** New function: write-string/partial str [port_or_fdes [start [end]]]
  6042. Write characters from a string STR to a port or file descriptor.
  6043. A port must have an underlying file descriptor -- a so-called
  6044. fport. This procedure is mostly compatible and can efficiently
  6045. write large strings.
  6046. ** New module (ice-9 match)
  6047. This module includes Andrew K. Wright's pattern matcher. See
  6048. ice-9/match.scm for brief description or
  6049. http://www.star-lab.com/wright/code.html
  6050. for complete documentation.
  6051. ** New module (ice-9 buffered-input)
  6052. This module provides procedures to construct an input port from an
  6053. underlying source of input that reads and returns its input in chunks.
  6054. The underlying input source is a Scheme procedure, specified by the
  6055. caller, which the port invokes whenever it needs more input.
  6056. This is useful when building an input port whose back end is Readline
  6057. or a UI element such as the GtkEntry widget.
  6058. ** Documentation
  6059. The reference and tutorial documentation that was previously
  6060. distributed separately, as `guile-doc', is now included in the core
  6061. Guile distribution. The documentation consists of the following
  6062. manuals.
  6063. - The Guile Tutorial (guile-tut.texi) contains a tutorial introduction
  6064. to using Guile.
  6065. - The Guile Reference Manual (guile.texi) contains (or is intended to
  6066. contain) reference documentation on all aspects of Guile.
  6067. - The GOOPS Manual (goops.texi) contains both tutorial-style and
  6068. reference documentation for using GOOPS, Guile's Object Oriented
  6069. Programming System.
  6070. - The Revised^5 Report on the Algorithmic Language Scheme
  6071. (r5rs.texi).
  6072. See the README file in the `doc' directory for more details.
  6073. ** There are a couple of examples in the examples/ directory now.
  6074. * Changes to the stand-alone interpreter
  6075. ** New command line option `--use-srfi'
  6076. Using this option, SRFI modules can be loaded on startup and be
  6077. available right from the beginning. This makes programming portable
  6078. Scheme programs easier.
  6079. The option `--use-srfi' expects a comma-separated list of numbers,
  6080. each representing a SRFI number to be loaded into the interpreter
  6081. before starting evaluating a script file or the REPL. Additionally,
  6082. the feature identifier for the loaded SRFIs is recognized by
  6083. `cond-expand' when using this option.
  6084. Example:
  6085. $ guile --use-srfi=8,13
  6086. guile> (receive (x z) (values 1 2) (+ 1 2))
  6087. 3
  6088. guile> (string-pad "bla" 20)
  6089. " bla"
  6090. ** Guile now always starts up in the `(guile-user)' module.
  6091. Previously, scripts executed via the `-s' option would run in the
  6092. `(guile)' module and the repl would run in the `(guile-user)' module.
  6093. Now every user action takes place in the `(guile-user)' module by
  6094. default.
  6095. * Changes to Scheme functions and syntax
  6096. ** Character classifiers work for non-ASCII characters.
  6097. The predicates `char-alphabetic?', `char-numeric?',
  6098. `char-whitespace?', `char-lower?', `char-upper?' and `char-is-both?'
  6099. no longer check whether their arguments are ASCII characters.
  6100. Previously, a character would only be considered alphabetic when it
  6101. was also ASCII, for example.
  6102. ** Previously deprecated Scheme functions have been removed:
  6103. tag - no replacement.
  6104. fseek - replaced by seek.
  6105. list* - replaced by cons*.
  6106. ** It's now possible to create modules with controlled environments
  6107. Example:
  6108. (use-modules (ice-9 safe))
  6109. (define m (make-safe-module))
  6110. ;;; m will now be a module containing only a safe subset of R5RS
  6111. (eval '(+ 1 2) m) --> 3
  6112. (eval 'load m) --> ERROR: Unbound variable: load
  6113. ** Evaluation of "()", the empty list, is now an error.
  6114. Previously, the expression "()" evaluated to the empty list. This has
  6115. been changed to signal a "missing expression" error. The correct way
  6116. to write the empty list as a literal constant is to use quote: "'()".
  6117. ** New concept of `Guile Extensions'.
  6118. A Guile Extension is just a ordinary shared library that can be linked
  6119. at run-time. We found it advantageous to give this simple concept a
  6120. dedicated name to distinguish the issues related to shared libraries
  6121. from the issues related to the module system.
  6122. *** New function: load-extension
  6123. Executing (load-extension lib init) is mostly equivalent to
  6124. (dynamic-call init (dynamic-link lib))
  6125. except when scm_register_extension has been called previously.
  6126. Whenever appropriate, you should use `load-extension' instead of
  6127. dynamic-link and dynamic-call.
  6128. *** New C function: scm_c_register_extension
  6129. This function registers a initialization function for use by
  6130. `load-extension'. Use it when you don't want specific extensions to
  6131. be loaded as shared libraries (for example on platforms that don't
  6132. support dynamic linking).
  6133. ** Auto-loading of compiled-code modules is deprecated.
  6134. Guile used to be able to automatically find and link a shared
  6135. library to satisfy requests for a module. For example, the module
  6136. `(foo bar)' could be implemented by placing a shared library named
  6137. "foo/libbar.so" (or with a different extension) in a directory on the
  6138. load path of Guile.
  6139. This has been found to be too tricky, and is no longer supported. The
  6140. shared libraries are now called "extensions". You should now write a
  6141. small Scheme file that calls `load-extension' to load the shared
  6142. library and initialize it explicitly.
  6143. The shared libraries themselves should be installed in the usual
  6144. places for shared libraries, with names like "libguile-foo-bar".
  6145. For example, place this into a file "foo/bar.scm"
  6146. (define-module (foo bar))
  6147. (load-extension "libguile-foo-bar" "foobar_init")
  6148. ** Backward incompatible change: eval EXP ENVIRONMENT-SPECIFIER
  6149. `eval' is now R5RS, that is it takes two arguments.
  6150. The second argument is an environment specifier, i.e. either
  6151. (scheme-report-environment 5)
  6152. (null-environment 5)
  6153. (interaction-environment)
  6154. or
  6155. any module.
  6156. ** The module system has been made more disciplined.
  6157. The function `eval' will save and restore the current module around
  6158. the evaluation of the specified expression. While this expression is
  6159. evaluated, `(current-module)' will now return the right module, which
  6160. is the module specified as the second argument to `eval'.
  6161. A consequence of this change is that `eval' is not particularly
  6162. useful when you want allow the evaluated code to change what module is
  6163. designated as the current module and have this change persist from one
  6164. call to `eval' to the next. The read-eval-print-loop is an example
  6165. where `eval' is now inadequate. To compensate, there is a new
  6166. function `primitive-eval' that does not take a module specifier and
  6167. that does not save/restore the current module. You should use this
  6168. function together with `set-current-module', `current-module', etc
  6169. when you want to have more control over the state that is carried from
  6170. one eval to the next.
  6171. Additionally, it has been made sure that forms that are evaluated at
  6172. the top level are always evaluated with respect to the current module.
  6173. Previously, subforms of top-level forms such as `begin', `case',
  6174. etc. did not respect changes to the current module although these
  6175. subforms are at the top-level as well.
  6176. To prevent strange behavior, the forms `define-module',
  6177. `use-modules', `use-syntax', and `export' have been restricted to only
  6178. work on the top level. The forms `define-public' and
  6179. `defmacro-public' only export the new binding on the top level. They
  6180. behave just like `define' and `defmacro', respectively, when they are
  6181. used in a lexical environment.
  6182. Also, `export' will no longer silently re-export bindings imported
  6183. from a used module. It will emit a `deprecation' warning and will
  6184. cease to perform any re-export in the next version. If you actually
  6185. want to re-export bindings, use the new `re-export' in place of
  6186. `export'. The new `re-export' will not make copies of variables when
  6187. rexporting them, as `export' did wrongly.
  6188. ** Module system now allows selection and renaming of imported bindings
  6189. Previously, when using `use-modules' or the `#:use-module' clause in
  6190. the `define-module' form, all the bindings (association of symbols to
  6191. values) for imported modules were added to the "current module" on an
  6192. as-is basis. This has been changed to allow finer control through two
  6193. new facilities: selection and renaming.
  6194. You can now select which of the imported module's bindings are to be
  6195. visible in the current module by using the `:select' clause. This
  6196. clause also can be used to rename individual bindings. For example:
  6197. ;; import all bindings no questions asked
  6198. (use-modules (ice-9 common-list))
  6199. ;; import four bindings, renaming two of them;
  6200. ;; the current module sees: every some zonk-y zonk-n
  6201. (use-modules ((ice-9 common-list)
  6202. :select (every some
  6203. (remove-if . zonk-y)
  6204. (remove-if-not . zonk-n))))
  6205. You can also programmatically rename all selected bindings using the
  6206. `:renamer' clause, which specifies a proc that takes a symbol and
  6207. returns another symbol. Because it is common practice to use a prefix,
  6208. we now provide the convenience procedure `symbol-prefix-proc'. For
  6209. example:
  6210. ;; import four bindings, renaming two of them specifically,
  6211. ;; and all four w/ prefix "CL:";
  6212. ;; the current module sees: CL:every CL:some CL:zonk-y CL:zonk-n
  6213. (use-modules ((ice-9 common-list)
  6214. :select (every some
  6215. (remove-if . zonk-y)
  6216. (remove-if-not . zonk-n))
  6217. :renamer (symbol-prefix-proc 'CL:)))
  6218. ;; import four bindings, renaming two of them specifically,
  6219. ;; and all four by upcasing.
  6220. ;; the current module sees: EVERY SOME ZONK-Y ZONK-N
  6221. (define (upcase-symbol sym)
  6222. (string->symbol (string-upcase (symbol->string sym))))
  6223. (use-modules ((ice-9 common-list)
  6224. :select (every some
  6225. (remove-if . zonk-y)
  6226. (remove-if-not . zonk-n))
  6227. :renamer upcase-symbol))
  6228. Note that programmatic renaming is done *after* individual renaming.
  6229. Also, the above examples show `use-modules', but the same facilities are
  6230. available for the `#:use-module' clause of `define-module'.
  6231. See manual for more info.
  6232. ** The semantics of guardians have changed.
  6233. The changes are for the most part compatible. An important criterion
  6234. was to keep the typical usage of guardians as simple as before, but to
  6235. make the semantics safer and (as a result) more useful.
  6236. *** All objects returned from guardians are now properly alive.
  6237. It is now guaranteed that any object referenced by an object returned
  6238. from a guardian is alive. It's now impossible for a guardian to
  6239. return a "contained" object before its "containing" object.
  6240. One incompatible (but probably not very important) change resulting
  6241. from this is that it is no longer possible to guard objects that
  6242. indirectly reference themselves (i.e. are parts of cycles). If you do
  6243. so accidentally, you'll get a warning.
  6244. *** There are now two types of guardians: greedy and sharing.
  6245. If you call (make-guardian #t) or just (make-guardian), you'll get a
  6246. greedy guardian, and for (make-guardian #f) a sharing guardian.
  6247. Greedy guardians are the default because they are more "defensive".
  6248. You can only greedily guard an object once. If you guard an object
  6249. more than once, once in a greedy guardian and the rest of times in
  6250. sharing guardians, then it is guaranteed that the object won't be
  6251. returned from sharing guardians as long as it is greedily guarded
  6252. and/or alive.
  6253. Guardians returned by calls to `make-guardian' can now take one more
  6254. optional parameter, which says whether to throw an error in case an
  6255. attempt is made to greedily guard an object that is already greedily
  6256. guarded. The default is true, i.e. throw an error. If the parameter
  6257. is false, the guardian invocation returns #t if guarding was
  6258. successful and #f if it wasn't.
  6259. Also, since greedy guarding is, in effect, a side-effecting operation
  6260. on objects, a new function is introduced: `destroy-guardian!'.
  6261. Invoking this function on a guardian renders it unoperative and, if
  6262. the guardian is greedy, clears the "greedily guarded" property of the
  6263. objects that were guarded by it, thus undoing the side effect.
  6264. Note that all this hair is hardly very important, since guardian
  6265. objects are usually permanent.
  6266. ** Continuations created by call-with-current-continuation now accept
  6267. any number of arguments, as required by R5RS.
  6268. ** New function `issue-deprecation-warning'
  6269. This function is used to display the deprecation messages that are
  6270. controlled by GUILE_WARN_DEPRECATION as explained in the README.
  6271. (define (id x)
  6272. (issue-deprecation-warning "`id' is deprecated. Use `identity' instead.")
  6273. (identity x))
  6274. guile> (id 1)
  6275. ;; `id' is deprecated. Use `identity' instead.
  6276. 1
  6277. guile> (id 1)
  6278. 1
  6279. ** New syntax `begin-deprecated'
  6280. When deprecated features are included (as determined by the configure
  6281. option --enable-deprecated), `begin-deprecated' is identical to
  6282. `begin'. When deprecated features are excluded, it always evaluates
  6283. to `#f', ignoring the body forms.
  6284. ** New function `make-object-property'
  6285. This function returns a new `procedure with setter' P that can be used
  6286. to attach a property to objects. When calling P as
  6287. (set! (P obj) val)
  6288. where `obj' is any kind of object, it attaches `val' to `obj' in such
  6289. a way that it can be retrieved by calling P as
  6290. (P obj)
  6291. This function will replace procedure properties, symbol properties and
  6292. source properties eventually.
  6293. ** Module (ice-9 optargs) now uses keywords instead of `#&'.
  6294. Instead of #&optional, #&key, etc you should now use #:optional,
  6295. #:key, etc. Since #:optional is a keyword, you can write it as just
  6296. :optional when (read-set! keywords 'prefix) is active.
  6297. The old reader syntax `#&' is still supported, but deprecated. It
  6298. will be removed in the next release.
  6299. ** New define-module option: pure
  6300. Tells the module system not to include any bindings from the root
  6301. module.
  6302. Example:
  6303. (define-module (totally-empty-module)
  6304. :pure)
  6305. ** New define-module option: export NAME1 ...
  6306. Export names NAME1 ...
  6307. This option is required if you want to be able to export bindings from
  6308. a module which doesn't import one of `define-public' or `export'.
  6309. Example:
  6310. (define-module (foo)
  6311. :pure
  6312. :use-module (ice-9 r5rs)
  6313. :export (bar))
  6314. ;;; Note that we're pure R5RS below this point!
  6315. (define (bar)
  6316. ...)
  6317. ** New function: object->string OBJ
  6318. Return a Scheme string obtained by printing a given object.
  6319. ** New function: port? X
  6320. Returns a boolean indicating whether X is a port. Equivalent to
  6321. `(or (input-port? X) (output-port? X))'.
  6322. ** New function: file-port?
  6323. Determines whether a given object is a port that is related to a file.
  6324. ** New function: port-for-each proc
  6325. Apply PROC to each port in the Guile port table in turn. The return
  6326. value is unspecified. More specifically, PROC is applied exactly once
  6327. to every port that exists in the system at the time PORT-FOR-EACH is
  6328. invoked. Changes to the port table while PORT-FOR-EACH is running
  6329. have no effect as far as PORT-FOR-EACH is concerned.
  6330. ** New function: dup2 oldfd newfd
  6331. A simple wrapper for the `dup2' system call. Copies the file
  6332. descriptor OLDFD to descriptor number NEWFD, replacing the
  6333. previous meaning of NEWFD. Both OLDFD and NEWFD must be integers.
  6334. Unlike for dup->fdes or primitive-move->fdes, no attempt is made
  6335. to move away ports which are using NEWFD. The return value is
  6336. unspecified.
  6337. ** New function: close-fdes fd
  6338. A simple wrapper for the `close' system call. Close file
  6339. descriptor FD, which must be an integer. Unlike close (*note
  6340. close: Ports and File Descriptors.), the file descriptor will be
  6341. closed even if a port is using it. The return value is
  6342. unspecified.
  6343. ** New function: crypt password salt
  6344. Encrypts `password' using the standard unix password encryption
  6345. algorithm.
  6346. ** New function: chroot path
  6347. Change the root directory of the running process to `path'.
  6348. ** New functions: getlogin, cuserid
  6349. Return the login name or the user name of the current effective user
  6350. id, respectively.
  6351. ** New functions: getpriority which who, setpriority which who prio
  6352. Get or set the priority of the running process.
  6353. ** New function: getpass prompt
  6354. Read a password from the terminal, first displaying `prompt' and
  6355. disabling echoing.
  6356. ** New function: flock file operation
  6357. Set/remove an advisory shared or exclusive lock on `file'.
  6358. ** New functions: sethostname name, gethostname
  6359. Set or get the hostname of the machine the current process is running
  6360. on.
  6361. ** New function: mkstemp! tmpl
  6362. mkstemp creates a new unique file in the file system and returns a
  6363. new buffered port open for reading and writing to the file. TMPL
  6364. is a string specifying where the file should be created: it must
  6365. end with `XXXXXX' and will be changed in place to return the name
  6366. of the temporary file.
  6367. ** New function: open-input-string string
  6368. Return an input string port which delivers the characters from
  6369. `string'. This procedure, together with `open-output-string' and
  6370. `get-output-string' implements SRFI-6.
  6371. ** New function: open-output-string
  6372. Return an output string port which collects all data written to it.
  6373. The data can then be retrieved by `get-output-string'.
  6374. ** New function: get-output-string
  6375. Return the contents of an output string port.
  6376. ** New function: identity
  6377. Return the argument.
  6378. ** socket, connect, accept etc., now have support for IPv6. IPv6 addresses
  6379. are represented in Scheme as integers with normal host byte ordering.
  6380. ** New function: inet-pton family address
  6381. Convert a printable string network address into an integer. Note that
  6382. unlike the C version of this function, the result is an integer with
  6383. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6384. e.g.,
  6385. (inet-pton AF_INET "127.0.0.1") => 2130706433
  6386. (inet-pton AF_INET6 "::1") => 1
  6387. ** New function: inet-ntop family address
  6388. Convert an integer network address into a printable string. Note that
  6389. unlike the C version of this function, the input is an integer with
  6390. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  6391. e.g.,
  6392. (inet-ntop AF_INET 2130706433) => "127.0.0.1"
  6393. (inet-ntop AF_INET6 (- (expt 2 128) 1)) =>
  6394. ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  6395. ** Deprecated: id
  6396. Use `identity' instead.
  6397. ** Deprecated: -1+
  6398. Use `1-' instead.
  6399. ** Deprecated: return-it
  6400. Do without it.
  6401. ** Deprecated: string-character-length
  6402. Use `string-length' instead.
  6403. ** Deprecated: flags
  6404. Use `logior' instead.
  6405. ** Deprecated: close-all-ports-except.
  6406. This was intended for closing ports in a child process after a fork,
  6407. but it has the undesirable side effect of flushing buffers.
  6408. port-for-each is more flexible.
  6409. ** The (ice-9 popen) module now attempts to set up file descriptors in
  6410. the child process from the current Scheme ports, instead of using the
  6411. current values of file descriptors 0, 1, and 2 in the parent process.
  6412. ** Removed function: builtin-weak-bindings
  6413. There is no such concept as a weak binding any more.
  6414. ** Removed constants: bignum-radix, scm-line-incrementors
  6415. ** define-method: New syntax mandatory.
  6416. The new method syntax is now mandatory:
  6417. (define-method (NAME ARG-SPEC ...) BODY ...)
  6418. (define-method (NAME ARG-SPEC ... . REST-ARG) BODY ...)
  6419. ARG-SPEC ::= ARG-NAME | (ARG-NAME TYPE)
  6420. REST-ARG ::= ARG-NAME
  6421. If you have old code using the old syntax, import
  6422. (oop goops old-define-method) before (oop goops) as in:
  6423. (use-modules (oop goops old-define-method) (oop goops))
  6424. ** Deprecated function: builtin-variable
  6425. Removed function: builtin-bindings
  6426. There is no longer a distinction between builtin or other variables.
  6427. Use module system operations for all variables.
  6428. ** Lazy-catch handlers are no longer allowed to return.
  6429. That is, a call to `throw', `error', etc is now guaranteed to not
  6430. return.
  6431. ** Bugfixes for (ice-9 getopt-long)
  6432. This module is now tested using test-suite/tests/getopt-long.test.
  6433. The following bugs have been fixed:
  6434. *** Parsing for options that are specified to have `optional' args now checks
  6435. if the next element is an option instead of unconditionally taking it as the
  6436. option arg.
  6437. *** An error is now thrown for `--opt=val' when the option description
  6438. does not specify `(value #t)' or `(value optional)'. This condition used to
  6439. be accepted w/o error, contrary to the documentation.
  6440. *** The error message for unrecognized options is now more informative.
  6441. It used to be "not a record", an artifact of the implementation.
  6442. *** The error message for `--opt' terminating the arg list (no value), when
  6443. `(value #t)' is specified, is now more informative. It used to be "not enough
  6444. args".
  6445. *** "Clumped" single-char args now preserve trailing string, use it as arg.
  6446. The expansion used to be like so:
  6447. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "--xyz")
  6448. Note that the "5d" is dropped. Now it is like so:
  6449. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "5d" "--xyz")
  6450. This enables single-char options to have adjoining arguments as long as their
  6451. constituent characters are not potential single-char options.
  6452. ** (ice-9 session) procedure `arity' now works with (ice-9 optargs) `lambda*'
  6453. The `lambda*' and derivative forms in (ice-9 optargs) now set a procedure
  6454. property `arglist', which can be retrieved by `arity'. The result is that
  6455. `arity' can give more detailed information than before:
  6456. Before:
  6457. guile> (use-modules (ice-9 optargs))
  6458. guile> (define* (foo #:optional a b c) a)
  6459. guile> (arity foo)
  6460. 0 or more arguments in `lambda*:G0'.
  6461. After:
  6462. guile> (arity foo)
  6463. 3 optional arguments: `a', `b' and `c'.
  6464. guile> (define* (bar a b #:key c d #:allow-other-keys) a)
  6465. guile> (arity bar)
  6466. 2 required arguments: `a' and `b', 2 keyword arguments: `c'
  6467. and `d', other keywords allowed.
  6468. guile> (define* (baz a b #:optional c #:rest r) a)
  6469. guile> (arity baz)
  6470. 2 required arguments: `a' and `b', 1 optional argument: `c',
  6471. the rest in `r'.
  6472. * Changes to the C interface
  6473. ** Types have been renamed from scm_*_t to scm_t_*.
  6474. This has been done for POSIX sake. It reserves identifiers ending
  6475. with "_t". What a concept.
  6476. The old names are still available with status `deprecated'.
  6477. ** scm_t_bits (former scm_bits_t) is now a unsigned type.
  6478. ** Deprecated features have been removed.
  6479. *** Macros removed
  6480. SCM_INPORTP, SCM_OUTPORTP SCM_ICHRP, SCM_ICHR, SCM_MAKICHR
  6481. SCM_SETJMPBUF SCM_NSTRINGP SCM_NRWSTRINGP SCM_NVECTORP SCM_DOUBLE_CELLP
  6482. *** C Functions removed
  6483. scm_sysmissing scm_tag scm_tc16_flo scm_tc_flo
  6484. scm_fseek - replaced by scm_seek.
  6485. gc-thunk - replaced by after-gc-hook.
  6486. gh_int2scmb - replaced by gh_bool2scm.
  6487. scm_tc_dblr - replaced by scm_tc16_real.
  6488. scm_tc_dblc - replaced by scm_tc16_complex.
  6489. scm_list_star - replaced by scm_cons_star.
  6490. ** Deprecated: scm_makfromstr
  6491. Use scm_mem2string instead.
  6492. ** Deprecated: scm_make_shared_substring
  6493. Explicit shared substrings will disappear from Guile.
  6494. Instead, "normal" strings will be implemented using sharing
  6495. internally, combined with a copy-on-write strategy.
  6496. ** Deprecated: scm_read_only_string_p
  6497. The concept of read-only strings will disappear in next release of
  6498. Guile.
  6499. ** Deprecated: scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member
  6500. Instead, use scm_c_memq or scm_memq, scm_memv, scm_member.
  6501. ** New functions: scm_call_0, scm_call_1, scm_call_2, scm_call_3
  6502. Call a procedure with the indicated number of arguments. See "Fly
  6503. Evaluation" in the manual.
  6504. ** New functions: scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3
  6505. Call a procedure with the indicated number of arguments and a list of
  6506. further arguments. See "Fly Evaluation" in the manual.
  6507. ** New functions: scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5
  6508. Create a list of the given number of elements. See "List
  6509. Constructors" in the manual.
  6510. ** Renamed function: scm_listify has been replaced by scm_list_n.
  6511. ** Deprecated macros: SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4,
  6512. SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9.
  6513. Use functions scm_list_N instead.
  6514. ** New function: scm_c_read (SCM port, void *buffer, scm_sizet size)
  6515. Used by an application to read arbitrary number of bytes from a port.
  6516. Same semantics as libc read, except that scm_c_read only returns less
  6517. than SIZE bytes if at end-of-file.
  6518. Warning: Doesn't update port line and column counts!
  6519. ** New function: scm_c_write (SCM port, const void *ptr, scm_sizet size)
  6520. Used by an application to write arbitrary number of bytes to an SCM
  6521. port. Similar semantics as libc write. However, unlike libc
  6522. write, scm_c_write writes the requested number of bytes and has no
  6523. return value.
  6524. Warning: Doesn't update port line and column counts!
  6525. ** New function: scm_init_guile ()
  6526. In contrast to scm_boot_guile, scm_init_guile will return normally
  6527. after initializing Guile. It is not available on all systems, tho.
  6528. ** New functions: scm_str2symbol, scm_mem2symbol
  6529. The function scm_str2symbol takes a const char* pointing to a zero-terminated
  6530. field of characters and creates a scheme symbol object from that C string.
  6531. The function scm_mem2symbol takes a const char* and a number of characters and
  6532. creates a symbol from the characters in that memory area.
  6533. ** New functions: scm_primitive_make_property
  6534. scm_primitive_property_ref
  6535. scm_primitive_property_set_x
  6536. scm_primitive_property_del_x
  6537. These functions implement a new way to deal with object properties.
  6538. See libguile/properties.c for their documentation.
  6539. ** New function: scm_done_free (long size)
  6540. This function is the inverse of scm_done_malloc. Use it to report the
  6541. amount of smob memory you free. The previous method, which involved
  6542. calling scm_done_malloc with negative argument, was somewhat
  6543. unintuitive (and is still available, of course).
  6544. ** New function: scm_c_memq (SCM obj, SCM list)
  6545. This function provides a fast C level alternative for scm_memq for the case
  6546. that the list parameter is known to be a proper list. The function is a
  6547. replacement for scm_sloppy_memq, but is stricter in its requirements on its
  6548. list input parameter, since for anything else but a proper list the function's
  6549. behaviour is undefined - it may even crash or loop endlessly. Further, for
  6550. the case that the object is not found in the list, scm_c_memq returns #f which
  6551. is similar to scm_memq, but different from scm_sloppy_memq's behaviour.
  6552. ** New functions: scm_remember_upto_here_1, scm_remember_upto_here_2,
  6553. scm_remember_upto_here
  6554. These functions replace the function scm_remember.
  6555. ** Deprecated function: scm_remember
  6556. Use one of the new functions scm_remember_upto_here_1,
  6557. scm_remember_upto_here_2 or scm_remember_upto_here instead.
  6558. ** New function: scm_allocate_string
  6559. This function replaces the function scm_makstr.
  6560. ** Deprecated function: scm_makstr
  6561. Use the new function scm_allocate_string instead.
  6562. ** New global variable scm_gc_running_p introduced.
  6563. Use this variable to find out if garbage collection is being executed. Up to
  6564. now applications have used scm_gc_heap_lock to test if garbage collection was
  6565. running, which also works because of the fact that up to know only the garbage
  6566. collector has set this variable. But, this is an implementation detail that
  6567. may change. Further, scm_gc_heap_lock is not set throughout gc, thus the use
  6568. of this variable is (and has been) not fully safe anyway.
  6569. ** New macros: SCM_BITVECTOR_MAX_LENGTH, SCM_UVECTOR_MAX_LENGTH
  6570. Use these instead of SCM_LENGTH_MAX.
  6571. ** New macros: SCM_CONTINUATION_LENGTH, SCM_CCLO_LENGTH, SCM_STACK_LENGTH,
  6572. SCM_STRING_LENGTH, SCM_SYMBOL_LENGTH, SCM_UVECTOR_LENGTH,
  6573. SCM_BITVECTOR_LENGTH, SCM_VECTOR_LENGTH.
  6574. Use these instead of SCM_LENGTH.
  6575. ** New macros: SCM_SET_CONTINUATION_LENGTH, SCM_SET_STRING_LENGTH,
  6576. SCM_SET_SYMBOL_LENGTH, SCM_SET_VECTOR_LENGTH, SCM_SET_UVECTOR_LENGTH,
  6577. SCM_SET_BITVECTOR_LENGTH
  6578. Use these instead of SCM_SETLENGTH
  6579. ** New macros: SCM_STRING_CHARS, SCM_SYMBOL_CHARS, SCM_CCLO_BASE,
  6580. SCM_VECTOR_BASE, SCM_UVECTOR_BASE, SCM_BITVECTOR_BASE, SCM_COMPLEX_MEM,
  6581. SCM_ARRAY_MEM
  6582. Use these instead of SCM_CHARS, SCM_UCHARS, SCM_ROCHARS, SCM_ROUCHARS or
  6583. SCM_VELTS.
  6584. ** New macros: SCM_SET_BIGNUM_BASE, SCM_SET_STRING_CHARS,
  6585. SCM_SET_SYMBOL_CHARS, SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE,
  6586. SCM_SET_VECTOR_BASE
  6587. Use these instead of SCM_SETCHARS.
  6588. ** New macro: SCM_BITVECTOR_P
  6589. ** New macro: SCM_STRING_COERCE_0TERMINATION_X
  6590. Use instead of SCM_COERCE_SUBSTR.
  6591. ** New macros: SCM_DIR_OPEN_P, SCM_DIR_FLAG_OPEN
  6592. For directory objects, use these instead of SCM_OPDIRP and SCM_OPN.
  6593. ** Deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
  6594. SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
  6595. SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
  6596. SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP,
  6597. SCM_VALIDATE_STRINGORSUBSTR, SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS,
  6598. SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
  6599. SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
  6600. SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
  6601. SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
  6602. SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX, SCM_GC8MARKP,
  6603. SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR, SCM_SUBR_DOC,
  6604. SCM_OPDIRP, SCM_VALIDATE_OPDIR, SCM_WTA, RETURN_SCM_WTA, SCM_CONST_LONG,
  6605. SCM_WNA, SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
  6606. SCM_VALIDATE_NUMBER_DEF_COPY, SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP,
  6607. SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_SETAND_CAR, SCM_SETOR_CAR
  6608. Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
  6609. Use scm_memory_error instead of SCM_NALLOC.
  6610. Use SCM_STRINGP instead of SCM_SLOPPY_STRINGP.
  6611. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_STRINGORSUBSTR.
  6612. Use SCM_FREE_CELL_P instead of SCM_FREEP/SCM_NFREEP
  6613. Use a type specific accessor macro instead of SCM_CHARS/SCM_UCHARS.
  6614. Use a type specific accessor instead of SCM(_|_RO|_HUGE_)LENGTH.
  6615. Use SCM_VALIDATE_(SYMBOL|STRING) instead of SCM_VALIDATE_ROSTRING.
  6616. Use SCM_STRING_COERCE_0TERMINATION_X instead of SCM_COERCE_SUBSTR.
  6617. Use SCM_STRINGP or SCM_SYMBOLP instead of SCM_ROSTRINGP.
  6618. Use SCM_STRINGP instead of SCM_RWSTRINGP.
  6619. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_RWSTRING.
  6620. Use SCM_STRING_CHARS instead of SCM_ROCHARS.
  6621. Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
  6622. Use a type specific setter macro instead of SCM_SETLENGTH.
  6623. Use a type specific setter macro instead of SCM_SETCHARS.
  6624. Use a type specific length macro instead of SCM_LENGTH_MAX.
  6625. Use SCM_GCMARKP instead of SCM_GC8MARKP.
  6626. Use SCM_SETGCMARK instead of SCM_SETGC8MARK.
  6627. Use SCM_CLRGCMARK instead of SCM_CLRGC8MARK.
  6628. Use SCM_TYP16 instead of SCM_GCTYP16.
  6629. Use SCM_CDR instead of SCM_GCCDR.
  6630. Use SCM_DIR_OPEN_P instead of SCM_OPDIRP.
  6631. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of SCM_WTA.
  6632. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of RETURN_SCM_WTA.
  6633. Use SCM_VCELL_INIT instead of SCM_CONST_LONG.
  6634. Use SCM_WRONG_NUM_ARGS instead of SCM_WNA.
  6635. Use SCM_CONSP instead of SCM_SLOPPY_CONSP.
  6636. Use !SCM_CONSP instead of SCM_SLOPPY_NCONSP.
  6637. ** Removed function: scm_struct_init
  6638. ** Removed variable: scm_symhash_dim
  6639. ** Renamed function: scm_make_cont has been replaced by
  6640. scm_make_continuation, which has a different interface.
  6641. ** Deprecated function: scm_call_catching_errors
  6642. Use scm_catch or scm_lazy_catch from throw.[ch] instead.
  6643. ** Deprecated function: scm_strhash
  6644. Use scm_string_hash instead.
  6645. ** Deprecated function: scm_vector_set_length_x
  6646. Instead, create a fresh vector of the desired size and copy the contents.
  6647. ** scm_gensym has changed prototype
  6648. scm_gensym now only takes one argument.
  6649. ** Deprecated type tags: scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols,
  6650. scm_tc7_lvector
  6651. There is now only a single symbol type scm_tc7_symbol.
  6652. The tag scm_tc7_lvector was not used anyway.
  6653. ** Deprecated function: scm_make_smob_type_mfpe, scm_set_smob_mfpe.
  6654. Use scm_make_smob_type and scm_set_smob_XXX instead.
  6655. ** New function scm_set_smob_apply.
  6656. This can be used to set an apply function to a smob type.
  6657. ** Deprecated function: scm_strprint_obj
  6658. Use scm_object_to_string instead.
  6659. ** Deprecated function: scm_wta
  6660. Use scm_wrong_type_arg, or another appropriate error signalling function
  6661. instead.
  6662. ** Explicit support for obarrays has been deprecated.
  6663. Use `scm_str2symbol' and the generic hashtable functions instead.
  6664. ** The concept of `vcells' has been deprecated.
  6665. The data type `variable' is now used exclusively. `Vcells' have been
  6666. a low-level concept so you are likely not affected by this change.
  6667. *** Deprecated functions: scm_sym2vcell, scm_sysintern,
  6668. scm_sysintern0, scm_symbol_value0, scm_intern, scm_intern0.
  6669. Use scm_c_define or scm_c_lookup instead, as appropriate.
  6670. *** New functions: scm_c_module_lookup, scm_c_lookup,
  6671. scm_c_module_define, scm_c_define, scm_module_lookup, scm_lookup,
  6672. scm_module_define, scm_define.
  6673. These functions work with variables instead of with vcells.
  6674. ** New functions for creating and defining `subr's and `gsubr's.
  6675. The new functions more clearly distinguish between creating a subr (or
  6676. gsubr) object and adding it to the current module.
  6677. These new functions are available: scm_c_make_subr, scm_c_define_subr,
  6678. scm_c_make_subr_with_generic, scm_c_define_subr_with_generic,
  6679. scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,
  6680. scm_c_define_gsubr_with_generic.
  6681. ** Deprecated functions: scm_make_subr, scm_make_subr_opt,
  6682. scm_make_subr_with_generic, scm_make_gsubr,
  6683. scm_make_gsubr_with_generic.
  6684. Use the new ones from above instead.
  6685. ** C interface to the module system has changed.
  6686. While we suggest that you avoid as many explicit module system
  6687. operations from C as possible for the time being, the C interface has
  6688. been made more similar to the high-level Scheme module system.
  6689. *** New functions: scm_c_define_module, scm_c_use_module,
  6690. scm_c_export, scm_c_resolve_module.
  6691. They mostly work like their Scheme namesakes. scm_c_define_module
  6692. takes a function that is called a context where the new module is
  6693. current.
  6694. *** Deprecated functions: scm_the_root_module, scm_make_module,
  6695. scm_ensure_user_module, scm_load_scheme_module.
  6696. Use the new functions instead.
  6697. ** Renamed function: scm_internal_with_fluids becomes
  6698. scm_c_with_fluids.
  6699. scm_internal_with_fluids is available as a deprecated function.
  6700. ** New function: scm_c_with_fluid.
  6701. Just like scm_c_with_fluids, but takes one fluid and one value instead
  6702. of lists of same.
  6703. ** Deprecated typedefs: long_long, ulong_long.
  6704. They are of questionable utility and they pollute the global
  6705. namespace.
  6706. ** Deprecated typedef: scm_sizet
  6707. It is of questionable utility now that Guile requires ANSI C, and is
  6708. oddly named.
  6709. ** Deprecated typedefs: scm_port_rw_active, scm_port,
  6710. scm_ptob_descriptor, scm_debug_info, scm_debug_frame, scm_fport,
  6711. scm_option, scm_rstate, scm_rng, scm_array, scm_array_dim.
  6712. Made more compliant with the naming policy by adding a _t at the end.
  6713. ** Deprecated functions: scm_mkbig, scm_big2num, scm_adjbig,
  6714. scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl
  6715. With the exception of the mysterious scm_2ulong2big, they are still
  6716. available under new names (scm_i_mkbig etc). These functions are not
  6717. intended to be used in user code. You should avoid dealing with
  6718. bignums directly, and should deal with numbers in general (which can
  6719. be bignums).
  6720. ** Change in behavior: scm_num2long, scm_num2ulong
  6721. The scm_num2[u]long functions don't any longer accept an inexact
  6722. argument. This change in behavior is motivated by concordance with
  6723. R5RS: It is more common that a primitive doesn't want to accept an
  6724. inexact for an exact.
  6725. ** New functions: scm_short2num, scm_ushort2num, scm_int2num,
  6726. scm_uint2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
  6727. scm_num2ushort, scm_num2int, scm_num2uint, scm_num2ptrdiff,
  6728. scm_num2size.
  6729. These are conversion functions between the various ANSI C integral
  6730. types and Scheme numbers. NOTE: The scm_num2xxx functions don't
  6731. accept an inexact argument.
  6732. ** New functions: scm_float2num, scm_double2num,
  6733. scm_num2float, scm_num2double.
  6734. These are conversion functions between the two ANSI C float types and
  6735. Scheme numbers.
  6736. ** New number validation macros:
  6737. SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,INT,UINT}[_DEF]
  6738. See above.
  6739. ** New functions: scm_gc_protect_object, scm_gc_unprotect_object
  6740. These are just nicer-named old scm_protect_object and
  6741. scm_unprotect_object.
  6742. ** Deprecated functions: scm_protect_object, scm_unprotect_object
  6743. ** New functions: scm_gc_[un]register_root, scm_gc_[un]register_roots
  6744. These functions can be used to register pointers to locations that
  6745. hold SCM values.
  6746. ** Deprecated function: scm_create_hook.
  6747. Its sins are: misleading name, non-modularity and lack of general
  6748. usefulness.
  6749. Changes since Guile 1.3.4:
  6750. * Changes to the distribution
  6751. ** Trees from nightly snapshots and CVS now require you to run autogen.sh.
  6752. We've changed the way we handle generated files in the Guile source
  6753. repository. As a result, the procedure for building trees obtained
  6754. from the nightly FTP snapshots or via CVS has changed:
  6755. - You must have appropriate versions of autoconf, automake, and
  6756. libtool installed on your system. See README for info on how to
  6757. obtain these programs.
  6758. - Before configuring the tree, you must first run the script
  6759. `autogen.sh' at the top of the source tree.
  6760. The Guile repository used to contain not only source files, written by
  6761. humans, but also some generated files, like configure scripts and
  6762. Makefile.in files. Even though the contents of these files could be
  6763. derived mechanically from other files present, we thought it would
  6764. make the tree easier to build if we checked them into CVS.
  6765. However, this approach means that minor differences between
  6766. developer's installed tools and habits affected the whole team.
  6767. So we have removed the generated files from the repository, and
  6768. added the autogen.sh script, which will reconstruct them
  6769. appropriately.
  6770. ** configure now has experimental options to remove support for certain
  6771. features:
  6772. --disable-arrays omit array and uniform array support
  6773. --disable-posix omit posix interfaces
  6774. --disable-networking omit networking interfaces
  6775. --disable-regex omit regular expression interfaces
  6776. These are likely to become separate modules some day.
  6777. ** New configure option --enable-debug-freelist
  6778. This enables a debugging version of SCM_NEWCELL(), and also registers
  6779. an extra primitive, the setter `gc-set-debug-check-freelist!'.
  6780. Configure with the --enable-debug-freelist option to enable
  6781. the gc-set-debug-check-freelist! primitive, and then use:
  6782. (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
  6783. (gc-set-debug-check-freelist! #f) # turn off checking
  6784. Checking of the freelist forces a traversal of the freelist and
  6785. a garbage collection before each allocation of a cell. This can
  6786. slow down the interpreter dramatically, so the setter should be used to
  6787. turn on this extra processing only when necessary.
  6788. ** New configure option --enable-debug-malloc
  6789. Include code for debugging of calls to scm_must_malloc/realloc/free.
  6790. Checks that
  6791. 1. objects freed by scm_must_free has been mallocated by scm_must_malloc
  6792. 2. objects reallocated by scm_must_realloc has been allocated by
  6793. scm_must_malloc
  6794. 3. reallocated objects are reallocated with the same what string
  6795. But, most importantly, it records the number of allocated objects of
  6796. each kind. This is useful when searching for memory leaks.
  6797. A Guile compiled with this option provides the primitive
  6798. `malloc-stats' which returns an alist with pairs of kind and the
  6799. number of objects of that kind.
  6800. ** All includes are now referenced relative to the root directory
  6801. Since some users have had problems with mixups between Guile and
  6802. system headers, we have decided to always refer to Guile headers via
  6803. their parent directories. This essentially creates a "private name
  6804. space" for Guile headers. This means that the compiler only is given
  6805. -I options for the root build and root source directory.
  6806. ** Header files kw.h and genio.h have been removed.
  6807. ** The module (ice-9 getopt-gnu-style) has been removed.
  6808. ** New module (ice-9 documentation)
  6809. Implements the interface to documentation strings associated with
  6810. objects.
  6811. ** New module (ice-9 time)
  6812. Provides a macro `time', which displays execution time of a given form.
  6813. ** New module (ice-9 history)
  6814. Loading this module enables value history in the repl.
  6815. * Changes to the stand-alone interpreter
  6816. ** New command line option --debug
  6817. Start Guile with debugging evaluator and backtraces enabled.
  6818. This is useful when debugging your .guile init file or scripts.
  6819. ** New help facility
  6820. Usage: (help NAME) gives documentation about objects named NAME (a symbol)
  6821. (help REGEXP) ditto for objects with names matching REGEXP (a string)
  6822. (help 'NAME) gives documentation for NAME, even if it is not an object
  6823. (help ,EXPR) gives documentation for object returned by EXPR
  6824. (help (my module)) gives module commentary for `(my module)'
  6825. (help) gives this text
  6826. `help' searches among bindings exported from loaded modules, while
  6827. `apropos' searches among bindings visible from the "current" module.
  6828. Examples: (help help)
  6829. (help cons)
  6830. (help "output-string")
  6831. ** `help' and `apropos' now prints full module names
  6832. ** Dynamic linking now uses libltdl from the libtool package.
  6833. The old system dependent code for doing dynamic linking has been
  6834. replaced with calls to the libltdl functions which do all the hairy
  6835. details for us.
  6836. The major improvement is that you can now directly pass libtool
  6837. library names like "libfoo.la" to `dynamic-link' and `dynamic-link'
  6838. will be able to do the best shared library job you can get, via
  6839. libltdl.
  6840. The way dynamic libraries are found has changed and is not really
  6841. portable across platforms, probably. It is therefore recommended to
  6842. use absolute filenames when possible.
  6843. If you pass a filename without an extension to `dynamic-link', it will
  6844. try a few appropriate ones. Thus, the most platform ignorant way is
  6845. to specify a name like "libfoo", without any directories and
  6846. extensions.
  6847. ** Guile COOP threads are now compatible with LinuxThreads
  6848. Previously, COOP threading wasn't possible in applications linked with
  6849. Linux POSIX threads due to their use of the stack pointer to find the
  6850. thread context. This has now been fixed with a workaround which uses
  6851. the pthreads to allocate the stack.
  6852. ** New primitives: `pkgdata-dir', `site-dir', `library-dir'
  6853. ** Positions of erring expression in scripts
  6854. With version 1.3.4, the location of the erring expression in Guile
  6855. scipts is no longer automatically reported. (This should have been
  6856. documented before the 1.3.4 release.)
  6857. You can get this information by enabling recording of positions of
  6858. source expressions and running the debugging evaluator. Put this at
  6859. the top of your script (or in your "site" file):
  6860. (read-enable 'positions)
  6861. (debug-enable 'debug)
  6862. ** Backtraces in scripts
  6863. It is now possible to get backtraces in scripts.
  6864. Put
  6865. (debug-enable 'debug 'backtrace)
  6866. at the top of the script.
  6867. (The first options enables the debugging evaluator.
  6868. The second enables backtraces.)
  6869. ** Part of module system symbol lookup now implemented in C
  6870. The eval closure of most modules is now implemented in C. Since this
  6871. was one of the bottlenecks for loading speed, Guile now loads code
  6872. substantially faster than before.
  6873. ** Attempting to get the value of an unbound variable now produces
  6874. an exception with a key of 'unbound-variable instead of 'misc-error.
  6875. ** The initial default output port is now unbuffered if it's using a
  6876. tty device. Previously in this situation it was line-buffered.
  6877. ** New hook: after-gc-hook
  6878. after-gc-hook takes over the role of gc-thunk. This hook is run at
  6879. the first SCM_TICK after a GC. (Thus, the code is run at the same
  6880. point during evaluation as signal handlers.)
  6881. Note that this hook should be used only for diagnostic and debugging
  6882. purposes. It is not certain that it will continue to be well-defined
  6883. when this hook is run in the future.
  6884. C programmers: Note the new C level hooks scm_before_gc_c_hook,
  6885. scm_before_sweep_c_hook, scm_after_gc_c_hook.
  6886. ** Improvements to garbage collector
  6887. Guile 1.4 has a new policy for triggering heap allocation and
  6888. determining the sizes of heap segments. It fixes a number of problems
  6889. in the old GC.
  6890. 1. The new policy can handle two separate pools of cells
  6891. (2-word/4-word) better. (The old policy would run wild, allocating
  6892. more and more memory for certain programs.)
  6893. 2. The old code would sometimes allocate far too much heap so that the
  6894. Guile process became gigantic. The new code avoids this.
  6895. 3. The old code would sometimes allocate too little so that few cells
  6896. were freed at GC so that, in turn, too much time was spent in GC.
  6897. 4. The old code would often trigger heap allocation several times in a
  6898. row. (The new scheme predicts how large the segments needs to be
  6899. in order not to need further allocation.)
  6900. All in all, the new GC policy will make larger applications more
  6901. efficient.
  6902. The new GC scheme also is prepared for POSIX threading. Threads can
  6903. allocate private pools of cells ("clusters") with just a single
  6904. function call. Allocation of single cells from such a cluster can
  6905. then proceed without any need of inter-thread synchronization.
  6906. ** New environment variables controlling GC parameters
  6907. GUILE_MAX_SEGMENT_SIZE Maximal segment size
  6908. (default = 2097000)
  6909. Allocation of 2-word cell heaps:
  6910. GUILE_INIT_SEGMENT_SIZE_1 Size of initial heap segment in bytes
  6911. (default = 360000)
  6912. GUILE_MIN_YIELD_1 Minimum number of freed cells at each
  6913. GC in percent of total heap size
  6914. (default = 40)
  6915. Allocation of 4-word cell heaps
  6916. (used for real numbers and misc other objects):
  6917. GUILE_INIT_SEGMENT_SIZE_2, GUILE_MIN_YIELD_2
  6918. (See entry "Way for application to customize GC parameters" under
  6919. section "Changes to the scm_ interface" below.)
  6920. ** Guile now implements reals using 4-word cells
  6921. This speeds up computation with reals. (They were earlier allocated
  6922. with `malloc'.) There is still some room for optimizations, however.
  6923. ** Some further steps toward POSIX thread support have been taken
  6924. *** Guile's critical sections (SCM_DEFER/ALLOW_INTS)
  6925. don't have much effect any longer, and many of them will be removed in
  6926. next release.
  6927. *** Signals
  6928. are only handled at the top of the evaluator loop, immediately after
  6929. I/O, and in scm_equalp.
  6930. *** The GC can allocate thread private pools of pairs.
  6931. * Changes to Scheme functions and syntax
  6932. ** close-input-port and close-output-port are now R5RS
  6933. These procedures have been turned into primitives and have R5RS behaviour.
  6934. ** New procedure: simple-format PORT MESSAGE ARG1 ...
  6935. (ice-9 boot) makes `format' an alias for `simple-format' until possibly
  6936. extended by the more sophisticated version in (ice-9 format)
  6937. (simple-format port message . args)
  6938. Write MESSAGE to DESTINATION, defaulting to `current-output-port'.
  6939. MESSAGE can contain ~A (was %s) and ~S (was %S) escapes. When printed,
  6940. the escapes are replaced with corresponding members of ARGS:
  6941. ~A formats using `display' and ~S formats using `write'.
  6942. If DESTINATION is #t, then use the `current-output-port',
  6943. if DESTINATION is #f, then return a string containing the formatted text.
  6944. Does not add a trailing newline."
  6945. ** string-ref: the second argument is no longer optional.
  6946. ** string, list->string: no longer accept strings in their arguments,
  6947. only characters, for compatibility with R5RS.
  6948. ** New procedure: port-closed? PORT
  6949. Returns #t if PORT is closed or #f if it is open.
  6950. ** Deprecated: list*
  6951. The list* functionality is now provided by cons* (SRFI-1 compliant)
  6952. ** New procedure: cons* ARG1 ARG2 ... ARGn
  6953. Like `list', but the last arg provides the tail of the constructed list,
  6954. returning (cons ARG1 (cons ARG2 (cons ... ARGn))).
  6955. Requires at least one argument. If given one argument, that argument
  6956. is returned as result.
  6957. This function is called `list*' in some other Schemes and in Common LISP.
  6958. ** Removed deprecated: serial-map, serial-array-copy!, serial-array-map!
  6959. ** New procedure: object-documentation OBJECT
  6960. Returns the documentation string associated with OBJECT. The
  6961. procedure uses a caching mechanism so that subsequent lookups are
  6962. faster.
  6963. Exported by (ice-9 documentation).
  6964. ** module-name now returns full names of modules
  6965. Previously, only the last part of the name was returned (`session' for
  6966. `(ice-9 session)'). Ex: `(ice-9 session)'.
  6967. * Changes to the gh_ interface
  6968. ** Deprecated: gh_int2scmb
  6969. Use gh_bool2scm instead.
  6970. * Changes to the scm_ interface
  6971. ** Guile primitives now carry docstrings!
  6972. Thanks to Greg Badros!
  6973. ** Guile primitives are defined in a new way: SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  6974. Now Guile primitives are defined using the SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  6975. macros and must contain a docstring that is extracted into foo.doc using a new
  6976. guile-doc-snarf script (that uses guile-doc-snarf.awk).
  6977. However, a major overhaul of these macros is scheduled for the next release of
  6978. guile.
  6979. ** Guile primitives use a new technique for validation of arguments
  6980. SCM_VALIDATE_* macros are defined to ease the redundancy and improve
  6981. the readability of argument checking.
  6982. ** All (nearly?) K&R prototypes for functions replaced with ANSI C equivalents.
  6983. ** New macros: SCM_PACK, SCM_UNPACK
  6984. Compose/decompose an SCM value.
  6985. The SCM type is now treated as an abstract data type and may be defined as a
  6986. long, a void* or as a struct, depending on the architecture and compile time
  6987. options. This makes it easier to find several types of bugs, for example when
  6988. SCM values are treated as integers without conversion. Values of the SCM type
  6989. should be treated as "atomic" values. These macros are used when
  6990. composing/decomposing an SCM value, either because you want to access
  6991. individual bits, or because you want to treat it as an integer value.
  6992. E.g., in order to set bit 7 in an SCM value x, use the expression
  6993. SCM_PACK (SCM_UNPACK (x) | 0x80)
  6994. ** The name property of hooks is deprecated.
  6995. Thus, the use of SCM_HOOK_NAME and scm_make_hook_with_name is deprecated.
  6996. You can emulate this feature by using object properties.
  6997. ** Deprecated macros: SCM_INPORTP, SCM_OUTPORTP, SCM_CRDY, SCM_ICHRP,
  6998. SCM_ICHR, SCM_MAKICHR, SCM_SETJMPBUF, SCM_NSTRINGP, SCM_NRWSTRINGP,
  6999. SCM_NVECTORP
  7000. These macros will be removed in a future release of Guile.
  7001. ** The following types, functions and macros from numbers.h are deprecated:
  7002. scm_dblproc, SCM_UNEGFIXABLE, SCM_FLOBUFLEN, SCM_INEXP, SCM_CPLXP, SCM_REAL,
  7003. SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP, SCM_NUM2DBL, SCM_NO_BIGDIG
  7004. ** Port internals: the rw_random variable in the scm_port structure
  7005. must be set to non-zero in any random access port. In recent Guile
  7006. releases it was only set for bidirectional random-access ports.
  7007. ** Port internals: the seek ptob procedure is now responsible for
  7008. resetting the buffers if required. The change was made so that in the
  7009. special case of reading the current position (i.e., seek p 0 SEEK_CUR)
  7010. the fport and strport ptobs can avoid resetting the buffers,
  7011. in particular to avoid discarding unread chars. An existing port
  7012. type can be fixed by adding something like the following to the
  7013. beginning of the ptob seek procedure:
  7014. if (pt->rw_active == SCM_PORT_READ)
  7015. scm_end_input (object);
  7016. else if (pt->rw_active == SCM_PORT_WRITE)
  7017. ptob->flush (object);
  7018. although to actually avoid resetting the buffers and discard unread
  7019. chars requires further hacking that depends on the characteristics
  7020. of the ptob.
  7021. ** Deprecated functions: scm_fseek, scm_tag
  7022. These functions are no longer used and will be removed in a future version.
  7023. ** The scm_sysmissing procedure is no longer used in libguile.
  7024. Unless it turns out to be unexpectedly useful to somebody, it will be
  7025. removed in a future version.
  7026. ** The format of error message strings has changed
  7027. The two C procedures: scm_display_error and scm_error, as well as the
  7028. primitive `scm-error', now use scm_simple_format to do their work.
  7029. This means that the message strings of all code must be updated to use
  7030. ~A where %s was used before, and ~S where %S was used before.
  7031. During the period when there still are a lot of old Guiles out there,
  7032. you might want to support both old and new versions of Guile.
  7033. There are basically two methods to achieve this. Both methods use
  7034. autoconf. Put
  7035. AC_CHECK_FUNCS(scm_simple_format)
  7036. in your configure.in.
  7037. Method 1: Use the string concatenation features of ANSI C's
  7038. preprocessor.
  7039. In C:
  7040. #ifdef HAVE_SCM_SIMPLE_FORMAT
  7041. #define FMT_S "~S"
  7042. #else
  7043. #define FMT_S "%S"
  7044. #endif
  7045. Then represent each of your error messages using a preprocessor macro:
  7046. #define E_SPIDER_ERROR "There's a spider in your " ## FMT_S ## "!!!"
  7047. In Scheme:
  7048. (define fmt-s (if (defined? 'simple-format) "~S" "%S"))
  7049. (define make-message string-append)
  7050. (define e-spider-error (make-message "There's a spider in your " fmt-s "!!!"))
  7051. Method 2: Use the oldfmt function found in doc/oldfmt.c.
  7052. In C:
  7053. scm_misc_error ("picnic", scm_c_oldfmt0 ("There's a spider in your ~S!!!"),
  7054. ...);
  7055. In Scheme:
  7056. (scm-error 'misc-error "picnic" (oldfmt "There's a spider in your ~S!!!")
  7057. ...)
  7058. ** Deprecated: coop_mutex_init, coop_condition_variable_init
  7059. Don't use the functions coop_mutex_init and
  7060. coop_condition_variable_init. They will change.
  7061. Use scm_mutex_init and scm_cond_init instead.
  7062. ** New function: int scm_cond_timedwait (scm_cond_t *COND, scm_mutex_t *MUTEX, const struct timespec *ABSTIME)
  7063. `scm_cond_timedwait' atomically unlocks MUTEX and waits on
  7064. COND, as `scm_cond_wait' does, but it also bounds the duration
  7065. of the wait. If COND has not been signaled before time ABSTIME,
  7066. the mutex MUTEX is re-acquired and `scm_cond_timedwait'
  7067. returns the error code `ETIMEDOUT'.
  7068. The ABSTIME parameter specifies an absolute time, with the same
  7069. origin as `time' and `gettimeofday': an ABSTIME of 0 corresponds
  7070. to 00:00:00 GMT, January 1, 1970.
  7071. ** New function: scm_cond_broadcast (scm_cond_t *COND)
  7072. `scm_cond_broadcast' restarts all the threads that are waiting
  7073. on the condition variable COND. Nothing happens if no threads are
  7074. waiting on COND.
  7075. ** New function: scm_key_create (scm_key_t *KEY, void (*destr_function) (void *))
  7076. `scm_key_create' allocates a new TSD key. The key is stored in
  7077. the location pointed to by KEY. There is no limit on the number
  7078. of keys allocated at a given time. The value initially associated
  7079. with the returned key is `NULL' in all currently executing threads.
  7080. The DESTR_FUNCTION argument, if not `NULL', specifies a destructor
  7081. function associated with the key. When a thread terminates,
  7082. DESTR_FUNCTION is called on the value associated with the key in
  7083. that thread. The DESTR_FUNCTION is not called if a key is deleted
  7084. with `scm_key_delete' or a value is changed with
  7085. `scm_setspecific'. The order in which destructor functions are
  7086. called at thread termination time is unspecified.
  7087. Destructors are not yet implemented.
  7088. ** New function: scm_setspecific (scm_key_t KEY, const void *POINTER)
  7089. `scm_setspecific' changes the value associated with KEY in the
  7090. calling thread, storing the given POINTER instead.
  7091. ** New function: scm_getspecific (scm_key_t KEY)
  7092. `scm_getspecific' returns the value currently associated with
  7093. KEY in the calling thread.
  7094. ** New function: scm_key_delete (scm_key_t KEY)
  7095. `scm_key_delete' deallocates a TSD key. It does not check
  7096. whether non-`NULL' values are associated with that key in the
  7097. currently executing threads, nor call the destructor function
  7098. associated with the key.
  7099. ** New function: scm_c_hook_init (scm_c_hook_t *HOOK, void *HOOK_DATA, scm_c_hook_type_t TYPE)
  7100. Initialize a C level hook HOOK with associated HOOK_DATA and type
  7101. TYPE. (See scm_c_hook_run ().)
  7102. ** New function: scm_c_hook_add (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA, int APPENDP)
  7103. Add hook function FUNC with associated FUNC_DATA to HOOK. If APPENDP
  7104. is true, add it last, otherwise first. The same FUNC can be added
  7105. multiple times if FUNC_DATA differ and vice versa.
  7106. ** New function: scm_c_hook_remove (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA)
  7107. Remove hook function FUNC with associated FUNC_DATA from HOOK. A
  7108. function is only removed if both FUNC and FUNC_DATA matches.
  7109. ** New function: void *scm_c_hook_run (scm_c_hook_t *HOOK, void *DATA)
  7110. Run hook HOOK passing DATA to the hook functions.
  7111. If TYPE is SCM_C_HOOK_NORMAL, all hook functions are run. The value
  7112. returned is undefined.
  7113. If TYPE is SCM_C_HOOK_OR, hook functions are run until a function
  7114. returns a non-NULL value. This value is returned as the result of
  7115. scm_c_hook_run. If all functions return NULL, NULL is returned.
  7116. If TYPE is SCM_C_HOOK_AND, hook functions are run until a function
  7117. returns a NULL value, and NULL is returned. If all functions returns
  7118. a non-NULL value, the last value is returned.
  7119. ** New C level GC hooks
  7120. Five new C level hooks has been added to the garbage collector.
  7121. scm_before_gc_c_hook
  7122. scm_after_gc_c_hook
  7123. are run before locking and after unlocking the heap. The system is
  7124. thus in a mode where evaluation can take place. (Except that
  7125. scm_before_gc_c_hook must not allocate new cells.)
  7126. scm_before_mark_c_hook
  7127. scm_before_sweep_c_hook
  7128. scm_after_sweep_c_hook
  7129. are run when the heap is locked. These are intended for extension of
  7130. the GC in a modular fashion. Examples are the weaks and guardians
  7131. modules.
  7132. ** Way for application to customize GC parameters
  7133. The application can set up other default values for the GC heap
  7134. allocation parameters
  7135. GUILE_INIT_HEAP_SIZE_1, GUILE_MIN_YIELD_1,
  7136. GUILE_INIT_HEAP_SIZE_2, GUILE_MIN_YIELD_2,
  7137. GUILE_MAX_SEGMENT_SIZE,
  7138. by setting
  7139. scm_default_init_heap_size_1, scm_default_min_yield_1,
  7140. scm_default_init_heap_size_2, scm_default_min_yield_2,
  7141. scm_default_max_segment_size
  7142. respectively before callong scm_boot_guile.
  7143. (See entry "New environment variables ..." in section
  7144. "Changes to the stand-alone interpreter" above.)
  7145. ** scm_protect_object/scm_unprotect_object now nest
  7146. This means that you can call scm_protect_object multiple times on an
  7147. object and count on the object being protected until
  7148. scm_unprotect_object has been call the same number of times.
  7149. The functions also have better time complexity.
  7150. Still, it is usually possible to structure the application in a way
  7151. that you don't need to use these functions. For example, if you use a
  7152. protected standard Guile list to keep track of live objects rather
  7153. than some custom data type, objects will die a natural death when they
  7154. are no longer needed.
  7155. ** Deprecated type tags: scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc
  7156. Guile does not provide the float representation for inexact real numbers any
  7157. more. Now, only doubles are used to represent inexact real numbers. Further,
  7158. the tag names scm_tc_dblr and scm_tc_dblc have been changed to scm_tc16_real
  7159. and scm_tc16_complex, respectively.
  7160. ** Removed deprecated type scm_smobfuns
  7161. ** Removed deprecated function scm_newsmob
  7162. ** Warning: scm_make_smob_type_mfpe might become deprecated in a future release
  7163. There is an ongoing discussion among the developers whether to
  7164. deprecate `scm_make_smob_type_mfpe' or not. Please use the current
  7165. standard interface (scm_make_smob_type, scm_set_smob_XXX) in new code
  7166. until this issue has been settled.
  7167. ** Removed deprecated type tag scm_tc16_kw
  7168. ** Added type tag scm_tc16_keyword
  7169. (This was introduced already in release 1.3.4 but was not documented
  7170. until now.)
  7171. ** gdb_print now prints "*** Guile not initialized ***" until Guile initialized
  7172. * Changes to system call interfaces:
  7173. ** The "select" procedure now tests port buffers for the ability to
  7174. provide input or accept output. Previously only the underlying file
  7175. descriptors were checked.
  7176. ** New variable PIPE_BUF: the maximum number of bytes that can be
  7177. atomically written to a pipe.
  7178. ** If a facility is not available on the system when Guile is
  7179. compiled, the corresponding primitive procedure will not be defined.
  7180. Previously it would have been defined but would throw a system-error
  7181. exception if called. Exception handlers which catch this case may
  7182. need minor modification: an error will be thrown with key
  7183. 'unbound-variable instead of 'system-error. Alternatively it's
  7184. now possible to use `defined?' to check whether the facility is
  7185. available.
  7186. ** Procedures which depend on the timezone should now give the correct
  7187. result on systems which cache the TZ environment variable, even if TZ
  7188. is changed without calling tzset.
  7189. * Changes to the networking interfaces:
  7190. ** New functions: htons, ntohs, htonl, ntohl: for converting short and
  7191. long integers between network and host format. For now, it's not
  7192. particularly convenient to do this kind of thing, but consider:
  7193. (define write-network-long
  7194. (lambda (value port)
  7195. (let ((v (make-uniform-vector 1 1 0)))
  7196. (uniform-vector-set! v 0 (htonl value))
  7197. (uniform-vector-write v port))))
  7198. (define read-network-long
  7199. (lambda (port)
  7200. (let ((v (make-uniform-vector 1 1 0)))
  7201. (uniform-vector-read! v port)
  7202. (ntohl (uniform-vector-ref v 0)))))
  7203. ** If inet-aton fails, it now throws an error with key 'misc-error
  7204. instead of 'system-error, since errno is not relevant.
  7205. ** Certain gethostbyname/gethostbyaddr failures now throw errors with
  7206. specific keys instead of 'system-error. The latter is inappropriate
  7207. since errno will not have been set. The keys are:
  7208. 'host-not-found, 'try-again, 'no-recovery and 'no-data.
  7209. ** sethostent, setnetent, setprotoent, setservent: now take an
  7210. optional argument STAYOPEN, which specifies whether the database
  7211. remains open after a database entry is accessed randomly (e.g., using
  7212. gethostbyname for the hosts database.) The default is #f. Previously
  7213. #t was always used.
  7214. Changes since Guile 1.3.2:
  7215. * Changes to the stand-alone interpreter
  7216. ** Debugger
  7217. An initial version of the Guile debugger written by Chris Hanson has
  7218. been added. The debugger is still under development but is included
  7219. in the distribution anyway since it is already quite useful.
  7220. Type
  7221. (debug)
  7222. after an error to enter the debugger. Type `help' inside the debugger
  7223. for a description of available commands.
  7224. If you prefer to have stack frames numbered and printed in
  7225. anti-chronological order and prefer up in the stack to be down on the
  7226. screen as is the case in gdb, you can put
  7227. (debug-enable 'backwards)
  7228. in your .guile startup file. (However, this means that Guile can't
  7229. use indentation to indicate stack level.)
  7230. The debugger is autoloaded into Guile at the first use.
  7231. ** Further enhancements to backtraces
  7232. There is a new debug option `width' which controls the maximum width
  7233. on the screen of printed stack frames. Fancy printing parameters
  7234. ("level" and "length" as in Common LISP) are adaptively adjusted for
  7235. each stack frame to give maximum information while still fitting
  7236. within the bounds. If the stack frame can't be made to fit by
  7237. adjusting parameters, it is simply cut off at the end. This is marked
  7238. with a `$'.
  7239. ** Some modules are now only loaded when the repl is started
  7240. The modules (ice-9 debug), (ice-9 session), (ice-9 threads) and (ice-9
  7241. regex) are now loaded into (guile-user) only if the repl has been
  7242. started. The effect is that the startup time for scripts has been
  7243. reduced to 30% of what it was previously.
  7244. Correctly written scripts load the modules they require at the top of
  7245. the file and should not be affected by this change.
  7246. ** Hooks are now represented as smobs
  7247. * Changes to Scheme functions and syntax
  7248. ** Readline support has changed again.
  7249. The old (readline-activator) module is gone. Use (ice-9 readline)
  7250. instead, which now contains all readline functionality. So the code
  7251. to activate readline is now
  7252. (use-modules (ice-9 readline))
  7253. (activate-readline)
  7254. This should work at any time, including from the guile prompt.
  7255. To avoid confusion about the terms of Guile's license, please only
  7256. enable readline for your personal use; please don't make it the
  7257. default for others. Here is why we make this rather odd-sounding
  7258. request:
  7259. Guile is normally licensed under a weakened form of the GNU General
  7260. Public License, which allows you to link code with Guile without
  7261. placing that code under the GPL. This exception is important to some
  7262. people.
  7263. However, since readline is distributed under the GNU General Public
  7264. License, when you link Guile with readline, either statically or
  7265. dynamically, you effectively change Guile's license to the strict GPL.
  7266. Whenever you link any strictly GPL'd code into Guile, uses of Guile
  7267. which are normally permitted become forbidden. This is a rather
  7268. non-obvious consequence of the licensing terms.
  7269. So, to make sure things remain clear, please let people choose for
  7270. themselves whether to link GPL'd libraries like readline with Guile.
  7271. ** regexp-substitute/global has changed slightly, but incompatibly.
  7272. If you include a function in the item list, the string of the match
  7273. object it receives is the same string passed to
  7274. regexp-substitute/global, not some suffix of that string.
  7275. Correspondingly, the match's positions are relative to the entire
  7276. string, not the suffix.
  7277. If the regexp can match the empty string, the way matches are chosen
  7278. from the string has changed. regexp-substitute/global recognizes the
  7279. same set of matches that list-matches does; see below.
  7280. ** New function: list-matches REGEXP STRING [FLAGS]
  7281. Return a list of match objects, one for every non-overlapping, maximal
  7282. match of REGEXP in STRING. The matches appear in left-to-right order.
  7283. list-matches only reports matches of the empty string if there are no
  7284. other matches which begin on, end at, or include the empty match's
  7285. position.
  7286. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  7287. ** New function: fold-matches REGEXP STRING INIT PROC [FLAGS]
  7288. For each match of REGEXP in STRING, apply PROC to the match object,
  7289. and the last value PROC returned, or INIT for the first call. Return
  7290. the last value returned by PROC. We apply PROC to the matches as they
  7291. appear from left to right.
  7292. This function recognizes matches according to the same criteria as
  7293. list-matches.
  7294. Thus, you could define list-matches like this:
  7295. (define (list-matches regexp string . flags)
  7296. (reverse! (apply fold-matches regexp string '() cons flags)))
  7297. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  7298. ** Hooks
  7299. *** New function: hook? OBJ
  7300. Return #t if OBJ is a hook, otherwise #f.
  7301. *** New function: make-hook-with-name NAME [ARITY]
  7302. Return a hook with name NAME and arity ARITY. The default value for
  7303. ARITY is 0. The only effect of NAME is that it will appear when the
  7304. hook object is printed to ease debugging.
  7305. *** New function: hook-empty? HOOK
  7306. Return #t if HOOK doesn't contain any procedures, otherwise #f.
  7307. *** New function: hook->list HOOK
  7308. Return a list of the procedures that are called when run-hook is
  7309. applied to HOOK.
  7310. ** `map' signals an error if its argument lists are not all the same length.
  7311. This is the behavior required by R5RS, so this change is really a bug
  7312. fix. But it seems to affect a lot of people's code, so we're
  7313. mentioning it here anyway.
  7314. ** Print-state handling has been made more transparent
  7315. Under certain circumstances, ports are represented as a port with an
  7316. associated print state. Earlier, this pair was represented as a pair
  7317. (see "Some magic has been added to the printer" below). It is now
  7318. indistinguishable (almost; see `get-print-state') from a port on the
  7319. user level.
  7320. *** New function: port-with-print-state OUTPUT-PORT PRINT-STATE
  7321. Return a new port with the associated print state PRINT-STATE.
  7322. *** New function: get-print-state OUTPUT-PORT
  7323. Return the print state associated with this port if it exists,
  7324. otherwise return #f.
  7325. *** New function: directory-stream? OBJECT
  7326. Returns true iff OBJECT is a directory stream --- the sort of object
  7327. returned by `opendir'.
  7328. ** New function: using-readline?
  7329. Return #t if readline is in use in the current repl.
  7330. ** structs will be removed in 1.4
  7331. Structs will be replaced in Guile 1.4. We will merge GOOPS into Guile
  7332. and use GOOPS objects as the fundamental record type.
  7333. * Changes to the scm_ interface
  7334. ** structs will be removed in 1.4
  7335. The entire current struct interface (struct.c, struct.h) will be
  7336. replaced in Guile 1.4. We will merge GOOPS into libguile and use
  7337. GOOPS objects as the fundamental record type.
  7338. ** The internal representation of subr's has changed
  7339. Instead of giving a hint to the subr name, the CAR field of the subr
  7340. now contains an index to a subr entry in scm_subr_table.
  7341. *** New variable: scm_subr_table
  7342. An array of subr entries. A subr entry contains the name, properties
  7343. and documentation associated with the subr. The properties and
  7344. documentation slots are not yet used.
  7345. ** A new scheme for "forwarding" calls to a builtin to a generic function
  7346. It is now possible to extend the functionality of some Guile
  7347. primitives by letting them defer a call to a GOOPS generic function on
  7348. argument mismatch. This means that there is no loss of efficiency in
  7349. normal evaluation.
  7350. Example:
  7351. (use-modules (oop goops)) ; Must be GOOPS version 0.2.
  7352. (define-method + ((x <string>) (y <string>))
  7353. (string-append x y))
  7354. + will still be as efficient as usual in numerical calculations, but
  7355. can also be used for concatenating strings.
  7356. Who will be the first one to extend Guile's numerical tower to
  7357. rationals? :) [OK, there a few other things to fix before this can
  7358. be made in a clean way.]
  7359. *** New snarf macros for defining primitives: SCM_GPROC, SCM_GPROC1
  7360. New macro: SCM_GPROC (CNAME, SNAME, REQ, OPT, VAR, CFUNC, GENERIC)
  7361. New macro: SCM_GPROC1 (CNAME, SNAME, TYPE, CFUNC, GENERIC)
  7362. These do the same job as SCM_PROC and SCM_PROC1, but they also define
  7363. a variable GENERIC which can be used by the dispatch macros below.
  7364. [This is experimental code which may change soon.]
  7365. *** New macros for forwarding control to a generic on arg type error
  7366. New macro: SCM_WTA_DISPATCH_1 (GENERIC, ARG1, POS, SUBR)
  7367. New macro: SCM_WTA_DISPATCH_2 (GENERIC, ARG1, ARG2, POS, SUBR)
  7368. These correspond to the scm_wta function call, and have the same
  7369. behaviour until the user has called the GOOPS primitive
  7370. `enable-primitive-generic!'. After that, these macros will apply the
  7371. generic function GENERIC to the argument(s) instead of calling
  7372. scm_wta.
  7373. [This is experimental code which may change soon.]
  7374. *** New macros for argument testing with generic dispatch
  7375. New macro: SCM_GASSERT1 (COND, GENERIC, ARG1, POS, SUBR)
  7376. New macro: SCM_GASSERT2 (COND, GENERIC, ARG1, ARG2, POS, SUBR)
  7377. These correspond to the SCM_ASSERT macro, but will defer control to
  7378. GENERIC on error after `enable-primitive-generic!' has been called.
  7379. [This is experimental code which may change soon.]
  7380. ** New function: SCM scm_eval_body (SCM body, SCM env)
  7381. Evaluates the body of a special form.
  7382. ** The internal representation of struct's has changed
  7383. Previously, four slots were allocated for the procedure(s) of entities
  7384. and operators. The motivation for this representation had to do with
  7385. the structure of the evaluator, the wish to support tail-recursive
  7386. generic functions, and efficiency. Since the generic function
  7387. dispatch mechanism has changed, there is no longer a need for such an
  7388. expensive representation, and the representation has been simplified.
  7389. This should not make any difference for most users.
  7390. ** GOOPS support has been cleaned up.
  7391. Some code has been moved from eval.c to objects.c and code in both of
  7392. these compilation units has been cleaned up and better structured.
  7393. *** New functions for applying generic functions
  7394. New function: SCM scm_apply_generic (GENERIC, ARGS)
  7395. New function: SCM scm_call_generic_0 (GENERIC)
  7396. New function: SCM scm_call_generic_1 (GENERIC, ARG1)
  7397. New function: SCM scm_call_generic_2 (GENERIC, ARG1, ARG2)
  7398. New function: SCM scm_call_generic_3 (GENERIC, ARG1, ARG2, ARG3)
  7399. ** Deprecated function: scm_make_named_hook
  7400. It is now replaced by:
  7401. ** New function: SCM scm_create_hook (const char *name, int arity)
  7402. Creates a hook in the same way as make-hook above but also
  7403. binds a variable named NAME to it.
  7404. This is the typical way of creating a hook from C code.
  7405. Currently, the variable is created in the "current" module.
  7406. This might change when we get the new module system.
  7407. [The behaviour is identical to scm_make_named_hook.]
  7408. Changes since Guile 1.3:
  7409. * Changes to mailing lists
  7410. ** Some of the Guile mailing lists have moved to sourceware.cygnus.com.
  7411. See the README file to find current addresses for all the Guile
  7412. mailing lists.
  7413. * Changes to the distribution
  7414. ** Readline support is no longer included with Guile by default.
  7415. Based on the different license terms of Guile and Readline, we
  7416. concluded that Guile should not *by default* cause the linking of
  7417. Readline into an application program. Readline support is now offered
  7418. as a separate module, which is linked into an application only when
  7419. you explicitly specify it.
  7420. Although Guile is GNU software, its distribution terms add a special
  7421. exception to the usual GNU General Public License (GPL). Guile's
  7422. license includes a clause that allows you to link Guile with non-free
  7423. programs. We add this exception so as not to put Guile at a
  7424. disadvantage vis-a-vis other extensibility packages that support other
  7425. languages.
  7426. In contrast, the GNU Readline library is distributed under the GNU
  7427. General Public License pure and simple. This means that you may not
  7428. link Readline, even dynamically, into an application unless it is
  7429. distributed under a free software license that is compatible the GPL.
  7430. Because of this difference in distribution terms, an application that
  7431. can use Guile may not be able to use Readline. Now users will be
  7432. explicitly offered two independent decisions about the use of these
  7433. two packages.
  7434. You can activate the readline support by issuing
  7435. (use-modules (readline-activator))
  7436. (activate-readline)
  7437. from your ".guile" file, for example.
  7438. * Changes to the stand-alone interpreter
  7439. ** All builtins now print as primitives.
  7440. Previously builtin procedures not belonging to the fundamental subr
  7441. types printed as #<compiled closure #<primitive-procedure gsubr-apply>>.
  7442. Now, they print as #<primitive-procedure NAME>.
  7443. ** Backtraces slightly more intelligible.
  7444. gsubr-apply and macro transformer application frames no longer appear
  7445. in backtraces.
  7446. * Changes to Scheme functions and syntax
  7447. ** Guile now correctly handles internal defines by rewriting them into
  7448. their equivalent letrec. Previously, internal defines would
  7449. incrementally add to the innermost environment, without checking
  7450. whether the restrictions specified in RnRS were met. This lead to the
  7451. correct behaviour when these restriction actually were met, but didn't
  7452. catch all illegal uses. Such an illegal use could lead to crashes of
  7453. the Guile interpreter or other unwanted results. An example of
  7454. incorrect internal defines that made Guile behave erratically:
  7455. (let ()
  7456. (define a 1)
  7457. (define (b) a)
  7458. (define c (1+ (b)))
  7459. (define d 3)
  7460. (b))
  7461. => 2
  7462. The problem with this example is that the definition of `c' uses the
  7463. value of `b' directly. This confuses the meoization machine of Guile
  7464. so that the second call of `b' (this time in a larger environment that
  7465. also contains bindings for `c' and `d') refers to the binding of `c'
  7466. instead of `a'. You could also make Guile crash with a variation on
  7467. this theme:
  7468. (define (foo flag)
  7469. (define a 1)
  7470. (define (b flag) (if flag a 1))
  7471. (define c (1+ (b flag)))
  7472. (define d 3)
  7473. (b #t))
  7474. (foo #f)
  7475. (foo #t)
  7476. From now on, Guile will issue an `Unbound variable: b' error message
  7477. for both examples.
  7478. ** Hooks
  7479. A hook contains a list of functions which should be called on
  7480. particular occasions in an existing program. Hooks are used for
  7481. customization.
  7482. A window manager might have a hook before-window-map-hook. The window
  7483. manager uses the function run-hooks to call all functions stored in
  7484. before-window-map-hook each time a window is mapped. The user can
  7485. store functions in the hook using add-hook!.
  7486. In Guile, hooks are first class objects.
  7487. *** New function: make-hook [N_ARGS]
  7488. Return a hook for hook functions which can take N_ARGS arguments.
  7489. The default value for N_ARGS is 0.
  7490. (See also scm_make_named_hook below.)
  7491. *** New function: add-hook! HOOK PROC [APPEND_P]
  7492. Put PROC at the beginning of the list of functions stored in HOOK.
  7493. If APPEND_P is supplied, and non-false, put PROC at the end instead.
  7494. PROC must be able to take the number of arguments specified when the
  7495. hook was created.
  7496. If PROC already exists in HOOK, then remove it first.
  7497. *** New function: remove-hook! HOOK PROC
  7498. Remove PROC from the list of functions in HOOK.
  7499. *** New function: reset-hook! HOOK
  7500. Clear the list of hook functions stored in HOOK.
  7501. *** New function: run-hook HOOK ARG1 ...
  7502. Run all hook functions stored in HOOK with arguments ARG1 ... .
  7503. The number of arguments supplied must correspond to the number given
  7504. when the hook was created.
  7505. ** The function `dynamic-link' now takes optional keyword arguments.
  7506. The only keyword argument that is currently defined is `:global
  7507. BOOL'. With it, you can control whether the shared library will be
  7508. linked in global mode or not. In global mode, the symbols from the
  7509. linked library can be used to resolve references from other
  7510. dynamically linked libraries. In non-global mode, the linked
  7511. library is essentially invisible and can only be accessed via
  7512. `dynamic-func', etc. The default is now to link in global mode.
  7513. Previously, the default has been non-global mode.
  7514. The `#:global' keyword is only effective on platforms that support
  7515. the dlopen family of functions.
  7516. ** New function `provided?'
  7517. - Function: provided? FEATURE
  7518. Return true iff FEATURE is supported by this installation of
  7519. Guile. FEATURE must be a symbol naming a feature; the global
  7520. variable `*features*' is a list of available features.
  7521. ** Changes to the module (ice-9 expect):
  7522. *** The expect-strings macro now matches `$' in a regular expression
  7523. only at a line-break or end-of-file by default. Previously it would
  7524. match the end of the string accumulated so far. The old behaviour
  7525. can be obtained by setting the variable `expect-strings-exec-flags'
  7526. to 0.
  7527. *** The expect-strings macro now uses a variable `expect-strings-exec-flags'
  7528. for the regexp-exec flags. If `regexp/noteol' is included, then `$'
  7529. in a regular expression will still match before a line-break or
  7530. end-of-file. The default is `regexp/noteol'.
  7531. *** The expect-strings macro now uses a variable
  7532. `expect-strings-compile-flags' for the flags to be supplied to
  7533. `make-regexp'. The default is `regexp/newline', which was previously
  7534. hard-coded.
  7535. *** The expect macro now supplies two arguments to a match procedure:
  7536. the current accumulated string and a flag to indicate whether
  7537. end-of-file has been reached. Previously only the string was supplied.
  7538. If end-of-file is reached, the match procedure will be called an
  7539. additional time with the same accumulated string as the previous call
  7540. but with the flag set.
  7541. ** New module (ice-9 format), implementing the Common Lisp `format' function.
  7542. This code, and the documentation for it that appears here, was
  7543. borrowed from SLIB, with minor adaptations for Guile.
  7544. - Function: format DESTINATION FORMAT-STRING . ARGUMENTS
  7545. An almost complete implementation of Common LISP format description
  7546. according to the CL reference book `Common LISP' from Guy L.
  7547. Steele, Digital Press. Backward compatible to most of the
  7548. available Scheme format implementations.
  7549. Returns `#t', `#f' or a string; has side effect of printing
  7550. according to FORMAT-STRING. If DESTINATION is `#t', the output is
  7551. to the current output port and `#t' is returned. If DESTINATION
  7552. is `#f', a formatted string is returned as the result of the call.
  7553. NEW: If DESTINATION is a string, DESTINATION is regarded as the
  7554. format string; FORMAT-STRING is then the first argument and the
  7555. output is returned as a string. If DESTINATION is a number, the
  7556. output is to the current error port if available by the
  7557. implementation. Otherwise DESTINATION must be an output port and
  7558. `#t' is returned.
  7559. FORMAT-STRING must be a string. In case of a formatting error
  7560. format returns `#f' and prints a message on the current output or
  7561. error port. Characters are output as if the string were output by
  7562. the `display' function with the exception of those prefixed by a
  7563. tilde (~). For a detailed description of the FORMAT-STRING syntax
  7564. please consult a Common LISP format reference manual. For a test
  7565. suite to verify this format implementation load `formatst.scm'.
  7566. Please send bug reports to `lutzeb@cs.tu-berlin.de'.
  7567. Note: `format' is not reentrant, i.e. only one `format'-call may
  7568. be executed at a time.
  7569. *** Format Specification (Format version 3.0)
  7570. Please consult a Common LISP format reference manual for a detailed
  7571. description of the format string syntax. For a demonstration of the
  7572. implemented directives see `formatst.scm'.
  7573. This implementation supports directive parameters and modifiers (`:'
  7574. and `@' characters). Multiple parameters must be separated by a comma
  7575. (`,'). Parameters can be numerical parameters (positive or negative),
  7576. character parameters (prefixed by a quote character (`''), variable
  7577. parameters (`v'), number of rest arguments parameter (`#'), empty and
  7578. default parameters. Directive characters are case independent. The
  7579. general form of a directive is:
  7580. DIRECTIVE ::= ~{DIRECTIVE-PARAMETER,}[:][@]DIRECTIVE-CHARACTER
  7581. DIRECTIVE-PARAMETER ::= [ [-|+]{0-9}+ | 'CHARACTER | v | # ]
  7582. *** Implemented CL Format Control Directives
  7583. Documentation syntax: Uppercase characters represent the
  7584. corresponding control directive characters. Lowercase characters
  7585. represent control directive parameter descriptions.
  7586. `~A'
  7587. Any (print as `display' does).
  7588. `~@A'
  7589. left pad.
  7590. `~MINCOL,COLINC,MINPAD,PADCHARA'
  7591. full padding.
  7592. `~S'
  7593. S-expression (print as `write' does).
  7594. `~@S'
  7595. left pad.
  7596. `~MINCOL,COLINC,MINPAD,PADCHARS'
  7597. full padding.
  7598. `~D'
  7599. Decimal.
  7600. `~@D'
  7601. print number sign always.
  7602. `~:D'
  7603. print comma separated.
  7604. `~MINCOL,PADCHAR,COMMACHARD'
  7605. padding.
  7606. `~X'
  7607. Hexadecimal.
  7608. `~@X'
  7609. print number sign always.
  7610. `~:X'
  7611. print comma separated.
  7612. `~MINCOL,PADCHAR,COMMACHARX'
  7613. padding.
  7614. `~O'
  7615. Octal.
  7616. `~@O'
  7617. print number sign always.
  7618. `~:O'
  7619. print comma separated.
  7620. `~MINCOL,PADCHAR,COMMACHARO'
  7621. padding.
  7622. `~B'
  7623. Binary.
  7624. `~@B'
  7625. print number sign always.
  7626. `~:B'
  7627. print comma separated.
  7628. `~MINCOL,PADCHAR,COMMACHARB'
  7629. padding.
  7630. `~NR'
  7631. Radix N.
  7632. `~N,MINCOL,PADCHAR,COMMACHARR'
  7633. padding.
  7634. `~@R'
  7635. print a number as a Roman numeral.
  7636. `~:@R'
  7637. print a number as an "old fashioned" Roman numeral.
  7638. `~:R'
  7639. print a number as an ordinal English number.
  7640. `~:@R'
  7641. print a number as a cardinal English number.
  7642. `~P'
  7643. Plural.
  7644. `~@P'
  7645. prints `y' and `ies'.
  7646. `~:P'
  7647. as `~P but jumps 1 argument backward.'
  7648. `~:@P'
  7649. as `~@P but jumps 1 argument backward.'
  7650. `~C'
  7651. Character.
  7652. `~@C'
  7653. prints a character as the reader can understand it (i.e. `#\'
  7654. prefixing).
  7655. `~:C'
  7656. prints a character as emacs does (eg. `^C' for ASCII 03).
  7657. `~F'
  7658. Fixed-format floating-point (prints a flonum like MMM.NNN).
  7659. `~WIDTH,DIGITS,SCALE,OVERFLOWCHAR,PADCHARF'
  7660. `~@F'
  7661. If the number is positive a plus sign is printed.
  7662. `~E'
  7663. Exponential floating-point (prints a flonum like MMM.NNN`E'EE).
  7664. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARE'
  7665. `~@E'
  7666. If the number is positive a plus sign is printed.
  7667. `~G'
  7668. General floating-point (prints a flonum either fixed or
  7669. exponential).
  7670. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARG'
  7671. `~@G'
  7672. If the number is positive a plus sign is printed.
  7673. `~$'
  7674. Dollars floating-point (prints a flonum in fixed with signs
  7675. separated).
  7676. `~DIGITS,SCALE,WIDTH,PADCHAR$'
  7677. `~@$'
  7678. If the number is positive a plus sign is printed.
  7679. `~:@$'
  7680. A sign is always printed and appears before the padding.
  7681. `~:$'
  7682. The sign appears before the padding.
  7683. `~%'
  7684. Newline.
  7685. `~N%'
  7686. print N newlines.
  7687. `~&'
  7688. print newline if not at the beginning of the output line.
  7689. `~N&'
  7690. prints `~&' and then N-1 newlines.
  7691. `~|'
  7692. Page Separator.
  7693. `~N|'
  7694. print N page separators.
  7695. `~~'
  7696. Tilde.
  7697. `~N~'
  7698. print N tildes.
  7699. `~'<newline>
  7700. Continuation Line.
  7701. `~:'<newline>
  7702. newline is ignored, white space left.
  7703. `~@'<newline>
  7704. newline is left, white space ignored.
  7705. `~T'
  7706. Tabulation.
  7707. `~@T'
  7708. relative tabulation.
  7709. `~COLNUM,COLINCT'
  7710. full tabulation.
  7711. `~?'
  7712. Indirection (expects indirect arguments as a list).
  7713. `~@?'
  7714. extracts indirect arguments from format arguments.
  7715. `~(STR~)'
  7716. Case conversion (converts by `string-downcase').
  7717. `~:(STR~)'
  7718. converts by `string-capitalize'.
  7719. `~@(STR~)'
  7720. converts by `string-capitalize-first'.
  7721. `~:@(STR~)'
  7722. converts by `string-upcase'.
  7723. `~*'
  7724. Argument Jumping (jumps 1 argument forward).
  7725. `~N*'
  7726. jumps N arguments forward.
  7727. `~:*'
  7728. jumps 1 argument backward.
  7729. `~N:*'
  7730. jumps N arguments backward.
  7731. `~@*'
  7732. jumps to the 0th argument.
  7733. `~N@*'
  7734. jumps to the Nth argument (beginning from 0)
  7735. `~[STR0~;STR1~;...~;STRN~]'
  7736. Conditional Expression (numerical clause conditional).
  7737. `~N['
  7738. take argument from N.
  7739. `~@['
  7740. true test conditional.
  7741. `~:['
  7742. if-else-then conditional.
  7743. `~;'
  7744. clause separator.
  7745. `~:;'
  7746. default clause follows.
  7747. `~{STR~}'
  7748. Iteration (args come from the next argument (a list)).
  7749. `~N{'
  7750. at most N iterations.
  7751. `~:{'
  7752. args from next arg (a list of lists).
  7753. `~@{'
  7754. args from the rest of arguments.
  7755. `~:@{'
  7756. args from the rest args (lists).
  7757. `~^'
  7758. Up and out.
  7759. `~N^'
  7760. aborts if N = 0
  7761. `~N,M^'
  7762. aborts if N = M
  7763. `~N,M,K^'
  7764. aborts if N <= M <= K
  7765. *** Not Implemented CL Format Control Directives
  7766. `~:A'
  7767. print `#f' as an empty list (see below).
  7768. `~:S'
  7769. print `#f' as an empty list (see below).
  7770. `~<~>'
  7771. Justification.
  7772. `~:^'
  7773. (sorry I don't understand its semantics completely)
  7774. *** Extended, Replaced and Additional Control Directives
  7775. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHD'
  7776. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHX'
  7777. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHO'
  7778. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHB'
  7779. `~N,MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHR'
  7780. COMMAWIDTH is the number of characters between two comma
  7781. characters.
  7782. `~I'
  7783. print a R4RS complex number as `~F~@Fi' with passed parameters for
  7784. `~F'.
  7785. `~Y'
  7786. Pretty print formatting of an argument for scheme code lists.
  7787. `~K'
  7788. Same as `~?.'
  7789. `~!'
  7790. Flushes the output if format DESTINATION is a port.
  7791. `~_'
  7792. Print a `#\space' character
  7793. `~N_'
  7794. print N `#\space' characters.
  7795. `~/'
  7796. Print a `#\tab' character
  7797. `~N/'
  7798. print N `#\tab' characters.
  7799. `~NC'
  7800. Takes N as an integer representation for a character. No arguments
  7801. are consumed. N is converted to a character by `integer->char'. N
  7802. must be a positive decimal number.
  7803. `~:S'
  7804. Print out readproof. Prints out internal objects represented as
  7805. `#<...>' as strings `"#<...>"' so that the format output can always
  7806. be processed by `read'.
  7807. `~:A'
  7808. Print out readproof. Prints out internal objects represented as
  7809. `#<...>' as strings `"#<...>"' so that the format output can always
  7810. be processed by `read'.
  7811. `~Q'
  7812. Prints information and a copyright notice on the format
  7813. implementation.
  7814. `~:Q'
  7815. prints format version.
  7816. `~F, ~E, ~G, ~$'
  7817. may also print number strings, i.e. passing a number as a string
  7818. and format it accordingly.
  7819. *** Configuration Variables
  7820. The format module exports some configuration variables to suit the
  7821. systems and users needs. There should be no modification necessary for
  7822. the configuration that comes with Guile. Format detects automatically
  7823. if the running scheme system implements floating point numbers and
  7824. complex numbers.
  7825. format:symbol-case-conv
  7826. Symbols are converted by `symbol->string' so the case type of the
  7827. printed symbols is implementation dependent.
  7828. `format:symbol-case-conv' is a one arg closure which is either
  7829. `#f' (no conversion), `string-upcase', `string-downcase' or
  7830. `string-capitalize'. (default `#f')
  7831. format:iobj-case-conv
  7832. As FORMAT:SYMBOL-CASE-CONV but applies for the representation of
  7833. implementation internal objects. (default `#f')
  7834. format:expch
  7835. The character prefixing the exponent value in `~E' printing.
  7836. (default `#\E')
  7837. *** Compatibility With Other Format Implementations
  7838. SLIB format 2.x:
  7839. See `format.doc'.
  7840. SLIB format 1.4:
  7841. Downward compatible except for padding support and `~A', `~S',
  7842. `~P', `~X' uppercase printing. SLIB format 1.4 uses C-style
  7843. `printf' padding support which is completely replaced by the CL
  7844. `format' padding style.
  7845. MIT C-Scheme 7.1:
  7846. Downward compatible except for `~', which is not documented
  7847. (ignores all characters inside the format string up to a newline
  7848. character). (7.1 implements `~a', `~s', ~NEWLINE, `~~', `~%',
  7849. numerical and variable parameters and `:/@' modifiers in the CL
  7850. sense).
  7851. Elk 1.5/2.0:
  7852. Downward compatible except for `~A' and `~S' which print in
  7853. uppercase. (Elk implements `~a', `~s', `~~', and `~%' (no
  7854. directive parameters or modifiers)).
  7855. Scheme->C 01nov91:
  7856. Downward compatible except for an optional destination parameter:
  7857. S2C accepts a format call without a destination which returns a
  7858. formatted string. This is equivalent to a #f destination in S2C.
  7859. (S2C implements `~a', `~s', `~c', `~%', and `~~' (no directive
  7860. parameters or modifiers)).
  7861. ** Changes to string-handling functions.
  7862. These functions were added to support the (ice-9 format) module, above.
  7863. *** New function: string-upcase STRING
  7864. *** New function: string-downcase STRING
  7865. These are non-destructive versions of the existing string-upcase! and
  7866. string-downcase! functions.
  7867. *** New function: string-capitalize! STRING
  7868. *** New function: string-capitalize STRING
  7869. These functions convert the first letter of each word in the string to
  7870. upper case. Thus:
  7871. (string-capitalize "howdy there")
  7872. => "Howdy There"
  7873. As with the other functions, string-capitalize! modifies the string in
  7874. place, while string-capitalize returns a modified copy of its argument.
  7875. *** New function: string-ci->symbol STRING
  7876. Return a symbol whose name is STRING, but having the same case as if
  7877. the symbol had be read by `read'.
  7878. Guile can be configured to be sensitive or insensitive to case
  7879. differences in Scheme identifiers. If Guile is case-insensitive, all
  7880. symbols are converted to lower case on input. The `string-ci->symbol'
  7881. function returns a symbol whose name in STRING, transformed as Guile
  7882. would if STRING were input.
  7883. *** New function: substring-move! STRING1 START END STRING2 START
  7884. Copy the substring of STRING1 from START (inclusive) to END
  7885. (exclusive) to STRING2 at START. STRING1 and STRING2 may be the same
  7886. string, and the source and destination areas may overlap; in all
  7887. cases, the function behaves as if all the characters were copied
  7888. simultanously.
  7889. *** Extended functions: substring-move-left! substring-move-right!
  7890. These functions now correctly copy arbitrarily overlapping substrings;
  7891. they are both synonyms for substring-move!.
  7892. ** New module (ice-9 getopt-long), with the function `getopt-long'.
  7893. getopt-long is a function for parsing command-line arguments in a
  7894. manner consistent with other GNU programs.
  7895. (getopt-long ARGS GRAMMAR)
  7896. Parse the arguments ARGS according to the argument list grammar GRAMMAR.
  7897. ARGS should be a list of strings. Its first element should be the
  7898. name of the program; subsequent elements should be the arguments
  7899. that were passed to the program on the command line. The
  7900. `program-arguments' procedure returns a list of this form.
  7901. GRAMMAR is a list of the form:
  7902. ((OPTION (PROPERTY VALUE) ...) ...)
  7903. Each OPTION should be a symbol. `getopt-long' will accept a
  7904. command-line option named `--OPTION'.
  7905. Each option can have the following (PROPERTY VALUE) pairs:
  7906. (single-char CHAR) --- Accept `-CHAR' as a single-character
  7907. equivalent to `--OPTION'. This is how to specify traditional
  7908. Unix-style flags.
  7909. (required? BOOL) --- If BOOL is true, the option is required.
  7910. getopt-long will raise an error if it is not found in ARGS.
  7911. (value BOOL) --- If BOOL is #t, the option accepts a value; if
  7912. it is #f, it does not; and if it is the symbol
  7913. `optional', the option may appear in ARGS with or
  7914. without a value.
  7915. (predicate FUNC) --- If the option accepts a value (i.e. you
  7916. specified `(value #t)' for this option), then getopt
  7917. will apply FUNC to the value, and throw an exception
  7918. if it returns #f. FUNC should be a procedure which
  7919. accepts a string and returns a boolean value; you may
  7920. need to use quasiquotes to get it into GRAMMAR.
  7921. The (PROPERTY VALUE) pairs may occur in any order, but each
  7922. property may occur only once. By default, options do not have
  7923. single-character equivalents, are not required, and do not take
  7924. values.
  7925. In ARGS, single-character options may be combined, in the usual
  7926. Unix fashion: ("-x" "-y") is equivalent to ("-xy"). If an option
  7927. accepts values, then it must be the last option in the
  7928. combination; the value is the next argument. So, for example, using
  7929. the following grammar:
  7930. ((apples (single-char #\a))
  7931. (blimps (single-char #\b) (value #t))
  7932. (catalexis (single-char #\c) (value #t)))
  7933. the following argument lists would be acceptable:
  7934. ("-a" "-b" "bang" "-c" "couth") ("bang" and "couth" are the values
  7935. for "blimps" and "catalexis")
  7936. ("-ab" "bang" "-c" "couth") (same)
  7937. ("-ac" "couth" "-b" "bang") (same)
  7938. ("-abc" "couth" "bang") (an error, since `-b' is not the
  7939. last option in its combination)
  7940. If an option's value is optional, then `getopt-long' decides
  7941. whether it has a value by looking at what follows it in ARGS. If
  7942. the next element is a string, and it does not appear to be an
  7943. option itself, then that string is the option's value.
  7944. The value of a long option can appear as the next element in ARGS,
  7945. or it can follow the option name, separated by an `=' character.
  7946. Thus, using the same grammar as above, the following argument lists
  7947. are equivalent:
  7948. ("--apples" "Braeburn" "--blimps" "Goodyear")
  7949. ("--apples=Braeburn" "--blimps" "Goodyear")
  7950. ("--blimps" "Goodyear" "--apples=Braeburn")
  7951. If the option "--" appears in ARGS, argument parsing stops there;
  7952. subsequent arguments are returned as ordinary arguments, even if
  7953. they resemble options. So, in the argument list:
  7954. ("--apples" "Granny Smith" "--" "--blimp" "Goodyear")
  7955. `getopt-long' will recognize the `apples' option as having the
  7956. value "Granny Smith", but it will not recognize the `blimp'
  7957. option; it will return the strings "--blimp" and "Goodyear" as
  7958. ordinary argument strings.
  7959. The `getopt-long' function returns the parsed argument list as an
  7960. assocation list, mapping option names --- the symbols from GRAMMAR
  7961. --- onto their values, or #t if the option does not accept a value.
  7962. Unused options do not appear in the alist.
  7963. All arguments that are not the value of any option are returned
  7964. as a list, associated with the empty list.
  7965. `getopt-long' throws an exception if:
  7966. - it finds an unrecognized option in ARGS
  7967. - a required option is omitted
  7968. - an option that requires an argument doesn't get one
  7969. - an option that doesn't accept an argument does get one (this can
  7970. only happen using the long option `--opt=value' syntax)
  7971. - an option predicate fails
  7972. So, for example:
  7973. (define grammar
  7974. `((lockfile-dir (required? #t)
  7975. (value #t)
  7976. (single-char #\k)
  7977. (predicate ,file-is-directory?))
  7978. (verbose (required? #f)
  7979. (single-char #\v)
  7980. (value #f))
  7981. (x-includes (single-char #\x))
  7982. (rnet-server (single-char #\y)
  7983. (predicate ,string?))))
  7984. (getopt-long '("my-prog" "-vk" "/tmp" "foo1" "--x-includes=/usr/include"
  7985. "--rnet-server=lamprod" "--" "-fred" "foo2" "foo3")
  7986. grammar)
  7987. => ((() "foo1" "-fred" "foo2" "foo3")
  7988. (rnet-server . "lamprod")
  7989. (x-includes . "/usr/include")
  7990. (lockfile-dir . "/tmp")
  7991. (verbose . #t))
  7992. ** The (ice-9 getopt-gnu-style) module is obsolete; use (ice-9 getopt-long).
  7993. It will be removed in a few releases.
  7994. ** New syntax: lambda*
  7995. ** New syntax: define*
  7996. ** New syntax: define*-public
  7997. ** New syntax: defmacro*
  7998. ** New syntax: defmacro*-public
  7999. Guile now supports optional arguments.
  8000. `lambda*', `define*', `define*-public', `defmacro*' and
  8001. `defmacro*-public' are identical to the non-* versions except that
  8002. they use an extended type of parameter list that has the following BNF
  8003. syntax (parentheses are literal, square brackets indicate grouping,
  8004. and `*', `+' and `?' have the usual meaning):
  8005. ext-param-list ::= ( [identifier]* [#&optional [ext-var-decl]+]?
  8006. [#&key [ext-var-decl]+ [#&allow-other-keys]?]?
  8007. [[#&rest identifier]|[. identifier]]? ) | [identifier]
  8008. ext-var-decl ::= identifier | ( identifier expression )
  8009. The semantics are best illustrated with the following documentation
  8010. and examples for `lambda*':
  8011. lambda* args . body
  8012. lambda extended for optional and keyword arguments
  8013. lambda* creates a procedure that takes optional arguments. These
  8014. are specified by putting them inside brackets at the end of the
  8015. paramater list, but before any dotted rest argument. For example,
  8016. (lambda* (a b #&optional c d . e) '())
  8017. creates a procedure with fixed arguments a and b, optional arguments c
  8018. and d, and rest argument e. If the optional arguments are omitted
  8019. in a call, the variables for them are unbound in the procedure. This
  8020. can be checked with the bound? macro.
  8021. lambda* can also take keyword arguments. For example, a procedure
  8022. defined like this:
  8023. (lambda* (#&key xyzzy larch) '())
  8024. can be called with any of the argument lists (#:xyzzy 11)
  8025. (#:larch 13) (#:larch 42 #:xyzzy 19) (). Whichever arguments
  8026. are given as keywords are bound to values.
  8027. Optional and keyword arguments can also be given default values
  8028. which they take on when they are not present in a call, by giving a
  8029. two-item list in place of an optional argument, for example in:
  8030. (lambda* (foo #&optional (bar 42) #&key (baz 73)) (list foo bar baz))
  8031. foo is a fixed argument, bar is an optional argument with default
  8032. value 42, and baz is a keyword argument with default value 73.
  8033. Default value expressions are not evaluated unless they are needed
  8034. and until the procedure is called.
  8035. lambda* now supports two more special parameter list keywords.
  8036. lambda*-defined procedures now throw an error by default if a
  8037. keyword other than one of those specified is found in the actual
  8038. passed arguments. However, specifying #&allow-other-keys
  8039. immediately after the kyword argument declarations restores the
  8040. previous behavior of ignoring unknown keywords. lambda* also now
  8041. guarantees that if the same keyword is passed more than once, the
  8042. last one passed is the one that takes effect. For example,
  8043. ((lambda* (#&key (heads 0) (tails 0)) (display (list heads tails)))
  8044. #:heads 37 #:tails 42 #:heads 99)
  8045. would result in (99 47) being displayed.
  8046. #&rest is also now provided as a synonym for the dotted syntax rest
  8047. argument. The argument lists (a . b) and (a #&rest b) are equivalent in
  8048. all respects to lambda*. This is provided for more similarity to DSSSL,
  8049. MIT-Scheme and Kawa among others, as well as for refugees from other
  8050. Lisp dialects.
  8051. Further documentation may be found in the optargs.scm file itself.
  8052. The optional argument module also exports the macros `let-optional',
  8053. `let-optional*', `let-keywords', `let-keywords*' and `bound?'. These
  8054. are not documented here because they may be removed in the future, but
  8055. full documentation is still available in optargs.scm.
  8056. ** New syntax: and-let*
  8057. Guile now supports the `and-let*' form, described in the draft SRFI-2.
  8058. Syntax: (land* (<clause> ...) <body> ...)
  8059. Each <clause> should have one of the following forms:
  8060. (<variable> <expression>)
  8061. (<expression>)
  8062. <bound-variable>
  8063. Each <variable> or <bound-variable> should be an identifier. Each
  8064. <expression> should be a valid expression. The <body> should be a
  8065. possibly empty sequence of expressions, like the <body> of a
  8066. lambda form.
  8067. Semantics: A LAND* expression is evaluated by evaluating the
  8068. <expression> or <bound-variable> of each of the <clause>s from
  8069. left to right. The value of the first <expression> or
  8070. <bound-variable> that evaluates to a false value is returned; the
  8071. remaining <expression>s and <bound-variable>s are not evaluated.
  8072. The <body> forms are evaluated iff all the <expression>s and
  8073. <bound-variable>s evaluate to true values.
  8074. The <expression>s and the <body> are evaluated in an environment
  8075. binding each <variable> of the preceding (<variable> <expression>)
  8076. clauses to the value of the <expression>. Later bindings
  8077. shadow earlier bindings.
  8078. Guile's and-let* macro was contributed by Michael Livshin.
  8079. ** New sorting functions
  8080. *** New function: sorted? SEQUENCE LESS?
  8081. Returns `#t' when the sequence argument is in non-decreasing order
  8082. according to LESS? (that is, there is no adjacent pair `... x y
  8083. ...' for which `(less? y x)').
  8084. Returns `#f' when the sequence contains at least one out-of-order
  8085. pair. It is an error if the sequence is neither a list nor a
  8086. vector.
  8087. *** New function: merge LIST1 LIST2 LESS?
  8088. LIST1 and LIST2 are sorted lists.
  8089. Returns the sorted list of all elements in LIST1 and LIST2.
  8090. Assume that the elements a and b1 in LIST1 and b2 in LIST2 are "equal"
  8091. in the sense that (LESS? x y) --> #f for x, y in {a, b1, b2},
  8092. and that a < b1 in LIST1. Then a < b1 < b2 in the result.
  8093. (Here "<" should read "comes before".)
  8094. *** New procedure: merge! LIST1 LIST2 LESS?
  8095. Merges two lists, re-using the pairs of LIST1 and LIST2 to build
  8096. the result. If the code is compiled, and LESS? constructs no new
  8097. pairs, no pairs at all will be allocated. The first pair of the
  8098. result will be either the first pair of LIST1 or the first pair of
  8099. LIST2.
  8100. *** New function: sort SEQUENCE LESS?
  8101. Accepts either a list or a vector, and returns a new sequence
  8102. which is sorted. The new sequence is the same type as the input.
  8103. Always `(sorted? (sort sequence less?) less?)'. The original
  8104. sequence is not altered in any way. The new sequence shares its
  8105. elements with the old one; no elements are copied.
  8106. *** New procedure: sort! SEQUENCE LESS
  8107. Returns its sorted result in the original boxes. No new storage is
  8108. allocated at all. Proper usage: (set! slist (sort! slist <))
  8109. *** New function: stable-sort SEQUENCE LESS?
  8110. Similar to `sort' but stable. That is, if "equal" elements are
  8111. ordered a < b in the original sequence, they will have the same order
  8112. in the result.
  8113. *** New function: stable-sort! SEQUENCE LESS?
  8114. Similar to `sort!' but stable.
  8115. Uses temporary storage when sorting vectors.
  8116. *** New functions: sort-list, sort-list!
  8117. Added for compatibility with scsh.
  8118. ** New built-in random number support
  8119. *** New function: random N [STATE]
  8120. Accepts a positive integer or real N and returns a number of the
  8121. same type between zero (inclusive) and N (exclusive). The values
  8122. returned have a uniform distribution.
  8123. The optional argument STATE must be of the type produced by
  8124. `copy-random-state' or `seed->random-state'. It defaults to the value
  8125. of the variable `*random-state*'. This object is used to maintain the
  8126. state of the pseudo-random-number generator and is altered as a side
  8127. effect of the `random' operation.
  8128. *** New variable: *random-state*
  8129. Holds a data structure that encodes the internal state of the
  8130. random-number generator that `random' uses by default. The nature
  8131. of this data structure is implementation-dependent. It may be
  8132. printed out and successfully read back in, but may or may not
  8133. function correctly as a random-number state object in another
  8134. implementation.
  8135. *** New function: copy-random-state [STATE]
  8136. Returns a new object of type suitable for use as the value of the
  8137. variable `*random-state*' and as a second argument to `random'.
  8138. If argument STATE is given, a copy of it is returned. Otherwise a
  8139. copy of `*random-state*' is returned.
  8140. *** New function: seed->random-state SEED
  8141. Returns a new object of type suitable for use as the value of the
  8142. variable `*random-state*' and as a second argument to `random'.
  8143. SEED is a string or a number. A new state is generated and
  8144. initialized using SEED.
  8145. *** New function: random:uniform [STATE]
  8146. Returns an uniformly distributed inexact real random number in the
  8147. range between 0 and 1.
  8148. *** New procedure: random:solid-sphere! VECT [STATE]
  8149. Fills VECT with inexact real random numbers the sum of whose
  8150. squares is less than 1.0. Thinking of VECT as coordinates in
  8151. space of dimension N = `(vector-length VECT)', the coordinates are
  8152. uniformly distributed within the unit N-shere. The sum of the
  8153. squares of the numbers is returned. VECT can be either a vector
  8154. or a uniform vector of doubles.
  8155. *** New procedure: random:hollow-sphere! VECT [STATE]
  8156. Fills VECT with inexact real random numbers the sum of whose squares
  8157. is equal to 1.0. Thinking of VECT as coordinates in space of
  8158. dimension n = `(vector-length VECT)', the coordinates are uniformly
  8159. distributed over the surface of the unit n-shere. VECT can be either
  8160. a vector or a uniform vector of doubles.
  8161. *** New function: random:normal [STATE]
  8162. Returns an inexact real in a normal distribution with mean 0 and
  8163. standard deviation 1. For a normal distribution with mean M and
  8164. standard deviation D use `(+ M (* D (random:normal)))'.
  8165. *** New procedure: random:normal-vector! VECT [STATE]
  8166. Fills VECT with inexact real random numbers which are independent and
  8167. standard normally distributed (i.e., with mean 0 and variance 1).
  8168. VECT can be either a vector or a uniform vector of doubles.
  8169. *** New function: random:exp STATE
  8170. Returns an inexact real in an exponential distribution with mean 1.
  8171. For an exponential distribution with mean U use (* U (random:exp)).
  8172. ** The range of logand, logior, logxor, logtest, and logbit? have changed.
  8173. These functions now operate on numbers in the range of a C unsigned
  8174. long.
  8175. These functions used to operate on numbers in the range of a C signed
  8176. long; however, this seems inappropriate, because Guile integers don't
  8177. overflow.
  8178. ** New function: make-guardian
  8179. This is an implementation of guardians as described in
  8180. R. Kent Dybvig, Carl Bruggeman, and David Eby (1993) "Guardians in a
  8181. Generation-Based Garbage Collector" ACM SIGPLAN Conference on
  8182. Programming Language Design and Implementation, June 1993
  8183. ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/guardians.ps.gz
  8184. ** New functions: delq1!, delv1!, delete1!
  8185. These procedures behave similar to delq! and friends but delete only
  8186. one object if at all.
  8187. ** New function: unread-string STRING PORT
  8188. Unread STRING to PORT, that is, push it back onto the port so that
  8189. next read operation will work on the pushed back characters.
  8190. ** unread-char can now be called multiple times
  8191. If unread-char is called multiple times, the unread characters will be
  8192. read again in last-in first-out order.
  8193. ** the procedures uniform-array-read! and uniform-array-write! now
  8194. work on any kind of port, not just ports which are open on a file.
  8195. ** Now 'l' in a port mode requests line buffering.
  8196. ** The procedure truncate-file now works on string ports as well
  8197. as file ports. If the size argument is omitted, the current
  8198. file position is used.
  8199. ** new procedure: seek PORT/FDES OFFSET WHENCE
  8200. The arguments are the same as for the old fseek procedure, but it
  8201. works on string ports as well as random-access file ports.
  8202. ** the fseek procedure now works on string ports, since it has been
  8203. redefined using seek.
  8204. ** the setvbuf procedure now uses a default size if mode is _IOFBF and
  8205. size is not supplied.
  8206. ** the newline procedure no longer flushes the port if it's not
  8207. line-buffered: previously it did if it was the current output port.
  8208. ** open-pipe and close-pipe are no longer primitive procedures, but
  8209. an emulation can be obtained using `(use-modules (ice-9 popen))'.
  8210. ** the freopen procedure has been removed.
  8211. ** new procedure: drain-input PORT
  8212. Drains PORT's read buffers (including any pushed-back characters)
  8213. and returns the contents as a single string.
  8214. ** New function: map-in-order PROC LIST1 LIST2 ...
  8215. Version of `map' which guarantees that the procedure is applied to the
  8216. lists in serial order.
  8217. ** Renamed `serial-array-copy!' and `serial-array-map!' to
  8218. `array-copy-in-order!' and `array-map-in-order!'. The old names are
  8219. now obsolete and will go away in release 1.5.
  8220. ** New syntax: collect BODY1 ...
  8221. Version of `begin' which returns a list of the results of the body
  8222. forms instead of the result of the last body form. In contrast to
  8223. `begin', `collect' allows an empty body.
  8224. ** New functions: read-history FILENAME, write-history FILENAME
  8225. Read/write command line history from/to file. Returns #t on success
  8226. and #f if an error occured.
  8227. ** `ls' and `lls' in module (ice-9 ls) now handle no arguments.
  8228. These procedures return a list of definitions available in the specified
  8229. argument, a relative module reference. In the case of no argument,
  8230. `(current-module)' is now consulted for definitions to return, instead
  8231. of simply returning #f, the former behavior.
  8232. ** The #/ syntax for lists is no longer supported.
  8233. Earlier versions of Scheme accepted this syntax, but printed a
  8234. warning.
  8235. ** Guile no longer consults the SCHEME_LOAD_PATH environment variable.
  8236. Instead, you should set GUILE_LOAD_PATH to tell Guile where to find
  8237. modules.
  8238. * Changes to the gh_ interface
  8239. ** gh_scm2doubles
  8240. Now takes a second argument which is the result array. If this
  8241. pointer is NULL, a new array is malloced (the old behaviour).
  8242. ** gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
  8243. gh_scm2shorts, gh_scm2longs, gh_scm2floats
  8244. New functions.
  8245. * Changes to the scm_ interface
  8246. ** Function: scm_make_named_hook (char* name, int n_args)
  8247. Creates a hook in the same way as make-hook above but also
  8248. binds a variable named NAME to it.
  8249. This is the typical way of creating a hook from C code.
  8250. Currently, the variable is created in the "current" module. This
  8251. might change when we get the new module system.
  8252. ** The smob interface
  8253. The interface for creating smobs has changed. For documentation, see
  8254. data-rep.info (made from guile-core/doc/data-rep.texi).
  8255. *** Deprecated function: SCM scm_newsmob (scm_smobfuns *)
  8256. >>> This function will be removed in 1.3.4. <<<
  8257. It is replaced by:
  8258. *** Function: SCM scm_make_smob_type (const char *name, scm_sizet size)
  8259. This function adds a new smob type, named NAME, with instance size
  8260. SIZE to the system. The return value is a tag that is used in
  8261. creating instances of the type. If SIZE is 0, then no memory will
  8262. be allocated when instances of the smob are created, and nothing
  8263. will be freed by the default free function.
  8264. *** Function: void scm_set_smob_mark (long tc, SCM (*mark) (SCM))
  8265. This function sets the smob marking procedure for the smob type
  8266. specified by the tag TC. TC is the tag returned by
  8267. `scm_make_smob_type'.
  8268. *** Function: void scm_set_smob_free (long tc, SCM (*mark) (SCM))
  8269. This function sets the smob freeing procedure for the smob type
  8270. specified by the tag TC. TC is the tag returned by
  8271. `scm_make_smob_type'.
  8272. *** Function: void scm_set_smob_print (tc, print)
  8273. - Function: void scm_set_smob_print (long tc,
  8274. scm_sizet (*print) (SCM,
  8275. SCM,
  8276. scm_print_state *))
  8277. This function sets the smob printing procedure for the smob type
  8278. specified by the tag TC. TC is the tag returned by
  8279. `scm_make_smob_type'.
  8280. *** Function: void scm_set_smob_equalp (long tc, SCM (*equalp) (SCM, SCM))
  8281. This function sets the smob equality-testing predicate for the
  8282. smob type specified by the tag TC. TC is the tag returned by
  8283. `scm_make_smob_type'.
  8284. *** Macro: void SCM_NEWSMOB (SCM var, long tc, void *data)
  8285. Make VALUE contain a smob instance of the type with type code TC and
  8286. smob data DATA. VALUE must be previously declared as C type `SCM'.
  8287. *** Macro: fn_returns SCM_RETURN_NEWSMOB (long tc, void *data)
  8288. This macro expands to a block of code that creates a smob instance
  8289. of the type with type code TC and smob data DATA, and returns that
  8290. `SCM' value. It should be the last piece of code in a block.
  8291. ** The interfaces for using I/O ports and implementing port types
  8292. (ptobs) have changed significantly. The new interface is based on
  8293. shared access to buffers and a new set of ptob procedures.
  8294. *** scm_newptob has been removed
  8295. It is replaced by:
  8296. *** Function: SCM scm_make_port_type (type_name, fill_buffer, write_flush)
  8297. - Function: SCM scm_make_port_type (char *type_name,
  8298. int (*fill_buffer) (SCM port),
  8299. void (*write_flush) (SCM port));
  8300. Similarly to the new smob interface, there is a set of function
  8301. setters by which the user can customize the behaviour of his port
  8302. type. See ports.h (scm_set_port_XXX).
  8303. ** scm_strport_to_string: New function: creates a new string from
  8304. a string port's buffer.
  8305. ** Plug in interface for random number generators
  8306. The variable `scm_the_rng' in random.c contains a value and three
  8307. function pointers which together define the current random number
  8308. generator being used by the Scheme level interface and the random
  8309. number library functions.
  8310. The user is free to replace the default generator with the generator
  8311. of his own choice.
  8312. *** Variable: size_t scm_the_rng.rstate_size
  8313. The size of the random state type used by the current RNG
  8314. measured in chars.
  8315. *** Function: unsigned long scm_the_rng.random_bits (scm_rstate *STATE)
  8316. Given the random STATE, return 32 random bits.
  8317. *** Function: void scm_the_rng.init_rstate (scm_rstate *STATE, chars *S, int N)
  8318. Seed random state STATE using string S of length N.
  8319. *** Function: scm_rstate *scm_the_rng.copy_rstate (scm_rstate *STATE)
  8320. Given random state STATE, return a malloced copy.
  8321. ** Default RNG
  8322. The default RNG is the MWC (Multiply With Carry) random number
  8323. generator described by George Marsaglia at the Department of
  8324. Statistics and Supercomputer Computations Research Institute, The
  8325. Florida State University (http://stat.fsu.edu/~geo).
  8326. It uses 64 bits, has a period of 4578426017172946943 (4.6e18), and
  8327. passes all tests in the DIEHARD test suite
  8328. (http://stat.fsu.edu/~geo/diehard.html). The generation of 32 bits
  8329. costs one multiply and one add on platforms which either supports long
  8330. longs (gcc does this on most systems) or have 64 bit longs. The cost
  8331. is four multiply on other systems but this can be optimized by writing
  8332. scm_i_uniform32 in assembler.
  8333. These functions are provided through the scm_the_rng interface for use
  8334. by libguile and the application.
  8335. *** Function: unsigned long scm_i_uniform32 (scm_i_rstate *STATE)
  8336. Given the random STATE, return 32 random bits.
  8337. Don't use this function directly. Instead go through the plugin
  8338. interface (see "Plug in interface" above).
  8339. *** Function: void scm_i_init_rstate (scm_i_rstate *STATE, char *SEED, int N)
  8340. Initialize STATE using SEED of length N.
  8341. *** Function: scm_i_rstate *scm_i_copy_rstate (scm_i_rstate *STATE)
  8342. Return a malloc:ed copy of STATE. This function can easily be re-used
  8343. in the interfaces to other RNGs.
  8344. ** Random number library functions
  8345. These functions use the current RNG through the scm_the_rng interface.
  8346. It might be a good idea to use these functions from your C code so
  8347. that only one random generator is used by all code in your program.
  8348. The default random state is stored in:
  8349. *** Variable: SCM scm_var_random_state
  8350. Contains the vcell of the Scheme variable "*random-state*" which is
  8351. used as default state by all random number functions in the Scheme
  8352. level interface.
  8353. Example:
  8354. double x = scm_c_uniform01 (SCM_RSTATE (SCM_CDR (scm_var_random_state)));
  8355. *** Function: scm_rstate *scm_c_default_rstate (void)
  8356. This is a convenience function which returns the value of
  8357. scm_var_random_state. An error message is generated if this value
  8358. isn't a random state.
  8359. *** Function: scm_rstate *scm_c_make_rstate (char *SEED, int LENGTH)
  8360. Make a new random state from the string SEED of length LENGTH.
  8361. It is generally not a good idea to use multiple random states in a
  8362. program. While subsequent random numbers generated from one random
  8363. state are guaranteed to be reasonably independent, there is no such
  8364. guarantee for numbers generated from different random states.
  8365. *** Macro: unsigned long scm_c_uniform32 (scm_rstate *STATE)
  8366. Return 32 random bits.
  8367. *** Function: double scm_c_uniform01 (scm_rstate *STATE)
  8368. Return a sample from the uniform(0,1) distribution.
  8369. *** Function: double scm_c_normal01 (scm_rstate *STATE)
  8370. Return a sample from the normal(0,1) distribution.
  8371. *** Function: double scm_c_exp1 (scm_rstate *STATE)
  8372. Return a sample from the exp(1) distribution.
  8373. *** Function: unsigned long scm_c_random (scm_rstate *STATE, unsigned long M)
  8374. Return a sample from the discrete uniform(0,M) distribution.
  8375. *** Function: SCM scm_c_random_bignum (scm_rstate *STATE, SCM M)
  8376. Return a sample from the discrete uniform(0,M) distribution.
  8377. M must be a bignum object. The returned value may be an INUM.
  8378. Changes in Guile 1.3 (released Monday, October 19, 1998):
  8379. * Changes to the distribution
  8380. ** We renamed the SCHEME_LOAD_PATH environment variable to GUILE_LOAD_PATH.
  8381. To avoid conflicts, programs should name environment variables after
  8382. themselves, except when there's a common practice establishing some
  8383. other convention.
  8384. For now, Guile supports both GUILE_LOAD_PATH and SCHEME_LOAD_PATH,
  8385. giving the former precedence, and printing a warning message if the
  8386. latter is set. Guile 1.4 will not recognize SCHEME_LOAD_PATH at all.
  8387. ** The header files related to multi-byte characters have been removed.
  8388. They were: libguile/extchrs.h and libguile/mbstrings.h. Any C code
  8389. which referred to these explicitly will probably need to be rewritten,
  8390. since the support for the variant string types has been removed; see
  8391. below.
  8392. ** The header files append.h and sequences.h have been removed. These
  8393. files implemented non-R4RS operations which would encourage
  8394. non-portable programming style and less easy-to-read code.
  8395. * Changes to the stand-alone interpreter
  8396. ** New procedures have been added to implement a "batch mode":
  8397. *** Function: batch-mode?
  8398. Returns a boolean indicating whether the interpreter is in batch
  8399. mode.
  8400. *** Function: set-batch-mode?! ARG
  8401. If ARG is true, switches the interpreter to batch mode. The `#f'
  8402. case has not been implemented.
  8403. ** Guile now provides full command-line editing, when run interactively.
  8404. To use this feature, you must have the readline library installed.
  8405. The Guile build process will notice it, and automatically include
  8406. support for it.
  8407. The readline library is available via anonymous FTP from any GNU
  8408. mirror site; the canonical location is "ftp://prep.ai.mit.edu/pub/gnu".
  8409. ** the-last-stack is now a fluid.
  8410. * Changes to the procedure for linking libguile with your programs
  8411. ** You can now use the `guile-config' utility to build programs that use Guile.
  8412. Guile now includes a command-line utility called `guile-config', which
  8413. can provide information about how to compile and link programs that
  8414. use Guile.
  8415. *** `guile-config compile' prints any C compiler flags needed to use Guile.
  8416. You should include this command's output on the command line you use
  8417. to compile C or C++ code that #includes the Guile header files. It's
  8418. usually just a `-I' flag to help the compiler find the Guile headers.
  8419. *** `guile-config link' prints any linker flags necessary to link with Guile.
  8420. This command writes to its standard output a list of flags which you
  8421. must pass to the linker to link your code against the Guile library.
  8422. The flags include '-lguile' itself, any other libraries the Guile
  8423. library depends upon, and any `-L' flags needed to help the linker
  8424. find those libraries.
  8425. For example, here is a Makefile rule that builds a program named 'foo'
  8426. from the object files ${FOO_OBJECTS}, and links them against Guile:
  8427. foo: ${FOO_OBJECTS}
  8428. ${CC} ${CFLAGS} ${FOO_OBJECTS} `guile-config link` -o foo
  8429. Previous Guile releases recommended that you use autoconf to detect
  8430. which of a predefined set of libraries were present on your system.
  8431. It is more robust to use `guile-config', since it records exactly which
  8432. libraries the installed Guile library requires.
  8433. This was originally called `build-guile', but was renamed to
  8434. `guile-config' before Guile 1.3 was released, to be consistent with
  8435. the analogous script for the GTK+ GUI toolkit, which is called
  8436. `gtk-config'.
  8437. ** Use the GUILE_FLAGS macro in your configure.in file to find Guile.
  8438. If you are using the GNU autoconf package to configure your program,
  8439. you can use the GUILE_FLAGS autoconf macro to call `guile-config'
  8440. (described above) and gather the necessary values for use in your
  8441. Makefiles.
  8442. The GUILE_FLAGS macro expands to configure script code which runs the
  8443. `guile-config' script, to find out where Guile's header files and
  8444. libraries are installed. It sets two variables, marked for
  8445. substitution, as by AC_SUBST.
  8446. GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
  8447. code that uses Guile header files. This is almost always just a
  8448. -I flag.
  8449. GUILE_LDFLAGS --- flags to pass to the linker to link a
  8450. program against Guile. This includes `-lguile' for the Guile
  8451. library itself, any libraries that Guile itself requires (like
  8452. -lqthreads), and so on. It may also include a -L flag to tell the
  8453. compiler where to find the libraries.
  8454. GUILE_FLAGS is defined in the file guile.m4, in the top-level
  8455. directory of the Guile distribution. You can copy it into your
  8456. package's aclocal.m4 file, and then use it in your configure.in file.
  8457. If you are using the `aclocal' program, distributed with GNU automake,
  8458. to maintain your aclocal.m4 file, the Guile installation process
  8459. installs guile.m4 where aclocal will find it. All you need to do is
  8460. use GUILE_FLAGS in your configure.in file, and then run `aclocal';
  8461. this will copy the definition of GUILE_FLAGS into your aclocal.m4
  8462. file.
  8463. * Changes to Scheme functions and syntax
  8464. ** Multi-byte strings have been removed, as have multi-byte and wide
  8465. ports. We felt that these were the wrong approach to
  8466. internationalization support.
  8467. ** New function: readline [PROMPT]
  8468. Read a line from the terminal, and allow the user to edit it,
  8469. prompting with PROMPT. READLINE provides a large set of Emacs-like
  8470. editing commands, lets the user recall previously typed lines, and
  8471. works on almost every kind of terminal, including dumb terminals.
  8472. READLINE assumes that the cursor is at the beginning of the line when
  8473. it is invoked. Thus, you can't print a prompt yourself, and then call
  8474. READLINE; you need to package up your prompt as a string, pass it to
  8475. the function, and let READLINE print the prompt itself. This is
  8476. because READLINE needs to know the prompt's screen width.
  8477. For Guile to provide this function, you must have the readline
  8478. library, version 2.1 or later, installed on your system. Readline is
  8479. available via anonymous FTP from prep.ai.mit.edu in pub/gnu, or from
  8480. any GNU mirror site.
  8481. See also ADD-HISTORY function.
  8482. ** New function: add-history STRING
  8483. Add STRING as the most recent line in the history used by the READLINE
  8484. command. READLINE does not add lines to the history itself; you must
  8485. call ADD-HISTORY to make previous input available to the user.
  8486. ** The behavior of the read-line function has changed.
  8487. This function now uses standard C library functions to read the line,
  8488. for speed. This means that it doesn not respect the value of
  8489. scm-line-incrementors; it assumes that lines are delimited with
  8490. #\newline.
  8491. (Note that this is read-line, the function that reads a line of text
  8492. from a port, not readline, the function that reads a line from a
  8493. terminal, providing full editing capabilities.)
  8494. ** New module (ice-9 getopt-gnu-style): Parse command-line arguments.
  8495. This module provides some simple argument parsing. It exports one
  8496. function:
  8497. Function: getopt-gnu-style ARG-LS
  8498. Parse a list of program arguments into an alist of option
  8499. descriptions.
  8500. Each item in the list of program arguments is examined to see if
  8501. it meets the syntax of a GNU long-named option. An argument like
  8502. `--MUMBLE' produces an element of the form (MUMBLE . #t) in the
  8503. returned alist, where MUMBLE is a keyword object with the same
  8504. name as the argument. An argument like `--MUMBLE=FROB' produces
  8505. an element of the form (MUMBLE . FROB), where FROB is a string.
  8506. As a special case, the returned alist also contains a pair whose
  8507. car is the symbol `rest'. The cdr of this pair is a list
  8508. containing all the items in the argument list that are not options
  8509. of the form mentioned above.
  8510. The argument `--' is treated specially: all items in the argument
  8511. list appearing after such an argument are not examined, and are
  8512. returned in the special `rest' list.
  8513. This function does not parse normal single-character switches.
  8514. You will need to parse them out of the `rest' list yourself.
  8515. ** The read syntax for byte vectors and short vectors has changed.
  8516. Instead of #bytes(...), write #y(...).
  8517. Instead of #short(...), write #h(...).
  8518. This may seem nutty, but, like the other uniform vectors, byte vectors
  8519. and short vectors want to have the same print and read syntax (and,
  8520. more basic, want to have read syntax!). Changing the read syntax to
  8521. use multiple characters after the hash sign breaks with the
  8522. conventions used in R5RS and the conventions used for the other
  8523. uniform vectors. It also introduces complexity in the current reader,
  8524. both on the C and Scheme levels. (The Right solution is probably to
  8525. change the syntax and prototypes for uniform vectors entirely.)
  8526. ** The new module (ice-9 session) provides useful interactive functions.
  8527. *** New procedure: (apropos REGEXP OPTION ...)
  8528. Display a list of top-level variables whose names match REGEXP, and
  8529. the modules they are imported from. Each OPTION should be one of the
  8530. following symbols:
  8531. value --- Show the value of each matching variable.
  8532. shadow --- Show bindings shadowed by subsequently imported modules.
  8533. full --- Same as both `shadow' and `value'.
  8534. For example:
  8535. guile> (apropos "trace" 'full)
  8536. debug: trace #<procedure trace args>
  8537. debug: untrace #<procedure untrace args>
  8538. the-scm-module: display-backtrace #<compiled-closure #<primitive-procedure gsubr-apply>>
  8539. the-scm-module: before-backtrace-hook ()
  8540. the-scm-module: backtrace #<primitive-procedure backtrace>
  8541. the-scm-module: after-backtrace-hook ()
  8542. the-scm-module: has-shown-backtrace-hint? #f
  8543. guile>
  8544. ** There are new functions and syntax for working with macros.
  8545. Guile implements macros as a special object type. Any variable whose
  8546. top-level binding is a macro object acts as a macro. The macro object
  8547. specifies how the expression should be transformed before evaluation.
  8548. *** Macro objects now print in a reasonable way, resembling procedures.
  8549. *** New function: (macro? OBJ)
  8550. True iff OBJ is a macro object.
  8551. *** New function: (primitive-macro? OBJ)
  8552. Like (macro? OBJ), but true only if OBJ is one of the Guile primitive
  8553. macro transformers, implemented in eval.c rather than Scheme code.
  8554. Why do we have this function?
  8555. - For symmetry with procedure? and primitive-procedure?,
  8556. - to allow custom print procedures to tell whether a macro is
  8557. primitive, and display it differently, and
  8558. - to allow compilers and user-written evaluators to distinguish
  8559. builtin special forms from user-defined ones, which could be
  8560. compiled.
  8561. *** New function: (macro-type OBJ)
  8562. Return a value indicating what kind of macro OBJ is. Possible return
  8563. values are:
  8564. The symbol `syntax' --- a macro created by procedure->syntax.
  8565. The symbol `macro' --- a macro created by procedure->macro.
  8566. The symbol `macro!' --- a macro created by procedure->memoizing-macro.
  8567. The boolean #f --- if OBJ is not a macro object.
  8568. *** New function: (macro-name MACRO)
  8569. Return the name of the macro object MACRO's procedure, as returned by
  8570. procedure-name.
  8571. *** New function: (macro-transformer MACRO)
  8572. Return the transformer procedure for MACRO.
  8573. *** New syntax: (use-syntax MODULE ... TRANSFORMER)
  8574. Specify a new macro expander to use in the current module. Each
  8575. MODULE is a module name, with the same meaning as in the `use-modules'
  8576. form; each named module's exported bindings are added to the current
  8577. top-level environment. TRANSFORMER is an expression evaluated in the
  8578. resulting environment which must yield a procedure to use as the
  8579. module's eval transformer: every expression evaluated in this module
  8580. is passed to this function, and the result passed to the Guile
  8581. interpreter.
  8582. *** macro-eval! is removed. Use local-eval instead.
  8583. ** Some magic has been added to the printer to better handle user
  8584. written printing routines (like record printers, closure printers).
  8585. The problem is that these user written routines must have access to
  8586. the current `print-state' to be able to handle fancy things like
  8587. detection of circular references. These print-states have to be
  8588. passed to the builtin printing routines (display, write, etc) to
  8589. properly continue the print chain.
  8590. We didn't want to change all existing print code so that it
  8591. explicitly passes thru a print state in addition to a port. Instead,
  8592. we extented the possible values that the builtin printing routines
  8593. accept as a `port'. In addition to a normal port, they now also take
  8594. a pair of a normal port and a print-state. Printing will go to the
  8595. port and the print-state will be used to control the detection of
  8596. circular references, etc. If the builtin function does not care for a
  8597. print-state, it is simply ignored.
  8598. User written callbacks are now called with such a pair as their
  8599. `port', but because every function now accepts this pair as a PORT
  8600. argument, you don't have to worry about that. In fact, it is probably
  8601. safest to not check for these pairs.
  8602. However, it is sometimes necessary to continue a print chain on a
  8603. different port, for example to get a intermediate string
  8604. representation of the printed value, mangle that string somehow, and
  8605. then to finally print the mangled string. Use the new function
  8606. inherit-print-state OLD-PORT NEW-PORT
  8607. for this. It constructs a new `port' that prints to NEW-PORT but
  8608. inherits the print-state of OLD-PORT.
  8609. ** struct-vtable-offset renamed to vtable-offset-user
  8610. ** New constants: vtable-index-layout, vtable-index-vtable, vtable-index-printer
  8611. ** There is now a third optional argument to make-vtable-vtable
  8612. (and fourth to make-struct) when constructing new types (vtables).
  8613. This argument initializes field vtable-index-printer of the vtable.
  8614. ** The detection of circular references has been extended to structs.
  8615. That is, a structure that -- in the process of being printed -- prints
  8616. itself does not lead to infinite recursion.
  8617. ** There is now some basic support for fluids. Please read
  8618. "libguile/fluid.h" to find out more. It is accessible from Scheme with
  8619. the following functions and macros:
  8620. Function: make-fluid
  8621. Create a new fluid object. Fluids are not special variables or
  8622. some other extension to the semantics of Scheme, but rather
  8623. ordinary Scheme objects. You can store them into variables (that
  8624. are still lexically scoped, of course) or into any other place you
  8625. like. Every fluid has a initial value of `#f'.
  8626. Function: fluid? OBJ
  8627. Test whether OBJ is a fluid.
  8628. Function: fluid-ref FLUID
  8629. Function: fluid-set! FLUID VAL
  8630. Access/modify the fluid FLUID. Modifications are only visible
  8631. within the current dynamic root (that includes threads).
  8632. Function: with-fluids* FLUIDS VALUES THUNK
  8633. FLUIDS is a list of fluids and VALUES a corresponding list of
  8634. values for these fluids. Before THUNK gets called the values are
  8635. installed in the fluids and the old values of the fluids are
  8636. saved in the VALUES list. When the flow of control leaves THUNK
  8637. or reenters it, the values get swapped again. You might think of
  8638. this as a `safe-fluid-excursion'. Note that the VALUES list is
  8639. modified by `with-fluids*'.
  8640. Macro: with-fluids ((FLUID VALUE) ...) FORM ...
  8641. The same as `with-fluids*' but with a different syntax. It looks
  8642. just like `let', but both FLUID and VALUE are evaluated. Remember,
  8643. fluids are not special variables but ordinary objects. FLUID
  8644. should evaluate to a fluid.
  8645. ** Changes to system call interfaces:
  8646. *** close-port, close-input-port and close-output-port now return a
  8647. boolean instead of an `unspecified' object. #t means that the port
  8648. was successfully closed, while #f means it was already closed. It is
  8649. also now possible for these procedures to raise an exception if an
  8650. error occurs (some errors from write can be delayed until close.)
  8651. *** the first argument to chmod, fcntl, ftell and fseek can now be a
  8652. file descriptor.
  8653. *** the third argument to fcntl is now optional.
  8654. *** the first argument to chown can now be a file descriptor or a port.
  8655. *** the argument to stat can now be a port.
  8656. *** The following new procedures have been added (most use scsh
  8657. interfaces):
  8658. *** procedure: close PORT/FD
  8659. Similar to close-port (*note close-port: Closing Ports.), but also
  8660. works on file descriptors. A side effect of closing a file
  8661. descriptor is that any ports using that file descriptor are moved
  8662. to a different file descriptor and have their revealed counts set
  8663. to zero.
  8664. *** procedure: port->fdes PORT
  8665. Returns the integer file descriptor underlying PORT. As a side
  8666. effect the revealed count of PORT is incremented.
  8667. *** procedure: fdes->ports FDES
  8668. Returns a list of existing ports which have FDES as an underlying
  8669. file descriptor, without changing their revealed counts.
  8670. *** procedure: fdes->inport FDES
  8671. Returns an existing input port which has FDES as its underlying
  8672. file descriptor, if one exists, and increments its revealed count.
  8673. Otherwise, returns a new input port with a revealed count of 1.
  8674. *** procedure: fdes->outport FDES
  8675. Returns an existing output port which has FDES as its underlying
  8676. file descriptor, if one exists, and increments its revealed count.
  8677. Otherwise, returns a new output port with a revealed count of 1.
  8678. The next group of procedures perform a `dup2' system call, if NEWFD
  8679. (an integer) is supplied, otherwise a `dup'. The file descriptor to be
  8680. duplicated can be supplied as an integer or contained in a port. The
  8681. type of value returned varies depending on which procedure is used.
  8682. All procedures also have the side effect when performing `dup2' that
  8683. any ports using NEWFD are moved to a different file descriptor and have
  8684. their revealed counts set to zero.
  8685. *** procedure: dup->fdes PORT/FD [NEWFD]
  8686. Returns an integer file descriptor.
  8687. *** procedure: dup->inport PORT/FD [NEWFD]
  8688. Returns a new input port using the new file descriptor.
  8689. *** procedure: dup->outport PORT/FD [NEWFD]
  8690. Returns a new output port using the new file descriptor.
  8691. *** procedure: dup PORT/FD [NEWFD]
  8692. Returns a new port if PORT/FD is a port, with the same mode as the
  8693. supplied port, otherwise returns an integer file descriptor.
  8694. *** procedure: dup->port PORT/FD MODE [NEWFD]
  8695. Returns a new port using the new file descriptor. MODE supplies a
  8696. mode string for the port (*note open-file: File Ports.).
  8697. *** procedure: setenv NAME VALUE
  8698. Modifies the environment of the current process, which is also the
  8699. default environment inherited by child processes.
  8700. If VALUE is `#f', then NAME is removed from the environment.
  8701. Otherwise, the string NAME=VALUE is added to the environment,
  8702. replacing any existing string with name matching NAME.
  8703. The return value is unspecified.
  8704. *** procedure: truncate-file OBJ SIZE
  8705. Truncates the file referred to by OBJ to at most SIZE bytes. OBJ
  8706. can be a string containing a file name or an integer file
  8707. descriptor or port open for output on the file. The underlying
  8708. system calls are `truncate' and `ftruncate'.
  8709. The return value is unspecified.
  8710. *** procedure: setvbuf PORT MODE [SIZE]
  8711. Set the buffering mode for PORT. MODE can be:
  8712. `_IONBF'
  8713. non-buffered
  8714. `_IOLBF'
  8715. line buffered
  8716. `_IOFBF'
  8717. block buffered, using a newly allocated buffer of SIZE bytes.
  8718. However if SIZE is zero or unspecified, the port will be made
  8719. non-buffered.
  8720. This procedure should not be used after I/O has been performed with
  8721. the port.
  8722. Ports are usually block buffered by default, with a default buffer
  8723. size. Procedures e.g., *Note open-file: File Ports, which accept a
  8724. mode string allow `0' to be added to request an unbuffered port.
  8725. *** procedure: fsync PORT/FD
  8726. Copies any unwritten data for the specified output file descriptor
  8727. to disk. If PORT/FD is a port, its buffer is flushed before the
  8728. underlying file descriptor is fsync'd. The return value is
  8729. unspecified.
  8730. *** procedure: open-fdes PATH FLAGS [MODES]
  8731. Similar to `open' but returns a file descriptor instead of a port.
  8732. *** procedure: execle PATH ENV [ARG] ...
  8733. Similar to `execl', but the environment of the new process is
  8734. specified by ENV, which must be a list of strings as returned by
  8735. the `environ' procedure.
  8736. This procedure is currently implemented using the `execve' system
  8737. call, but we call it `execle' because of its Scheme calling
  8738. interface.
  8739. *** procedure: strerror ERRNO
  8740. Returns the Unix error message corresponding to ERRNO, an integer.
  8741. *** procedure: primitive-exit [STATUS]
  8742. Terminate the current process without unwinding the Scheme stack.
  8743. This is would typically be useful after a fork. The exit status
  8744. is STATUS if supplied, otherwise zero.
  8745. *** procedure: times
  8746. Returns an object with information about real and processor time.
  8747. The following procedures accept such an object as an argument and
  8748. return a selected component:
  8749. `tms:clock'
  8750. The current real time, expressed as time units relative to an
  8751. arbitrary base.
  8752. `tms:utime'
  8753. The CPU time units used by the calling process.
  8754. `tms:stime'
  8755. The CPU time units used by the system on behalf of the
  8756. calling process.
  8757. `tms:cutime'
  8758. The CPU time units used by terminated child processes of the
  8759. calling process, whose status has been collected (e.g., using
  8760. `waitpid').
  8761. `tms:cstime'
  8762. Similarly, the CPU times units used by the system on behalf of
  8763. terminated child processes.
  8764. ** Removed: list-length
  8765. ** Removed: list-append, list-append!
  8766. ** Removed: list-reverse, list-reverse!
  8767. ** array-map renamed to array-map!
  8768. ** serial-array-map renamed to serial-array-map!
  8769. ** catch doesn't take #f as first argument any longer
  8770. Previously, it was possible to pass #f instead of a key to `catch'.
  8771. That would cause `catch' to pass a jump buffer object to the procedure
  8772. passed as second argument. The procedure could then use this jump
  8773. buffer objekt as an argument to throw.
  8774. This mechanism has been removed since its utility doesn't motivate the
  8775. extra complexity it introduces.
  8776. ** The `#/' notation for lists now provokes a warning message from Guile.
  8777. This syntax will be removed from Guile in the near future.
  8778. To disable the warning message, set the GUILE_HUSH environment
  8779. variable to any non-empty value.
  8780. ** The newline character now prints as `#\newline', following the
  8781. normal Scheme notation, not `#\nl'.
  8782. * Changes to the gh_ interface
  8783. ** The gh_enter function now takes care of loading the Guile startup files.
  8784. gh_enter works by calling scm_boot_guile; see the remarks below.
  8785. ** Function: void gh_write (SCM x)
  8786. Write the printed representation of the scheme object x to the current
  8787. output port. Corresponds to the scheme level `write'.
  8788. ** gh_list_length renamed to gh_length.
  8789. ** vector handling routines
  8790. Several major changes. In particular, gh_vector() now resembles
  8791. (vector ...) (with a caveat -- see manual), and gh_make_vector() now
  8792. exists and behaves like (make-vector ...). gh_vset() and gh_vref()
  8793. have been renamed gh_vector_set_x() and gh_vector_ref(). Some missing
  8794. vector-related gh_ functions have been implemented.
  8795. ** pair and list routines
  8796. Implemented several of the R4RS pair and list functions that were
  8797. missing.
  8798. ** gh_scm2doubles, gh_doubles2scm, gh_doubles2dvect
  8799. New function. Converts double arrays back and forth between Scheme
  8800. and C.
  8801. * Changes to the scm_ interface
  8802. ** The function scm_boot_guile now takes care of loading the startup files.
  8803. Guile's primary initialization function, scm_boot_guile, now takes
  8804. care of loading `boot-9.scm', in the `ice-9' module, to initialize
  8805. Guile, define the module system, and put together some standard
  8806. bindings. It also loads `init.scm', which is intended to hold
  8807. site-specific initialization code.
  8808. Since Guile cannot operate properly until boot-9.scm is loaded, there
  8809. is no reason to separate loading boot-9.scm from Guile's other
  8810. initialization processes.
  8811. This job used to be done by scm_compile_shell_switches, which didn't
  8812. make much sense; in particular, it meant that people using Guile for
  8813. non-shell-like applications had to jump through hoops to get Guile
  8814. initialized properly.
  8815. ** The function scm_compile_shell_switches no longer loads the startup files.
  8816. Now, Guile always loads the startup files, whenever it is initialized;
  8817. see the notes above for scm_boot_guile and scm_load_startup_files.
  8818. ** Function: scm_load_startup_files
  8819. This new function takes care of loading Guile's initialization file
  8820. (`boot-9.scm'), and the site initialization file, `init.scm'. Since
  8821. this is always called by the Guile initialization process, it's
  8822. probably not too useful to call this yourself, but it's there anyway.
  8823. ** The semantics of smob marking have changed slightly.
  8824. The smob marking function (the `mark' member of the scm_smobfuns
  8825. structure) is no longer responsible for setting the mark bit on the
  8826. smob. The generic smob handling code in the garbage collector will
  8827. set this bit. The mark function need only ensure that any other
  8828. objects the smob refers to get marked.
  8829. Note that this change means that the smob's GC8MARK bit is typically
  8830. already set upon entry to the mark function. Thus, marking functions
  8831. which look like this:
  8832. {
  8833. if (SCM_GC8MARKP (ptr))
  8834. return SCM_BOOL_F;
  8835. SCM_SETGC8MARK (ptr);
  8836. ... mark objects to which the smob refers ...
  8837. }
  8838. are now incorrect, since they will return early, and fail to mark any
  8839. other objects the smob refers to. Some code in the Guile library used
  8840. to work this way.
  8841. ** The semantics of the I/O port functions in scm_ptobfuns have changed.
  8842. If you have implemented your own I/O port type, by writing the
  8843. functions required by the scm_ptobfuns and then calling scm_newptob,
  8844. you will need to change your functions slightly.
  8845. The functions in a scm_ptobfuns structure now expect the port itself
  8846. as their argument; they used to expect the `stream' member of the
  8847. port's scm_port_table structure. This allows functions in an
  8848. scm_ptobfuns structure to easily access the port's cell (and any flags
  8849. it its CAR), and the port's scm_port_table structure.
  8850. Guile now passes the I/O port itself as the `port' argument in the
  8851. following scm_ptobfuns functions:
  8852. int (*free) (SCM port);
  8853. int (*fputc) (int, SCM port);
  8854. int (*fputs) (char *, SCM port);
  8855. scm_sizet (*fwrite) SCM_P ((char *ptr,
  8856. scm_sizet size,
  8857. scm_sizet nitems,
  8858. SCM port));
  8859. int (*fflush) (SCM port);
  8860. int (*fgetc) (SCM port);
  8861. int (*fclose) (SCM port);
  8862. The interfaces to the `mark', `print', `equalp', and `fgets' methods
  8863. are unchanged.
  8864. If you have existing code which defines its own port types, it is easy
  8865. to convert your code to the new interface; simply apply SCM_STREAM to
  8866. the port argument to yield the value you code used to expect.
  8867. Note that since both the port and the stream have the same type in the
  8868. C code --- they are both SCM values --- the C compiler will not remind
  8869. you if you forget to update your scm_ptobfuns functions.
  8870. ** Function: int scm_internal_select (int fds,
  8871. SELECT_TYPE *rfds,
  8872. SELECT_TYPE *wfds,
  8873. SELECT_TYPE *efds,
  8874. struct timeval *timeout);
  8875. This is a replacement for the `select' function provided by the OS.
  8876. It enables I/O blocking and sleeping to happen for one cooperative
  8877. thread without blocking other threads. It also avoids busy-loops in
  8878. these situations. It is intended that all I/O blocking and sleeping
  8879. will finally go through this function. Currently, this function is
  8880. only available on systems providing `gettimeofday' and `select'.
  8881. ** Function: SCM scm_internal_stack_catch (SCM tag,
  8882. scm_catch_body_t body,
  8883. void *body_data,
  8884. scm_catch_handler_t handler,
  8885. void *handler_data)
  8886. A new sibling to the other two C level `catch' functions
  8887. scm_internal_catch and scm_internal_lazy_catch. Use it if you want
  8888. the stack to be saved automatically into the variable `the-last-stack'
  8889. (scm_the_last_stack_var) on error. This is necessary if you want to
  8890. use advanced error reporting, such as calling scm_display_error and
  8891. scm_display_backtrace. (They both take a stack object as argument.)
  8892. ** Function: SCM scm_spawn_thread (scm_catch_body_t body,
  8893. void *body_data,
  8894. scm_catch_handler_t handler,
  8895. void *handler_data)
  8896. Spawns a new thread. It does a job similar to
  8897. scm_call_with_new_thread but takes arguments more suitable when
  8898. spawning threads from application C code.
  8899. ** The hook scm_error_callback has been removed. It was originally
  8900. intended as a way for the user to install his own error handler. But
  8901. that method works badly since it intervenes between throw and catch,
  8902. thereby changing the semantics of expressions like (catch #t ...).
  8903. The correct way to do it is to use one of the C level catch functions
  8904. in throw.c: scm_internal_catch/lazy_catch/stack_catch.
  8905. ** Removed functions:
  8906. scm_obj_length, scm_list_length, scm_list_append, scm_list_append_x,
  8907. scm_list_reverse, scm_list_reverse_x
  8908. ** New macros: SCM_LISTn where n is one of the integers 0-9.
  8909. These can be used for pretty list creation from C. The idea is taken
  8910. from Erick Gallesio's STk.
  8911. ** scm_array_map renamed to scm_array_map_x
  8912. ** mbstrings are now removed
  8913. This means that the type codes scm_tc7_mb_string and
  8914. scm_tc7_mb_substring has been removed.
  8915. ** scm_gen_putc, scm_gen_puts, scm_gen_write, and scm_gen_getc have changed.
  8916. Since we no longer support multi-byte strings, these I/O functions
  8917. have been simplified, and renamed. Here are their old names, and
  8918. their new names and arguments:
  8919. scm_gen_putc -> void scm_putc (int c, SCM port);
  8920. scm_gen_puts -> void scm_puts (char *s, SCM port);
  8921. scm_gen_write -> void scm_lfwrite (char *ptr, scm_sizet size, SCM port);
  8922. scm_gen_getc -> void scm_getc (SCM port);
  8923. ** The macros SCM_TYP7D and SCM_TYP7SD has been removed.
  8924. ** The macro SCM_TYP7S has taken the role of the old SCM_TYP7D
  8925. SCM_TYP7S now masks away the bit which distinguishes substrings from
  8926. strings.
  8927. ** scm_catch_body_t: Backward incompatible change!
  8928. Body functions to scm_internal_catch and friends do not any longer
  8929. take a second argument. This is because it is no longer possible to
  8930. pass a #f arg to catch.
  8931. ** Calls to scm_protect_object and scm_unprotect now nest properly.
  8932. The function scm_protect_object protects its argument from being freed
  8933. by the garbage collector. scm_unprotect_object removes that
  8934. protection.
  8935. These functions now nest properly. That is, for every object O, there
  8936. is a counter which scm_protect_object(O) increments and
  8937. scm_unprotect_object(O) decrements, if the counter is greater than
  8938. zero. Every object's counter is zero when it is first created. If an
  8939. object's counter is greater than zero, the garbage collector will not
  8940. reclaim its storage.
  8941. This allows you to use scm_protect_object in your code without
  8942. worrying that some other function you call will call
  8943. scm_unprotect_object, and allow it to be freed. Assuming that the
  8944. functions you call are well-behaved, and unprotect only those objects
  8945. they protect, you can follow the same rule and have confidence that
  8946. objects will be freed only at appropriate times.
  8947. Changes in Guile 1.2 (released Tuesday, June 24 1997):
  8948. * Changes to the distribution
  8949. ** Nightly snapshots are now available from ftp.red-bean.com.
  8950. The old server, ftp.cyclic.com, has been relinquished to its rightful
  8951. owner.
  8952. Nightly snapshots of the Guile development sources are now available via
  8953. anonymous FTP from ftp.red-bean.com, as /pub/guile/guile-snap.tar.gz.
  8954. Via the web, that's: ftp://ftp.red-bean.com/pub/guile/guile-snap.tar.gz
  8955. For getit, that's: ftp.red-bean.com:/pub/guile/guile-snap.tar.gz
  8956. ** To run Guile without installing it, the procedure has changed a bit.
  8957. If you used a separate build directory to compile Guile, you'll need
  8958. to include the build directory in SCHEME_LOAD_PATH, as well as the
  8959. source directory. See the `INSTALL' file for examples.
  8960. * Changes to the procedure for linking libguile with your programs
  8961. ** The standard Guile load path for Scheme code now includes
  8962. $(datadir)/guile (usually /usr/local/share/guile). This means that
  8963. you can install your own Scheme files there, and Guile will find them.
  8964. (Previous versions of Guile only checked a directory whose name
  8965. contained the Guile version number, so you had to re-install or move
  8966. your Scheme sources each time you installed a fresh version of Guile.)
  8967. The load path also includes $(datadir)/guile/site; we recommend
  8968. putting individual Scheme files there. If you want to install a
  8969. package with multiple source files, create a directory for them under
  8970. $(datadir)/guile.
  8971. ** Guile 1.2 will now use the Rx regular expression library, if it is
  8972. installed on your system. When you are linking libguile into your own
  8973. programs, this means you will have to link against -lguile, -lqt (if
  8974. you configured Guile with thread support), and -lrx.
  8975. If you are using autoconf to generate configuration scripts for your
  8976. application, the following lines should suffice to add the appropriate
  8977. libraries to your link command:
  8978. ### Find Rx, quickthreads and libguile.
  8979. AC_CHECK_LIB(rx, main)
  8980. AC_CHECK_LIB(qt, main)
  8981. AC_CHECK_LIB(guile, scm_shell)
  8982. The Guile 1.2 distribution does not contain sources for the Rx
  8983. library, as Guile 1.0 did. If you want to use Rx, you'll need to
  8984. retrieve it from a GNU FTP site and install it separately.
  8985. * Changes to Scheme functions and syntax
  8986. ** The dynamic linking features of Guile are now enabled by default.
  8987. You can disable them by giving the `--disable-dynamic-linking' option
  8988. to configure.
  8989. (dynamic-link FILENAME)
  8990. Find the object file denoted by FILENAME (a string) and link it
  8991. into the running Guile application. When everything works out,
  8992. return a Scheme object suitable for representing the linked object
  8993. file. Otherwise an error is thrown. How object files are
  8994. searched is system dependent.
  8995. (dynamic-object? VAL)
  8996. Determine whether VAL represents a dynamically linked object file.
  8997. (dynamic-unlink DYNOBJ)
  8998. Unlink the indicated object file from the application. DYNOBJ
  8999. should be one of the values returned by `dynamic-link'.
  9000. (dynamic-func FUNCTION DYNOBJ)
  9001. Search the C function indicated by FUNCTION (a string or symbol)
  9002. in DYNOBJ and return some Scheme object that can later be used
  9003. with `dynamic-call' to actually call this function. Right now,
  9004. these Scheme objects are formed by casting the address of the
  9005. function to `long' and converting this number to its Scheme
  9006. representation.
  9007. (dynamic-call FUNCTION DYNOBJ)
  9008. Call the C function indicated by FUNCTION and DYNOBJ. The
  9009. function is passed no arguments and its return value is ignored.
  9010. When FUNCTION is something returned by `dynamic-func', call that
  9011. function and ignore DYNOBJ. When FUNCTION is a string (or symbol,
  9012. etc.), look it up in DYNOBJ; this is equivalent to
  9013. (dynamic-call (dynamic-func FUNCTION DYNOBJ) #f)
  9014. Interrupts are deferred while the C function is executing (with
  9015. SCM_DEFER_INTS/SCM_ALLOW_INTS).
  9016. (dynamic-args-call FUNCTION DYNOBJ ARGS)
  9017. Call the C function indicated by FUNCTION and DYNOBJ, but pass it
  9018. some arguments and return its return value. The C function is
  9019. expected to take two arguments and return an `int', just like
  9020. `main':
  9021. int c_func (int argc, char **argv);
  9022. ARGS must be a list of strings and is converted into an array of
  9023. `char *'. The array is passed in ARGV and its size in ARGC. The
  9024. return value is converted to a Scheme number and returned from the
  9025. call to `dynamic-args-call'.
  9026. When dynamic linking is disabled or not supported on your system,
  9027. the above functions throw errors, but they are still available.
  9028. Here is a small example that works on GNU/Linux:
  9029. (define libc-obj (dynamic-link "libc.so"))
  9030. (dynamic-args-call 'rand libc-obj '())
  9031. See the file `libguile/DYNAMIC-LINKING' for additional comments.
  9032. ** The #/ syntax for module names is depreciated, and will be removed
  9033. in a future version of Guile. Instead of
  9034. #/foo/bar/baz
  9035. instead write
  9036. (foo bar baz)
  9037. The latter syntax is more consistent with existing Lisp practice.
  9038. ** Guile now does fancier printing of structures. Structures are the
  9039. underlying implementation for records, which in turn are used to
  9040. implement modules, so all of these object now print differently and in
  9041. a more informative way.
  9042. The Scheme printer will examine the builtin variable *struct-printer*
  9043. whenever it needs to print a structure object. When this variable is
  9044. not `#f' it is deemed to be a procedure and will be applied to the
  9045. structure object and the output port. When *struct-printer* is `#f'
  9046. or the procedure return `#f' the structure object will be printed in
  9047. the boring #<struct 80458270> form.
  9048. This hook is used by some routines in ice-9/boot-9.scm to implement
  9049. type specific printing routines. Please read the comments there about
  9050. "printing structs".
  9051. One of the more specific uses of structs are records. The printing
  9052. procedure that could be passed to MAKE-RECORD-TYPE is now actually
  9053. called. It should behave like a *struct-printer* procedure (described
  9054. above).
  9055. ** Guile now supports a new R4RS-compliant syntax for keywords. A
  9056. token of the form #:NAME, where NAME has the same syntax as a Scheme
  9057. symbol, is the external representation of the keyword named NAME.
  9058. Keyword objects print using this syntax as well, so values containing
  9059. keyword objects can be read back into Guile. When used in an
  9060. expression, keywords are self-quoting objects.
  9061. Guile suports this read syntax, and uses this print syntax, regardless
  9062. of the current setting of the `keyword' read option. The `keyword'
  9063. read option only controls whether Guile recognizes the `:NAME' syntax,
  9064. which is incompatible with R4RS. (R4RS says such token represent
  9065. symbols.)
  9066. ** Guile has regular expression support again. Guile 1.0 included
  9067. functions for matching regular expressions, based on the Rx library.
  9068. In Guile 1.1, the Guile/Rx interface was removed to simplify the
  9069. distribution, and thus Guile had no regular expression support. Guile
  9070. 1.2 again supports the most commonly used functions, and supports all
  9071. of SCSH's regular expression functions.
  9072. If your system does not include a POSIX regular expression library,
  9073. and you have not linked Guile with a third-party regexp library such as
  9074. Rx, these functions will not be available. You can tell whether your
  9075. Guile installation includes regular expression support by checking
  9076. whether the `*features*' list includes the `regex' symbol.
  9077. *** regexp functions
  9078. By default, Guile supports POSIX extended regular expressions. That
  9079. means that the characters `(', `)', `+' and `?' are special, and must
  9080. be escaped if you wish to match the literal characters.
  9081. This regular expression interface was modeled after that implemented
  9082. by SCSH, the Scheme Shell. It is intended to be upwardly compatible
  9083. with SCSH regular expressions.
  9084. **** Function: string-match PATTERN STR [START]
  9085. Compile the string PATTERN into a regular expression and compare
  9086. it with STR. The optional numeric argument START specifies the
  9087. position of STR at which to begin matching.
  9088. `string-match' returns a "match structure" which describes what,
  9089. if anything, was matched by the regular expression. *Note Match
  9090. Structures::. If STR does not match PATTERN at all,
  9091. `string-match' returns `#f'.
  9092. Each time `string-match' is called, it must compile its PATTERN
  9093. argument into a regular expression structure. This operation is
  9094. expensive, which makes `string-match' inefficient if the same regular
  9095. expression is used several times (for example, in a loop). For better
  9096. performance, you can compile a regular expression in advance and then
  9097. match strings against the compiled regexp.
  9098. **** Function: make-regexp STR [FLAGS]
  9099. Compile the regular expression described by STR, and return the
  9100. compiled regexp structure. If STR does not describe a legal
  9101. regular expression, `make-regexp' throws a
  9102. `regular-expression-syntax' error.
  9103. FLAGS may be the bitwise-or of one or more of the following:
  9104. **** Constant: regexp/extended
  9105. Use POSIX Extended Regular Expression syntax when interpreting
  9106. STR. If not set, POSIX Basic Regular Expression syntax is used.
  9107. If the FLAGS argument is omitted, we assume regexp/extended.
  9108. **** Constant: regexp/icase
  9109. Do not differentiate case. Subsequent searches using the
  9110. returned regular expression will be case insensitive.
  9111. **** Constant: regexp/newline
  9112. Match-any-character operators don't match a newline.
  9113. A non-matching list ([^...]) not containing a newline matches a
  9114. newline.
  9115. Match-beginning-of-line operator (^) matches the empty string
  9116. immediately after a newline, regardless of whether the FLAGS
  9117. passed to regexp-exec contain regexp/notbol.
  9118. Match-end-of-line operator ($) matches the empty string
  9119. immediately before a newline, regardless of whether the FLAGS
  9120. passed to regexp-exec contain regexp/noteol.
  9121. **** Function: regexp-exec REGEXP STR [START [FLAGS]]
  9122. Match the compiled regular expression REGEXP against `str'. If
  9123. the optional integer START argument is provided, begin matching
  9124. from that position in the string. Return a match structure
  9125. describing the results of the match, or `#f' if no match could be
  9126. found.
  9127. FLAGS may be the bitwise-or of one or more of the following:
  9128. **** Constant: regexp/notbol
  9129. The match-beginning-of-line operator always fails to match (but
  9130. see the compilation flag regexp/newline above) This flag may be
  9131. used when different portions of a string are passed to
  9132. regexp-exec and the beginning of the string should not be
  9133. interpreted as the beginning of the line.
  9134. **** Constant: regexp/noteol
  9135. The match-end-of-line operator always fails to match (but see the
  9136. compilation flag regexp/newline above)
  9137. **** Function: regexp? OBJ
  9138. Return `#t' if OBJ is a compiled regular expression, or `#f'
  9139. otherwise.
  9140. Regular expressions are commonly used to find patterns in one string
  9141. and replace them with the contents of another string.
  9142. **** Function: regexp-substitute PORT MATCH [ITEM...]
  9143. Write to the output port PORT selected contents of the match
  9144. structure MATCH. Each ITEM specifies what should be written, and
  9145. may be one of the following arguments:
  9146. * A string. String arguments are written out verbatim.
  9147. * An integer. The submatch with that number is written.
  9148. * The symbol `pre'. The portion of the matched string preceding
  9149. the regexp match is written.
  9150. * The symbol `post'. The portion of the matched string
  9151. following the regexp match is written.
  9152. PORT may be `#f', in which case nothing is written; instead,
  9153. `regexp-substitute' constructs a string from the specified ITEMs
  9154. and returns that.
  9155. **** Function: regexp-substitute/global PORT REGEXP TARGET [ITEM...]
  9156. Similar to `regexp-substitute', but can be used to perform global
  9157. substitutions on STR. Instead of taking a match structure as an
  9158. argument, `regexp-substitute/global' takes two string arguments: a
  9159. REGEXP string describing a regular expression, and a TARGET string
  9160. which should be matched against this regular expression.
  9161. Each ITEM behaves as in REGEXP-SUBSTITUTE, with the following
  9162. exceptions:
  9163. * A function may be supplied. When this function is called, it
  9164. will be passed one argument: a match structure for a given
  9165. regular expression match. It should return a string to be
  9166. written out to PORT.
  9167. * The `post' symbol causes `regexp-substitute/global' to recurse
  9168. on the unmatched portion of STR. This *must* be supplied in
  9169. order to perform global search-and-replace on STR; if it is
  9170. not present among the ITEMs, then `regexp-substitute/global'
  9171. will return after processing a single match.
  9172. *** Match Structures
  9173. A "match structure" is the object returned by `string-match' and
  9174. `regexp-exec'. It describes which portion of a string, if any, matched
  9175. the given regular expression. Match structures include: a reference to
  9176. the string that was checked for matches; the starting and ending
  9177. positions of the regexp match; and, if the regexp included any
  9178. parenthesized subexpressions, the starting and ending positions of each
  9179. submatch.
  9180. In each of the regexp match functions described below, the `match'
  9181. argument must be a match structure returned by a previous call to
  9182. `string-match' or `regexp-exec'. Most of these functions return some
  9183. information about the original target string that was matched against a
  9184. regular expression; we will call that string TARGET for easy reference.
  9185. **** Function: regexp-match? OBJ
  9186. Return `#t' if OBJ is a match structure returned by a previous
  9187. call to `regexp-exec', or `#f' otherwise.
  9188. **** Function: match:substring MATCH [N]
  9189. Return the portion of TARGET matched by subexpression number N.
  9190. Submatch 0 (the default) represents the entire regexp match. If
  9191. the regular expression as a whole matched, but the subexpression
  9192. number N did not match, return `#f'.
  9193. **** Function: match:start MATCH [N]
  9194. Return the starting position of submatch number N.
  9195. **** Function: match:end MATCH [N]
  9196. Return the ending position of submatch number N.
  9197. **** Function: match:prefix MATCH
  9198. Return the unmatched portion of TARGET preceding the regexp match.
  9199. **** Function: match:suffix MATCH
  9200. Return the unmatched portion of TARGET following the regexp match.
  9201. **** Function: match:count MATCH
  9202. Return the number of parenthesized subexpressions from MATCH.
  9203. Note that the entire regular expression match itself counts as a
  9204. subexpression, and failed submatches are included in the count.
  9205. **** Function: match:string MATCH
  9206. Return the original TARGET string.
  9207. *** Backslash Escapes
  9208. Sometimes you will want a regexp to match characters like `*' or `$'
  9209. exactly. For example, to check whether a particular string represents
  9210. a menu entry from an Info node, it would be useful to match it against
  9211. a regexp like `^* [^:]*::'. However, this won't work; because the
  9212. asterisk is a metacharacter, it won't match the `*' at the beginning of
  9213. the string. In this case, we want to make the first asterisk un-magic.
  9214. You can do this by preceding the metacharacter with a backslash
  9215. character `\'. (This is also called "quoting" the metacharacter, and
  9216. is known as a "backslash escape".) When Guile sees a backslash in a
  9217. regular expression, it considers the following glyph to be an ordinary
  9218. character, no matter what special meaning it would ordinarily have.
  9219. Therefore, we can make the above example work by changing the regexp to
  9220. `^\* [^:]*::'. The `\*' sequence tells the regular expression engine
  9221. to match only a single asterisk in the target string.
  9222. Since the backslash is itself a metacharacter, you may force a
  9223. regexp to match a backslash in the target string by preceding the
  9224. backslash with itself. For example, to find variable references in a
  9225. TeX program, you might want to find occurrences of the string `\let\'
  9226. followed by any number of alphabetic characters. The regular expression
  9227. `\\let\\[A-Za-z]*' would do this: the double backslashes in the regexp
  9228. each match a single backslash in the target string.
  9229. **** Function: regexp-quote STR
  9230. Quote each special character found in STR with a backslash, and
  9231. return the resulting string.
  9232. *Very important:* Using backslash escapes in Guile source code (as
  9233. in Emacs Lisp or C) can be tricky, because the backslash character has
  9234. special meaning for the Guile reader. For example, if Guile encounters
  9235. the character sequence `\n' in the middle of a string while processing
  9236. Scheme code, it replaces those characters with a newline character.
  9237. Similarly, the character sequence `\t' is replaced by a horizontal tab.
  9238. Several of these "escape sequences" are processed by the Guile reader
  9239. before your code is executed. Unrecognized escape sequences are
  9240. ignored: if the characters `\*' appear in a string, they will be
  9241. translated to the single character `*'.
  9242. This translation is obviously undesirable for regular expressions,
  9243. since we want to be able to include backslashes in a string in order to
  9244. escape regexp metacharacters. Therefore, to make sure that a backslash
  9245. is preserved in a string in your Guile program, you must use *two*
  9246. consecutive backslashes:
  9247. (define Info-menu-entry-pattern (make-regexp "^\\* [^:]*"))
  9248. The string in this example is preprocessed by the Guile reader before
  9249. any code is executed. The resulting argument to `make-regexp' is the
  9250. string `^\* [^:]*', which is what we really want.
  9251. This also means that in order to write a regular expression that
  9252. matches a single backslash character, the regular expression string in
  9253. the source code must include *four* backslashes. Each consecutive pair
  9254. of backslashes gets translated by the Guile reader to a single
  9255. backslash, and the resulting double-backslash is interpreted by the
  9256. regexp engine as matching a single backslash character. Hence:
  9257. (define tex-variable-pattern (make-regexp "\\\\let\\\\=[A-Za-z]*"))
  9258. The reason for the unwieldiness of this syntax is historical. Both
  9259. regular expression pattern matchers and Unix string processing systems
  9260. have traditionally used backslashes with the special meanings described
  9261. above. The POSIX regular expression specification and ANSI C standard
  9262. both require these semantics. Attempting to abandon either convention
  9263. would cause other kinds of compatibility problems, possibly more severe
  9264. ones. Therefore, without extending the Scheme reader to support
  9265. strings with different quoting conventions (an ungainly and confusing
  9266. extension when implemented in other languages), we must adhere to this
  9267. cumbersome escape syntax.
  9268. * Changes to the gh_ interface
  9269. * Changes to the scm_ interface
  9270. * Changes to system call interfaces:
  9271. ** The value returned by `raise' is now unspecified. It throws an exception
  9272. if an error occurs.
  9273. *** A new procedure `sigaction' can be used to install signal handlers
  9274. (sigaction signum [action] [flags])
  9275. signum is the signal number, which can be specified using the value
  9276. of SIGINT etc.
  9277. If action is omitted, sigaction returns a pair: the CAR is the current
  9278. signal hander, which will be either an integer with the value SIG_DFL
  9279. (default action) or SIG_IGN (ignore), or the Scheme procedure which
  9280. handles the signal, or #f if a non-Scheme procedure handles the
  9281. signal. The CDR contains the current sigaction flags for the handler.
  9282. If action is provided, it is installed as the new handler for signum.
  9283. action can be a Scheme procedure taking one argument, or the value of
  9284. SIG_DFL (default action) or SIG_IGN (ignore), or #f to restore
  9285. whatever signal handler was installed before sigaction was first used.
  9286. Flags can optionally be specified for the new handler (SA_RESTART is
  9287. always used if the system provides it, so need not be specified.) The
  9288. return value is a pair with information about the old handler as
  9289. described above.
  9290. This interface does not provide access to the "signal blocking"
  9291. facility. Maybe this is not needed, since the thread support may
  9292. provide solutions to the problem of consistent access to data
  9293. structures.
  9294. *** A new procedure `flush-all-ports' is equivalent to running
  9295. `force-output' on every port open for output.
  9296. ** Guile now provides information on how it was built, via the new
  9297. global variable, %guile-build-info. This variable records the values
  9298. of the standard GNU makefile directory variables as an assocation
  9299. list, mapping variable names (symbols) onto directory paths (strings).
  9300. For example, to find out where the Guile link libraries were
  9301. installed, you can say:
  9302. guile -c "(display (assq-ref %guile-build-info 'libdir)) (newline)"
  9303. * Changes to the scm_ interface
  9304. ** The new function scm_handle_by_message_noexit is just like the
  9305. existing scm_handle_by_message function, except that it doesn't call
  9306. exit to terminate the process. Instead, it prints a message and just
  9307. returns #f. This might be a more appropriate catch-all handler for
  9308. new dynamic roots and threads.
  9309. Changes in Guile 1.1 (released Friday, May 16 1997):
  9310. * Changes to the distribution.
  9311. The Guile 1.0 distribution has been split up into several smaller
  9312. pieces:
  9313. guile-core --- the Guile interpreter itself.
  9314. guile-tcltk --- the interface between the Guile interpreter and
  9315. Tcl/Tk; Tcl is an interpreter for a stringy language, and Tk
  9316. is a toolkit for building graphical user interfaces.
  9317. guile-rgx-ctax --- the interface between Guile and the Rx regular
  9318. expression matcher, and the translator for the Ctax
  9319. programming language. These are packaged together because the
  9320. Ctax translator uses Rx to parse Ctax source code.
  9321. This NEWS file describes the changes made to guile-core since the 1.0
  9322. release.
  9323. We no longer distribute the documentation, since it was either out of
  9324. date, or incomplete. As soon as we have current documentation, we
  9325. will distribute it.
  9326. * Changes to the stand-alone interpreter
  9327. ** guile now accepts command-line arguments compatible with SCSH, Olin
  9328. Shivers' Scheme Shell.
  9329. In general, arguments are evaluated from left to right, but there are
  9330. exceptions. The following switches stop argument processing, and
  9331. stash all remaining command-line arguments as the value returned by
  9332. the (command-line) function.
  9333. -s SCRIPT load Scheme source code from FILE, and exit
  9334. -c EXPR evalute Scheme expression EXPR, and exit
  9335. -- stop scanning arguments; run interactively
  9336. The switches below are processed as they are encountered.
  9337. -l FILE load Scheme source code from FILE
  9338. -e FUNCTION after reading script, apply FUNCTION to
  9339. command line arguments
  9340. -ds do -s script at this point
  9341. --emacs enable Emacs protocol (experimental)
  9342. -h, --help display this help and exit
  9343. -v, --version display version information and exit
  9344. \ read arguments from following script lines
  9345. So, for example, here is a Guile script named `ekko' (thanks, Olin)
  9346. which re-implements the traditional "echo" command:
  9347. #!/usr/local/bin/guile -s
  9348. !#
  9349. (define (main args)
  9350. (map (lambda (arg) (display arg) (display " "))
  9351. (cdr args))
  9352. (newline))
  9353. (main (command-line))
  9354. Suppose we invoke this script as follows:
  9355. ekko a speckled gecko
  9356. Through the magic of Unix script processing (triggered by the `#!'
  9357. token at the top of the file), /usr/local/bin/guile receives the
  9358. following list of command-line arguments:
  9359. ("-s" "./ekko" "a" "speckled" "gecko")
  9360. Unix inserts the name of the script after the argument specified on
  9361. the first line of the file (in this case, "-s"), and then follows that
  9362. with the arguments given to the script. Guile loads the script, which
  9363. defines the `main' function, and then applies it to the list of
  9364. remaining command-line arguments, ("a" "speckled" "gecko").
  9365. In Unix, the first line of a script file must take the following form:
  9366. #!INTERPRETER ARGUMENT
  9367. where INTERPRETER is the absolute filename of the interpreter
  9368. executable, and ARGUMENT is a single command-line argument to pass to
  9369. the interpreter.
  9370. You may only pass one argument to the interpreter, and its length is
  9371. limited. These restrictions can be annoying to work around, so Guile
  9372. provides a general mechanism (borrowed from, and compatible with,
  9373. SCSH) for circumventing them.
  9374. If the ARGUMENT in a Guile script is a single backslash character,
  9375. `\', Guile will open the script file, parse arguments from its second
  9376. and subsequent lines, and replace the `\' with them. So, for example,
  9377. here is another implementation of the `ekko' script:
  9378. #!/usr/local/bin/guile \
  9379. -e main -s
  9380. !#
  9381. (define (main args)
  9382. (for-each (lambda (arg) (display arg) (display " "))
  9383. (cdr args))
  9384. (newline))
  9385. If the user invokes this script as follows:
  9386. ekko a speckled gecko
  9387. Unix expands this into
  9388. /usr/local/bin/guile \ ekko a speckled gecko
  9389. When Guile sees the `\' argument, it replaces it with the arguments
  9390. read from the second line of the script, producing:
  9391. /usr/local/bin/guile -e main -s ekko a speckled gecko
  9392. This tells Guile to load the `ekko' script, and apply the function
  9393. `main' to the argument list ("a" "speckled" "gecko").
  9394. Here is how Guile parses the command-line arguments:
  9395. - Each space character terminates an argument. This means that two
  9396. spaces in a row introduce an empty-string argument.
  9397. - The tab character is not permitted (unless you quote it with the
  9398. backslash character, as described below), to avoid confusion.
  9399. - The newline character terminates the sequence of arguments, and will
  9400. also terminate a final non-empty argument. (However, a newline
  9401. following a space will not introduce a final empty-string argument;
  9402. it only terminates the argument list.)
  9403. - The backslash character is the escape character. It escapes
  9404. backslash, space, tab, and newline. The ANSI C escape sequences
  9405. like \n and \t are also supported. These produce argument
  9406. constituents; the two-character combination \n doesn't act like a
  9407. terminating newline. The escape sequence \NNN for exactly three
  9408. octal digits reads as the character whose ASCII code is NNN. As
  9409. above, characters produced this way are argument constituents.
  9410. Backslash followed by other characters is not allowed.
  9411. * Changes to the procedure for linking libguile with your programs
  9412. ** Guile now builds and installs a shared guile library, if your
  9413. system support shared libraries. (It still builds a static library on
  9414. all systems.) Guile automatically detects whether your system
  9415. supports shared libraries. To prevent Guile from buildisg shared
  9416. libraries, pass the `--disable-shared' flag to the configure script.
  9417. Guile takes longer to compile when it builds shared libraries, because
  9418. it must compile every file twice --- once to produce position-
  9419. independent object code, and once to produce normal object code.
  9420. ** The libthreads library has been merged into libguile.
  9421. To link a program against Guile, you now need only link against
  9422. -lguile and -lqt; -lthreads is no longer needed. If you are using
  9423. autoconf to generate configuration scripts for your application, the
  9424. following lines should suffice to add the appropriate libraries to
  9425. your link command:
  9426. ### Find quickthreads and libguile.
  9427. AC_CHECK_LIB(qt, main)
  9428. AC_CHECK_LIB(guile, scm_shell)
  9429. * Changes to Scheme functions
  9430. ** Guile Scheme's special syntax for keyword objects is now optional,
  9431. and disabled by default.
  9432. The syntax variation from R4RS made it difficult to port some
  9433. interesting packages to Guile. The routines which accepted keyword
  9434. arguments (mostly in the module system) have been modified to also
  9435. accept symbols whose names begin with `:'.
  9436. To change the keyword syntax, you must first import the (ice-9 debug)
  9437. module:
  9438. (use-modules (ice-9 debug))
  9439. Then you can enable the keyword syntax as follows:
  9440. (read-set! keywords 'prefix)
  9441. To disable keyword syntax, do this:
  9442. (read-set! keywords #f)
  9443. ** Many more primitive functions accept shared substrings as
  9444. arguments. In the past, these functions required normal, mutable
  9445. strings as arguments, although they never made use of this
  9446. restriction.
  9447. ** The uniform array functions now operate on byte vectors. These
  9448. functions are `array-fill!', `serial-array-copy!', `array-copy!',
  9449. `serial-array-map', `array-map', `array-for-each', and
  9450. `array-index-map!'.
  9451. ** The new functions `trace' and `untrace' implement simple debugging
  9452. support for Scheme functions.
  9453. The `trace' function accepts any number of procedures as arguments,
  9454. and tells the Guile interpreter to display each procedure's name and
  9455. arguments each time the procedure is invoked. When invoked with no
  9456. arguments, `trace' returns the list of procedures currently being
  9457. traced.
  9458. The `untrace' function accepts any number of procedures as arguments,
  9459. and tells the Guile interpreter not to trace them any more. When
  9460. invoked with no arguments, `untrace' untraces all curretly traced
  9461. procedures.
  9462. The tracing in Guile has an advantage over most other systems: we
  9463. don't create new procedure objects, but mark the procedure objects
  9464. themselves. This means that anonymous and internal procedures can be
  9465. traced.
  9466. ** The function `assert-repl-prompt' has been renamed to
  9467. `set-repl-prompt!'. It takes one argument, PROMPT.
  9468. - If PROMPT is #f, the Guile read-eval-print loop will not prompt.
  9469. - If PROMPT is a string, we use it as a prompt.
  9470. - If PROMPT is a procedure accepting no arguments, we call it, and
  9471. display the result as a prompt.
  9472. - Otherwise, we display "> ".
  9473. ** The new function `eval-string' reads Scheme expressions from a
  9474. string and evaluates them, returning the value of the last expression
  9475. in the string. If the string contains no expressions, it returns an
  9476. unspecified value.
  9477. ** The new function `thunk?' returns true iff its argument is a
  9478. procedure of zero arguments.
  9479. ** `defined?' is now a builtin function, instead of syntax. This
  9480. means that its argument should be quoted. It returns #t iff its
  9481. argument is bound in the current module.
  9482. ** The new syntax `use-modules' allows you to add new modules to your
  9483. environment without re-typing a complete `define-module' form. It
  9484. accepts any number of module names as arguments, and imports their
  9485. public bindings into the current module.
  9486. ** The new function (module-defined? NAME MODULE) returns true iff
  9487. NAME, a symbol, is defined in MODULE, a module object.
  9488. ** The new function `builtin-bindings' creates and returns a hash
  9489. table containing copies of all the root module's bindings.
  9490. ** The new function `builtin-weak-bindings' does the same as
  9491. `builtin-bindings', but creates a doubly-weak hash table.
  9492. ** The `equal?' function now considers variable objects to be
  9493. equivalent if they have the same name and the same value.
  9494. ** The new function `command-line' returns the command-line arguments
  9495. given to Guile, as a list of strings.
  9496. When using guile as a script interpreter, `command-line' returns the
  9497. script's arguments; those processed by the interpreter (like `-s' or
  9498. `-c') are omitted. (In other words, you get the normal, expected
  9499. behavior.) Any application that uses scm_shell to process its
  9500. command-line arguments gets this behavior as well.
  9501. ** The new function `load-user-init' looks for a file called `.guile'
  9502. in the user's home directory, and loads it if it exists. This is
  9503. mostly for use by the code generated by scm_compile_shell_switches,
  9504. but we thought it might also be useful in other circumstances.
  9505. ** The new function `log10' returns the base-10 logarithm of its
  9506. argument.
  9507. ** Changes to I/O functions
  9508. *** The functions `read', `primitive-load', `read-and-eval!', and
  9509. `primitive-load-path' no longer take optional arguments controlling
  9510. case insensitivity and a `#' parser.
  9511. Case sensitivity is now controlled by a read option called
  9512. `case-insensitive'. The user can add new `#' syntaxes with the
  9513. `read-hash-extend' function (see below).
  9514. *** The new function `read-hash-extend' allows the user to change the
  9515. syntax of Guile Scheme in a somewhat controlled way.
  9516. (read-hash-extend CHAR PROC)
  9517. When parsing S-expressions, if we read a `#' character followed by
  9518. the character CHAR, use PROC to parse an object from the stream.
  9519. If PROC is #f, remove any parsing procedure registered for CHAR.
  9520. The reader applies PROC to two arguments: CHAR and an input port.
  9521. *** The new functions read-delimited and read-delimited! provide a
  9522. general mechanism for doing delimited input on streams.
  9523. (read-delimited DELIMS [PORT HANDLE-DELIM])
  9524. Read until we encounter one of the characters in DELIMS (a string),
  9525. or end-of-file. PORT is the input port to read from; it defaults to
  9526. the current input port. The HANDLE-DELIM parameter determines how
  9527. the terminating character is handled; it should be one of the
  9528. following symbols:
  9529. 'trim omit delimiter from result
  9530. 'peek leave delimiter character in input stream
  9531. 'concat append delimiter character to returned value
  9532. 'split return a pair: (RESULT . TERMINATOR)
  9533. HANDLE-DELIM defaults to 'peek.
  9534. (read-delimited! DELIMS BUF [PORT HANDLE-DELIM START END])
  9535. A side-effecting variant of `read-delimited'.
  9536. The data is written into the string BUF at the indices in the
  9537. half-open interval [START, END); the default interval is the whole
  9538. string: START = 0 and END = (string-length BUF). The values of
  9539. START and END must specify a well-defined interval in BUF, i.e.
  9540. 0 <= START <= END <= (string-length BUF).
  9541. It returns NBYTES, the number of bytes read. If the buffer filled
  9542. up without a delimiter character being found, it returns #f. If the
  9543. port is at EOF when the read starts, it returns the EOF object.
  9544. If an integer is returned (i.e., the read is successfully terminated
  9545. by reading a delimiter character), then the HANDLE-DELIM parameter
  9546. determines how to handle the terminating character. It is described
  9547. above, and defaults to 'peek.
  9548. (The descriptions of these functions were borrowed from the SCSH
  9549. manual, by Olin Shivers and Brian Carlstrom.)
  9550. *** The `%read-delimited!' function is the primitive used to implement
  9551. `read-delimited' and `read-delimited!'.
  9552. (%read-delimited! DELIMS BUF GOBBLE? [PORT START END])
  9553. This returns a pair of values: (TERMINATOR . NUM-READ).
  9554. - TERMINATOR describes why the read was terminated. If it is a
  9555. character or the eof object, then that is the value that terminated
  9556. the read. If it is #f, the function filled the buffer without finding
  9557. a delimiting character.
  9558. - NUM-READ is the number of characters read into BUF.
  9559. If the read is successfully terminated by reading a delimiter
  9560. character, then the gobble? parameter determines what to do with the
  9561. terminating character. If true, the character is removed from the
  9562. input stream; if false, the character is left in the input stream
  9563. where a subsequent read operation will retrieve it. In either case,
  9564. the character is also the first value returned by the procedure call.
  9565. (The descriptions of this function was borrowed from the SCSH manual,
  9566. by Olin Shivers and Brian Carlstrom.)
  9567. *** The `read-line' and `read-line!' functions have changed; they now
  9568. trim the terminator by default; previously they appended it to the
  9569. returned string. For the old behavior, use (read-line PORT 'concat).
  9570. *** The functions `uniform-array-read!' and `uniform-array-write!' now
  9571. take new optional START and END arguments, specifying the region of
  9572. the array to read and write.
  9573. *** The `ungetc-char-ready?' function has been removed. We feel it's
  9574. inappropriate for an interface to expose implementation details this
  9575. way.
  9576. ** Changes to the Unix library and system call interface
  9577. *** The new fcntl function provides access to the Unix `fcntl' system
  9578. call.
  9579. (fcntl PORT COMMAND VALUE)
  9580. Apply COMMAND to PORT's file descriptor, with VALUE as an argument.
  9581. Values for COMMAND are:
  9582. F_DUPFD duplicate a file descriptor
  9583. F_GETFD read the descriptor's close-on-exec flag
  9584. F_SETFD set the descriptor's close-on-exec flag to VALUE
  9585. F_GETFL read the descriptor's flags, as set on open
  9586. F_SETFL set the descriptor's flags, as set on open to VALUE
  9587. F_GETOWN return the process ID of a socket's owner, for SIGIO
  9588. F_SETOWN set the process that owns a socket to VALUE, for SIGIO
  9589. FD_CLOEXEC not sure what this is
  9590. For details, see the documentation for the fcntl system call.
  9591. *** The arguments to `select' have changed, for compatibility with
  9592. SCSH. The TIMEOUT parameter may now be non-integral, yielding the
  9593. expected behavior. The MILLISECONDS parameter has been changed to
  9594. MICROSECONDS, to more closely resemble the underlying system call.
  9595. The RVEC, WVEC, and EVEC arguments can now be vectors; the type of the
  9596. corresponding return set will be the same.
  9597. *** The arguments to the `mknod' system call have changed. They are
  9598. now:
  9599. (mknod PATH TYPE PERMS DEV)
  9600. Create a new file (`node') in the file system. PATH is the name of
  9601. the file to create. TYPE is the kind of file to create; it should
  9602. be 'fifo, 'block-special, or 'char-special. PERMS specifies the
  9603. permission bits to give the newly created file. If TYPE is
  9604. 'block-special or 'char-special, DEV specifies which device the
  9605. special file refers to; its interpretation depends on the kind of
  9606. special file being created.
  9607. *** The `fork' function has been renamed to `primitive-fork', to avoid
  9608. clashing with various SCSH forks.
  9609. *** The `recv' and `recvfrom' functions have been renamed to `recv!'
  9610. and `recvfrom!'. They no longer accept a size for a second argument;
  9611. you must pass a string to hold the received value. They no longer
  9612. return the buffer. Instead, `recv' returns the length of the message
  9613. received, and `recvfrom' returns a pair containing the packet's length
  9614. and originating address.
  9615. *** The file descriptor datatype has been removed, as have the
  9616. `read-fd', `write-fd', `close', `lseek', and `dup' functions.
  9617. We plan to replace these functions with a SCSH-compatible interface.
  9618. *** The `create' function has been removed; it's just a special case
  9619. of `open'.
  9620. *** There are new functions to break down process termination status
  9621. values. In the descriptions below, STATUS is a value returned by
  9622. `waitpid'.
  9623. (status:exit-val STATUS)
  9624. If the child process exited normally, this function returns the exit
  9625. code for the child process (i.e., the value passed to exit, or
  9626. returned from main). If the child process did not exit normally,
  9627. this function returns #f.
  9628. (status:stop-sig STATUS)
  9629. If the child process was suspended by a signal, this function
  9630. returns the signal that suspended the child. Otherwise, it returns
  9631. #f.
  9632. (status:term-sig STATUS)
  9633. If the child process terminated abnormally, this function returns
  9634. the signal that terminated the child. Otherwise, this function
  9635. returns false.
  9636. POSIX promises that exactly one of these functions will return true on
  9637. a valid STATUS value.
  9638. These functions are compatible with SCSH.
  9639. *** There are new accessors and setters for the broken-out time vectors
  9640. returned by `localtime', `gmtime', and that ilk. They are:
  9641. Component Accessor Setter
  9642. ========================= ============ ============
  9643. seconds tm:sec set-tm:sec
  9644. minutes tm:min set-tm:min
  9645. hours tm:hour set-tm:hour
  9646. day of the month tm:mday set-tm:mday
  9647. month tm:mon set-tm:mon
  9648. year tm:year set-tm:year
  9649. day of the week tm:wday set-tm:wday
  9650. day in the year tm:yday set-tm:yday
  9651. daylight saving time tm:isdst set-tm:isdst
  9652. GMT offset, seconds tm:gmtoff set-tm:gmtoff
  9653. name of time zone tm:zone set-tm:zone
  9654. *** There are new accessors for the vectors returned by `uname',
  9655. describing the host system:
  9656. Component Accessor
  9657. ============================================== ================
  9658. name of the operating system implementation utsname:sysname
  9659. network name of this machine utsname:nodename
  9660. release level of the operating system utsname:release
  9661. version level of the operating system utsname:version
  9662. machine hardware platform utsname:machine
  9663. *** There are new accessors for the vectors returned by `getpw',
  9664. `getpwnam', `getpwuid', and `getpwent', describing entries from the
  9665. system's user database:
  9666. Component Accessor
  9667. ====================== =================
  9668. user name passwd:name
  9669. user password passwd:passwd
  9670. user id passwd:uid
  9671. group id passwd:gid
  9672. real name passwd:gecos
  9673. home directory passwd:dir
  9674. shell program passwd:shell
  9675. *** There are new accessors for the vectors returned by `getgr',
  9676. `getgrnam', `getgrgid', and `getgrent', describing entries from the
  9677. system's group database:
  9678. Component Accessor
  9679. ======================= ============
  9680. group name group:name
  9681. group password group:passwd
  9682. group id group:gid
  9683. group members group:mem
  9684. *** There are new accessors for the vectors returned by `gethost',
  9685. `gethostbyaddr', `gethostbyname', and `gethostent', describing
  9686. internet hosts:
  9687. Component Accessor
  9688. ========================= ===============
  9689. official name of host hostent:name
  9690. alias list hostent:aliases
  9691. host address type hostent:addrtype
  9692. length of address hostent:length
  9693. list of addresses hostent:addr-list
  9694. *** There are new accessors for the vectors returned by `getnet',
  9695. `getnetbyaddr', `getnetbyname', and `getnetent', describing internet
  9696. networks:
  9697. Component Accessor
  9698. ========================= ===============
  9699. official name of net netent:name
  9700. alias list netent:aliases
  9701. net number type netent:addrtype
  9702. net number netent:net
  9703. *** There are new accessors for the vectors returned by `getproto',
  9704. `getprotobyname', `getprotobynumber', and `getprotoent', describing
  9705. internet protocols:
  9706. Component Accessor
  9707. ========================= ===============
  9708. official protocol name protoent:name
  9709. alias list protoent:aliases
  9710. protocol number protoent:proto
  9711. *** There are new accessors for the vectors returned by `getserv',
  9712. `getservbyname', `getservbyport', and `getservent', describing
  9713. internet protocols:
  9714. Component Accessor
  9715. ========================= ===============
  9716. official service name servent:name
  9717. alias list servent:aliases
  9718. port number servent:port
  9719. protocol to use servent:proto
  9720. *** There are new accessors for the sockaddr structures returned by
  9721. `accept', `getsockname', `getpeername', `recvfrom!':
  9722. Component Accessor
  9723. ======================================== ===============
  9724. address format (`family') sockaddr:fam
  9725. path, for file domain addresses sockaddr:path
  9726. address, for internet domain addresses sockaddr:addr
  9727. TCP or UDP port, for internet sockaddr:port
  9728. *** The `getpwent', `getgrent', `gethostent', `getnetent',
  9729. `getprotoent', and `getservent' functions now return #f at the end of
  9730. the user database. (They used to throw an exception.)
  9731. Note that calling MUMBLEent function is equivalent to calling the
  9732. corresponding MUMBLE function with no arguments.
  9733. *** The `setpwent', `setgrent', `sethostent', `setnetent',
  9734. `setprotoent', and `setservent' routines now take no arguments.
  9735. *** The `gethost', `getproto', `getnet', and `getserv' functions now
  9736. provide more useful information when they throw an exception.
  9737. *** The `lnaof' function has been renamed to `inet-lnaof'.
  9738. *** Guile now claims to have the `current-time' feature.
  9739. *** The `mktime' function now takes an optional second argument ZONE,
  9740. giving the time zone to use for the conversion. ZONE should be a
  9741. string, in the same format as expected for the "TZ" environment variable.
  9742. *** The `strptime' function now returns a pair (TIME . COUNT), where
  9743. TIME is the parsed time as a vector, and COUNT is the number of
  9744. characters from the string left unparsed. This function used to
  9745. return the remaining characters as a string.
  9746. *** The `gettimeofday' function has replaced the old `time+ticks' function.
  9747. The return value is now (SECONDS . MICROSECONDS); the fractional
  9748. component is no longer expressed in "ticks".
  9749. *** The `ticks/sec' constant has been removed, in light of the above change.
  9750. * Changes to the gh_ interface
  9751. ** gh_eval_str() now returns an SCM object which is the result of the
  9752. evaluation
  9753. ** gh_scm2str() now copies the Scheme data to a caller-provided C
  9754. array
  9755. ** gh_scm2newstr() now makes a C array, copies the Scheme data to it,
  9756. and returns the array
  9757. ** gh_scm2str0() is gone: there is no need to distinguish
  9758. null-terminated from non-null-terminated, since gh_scm2newstr() allows
  9759. the user to interpret the data both ways.
  9760. * Changes to the scm_ interface
  9761. ** The new function scm_symbol_value0 provides an easy way to get a
  9762. symbol's value from C code:
  9763. SCM scm_symbol_value0 (char *NAME)
  9764. Return the value of the symbol named by the null-terminated string
  9765. NAME in the current module. If the symbol named NAME is unbound in
  9766. the current module, return SCM_UNDEFINED.
  9767. ** The new function scm_sysintern0 creates new top-level variables,
  9768. without assigning them a value.
  9769. SCM scm_sysintern0 (char *NAME)
  9770. Create a new Scheme top-level variable named NAME. NAME is a
  9771. null-terminated string. Return the variable's value cell.
  9772. ** The function scm_internal_catch is the guts of catch. It handles
  9773. all the mechanics of setting up a catch target, invoking the catch
  9774. body, and perhaps invoking the handler if the body does a throw.
  9775. The function is designed to be usable from C code, but is general
  9776. enough to implement all the semantics Guile Scheme expects from throw.
  9777. TAG is the catch tag. Typically, this is a symbol, but this function
  9778. doesn't actually care about that.
  9779. BODY is a pointer to a C function which runs the body of the catch;
  9780. this is the code you can throw from. We call it like this:
  9781. BODY (BODY_DATA, JMPBUF)
  9782. where:
  9783. BODY_DATA is just the BODY_DATA argument we received; we pass it
  9784. through to BODY as its first argument. The caller can make
  9785. BODY_DATA point to anything useful that BODY might need.
  9786. JMPBUF is the Scheme jmpbuf object corresponding to this catch,
  9787. which we have just created and initialized.
  9788. HANDLER is a pointer to a C function to deal with a throw to TAG,
  9789. should one occur. We call it like this:
  9790. HANDLER (HANDLER_DATA, THROWN_TAG, THROW_ARGS)
  9791. where
  9792. HANDLER_DATA is the HANDLER_DATA argument we recevied; it's the
  9793. same idea as BODY_DATA above.
  9794. THROWN_TAG is the tag that the user threw to; usually this is
  9795. TAG, but it could be something else if TAG was #t (i.e., a
  9796. catch-all), or the user threw to a jmpbuf.
  9797. THROW_ARGS is the list of arguments the user passed to the THROW
  9798. function.
  9799. BODY_DATA is just a pointer we pass through to BODY. HANDLER_DATA
  9800. is just a pointer we pass through to HANDLER. We don't actually
  9801. use either of those pointers otherwise ourselves. The idea is
  9802. that, if our caller wants to communicate something to BODY or
  9803. HANDLER, it can pass a pointer to it as MUMBLE_DATA, which BODY and
  9804. HANDLER can then use. Think of it as a way to make BODY and
  9805. HANDLER closures, not just functions; MUMBLE_DATA points to the
  9806. enclosed variables.
  9807. Of course, it's up to the caller to make sure that any data a
  9808. MUMBLE_DATA needs is protected from GC. A common way to do this is
  9809. to make MUMBLE_DATA a pointer to data stored in an automatic
  9810. structure variable; since the collector must scan the stack for
  9811. references anyway, this assures that any references in MUMBLE_DATA
  9812. will be found.
  9813. ** The new function scm_internal_lazy_catch is exactly like
  9814. scm_internal_catch, except:
  9815. - It does not unwind the stack (this is the major difference).
  9816. - If handler returns, its value is returned from the throw.
  9817. - BODY always receives #f as its JMPBUF argument (since there's no
  9818. jmpbuf associated with a lazy catch, because we don't unwind the
  9819. stack.)
  9820. ** scm_body_thunk is a new body function you can pass to
  9821. scm_internal_catch if you want the body to be like Scheme's `catch'
  9822. --- a thunk, or a function of one argument if the tag is #f.
  9823. BODY_DATA is a pointer to a scm_body_thunk_data structure, which
  9824. contains the Scheme procedure to invoke as the body, and the tag
  9825. we're catching. If the tag is #f, then we pass JMPBUF (created by
  9826. scm_internal_catch) to the body procedure; otherwise, the body gets
  9827. no arguments.
  9828. ** scm_handle_by_proc is a new handler function you can pass to
  9829. scm_internal_catch if you want the handler to act like Scheme's catch
  9830. --- call a procedure with the tag and the throw arguments.
  9831. If the user does a throw to this catch, this function runs a handler
  9832. procedure written in Scheme. HANDLER_DATA is a pointer to an SCM
  9833. variable holding the Scheme procedure object to invoke. It ought to
  9834. be a pointer to an automatic variable (i.e., one living on the stack),
  9835. or the procedure object should be otherwise protected from GC.
  9836. ** scm_handle_by_message is a new handler function to use with
  9837. `scm_internal_catch' if you want Guile to print a message and die.
  9838. It's useful for dealing with throws to uncaught keys at the top level.
  9839. HANDLER_DATA, if non-zero, is assumed to be a char * pointing to a
  9840. message header to print; if zero, we use "guile" instead. That
  9841. text is followed by a colon, then the message described by ARGS.
  9842. ** The return type of scm_boot_guile is now void; the function does
  9843. not return a value, and indeed, never returns at all.
  9844. ** The new function scm_shell makes it easy for user applications to
  9845. process command-line arguments in a way that is compatible with the
  9846. stand-alone guile interpreter (which is in turn compatible with SCSH,
  9847. the Scheme shell).
  9848. To use the scm_shell function, first initialize any guile modules
  9849. linked into your application, and then call scm_shell with the values
  9850. of ARGC and ARGV your `main' function received. scm_shell will add
  9851. any SCSH-style meta-arguments from the top of the script file to the
  9852. argument vector, and then process the command-line arguments. This
  9853. generally means loading a script file or starting up an interactive
  9854. command interpreter. For details, see "Changes to the stand-alone
  9855. interpreter" above.
  9856. ** The new functions scm_get_meta_args and scm_count_argv help you
  9857. implement the SCSH-style meta-argument, `\'.
  9858. char **scm_get_meta_args (int ARGC, char **ARGV)
  9859. If the second element of ARGV is a string consisting of a single
  9860. backslash character (i.e. "\\" in Scheme notation), open the file
  9861. named by the following argument, parse arguments from it, and return
  9862. the spliced command line. The returned array is terminated by a
  9863. null pointer.
  9864. For details of argument parsing, see above, under "guile now accepts
  9865. command-line arguments compatible with SCSH..."
  9866. int scm_count_argv (char **ARGV)
  9867. Count the arguments in ARGV, assuming it is terminated by a null
  9868. pointer.
  9869. For an example of how these functions might be used, see the source
  9870. code for the function scm_shell in libguile/script.c.
  9871. You will usually want to use scm_shell instead of calling this
  9872. function yourself.
  9873. ** The new function scm_compile_shell_switches turns an array of
  9874. command-line arguments into Scheme code to carry out the actions they
  9875. describe. Given ARGC and ARGV, it returns a Scheme expression to
  9876. evaluate, and calls scm_set_program_arguments to make any remaining
  9877. command-line arguments available to the Scheme code. For example,
  9878. given the following arguments:
  9879. -e main -s ekko a speckled gecko
  9880. scm_set_program_arguments will return the following expression:
  9881. (begin (load "ekko") (main (command-line)) (quit))
  9882. You will usually want to use scm_shell instead of calling this
  9883. function yourself.
  9884. ** The function scm_shell_usage prints a usage message appropriate for
  9885. an interpreter that uses scm_compile_shell_switches to handle its
  9886. command-line arguments.
  9887. void scm_shell_usage (int FATAL, char *MESSAGE)
  9888. Print a usage message to the standard error output. If MESSAGE is
  9889. non-zero, write it before the usage message, followed by a newline.
  9890. If FATAL is non-zero, exit the process, using FATAL as the
  9891. termination status. (If you want to be compatible with Guile,
  9892. always use 1 as the exit status when terminating due to command-line
  9893. usage problems.)
  9894. You will usually want to use scm_shell instead of calling this
  9895. function yourself.
  9896. ** scm_eval_0str now returns SCM_UNSPECIFIED if the string contains no
  9897. expressions. It used to return SCM_EOL. Earth-shattering.
  9898. ** The macros for declaring scheme objects in C code have been
  9899. rearranged slightly. They are now:
  9900. SCM_SYMBOL (C_NAME, SCHEME_NAME)
  9901. Declare a static SCM variable named C_NAME, and initialize it to
  9902. point to the Scheme symbol whose name is SCHEME_NAME. C_NAME should
  9903. be a C identifier, and SCHEME_NAME should be a C string.
  9904. SCM_GLOBAL_SYMBOL (C_NAME, SCHEME_NAME)
  9905. Just like SCM_SYMBOL, but make C_NAME globally visible.
  9906. SCM_VCELL (C_NAME, SCHEME_NAME)
  9907. Create a global variable at the Scheme level named SCHEME_NAME.
  9908. Declare a static SCM variable named C_NAME, and initialize it to
  9909. point to the Scheme variable's value cell.
  9910. SCM_GLOBAL_VCELL (C_NAME, SCHEME_NAME)
  9911. Just like SCM_VCELL, but make C_NAME globally visible.
  9912. The `guile-snarf' script writes initialization code for these macros
  9913. to its standard output, given C source code as input.
  9914. The SCM_GLOBAL macro is gone.
  9915. ** The scm_read_line and scm_read_line_x functions have been replaced
  9916. by Scheme code based on the %read-delimited! procedure (known to C
  9917. code as scm_read_delimited_x). See its description above for more
  9918. information.
  9919. ** The function scm_sys_open has been renamed to scm_open. It now
  9920. returns a port instead of an FD object.
  9921. * The dynamic linking support has changed. For more information, see
  9922. libguile/DYNAMIC-LINKING.
  9923. Guile 1.0b3
  9924. User-visible changes from Thursday, September 5, 1996 until Guile 1.0
  9925. (Sun 5 Jan 1997):
  9926. * Changes to the 'guile' program:
  9927. ** Guile now loads some new files when it starts up. Guile first
  9928. searches the load path for init.scm, and loads it if found. Then, if
  9929. Guile is not being used to execute a script, and the user's home
  9930. directory contains a file named `.guile', Guile loads that.
  9931. ** You can now use Guile as a shell script interpreter.
  9932. To paraphrase the SCSH manual:
  9933. When Unix tries to execute an executable file whose first two
  9934. characters are the `#!', it treats the file not as machine code to
  9935. be directly executed by the native processor, but as source code
  9936. to be executed by some interpreter. The interpreter to use is
  9937. specified immediately after the #! sequence on the first line of
  9938. the source file. The kernel reads in the name of the interpreter,
  9939. and executes that instead. It passes the interpreter the source
  9940. filename as its first argument, with the original arguments
  9941. following. Consult the Unix man page for the `exec' system call
  9942. for more information.
  9943. Now you can use Guile as an interpreter, using a mechanism which is a
  9944. compatible subset of that provided by SCSH.
  9945. Guile now recognizes a '-s' command line switch, whose argument is the
  9946. name of a file of Scheme code to load. It also treats the two
  9947. characters `#!' as the start of a comment, terminated by `!#'. Thus,
  9948. to make a file of Scheme code directly executable by Unix, insert the
  9949. following two lines at the top of the file:
  9950. #!/usr/local/bin/guile -s
  9951. !#
  9952. Guile treats the argument of the `-s' command-line switch as the name
  9953. of a file of Scheme code to load, and treats the sequence `#!' as the
  9954. start of a block comment, terminated by `!#'.
  9955. For example, here's a version of 'echo' written in Scheme:
  9956. #!/usr/local/bin/guile -s
  9957. !#
  9958. (let loop ((args (cdr (program-arguments))))
  9959. (if (pair? args)
  9960. (begin
  9961. (display (car args))
  9962. (if (pair? (cdr args))
  9963. (display " "))
  9964. (loop (cdr args)))))
  9965. (newline)
  9966. Why does `#!' start a block comment terminated by `!#', instead of the
  9967. end of the line? That is the notation SCSH uses, and although we
  9968. don't yet support the other SCSH features that motivate that choice,
  9969. we would like to be backward-compatible with any existing Guile
  9970. scripts once we do. Furthermore, if the path to Guile on your system
  9971. is too long for your kernel, you can start the script with this
  9972. horrible hack:
  9973. #!/bin/sh
  9974. exec /really/long/path/to/guile -s "$0" ${1+"$@"}
  9975. !#
  9976. Note that some very old Unix systems don't support the `#!' syntax.
  9977. ** You can now run Guile without installing it.
  9978. Previous versions of the interactive Guile interpreter (`guile')
  9979. couldn't start up unless Guile's Scheme library had been installed;
  9980. they used the value of the environment variable `SCHEME_LOAD_PATH'
  9981. later on in the startup process, but not to find the startup code
  9982. itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme
  9983. code.
  9984. To run Guile without installing it, build it in the normal way, and
  9985. then set the environment variable `SCHEME_LOAD_PATH' to a
  9986. colon-separated list of directories, including the top-level directory
  9987. of the Guile sources. For example, if you unpacked Guile so that the
  9988. full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then
  9989. you might say
  9990. export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3
  9991. ** Guile's read-eval-print loop no longer prints #<unspecified>
  9992. results. If the user wants to see this, she can evaluate the
  9993. expression (assert-repl-print-unspecified #t), perhaps in her startup
  9994. file.
  9995. ** Guile no longer shows backtraces by default when an error occurs;
  9996. however, it does display a message saying how to get one, and how to
  9997. request that they be displayed by default. After an error, evaluate
  9998. (backtrace)
  9999. to see a backtrace, and
  10000. (debug-enable 'backtrace)
  10001. to see them by default.
  10002. * Changes to Guile Scheme:
  10003. ** Guile now distinguishes between #f and the empty list.
  10004. This is for compatibility with the IEEE standard, the (possibly)
  10005. upcoming Revised^5 Report on Scheme, and many extant Scheme
  10006. implementations.
  10007. Guile used to have #f and '() denote the same object, to make Scheme's
  10008. type system more compatible with Emacs Lisp's. However, the change
  10009. caused too much trouble for Scheme programmers, and we found another
  10010. way to reconcile Emacs Lisp with Scheme that didn't require this.
  10011. ** Guile's delq, delv, delete functions, and their destructive
  10012. counterparts, delq!, delv!, and delete!, now remove all matching
  10013. elements from the list, not just the first. This matches the behavior
  10014. of the corresponding Emacs Lisp functions, and (I believe) the Maclisp
  10015. functions which inspired them.
  10016. I recognize that this change may break code in subtle ways, but it
  10017. seems best to make the change before the FSF's first Guile release,
  10018. rather than after.
  10019. ** The compiled-library-path function has been deleted from libguile.
  10020. ** The facilities for loading Scheme source files have changed.
  10021. *** The variable %load-path now tells Guile which directories to search
  10022. for Scheme code. Its value is a list of strings, each of which names
  10023. a directory.
  10024. *** The variable %load-extensions now tells Guile which extensions to
  10025. try appending to a filename when searching the load path. Its value
  10026. is a list of strings. Its default value is ("" ".scm").
  10027. *** (%search-load-path FILENAME) searches the directories listed in the
  10028. value of the %load-path variable for a Scheme file named FILENAME,
  10029. with all the extensions listed in %load-extensions. If it finds a
  10030. match, then it returns its full filename. If FILENAME is absolute, it
  10031. returns it unchanged. Otherwise, it returns #f.
  10032. %search-load-path will not return matches that refer to directories.
  10033. *** (primitive-load FILENAME :optional CASE-INSENSITIVE-P SHARP)
  10034. uses %seach-load-path to find a file named FILENAME, and loads it if
  10035. it finds it. If it can't read FILENAME for any reason, it throws an
  10036. error.
  10037. The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the
  10038. `read' function.
  10039. *** load uses the same searching semantics as primitive-load.
  10040. *** The functions %try-load, try-load-with-path, %load, load-with-path,
  10041. basic-try-load-with-path, basic-load-with-path, try-load-module-with-
  10042. path, and load-module-with-path have been deleted. The functions
  10043. above should serve their purposes.
  10044. *** If the value of the variable %load-hook is a procedure,
  10045. `primitive-load' applies its value to the name of the file being
  10046. loaded (without the load path directory name prepended). If its value
  10047. is #f, it is ignored. Otherwise, an error occurs.
  10048. This is mostly useful for printing load notification messages.
  10049. ** The function `eval!' is no longer accessible from the scheme level.
  10050. We can't allow operations which introduce glocs into the scheme level,
  10051. because Guile's type system can't handle these as data. Use `eval' or
  10052. `read-and-eval!' (see below) as replacement.
  10053. ** The new function read-and-eval! reads an expression from PORT,
  10054. evaluates it, and returns the result. This is more efficient than
  10055. simply calling `read' and `eval', since it is not necessary to make a
  10056. copy of the expression for the evaluator to munge.
  10057. Its optional arguments CASE_INSENSITIVE_P and SHARP are interpreted as
  10058. for the `read' function.
  10059. ** The function `int?' has been removed; its definition was identical
  10060. to that of `integer?'.
  10061. ** The functions `<?', `<?', `<=?', `=?', `>?', and `>=?'. Code should
  10062. use the R4RS names for these functions.
  10063. ** The function object-properties no longer returns the hash handle;
  10064. it simply returns the object's property list.
  10065. ** Many functions have been changed to throw errors, instead of
  10066. returning #f on failure. The point of providing exception handling in
  10067. the language is to simplify the logic of user code, but this is less
  10068. useful if Guile's primitives don't throw exceptions.
  10069. ** The function `fileno' has been renamed from `%fileno'.
  10070. ** The function primitive-mode->fdes returns #t or #f now, not 1 or 0.
  10071. * Changes to Guile's C interface:
  10072. ** The library's initialization procedure has been simplified.
  10073. scm_boot_guile now has the prototype:
  10074. void scm_boot_guile (int ARGC,
  10075. char **ARGV,
  10076. void (*main_func) (),
  10077. void *closure);
  10078. scm_boot_guile calls MAIN_FUNC, passing it CLOSURE, ARGC, and ARGV.
  10079. MAIN_FUNC should do all the work of the program (initializing other
  10080. packages, reading user input, etc.) before returning. When MAIN_FUNC
  10081. returns, call exit (0); this function never returns. If you want some
  10082. other exit value, MAIN_FUNC may call exit itself.
  10083. scm_boot_guile arranges for program-arguments to return the strings
  10084. given by ARGC and ARGV. If MAIN_FUNC modifies ARGC/ARGV, should call
  10085. scm_set_program_arguments with the final list, so Scheme code will
  10086. know which arguments have been processed.
  10087. scm_boot_guile establishes a catch-all catch handler which prints an
  10088. error message and exits the process. This means that Guile exits in a
  10089. coherent way when system errors occur and the user isn't prepared to
  10090. handle it. If the user doesn't like this behavior, they can establish
  10091. their own universal catcher in MAIN_FUNC to shadow this one.
  10092. Why must the caller do all the real work from MAIN_FUNC? The garbage
  10093. collector assumes that all local variables of type SCM will be above
  10094. scm_boot_guile's stack frame on the stack. If you try to manipulate
  10095. SCM values after this function returns, it's the luck of the draw
  10096. whether the GC will be able to find the objects you allocate. So,
  10097. scm_boot_guile function exits, rather than returning, to discourage
  10098. people from making that mistake.
  10099. The IN, OUT, and ERR arguments were removed; there are other
  10100. convenient ways to override these when desired.
  10101. The RESULT argument was deleted; this function should never return.
  10102. The BOOT_CMD argument was deleted; the MAIN_FUNC argument is more
  10103. general.
  10104. ** Guile's header files should no longer conflict with your system's
  10105. header files.
  10106. In order to compile code which #included <libguile.h>, previous
  10107. versions of Guile required you to add a directory containing all the
  10108. Guile header files to your #include path. This was a problem, since
  10109. Guile's header files have names which conflict with many systems'
  10110. header files.
  10111. Now only <libguile.h> need appear in your #include path; you must
  10112. refer to all Guile's other header files as <libguile/mumble.h>.
  10113. Guile's installation procedure puts libguile.h in $(includedir), and
  10114. the rest in $(includedir)/libguile.
  10115. ** Two new C functions, scm_protect_object and scm_unprotect_object,
  10116. have been added to the Guile library.
  10117. scm_protect_object (OBJ) protects OBJ from the garbage collector.
  10118. OBJ will not be freed, even if all other references are dropped,
  10119. until someone does scm_unprotect_object (OBJ). Both functions
  10120. return OBJ.
  10121. Note that calls to scm_protect_object do not nest. You can call
  10122. scm_protect_object any number of times on a given object, and the
  10123. next call to scm_unprotect_object will unprotect it completely.
  10124. Basically, scm_protect_object and scm_unprotect_object just
  10125. maintain a list of references to things. Since the GC knows about
  10126. this list, all objects it mentions stay alive. scm_protect_object
  10127. adds its argument to the list; scm_unprotect_object remove its
  10128. argument from the list.
  10129. ** scm_eval_0str now returns the value of the last expression
  10130. evaluated.
  10131. ** The new function scm_read_0str reads an s-expression from a
  10132. null-terminated string, and returns it.
  10133. ** The new function `scm_stdio_to_port' converts a STDIO file pointer
  10134. to a Scheme port object.
  10135. ** The new function `scm_set_program_arguments' allows C code to set
  10136. the value returned by the Scheme `program-arguments' function.
  10137. Older changes:
  10138. * Guile no longer includes sophisticated Tcl/Tk support.
  10139. The old Tcl/Tk support was unsatisfying to us, because it required the
  10140. user to link against the Tcl library, as well as Tk and Guile. The
  10141. interface was also un-lispy, in that it preserved Tcl/Tk's practice of
  10142. referring to widgets by names, rather than exporting widgets to Scheme
  10143. code as a special datatype.
  10144. In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk
  10145. maintainers described some very interesting changes in progress to the
  10146. Tcl/Tk internals, which would facilitate clean interfaces between lone
  10147. Tk and other interpreters --- even for garbage-collected languages
  10148. like Scheme. They expected the new Tk to be publicly available in the
  10149. fall of 1996.
  10150. Since it seems that Guile might soon have a new, cleaner interface to
  10151. lone Tk, and that the old Guile/Tk glue code would probably need to be
  10152. completely rewritten, we (Jim Blandy and Richard Stallman) have
  10153. decided not to support the old code. We'll spend the time instead on
  10154. a good interface to the newer Tk, as soon as it is available.
  10155. Until then, gtcltk-lib provides trivial, low-maintenance functionality.
  10156. Copyright information:
  10157. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
  10158. Permission is granted to anyone to make or distribute verbatim copies
  10159. of this document as received, in any medium, provided that the
  10160. copyright notice and this permission notice are preserved,
  10161. thus giving the recipient permission to redistribute in turn.
  10162. Permission is granted to distribute modified versions
  10163. of this document, or of portions of it,
  10164. under the above conditions, provided also that they
  10165. carry prominent notices stating who last changed them.
  10166. Local variables:
  10167. mode: outline
  10168. paragraph-separate: "[ ]*$"
  10169. end: