NEWS 361 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826
  1. Guile NEWS --- history of user-visible changes.
  2. Copyright (C) 1996-2011 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 2.0.3 (since 2.0.2):
  6. * Speed improvements
  7. ** Guile has a new optimizer, `peval'.
  8. `Peval' is a partial evaluator that performs constant folding, dead code
  9. elimination, copy propagation, and inlining. By default it runs on
  10. every piece of code that Guile compiles, to fold computations that can
  11. happen at compile-time, so they don't have to happen at runtime.
  12. If we did our job right, the only impact you would see would be your
  13. programs getting faster. But if you notice slowdowns or bloated code,
  14. please send a mail to bug-guile@gnu.org with details.
  15. Thanks to William R. Cook, Oscar Waddell, and Kent Dybvig for inspiring
  16. peval and its implementation.
  17. You can see what peval does on a given piece of code by running the new
  18. `,optimize' REPL meta-command, and comparing it to the output of
  19. `,expand'. See "Compile Commands" in the manual, for more.
  20. ** Fewer calls to `stat'.
  21. Guile now stats only the .go file and the .scm file when loading a fresh
  22. compiled file.
  23. * Notable changes
  24. ** New module: `(web client)', a simple synchronous web client.
  25. See "Web Client" in the manual, for more.
  26. ** Users can now install compiled `.go' files.
  27. See "Installing Site Packages" in the manual.
  28. ** Remove Front-Cover and Back-Cover text from the manual.
  29. The manual is still under the GNU Free Documentation License, but no
  30. longer has any invariant sections.
  31. ** More helpful `guild help'.
  32. `guild' is Guile's multi-tool, for use in shell scripting. Now it has a
  33. nicer interface for querying the set of existing commands, and getting
  34. help on those commands. Try it out and see!
  35. ** New macro: `define-syntax-rule'
  36. `define-syntax-rule' is a shorthand to make a `syntax-rules' macro with
  37. one clause. See "Syntax Rules" in the manual, for more.
  38. ** The `,time' REPL meta-command now has more precision.
  39. The output of this command now has microsecond precision, instead of
  40. 10-millisecond precision.
  41. ** `(ice-9 match)' can now match records.
  42. See "Pattern Matching" in the manual, for more on matching records.
  43. ** New module: `(language tree-il debug)'.
  44. This module provides a tree-il verifier. This is useful for people that
  45. generate tree-il, usually as part of a language compiler.
  46. ** New functions: `scm_is_exact', `scm_is_inexact'.
  47. These provide a nice C interface for Scheme's `exact?' and `inexact?',
  48. respectively.
  49. * Bugs fixed
  50. See the git log (or the ChangeLog) for more details on these bugs.
  51. ** Fix order of importing modules and resolving duplicates handlers.
  52. ** Fix a number of bugs involving extended (merged) generics.
  53. ** Fix invocation of merge-generics duplicate handler.
  54. ** Fix write beyond array end in arrays.c.
  55. ** Fix read beyond end of hashtable size array in hashtab.c.
  56. ** (web http): Locale-independent parsing and serialization of dates.
  57. ** Ensure presence of Host header in HTTP/1.1 requests.
  58. ** Fix take-right and drop-right for improper lists.
  59. ** Fix leak in get_current_locale().
  60. ** Fix recursive define-inlinable expansions.
  61. ** Check that srfi-1 procedure arguments are procedures.
  62. ** Fix r6rs `map' for multiple returns.
  63. ** Fix scm_tmpfile leak on POSIX platforms.
  64. ** Fix a couple of leaks (objcode->bytecode, make-boot-program).
  65. ** Fix guile-lib back-compatibility for module-stexi-documentation.
  66. ** Fix --listen option to allow other ports.
  67. ** Fix scm_to_latin1_stringn for substrings.
  68. ** Fix compilation of untyped arrays of rank not 1.
  69. ** Fix unparse-tree-il of <dynset>.
  70. ** Fix reading of #||||#.
  71. ** Fix segfault in GOOPS when class fields are redefined.
  72. ** Prefer poll(2) over select(2) to allow file descriptors above FD_SETSIZE.
  73. Changes in 2.0.2 (since 2.0.1):
  74. * Notable changes
  75. ** `guile-tools' renamed to `guild'
  76. The new name is shorter. Its intended future use is for a CPAN-like
  77. system for Guile wizards and journeyfolk to band together to share code;
  78. hence the name. `guile-tools' is provided as a backward-compatible
  79. symbolic link. See "Using Guile Tools" in the manual, for more.
  80. ** New control operators: `shift' and `reset'
  81. See "Shift and Reset" in the manual, for more information.
  82. ** `while' as an expression
  83. Previously the return value of `while' was unspecified. Now its
  84. values are specified both in the case of normal termination, and via
  85. termination by invoking `break', possibly with arguments. See "while
  86. do" in the manual for more.
  87. ** Disallow access to handles of weak hash tables
  88. `hash-get-handle' and `hash-create-handle!' are no longer permitted to
  89. be called on weak hash tables, because the fields in a weak handle could
  90. be nulled out by the garbage collector at any time, but yet they are
  91. otherwise indistinguishable from pairs. Use `hash-ref' and `hash-set!'
  92. instead.
  93. ** More precision for `get-internal-run-time', `get-internal-real-time'
  94. On 64-bit systems which support POSIX clocks, Guile's internal timing
  95. procedures offer nanosecond resolution instead of the 10-millisecond
  96. resolution previously available. 32-bit systems now use 1-millisecond
  97. timers.
  98. ** Guile now measures time spent in GC
  99. `gc-stats' now returns a meaningful value for `gc-time-taken'.
  100. ** Add `gcprof'
  101. The statprof profiler now exports a `gcprof' procedure, driven by the
  102. `after-gc-hook', to see which parts of your program are causing GC. Let
  103. us know if you find it useful.
  104. ** `map', `for-each' and some others now implemented in Scheme
  105. We would not mention this in NEWS, as it is not a user-visible change,
  106. if it were not for one thing: `map' and `for-each' are no longer
  107. primitive generics. Instead they are normal bindings, which can be
  108. wrapped by normal generics. This fixes some modularity issues between
  109. core `map', SRFI-1 `map', and GOOPS.
  110. Also it's pretty cool that we can do this without a performance impact.
  111. ** Add `scm_peek_byte_or_eof'.
  112. This helper is like `scm_peek_char_or_eof', but for bytes instead of
  113. full characters.
  114. ** Implement #:stop-at-first-non-option option for getopt-long
  115. See "getopt-long Reference" in the manual, for more information.
  116. ** Improve R6RS conformance for conditions in the I/O libraries
  117. The `(rnrs io simple)' module now raises the correct R6RS conditions in
  118. error cases. `(rnrs io ports)' is also more correct now, though it is
  119. still a work in progress.
  120. ** All deprecated routines emit warnings
  121. A few deprecated routines were lacking deprecation warnings. This has
  122. been fixed now.
  123. * Speed improvements
  124. ** Constants in compiled code now share state better
  125. Constants with shared state, like `("foo")' and `"foo"', now share state
  126. as much as possible, in the entire compilation unit. This cuts compiled
  127. `.go' file sizes in half, generally, and speeds startup.
  128. ** VLists: optimize `vlist-fold-right', and add `vhash-fold-right'
  129. These procedures are now twice as fast as they were.
  130. ** UTF-8 ports to bypass `iconv' entirely
  131. This reduces memory usage in a very common case.
  132. ** Compiler speedups
  133. The compiler is now about 40% faster. (Note that this is only the case
  134. once the compiler is itself compiled, so the build still takes as long
  135. as it did before.)
  136. ** VM speed tuning
  137. Some assertions that were mostly useful for sanity-checks on the
  138. bytecode compiler are now off for both "regular" and "debug" engines.
  139. This together with a fix to cache a TLS access and some other tweaks
  140. improve the VM's performance by about 20%.
  141. ** SRFI-1 list-set optimizations
  142. lset-adjoin and lset-union now have fast paths for eq? sets.
  143. ** `memq', `memv' optimizations
  144. These procedures are now at least twice as fast than in 2.0.1.
  145. * Deprecations
  146. ** Deprecate scm_whash API
  147. `scm_whash_get_handle', `SCM_WHASHFOUNDP', `SCM_WHASHREF',
  148. `SCM_WHASHSET', `scm_whash_create_handle', `scm_whash_lookup', and
  149. `scm_whash_insert' are now deprecated. Use the normal hash table API
  150. instead.
  151. ** Deprecate scm_struct_table
  152. `SCM_STRUCT_TABLE_NAME', `SCM_SET_STRUCT_TABLE_NAME',
  153. `SCM_STRUCT_TABLE_CLASS', `SCM_SET_STRUCT_TABLE_CLASS',
  154. `scm_struct_table', and `scm_struct_create_handle' are now deprecated.
  155. These routines formed part of the internals of the map between structs
  156. and classes.
  157. ** Deprecate scm_internal_dynamic_wind
  158. The `scm_t_inner' type and `scm_internal_dynamic_wind' are deprecated,
  159. as the `scm_dynwind' API is better, and this API encourages users to
  160. stuff SCM values into pointers.
  161. ** Deprecate scm_immutable_cell, scm_immutable_double_cell
  162. These routines are deprecated, as the GC_STUBBORN API doesn't do
  163. anything any more.
  164. * Manual updates
  165. Andreas Rottman kindly transcribed the missing parts of the `(rnrs io
  166. ports)' documentation from the R6RS documentation. Thanks Andreas!
  167. * Bugs fixed
  168. ** Fix double-loading of script in -ds case
  169. ** -x error message fix
  170. ** iconveh-related cross-compilation fixes
  171. ** Fix small integer return value packing on big endian machines.
  172. ** Fix hash-set! in weak-value table from non-immediate to immediate
  173. ** Fix call-with-input-file & relatives for multiple values
  174. ** Fix `hash' for inf and nan
  175. ** Fix libguile internal type errors caught by typing-strictness==2
  176. ** Fix compile error in MinGW fstat socket detection
  177. ** Fix generation of auto-compiled file names on MinGW
  178. ** Fix multithreaded access to internal hash tables
  179. ** Emit a 1-based line number in error messages
  180. ** Fix define-module ordering
  181. ** Fix several POSIX functions to use the locale encoding
  182. ** Add type and range checks to the complex generalized vector accessors
  183. ** Fix unaligned accesses for bytevectors of complex numbers
  184. ** Fix '(a #{.} b)
  185. ** Fix erroneous VM stack overflow for canceled threads
  186. Changes in 2.0.1 (since 2.0.0):
  187. * Notable changes
  188. ** guile.m4 supports linking with rpath
  189. The GUILE_FLAGS macro now sets GUILE_LIBS and GUILE_LTLIBS, which
  190. include appropriate directives to the linker to include libguile-2.0.so
  191. in the runtime library lookup path.
  192. ** `begin' expands macros in its body before other expressions
  193. This enables support for programs like the following:
  194. (begin
  195. (define even?
  196. (lambda (x)
  197. (or (= x 0) (odd? (- x 1)))))
  198. (define-syntax odd?
  199. (syntax-rules ()
  200. ((odd? x) (not (even? x)))))
  201. (even? 10))
  202. ** REPL reader usability enhancements
  203. The REPL now flushes input after a read error, which should prevent one
  204. error from causing other errors. The REPL also now interprets comments
  205. as whitespace.
  206. ** REPL output has configurable width
  207. The REPL now defaults to output with the current terminal's width, in
  208. columns. See "Debug Commands" in the manual for more information on
  209. the ,width command.
  210. ** Better C access to the module system
  211. Guile now has convenient C accessors to look up variables or values in
  212. modules and their public interfaces. See `scm_c_public_ref' and friends
  213. in "Accessing Modules from C" in the manual.
  214. ** Added `scm_call_5', `scm_call_6'
  215. See "Fly Evaluation" in the manual.
  216. ** Added `scm_from_latin1_keyword', `scm_from_utf8_keyword'
  217. See "Keyword Procedures" in the manual, for more. Note that
  218. `scm_from_locale_keyword' should not be used when the name is a C string
  219. constant.
  220. ** R6RS unicode and string I/O work
  221. Added efficient implementations of `get-string-n' and `get-string-n!'
  222. for binary ports. Exported `current-input-port', `current-output-port'
  223. and `current-error-port' from `(rnrs io ports)', and enhanced support
  224. for transcoders.
  225. ** Added `pointer->scm', `scm->pointer' to `(system foreign)'
  226. These procedure are useful if one needs to pass and receive SCM values
  227. to and from foreign functions. See "Foreign Variables" in the manual,
  228. for more.
  229. ** Added `heap-allocated-since-gc' to `(gc-stats)'
  230. Also fixed the long-standing bug in the REPL `,stat' command.
  231. ** Add `on-error' REPL option
  232. This option controls what happens when an error occurs at the REPL, and
  233. defaults to `debug', indicating that Guile should enter the debugger.
  234. Other values include `report', which will simply print a backtrace
  235. without entering the debugger. See "System Commands" in the manual.
  236. ** Enforce immutability of string literals
  237. Attempting to mutate a string literal now causes a runtime error.
  238. ** Fix pthread redirection
  239. Guile 2.0.0 shipped with headers that, if configured with pthread
  240. support, would re-define `pthread_create', `pthread_join', and other API
  241. to redirect to the BDW-GC wrappers, `GC_pthread_create', etc. This was
  242. unintended, and not necessary: because threads must enter Guile with
  243. `scm_with_guile', Guile can handle thread registration itself, without
  244. needing to make the GC aware of all threads. This oversight has been
  245. fixed.
  246. ** `with-continuation-barrier' now unwinds on `quit'
  247. A throw to `quit' in a continuation barrier will cause Guile to exit.
  248. Before, it would do so before unwinding to the barrier, which would
  249. prevent cleanup handlers from running. This has been fixed so that it
  250. exits only after unwinding.
  251. ** `string->pointer' and `pointer->string' have optional encoding arg
  252. This allows users of the FFI to more easily deal in strings with
  253. particular (non-locale) encodings, like "utf-8". See "Void Pointers and
  254. Byte Access" in the manual, for more.
  255. ** R6RS fixnum arithmetic optimizations
  256. R6RS fixnum operations are are still slower than generic arithmetic,
  257. however.
  258. ** New procedure: `define-inlinable'
  259. See "Inlinable Procedures" in the manual, for more.
  260. ** New procedure: `exact-integer-sqrt'
  261. See "Integer Operations" in the manual, for more.
  262. ** "Extended read syntax" for symbols parses better
  263. In #{foo}# symbols, backslashes are now treated as escapes, as the
  264. symbol-printing code intended. Additionally, "\x" within #{foo}# is now
  265. interpreted as starting an R6RS hex escape. This is backward compatible
  266. because the symbol printer would never produce a "\x" before. The
  267. printer also works better too.
  268. ** Added `--fresh-auto-compile' option
  269. This allows a user to invalidate the auto-compilation cache. It's
  270. usually not needed. See "Compilation" in the manual, for a discussion.
  271. * Manual updates
  272. ** GOOPS documentation updates
  273. ** New man page
  274. Thanks to Mark Harig for improvements to guile.1.
  275. ** SRFI-23 documented
  276. The humble `error' SRFI now has an entry in the manual.
  277. * New modules
  278. ** `(ice-9 binary-ports)': "R6RS I/O Ports", in the manual
  279. ** `(ice-9 eval-string)': "Fly Evaluation", in the manual
  280. ** `(ice-9 command-line)', not documented yet
  281. * Bugs fixed
  282. ** Fixed `iconv_t' memory leak on close-port
  283. ** Fixed some leaks with weak hash tables
  284. ** Export `vhash-delq' and `vhash-delv' from `(ice-9 vlist)'
  285. ** `after-gc-hook' works again
  286. ** `define-record-type' now allowed in nested contexts
  287. ** `exact-integer-sqrt' now handles large integers correctly
  288. ** Fixed C extension examples in manual
  289. ** `vhash-delete' honors HASH argument
  290. ** Make `locale-digit-grouping' more robust
  291. ** Default exception printer robustness fixes
  292. ** Fix presence of non-I CPPFLAGS in `guile-2.0.pc'
  293. ** `read' updates line/column numbers when reading SCSH block comments
  294. ** Fix imports of multiple custom interfaces of same module
  295. ** Fix encoding scanning for non-seekable ports
  296. ** Fix `setter' when called with a non-setter generic
  297. ** Fix f32 and f64 bytevectors to not accept rationals
  298. ** Fix description of the R6RS `finite?' in manual
  299. ** Quotient, remainder and modulo accept inexact integers again
  300. ** Fix `continue' within `while' to take zero arguments
  301. ** Fix alignment for structures in FFI
  302. ** Fix port-filename of stdin, stdout, stderr to match the docs
  303. ** Fix weak hash table-related bug in `define-wrapped-pointer-type'
  304. ** Fix partial continuation application with pending procedure calls
  305. ** scm_{to,from}_locale_string use current locale, not current ports
  306. ** Fix thread cleanup, by using a pthread_key destructor
  307. ** Fix `quit' at the REPL
  308. ** Fix a failure to sync regs in vm bytevector ops
  309. ** Fix (texinfo reflection) to handle nested structures like syntax patterns
  310. ** Fix stexi->html double translation
  311. ** Fix tree-il->scheme fix for <prompt>
  312. ** Fix compilation of <prompt> in <fix> in single-value context
  313. ** Fix race condition in ensure-writable-dir
  314. ** Fix error message on ,disassemble "non-procedure"
  315. ** Fix prompt and abort with the boot evaluator
  316. ** Fix `procedure->pointer' for functions returning `void'
  317. ** Fix error reporting in dynamic-pointer
  318. ** Fix problems detecting coding: in block comments
  319. ** Fix duplicate load-path and load-compiled-path in compilation environment
  320. ** Add fallback read(2) suppport for .go files if mmap(2) unavailable
  321. ** Fix c32vector-set!, c64vector-set!
  322. ** Fix mistakenly deprecated read syntax for uniform complex vectors
  323. ** Fix parsing of exact numbers with negative exponents
  324. ** Ignore SIGPIPE in (system repl server)
  325. ** Fix optional second arg to R6RS log function
  326. ** Fix R6RS `assert' to return true value.
  327. ** Fix fencepost error when seeking in bytevector input ports
  328. ** Gracefully handle `setlocale' errors when starting the REPL
  329. ** Improve support of the `--disable-posix' configure option
  330. ** Make sure R6RS binary ports pass `binary-port?' regardless of the locale
  331. ** Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'
  332. Changes in 2.0.0 (changes since the 1.8.x series):
  333. * New modules (see the manual for details)
  334. ** `(srfi srfi-18)', more sophisticated multithreading support
  335. ** `(srfi srfi-27)', sources of random bits
  336. ** `(srfi srfi-38)', External Representation for Data With Shared Structure
  337. ** `(srfi srfi-42)', eager comprehensions
  338. ** `(srfi srfi-45)', primitives for expressing iterative lazy algorithms
  339. ** `(srfi srfi-67)', compare procedures
  340. ** `(ice-9 i18n)', internationalization support
  341. ** `(ice-9 futures)', fine-grain parallelism
  342. ** `(rnrs bytevectors)', the R6RS bytevector API
  343. ** `(rnrs io ports)', a subset of the R6RS I/O port API
  344. ** `(system xref)', a cross-referencing facility (FIXME undocumented)
  345. ** `(ice-9 vlist)', lists with constant-time random access; hash lists
  346. ** `(system foreign)', foreign function interface
  347. ** `(sxml match)', a pattern matcher for SXML
  348. ** `(srfi srfi-9 gnu)', extensions to the SRFI-9 record library
  349. ** `(system vm coverage)', a line-by-line code coverage library
  350. ** `(web uri)', URI data type, parser, and unparser
  351. ** `(web http)', HTTP header parsers and unparsers
  352. ** `(web request)', HTTP request data type, reader, and writer
  353. ** `(web response)', HTTP response data type, reader, and writer
  354. ** `(web server)', Generic HTTP server
  355. ** `(ice-9 poll)', a poll wrapper
  356. ** `(web server http)', HTTP-over-TCP web server implementation
  357. ** Replaced `(ice-9 match)' with Alex Shinn's compatible, hygienic matcher.
  358. Guile's copy of Andrew K. Wright's `match' library has been replaced by
  359. a compatible hygienic implementation by Alex Shinn. It is now
  360. documented, see "Pattern Matching" in the manual.
  361. Compared to Andrew K. Wright's `match', the new `match' lacks
  362. `match-define', `match:error-control', `match:set-error-control',
  363. `match:error', `match:set-error', and all structure-related procedures.
  364. ** Imported statprof, SSAX, and texinfo modules from Guile-Lib
  365. The statprof statistical profiler, the SSAX XML toolkit, and the texinfo
  366. toolkit from Guile-Lib have been imported into Guile proper. See
  367. "Standard Library" in the manual for more details.
  368. ** Integration of lalr-scm, a parser generator
  369. Guile has included Dominique Boucher's fine `lalr-scm' parser generator
  370. as `(system base lalr)'. See "LALR(1) Parsing" in the manual, for more
  371. information.
  372. * Changes to the stand-alone interpreter
  373. ** Guile now can compile Scheme to bytecode for a custom virtual machine.
  374. Compiled code loads much faster than Scheme source code, and runs around
  375. 3 or 4 times as fast, generating much less garbage in the process.
  376. ** Evaluating Scheme code does not use the C stack.
  377. Besides when compiling Guile itself, Guile no longer uses a recursive C
  378. function as an evaluator. This obviates the need to check the C stack
  379. pointer for overflow. Continuations still capture the C stack, however.
  380. ** New environment variables: GUILE_LOAD_COMPILED_PATH,
  381. GUILE_SYSTEM_LOAD_COMPILED_PATH
  382. GUILE_LOAD_COMPILED_PATH is for compiled files what GUILE_LOAD_PATH is
  383. for source files. It is a different path, however, because compiled
  384. files are architecture-specific. GUILE_SYSTEM_LOAD_COMPILED_PATH is like
  385. GUILE_SYSTEM_PATH.
  386. ** New read-eval-print loop (REPL) implementation
  387. Running Guile with no arguments drops the user into the new REPL. See
  388. "Using Guile Interactively" in the manual, for more information.
  389. ** Remove old Emacs interface
  390. Guile had an unused `--emacs' command line argument that was supposed to
  391. help when running Guile inside Emacs. This option has been removed, and
  392. the helper functions `named-module-use!' and `load-emacs-interface' have
  393. been deprecated.
  394. ** Add `(system repl server)' module and `--listen' command-line argument
  395. The `(system repl server)' module exposes procedures to listen on
  396. sockets for connections, and serve REPLs to those clients. The --listen
  397. command-line argument allows any Guile program to thus be remotely
  398. debuggable.
  399. See "Invoking Guile" for more information on `--listen'.
  400. ** Command line additions
  401. The guile binary now supports a new switch "-x", which can be used to
  402. extend the list of filename extensions tried when loading files
  403. (%load-extensions).
  404. ** New reader options: `square-brackets', `r6rs-hex-escapes',
  405. `hungry-eol-escapes'
  406. The reader supports a new option (changeable via `read-options'),
  407. `square-brackets', which instructs it to interpret square brackets as
  408. parentheses. This option is on by default.
  409. When the new `r6rs-hex-escapes' reader option is enabled, the reader
  410. will recognize string escape sequences as defined in R6RS. R6RS string
  411. escape sequences are incompatible with Guile's existing escapes, though,
  412. so this option is off by default.
  413. Additionally, Guile follows the R6RS newline escaping rules when the
  414. `hungry-eol-escapes' option is enabled.
  415. See "String Syntax" in the manual, for more information.
  416. ** Function profiling and tracing at the REPL
  417. The `,profile FORM' REPL meta-command can now be used to statistically
  418. profile execution of a form, to see which functions are taking the most
  419. time. See `,help profile' for more information.
  420. Similarly, `,trace FORM' traces all function applications that occur
  421. during the execution of `FORM'. See `,help trace' for more information.
  422. ** Recursive debugging REPL on error
  423. When Guile sees an error at the REPL, instead of saving the stack, Guile
  424. will directly enter a recursive REPL in the dynamic context of the
  425. error. See "Error Handling" in the manual, for more information.
  426. A recursive REPL is the same as any other REPL, except that it
  427. has been augmented with debugging information, so that one can inspect
  428. the context of the error. The debugger has been integrated with the REPL
  429. via a set of debugging meta-commands.
  430. For example, one may access a backtrace with `,backtrace' (or
  431. `,bt'). See "Interactive Debugging" in the manual, for more
  432. information.
  433. ** New `guile-tools' commands: `compile', `disassemble'
  434. Pass the `--help' command-line option to these commands for more
  435. information.
  436. ** Guile now adds its install prefix to the LTDL_LIBRARY_PATH
  437. Users may now install Guile to nonstandard prefixes and just run
  438. `/path/to/bin/guile', instead of also having to set LTDL_LIBRARY_PATH to
  439. include `/path/to/lib'.
  440. ** Guile's Emacs integration is now more keyboard-friendly
  441. Backtraces may now be disclosed with the keyboard in addition to the
  442. mouse.
  443. ** Load path change: search in version-specific paths before site paths
  444. When looking for a module, Guile now searches first in Guile's
  445. version-specific path (the library path), *then* in the site dir. This
  446. allows Guile's copy of SSAX to override any Guile-Lib copy the user has
  447. installed. Also it should cut the number of `stat' system calls by half,
  448. in the common case.
  449. ** Value history in the REPL on by default
  450. By default, the REPL will save computed values in variables like `$1',
  451. `$2', and the like. There are programmatic and interactive interfaces to
  452. control this. See "Value History" in the manual, for more information.
  453. ** Readline tab completion for arguments
  454. When readline is enabled, tab completion works for arguments too, not
  455. just for the operator position.
  456. ** Expression-oriented readline history
  457. Guile's readline history now tries to operate on expressions instead of
  458. input lines. Let us know what you think!
  459. ** Interactive Guile follows GNU conventions
  460. As recommended by the GPL, Guile now shows a brief copyright and
  461. warranty disclaimer on startup, along with pointers to more information.
  462. * Changes to Scheme functions and syntax
  463. ** Support for R6RS libraries
  464. The `library' and `import' forms from the latest Scheme report have been
  465. added to Guile, in such a way that R6RS libraries share a namespace with
  466. Guile modules. R6RS modules may import Guile modules, and are available
  467. for Guile modules to import via use-modules and all the rest. See "R6RS
  468. Libraries" in the manual for more information.
  469. ** Implementations of R6RS libraries
  470. Guile now has implementations for all of the libraries defined in the
  471. R6RS. Thanks to Julian Graham for this excellent hack. See "R6RS
  472. Standard Libraries" in the manual for a full list of libraries.
  473. ** Partial R6RS compatibility
  474. Guile now has enough support for R6RS to run a reasonably large subset
  475. of R6RS programs.
  476. Guile is not fully R6RS compatible. Many incompatibilities are simply
  477. bugs, though some parts of Guile will remain R6RS-incompatible for the
  478. foreseeable future. See "R6RS Incompatibilities" in the manual, for more
  479. information.
  480. Please contact bug-guile@gnu.org if you have found an issue not
  481. mentioned in that compatibility list.
  482. ** New implementation of `primitive-eval'
  483. Guile's `primitive-eval' is now implemented in Scheme. Actually there is
  484. still a C evaluator, used when building a fresh Guile to interpret the
  485. compiler, so we can compile eval.scm. Thereafter all calls to
  486. primitive-eval are implemented by VM-compiled code.
  487. This allows all of Guile's procedures, be they interpreted or compiled,
  488. to execute on the same stack, unifying multiple-value return semantics,
  489. providing for proper tail recursion between interpreted and compiled
  490. code, and simplifying debugging.
  491. As part of this change, the evaluator no longer mutates the internal
  492. representation of the code being evaluated in a thread-unsafe manner.
  493. There are two negative aspects of this change, however. First, Guile
  494. takes a lot longer to compile now. Also, there is less debugging
  495. information available for debugging interpreted code. We hope to improve
  496. both of these situations.
  497. There are many changes to the internal C evalator interface, but all
  498. public interfaces should be the same. See the ChangeLog for details. If
  499. we have inadvertantly changed an interface that you were using, please
  500. contact bug-guile@gnu.org.
  501. ** Procedure removed: `the-environment'
  502. This procedure was part of the interpreter's execution model, and does
  503. not apply to the compiler.
  504. ** No more `local-eval'
  505. `local-eval' used to exist so that one could evaluate code in the
  506. lexical context of a function. Since there is no way to get the lexical
  507. environment any more, as that concept has no meaning for the compiler,
  508. and a different meaning for the interpreter, we have removed the
  509. function.
  510. If you think you need `local-eval', you should probably implement your
  511. own metacircular evaluator. It will probably be as fast as Guile's
  512. anyway.
  513. ** Scheme source files will now be compiled automatically.
  514. If a compiled .go file corresponding to a .scm file is not found or is
  515. not fresh, the .scm file will be compiled on the fly, and the resulting
  516. .go file stored away. An advisory note will be printed on the console.
  517. Note that this mechanism depends on the timestamp of the .go file being
  518. newer than that of the .scm file; if the .scm or .go files are moved
  519. after installation, care should be taken to preserve their original
  520. timestamps.
  521. Auto-compiled files will be stored in the $XDG_CACHE_HOME/guile/ccache
  522. directory, where $XDG_CACHE_HOME defaults to ~/.cache. This directory
  523. will be created if needed.
  524. To inhibit automatic compilation, set the GUILE_AUTO_COMPILE environment
  525. variable to 0, or pass --no-auto-compile on the Guile command line.
  526. ** New POSIX procedures: `getrlimit' and `setrlimit'
  527. Note however that the interface of these functions is likely to change
  528. in the next prerelease.
  529. ** New POSIX procedure: `getsid'
  530. Scheme binding for the `getsid' C library call.
  531. ** New POSIX procedure: `getaddrinfo'
  532. Scheme binding for the `getaddrinfo' C library function.
  533. ** Multicast socket options
  534. Support was added for the IP_MULTICAST_TTL and IP_MULTICAST_IF socket
  535. options. See "Network Sockets and Communication" in the manual, for
  536. more information.
  537. ** `recv!', `recvfrom!', `send', `sendto' now deal in bytevectors
  538. These socket procedures now take bytevectors as arguments, instead of
  539. strings. There is some deprecated string support, however.
  540. ** New GNU procedures: `setaffinity' and `getaffinity'.
  541. See "Processes" in the manual, for more information.
  542. ** New procedures: `compose', `negate', and `const'
  543. See "Higher-Order Functions" in the manual, for more information.
  544. ** New procedure in `(oops goops)': `method-formals'
  545. ** New procedures in (ice-9 session): `add-value-help-handler!',
  546. `remove-value-help-handler!', `add-name-help-handler!'
  547. `remove-name-help-handler!', `procedure-arguments'
  548. The value and name help handlers provide some minimal extensibility to
  549. the help interface. Guile-lib's `(texinfo reflection)' uses them, for
  550. example, to make stexinfo help documentation available. See those
  551. procedures' docstrings for more information.
  552. `procedure-arguments' describes the arguments that a procedure can take,
  553. combining arity and formals. For example:
  554. (procedure-arguments resolve-interface)
  555. => ((required . (name)) (rest . args))
  556. Additionally, `module-commentary' is now publically exported from
  557. `(ice-9 session).
  558. ** Removed: `procedure->memoizing-macro', `procedure->syntax'
  559. These procedures created primitive fexprs for the old evaluator, and are
  560. no longer supported. If you feel that you need these functions, you
  561. probably need to write your own metacircular evaluator (which will
  562. probably be as fast as Guile's, anyway).
  563. ** New language: ECMAScript
  564. Guile now ships with one other high-level language supported,
  565. ECMAScript. The goal is to support all of version 3.1 of the standard,
  566. but not all of the libraries are there yet. This support is not yet
  567. documented; ask on the mailing list if you are interested.
  568. ** New language: Brainfuck
  569. Brainfuck is a toy language that closely models Turing machines. Guile's
  570. brainfuck compiler is meant to be an example of implementing other
  571. languages. See the manual for details, or
  572. http://en.wikipedia.org/wiki/Brainfuck for more information about the
  573. Brainfuck language itself.
  574. ** New language: Elisp
  575. Guile now has an experimental Emacs Lisp compiler and runtime. You can
  576. now switch to Elisp at the repl: `,language elisp'. All kudos to Daniel
  577. Kraft and Brian Templeton, and all bugs to bug-guile@gnu.org.
  578. ** Better documentation infrastructure for macros
  579. It is now possible to introspect on the type of a macro, e.g.
  580. syntax-rules, identifier-syntax, etc, and extract information about that
  581. macro, such as the syntax-rules patterns or the defmacro arguments.
  582. `(texinfo reflection)' takes advantage of this to give better macro
  583. documentation.
  584. ** Support for arbitrary procedure metadata
  585. Building on its support for docstrings, Guile now supports multiple
  586. docstrings, adding them to the tail of a compiled procedure's
  587. properties. For example:
  588. (define (foo)
  589. "one"
  590. "two"
  591. 3)
  592. (procedure-properties foo)
  593. => ((name . foo) (documentation . "one") (documentation . "two"))
  594. Also, vectors of pairs are now treated as additional metadata entries:
  595. (define (bar)
  596. #((quz . #f) (docstring . "xyzzy"))
  597. 3)
  598. (procedure-properties bar)
  599. => ((name . bar) (quz . #f) (docstring . "xyzzy"))
  600. This allows arbitrary literals to be embedded as metadata in a compiled
  601. procedure.
  602. ** The psyntax expander now knows how to interpret the @ and @@ special
  603. forms.
  604. ** The psyntax expander is now hygienic with respect to modules.
  605. Free variables in a macro are scoped in the module that the macro was
  606. defined in, not in the module the macro is used in. For example, code
  607. like this works now:
  608. (define-module (foo) #:export (bar))
  609. (define (helper x) ...)
  610. (define-syntax bar
  611. (syntax-rules () ((_ x) (helper x))))
  612. (define-module (baz) #:use-module (foo))
  613. (bar qux)
  614. It used to be you had to export `helper' from `(foo)' as well.
  615. Thankfully, this has been fixed.
  616. ** Support for version information in Guile's `module' form
  617. Guile modules now have a `#:version' field. See "R6RS Version
  618. References", "General Information about Modules", "Using Guile Modules",
  619. and "Creating Guile Modules" in the manual for more information.
  620. ** Support for renaming bindings on module export
  621. Wherever Guile accepts a symbol as an argument to specify a binding to
  622. export, it now also accepts a pair of symbols, indicating that a binding
  623. should be renamed on export. See "Creating Guile Modules" in the manual
  624. for more information.
  625. ** New procedure: `module-export-all!'
  626. This procedure exports all current and future bindings from a module.
  627. Use as `(module-export-all! (current-module))'.
  628. ** New procedure `reload-module', and `,reload' REPL command
  629. See "Module System Reflection" and "Module Commands" in the manual, for
  630. more information.
  631. ** `eval-case' has been deprecated, and replaced by `eval-when'.
  632. The semantics of `eval-when' are easier to understand. See "Eval When"
  633. in the manual, for more information.
  634. ** Guile is now more strict about prohibiting definitions in expression
  635. contexts.
  636. Although previous versions of Guile accepted it, the following
  637. expression is not valid, in R5RS or R6RS:
  638. (if test (define foo 'bar) (define foo 'baz))
  639. In this specific case, it would be better to do:
  640. (define foo (if test 'bar 'baz))
  641. It is possible to circumvent this restriction with e.g.
  642. `(module-define! (current-module) 'foo 'baz)'. Contact the list if you
  643. have any questions.
  644. ** Support for `letrec*'
  645. Guile now supports `letrec*', a recursive lexical binding operator in
  646. which the identifiers are bound in order. See "Local Bindings" in the
  647. manual, for more details.
  648. ** Internal definitions now expand to `letrec*'
  649. Following the R6RS, internal definitions now expand to letrec* instead
  650. of letrec. The following program is invalid for R5RS, but valid for
  651. R6RS:
  652. (define (foo)
  653. (define bar 10)
  654. (define baz (+ bar 20))
  655. baz)
  656. ;; R5RS and Guile <= 1.8:
  657. (foo) => Unbound variable: bar
  658. ;; R6RS and Guile >= 2.0:
  659. (foo) => 30
  660. This change should not affect correct R5RS programs, or programs written
  661. in earlier Guile dialects.
  662. ** Macro expansion produces structures instead of s-expressions
  663. In the olden days, macroexpanding an s-expression would yield another
  664. s-expression. Though the lexical variables were renamed, expansions of
  665. core forms like `if' and `begin' were still non-hygienic, as they relied
  666. on the toplevel definitions of `if' et al being the conventional ones.
  667. The solution is to expand to structures instead of s-expressions. There
  668. is an `if' structure, a `begin' structure, a `toplevel-ref' structure,
  669. etc. The expander already did this for compilation, producing Tree-IL
  670. directly; it has been changed now to do so when expanding for the
  671. evaluator as well.
  672. ** Defmacros must now produce valid Scheme expressions.
  673. It used to be that defmacros could unquote in Scheme values, as a way of
  674. supporting partial evaluation, and avoiding some hygiene issues. For
  675. example:
  676. (define (helper x) ...)
  677. (define-macro (foo bar)
  678. `(,helper ,bar))
  679. Assuming this macro is in the `(baz)' module, the direct translation of
  680. this code would be:
  681. (define (helper x) ...)
  682. (define-macro (foo bar)
  683. `((@@ (baz) helper) ,bar))
  684. Of course, one could just use a hygienic macro instead:
  685. (define-syntax foo
  686. (syntax-rules ()
  687. ((_ bar) (helper bar))))
  688. ** Guile's psyntax now supports docstrings and internal definitions.
  689. The following Scheme is not strictly legal:
  690. (define (foo)
  691. "bar"
  692. (define (baz) ...)
  693. (baz))
  694. However its intent is fairly clear. Guile interprets "bar" to be the
  695. docstring of `foo', and the definition of `baz' is still in definition
  696. context.
  697. ** Support for settable identifier syntax
  698. Following the R6RS, "variable transformers" are settable
  699. identifier-syntax. See "Identifier macros" in the manual, for more
  700. information.
  701. ** syntax-case treats `_' as a placeholder
  702. Following R6RS, a `_' in a syntax-rules or syntax-case pattern matches
  703. anything, and binds no pattern variables. Unlike the R6RS, Guile also
  704. permits `_' to be in the literals list for a pattern.
  705. ** Macros need to be defined before their first use.
  706. It used to be that with lazy memoization, this might work:
  707. (define (foo x)
  708. (ref x))
  709. (define-macro (ref x) x)
  710. (foo 1) => 1
  711. But now, the body of `foo' is interpreted to mean a call to the toplevel
  712. `ref' function, instead of a macro expansion. The solution is to define
  713. macros before code that uses them.
  714. ** Functions needed by macros at expand-time need to be present at
  715. expand-time.
  716. For example, this code will work at the REPL:
  717. (define (double-helper x) (* x x))
  718. (define-macro (double-literal x) (double-helper x))
  719. (double-literal 2) => 4
  720. But it will not work when a file is compiled, because the definition of
  721. `double-helper' is not present at expand-time. The solution is to wrap
  722. the definition of `double-helper' in `eval-when':
  723. (eval-when (load compile eval)
  724. (define (double-helper x) (* x x)))
  725. (define-macro (double-literal x) (double-helper x))
  726. (double-literal 2) => 4
  727. See the documentation for eval-when for more information.
  728. ** `macroexpand' produces structures, not S-expressions.
  729. Given the need to maintain referential transparency, both lexically and
  730. modular, the result of expanding Scheme expressions is no longer itself
  731. an s-expression. If you want a human-readable approximation of the
  732. result of `macroexpand', call `tree-il->scheme' from `(language
  733. tree-il)'.
  734. ** Removed function: `macroexpand-1'
  735. It is unclear how to implement `macroexpand-1' with syntax-case, though
  736. PLT Scheme does prove that it is possible.
  737. ** New reader macros: #' #` #, #,@
  738. These macros translate, respectively, to `syntax', `quasisyntax',
  739. `unsyntax', and `unsyntax-splicing'. See the R6RS for more information.
  740. These reader macros may be overridden by `read-hash-extend'.
  741. ** Incompatible change to #'
  742. Guile did have a #' hash-extension, by default, which just returned the
  743. subsequent datum: #'foo => foo. In the unlikely event that anyone
  744. actually used this, this behavior may be reinstated via the
  745. `read-hash-extend' mechanism.
  746. ** `unquote' and `unquote-splicing' accept multiple expressions
  747. As per the R6RS, these syntax operators can now accept any number of
  748. expressions to unquote.
  749. ** Scheme expresssions may be commented out with #;
  750. #; comments out an entire expression. See SRFI-62 or the R6RS for more
  751. information.
  752. ** Prompts: Delimited, composable continuations
  753. Guile now has prompts as part of its primitive language. See "Prompts"
  754. in the manual, for more information.
  755. Expressions entered in at the REPL, or from the command line, are
  756. surrounded by a prompt with the default prompt tag.
  757. ** `make-stack' with a tail-called procedural narrowing argument no longer
  758. works (with compiled procedures)
  759. It used to be the case that a captured stack could be narrowed to select
  760. calls only up to or from a certain procedure, even if that procedure
  761. already tail-called another procedure. This was because the debug
  762. information from the original procedure was kept on the stack.
  763. Now with the new compiler, the stack only contains active frames from
  764. the current continuation. A narrow to a procedure that is not in the
  765. stack will result in an empty stack. To fix this, narrow to a procedure
  766. that is active in the current continuation, or narrow to a specific
  767. number of stack frames.
  768. ** Backtraces through compiled procedures only show procedures that are
  769. active in the current continuation
  770. Similarly to the previous issue, backtraces in compiled code may be
  771. different from backtraces in interpreted code. There are no semantic
  772. differences, however. Please mail bug-guile@gnu.org if you see any
  773. deficiencies with Guile's backtraces.
  774. ** `positions' reader option enabled by default
  775. This change allows primitive-load without --auto-compile to also
  776. propagate source information through the expander, for better errors and
  777. to let macros know their source locations. The compiler was already
  778. turning it on anyway.
  779. ** New macro: `current-source-location'
  780. The macro returns the current source location (to be documented).
  781. ** syntax-rules and syntax-case macros now propagate source information
  782. through to the expanded code
  783. This should result in better backtraces.
  784. ** The currying behavior of `define' has been removed.
  785. Before, `(define ((f a) b) (* a b))' would translate to
  786. (define f (lambda (a) (lambda (b) (* a b))))
  787. Now a syntax error is signaled, as this syntax is not supported by
  788. default. Use the `(ice-9 curried-definitions)' module to get back the
  789. old behavior.
  790. ** New procedure, `define!'
  791. `define!' is a procedure that takes two arguments, a symbol and a value,
  792. and binds the value to the symbol in the current module. It's useful to
  793. programmatically make definitions in the current module, and is slightly
  794. less verbose than `module-define!'.
  795. ** All modules have names now
  796. Before, you could have anonymous modules: modules without names. Now,
  797. because of hygiene and macros, all modules have names. If a module was
  798. created without a name, the first time `module-name' is called on it, a
  799. fresh name will be lazily generated for it.
  800. ** The module namespace is now separate from the value namespace
  801. It was a little-known implementation detail of Guile's module system
  802. that it was built on a single hierarchical namespace of values -- that
  803. if there was a module named `(foo bar)', then in the module named
  804. `(foo)' there was a binding from `bar' to the `(foo bar)' module.
  805. This was a neat trick, but presented a number of problems. One problem
  806. was that the bindings in a module were not apparent from the module
  807. itself; perhaps the `(foo)' module had a private binding for `bar', and
  808. then an external contributor defined `(foo bar)'. In the end there can
  809. be only one binding, so one of the two will see the wrong thing, and
  810. produce an obtuse error of unclear provenance.
  811. Also, the public interface of a module was also bound in the value
  812. namespace, as `%module-public-interface'. This was a hack from the early
  813. days of Guile's modules.
  814. Both of these warts have been fixed by the addition of fields in the
  815. `module' data type. Access to modules and their interfaces from the
  816. value namespace has been deprecated, and all accessors use the new
  817. record accessors appropriately.
  818. When Guile is built with support for deprecated code, as is the default,
  819. the value namespace is still searched for modules and public interfaces,
  820. and a deprecation warning is raised as appropriate.
  821. Finally, to support lazy loading of modules as one used to be able to do
  822. with module binder procedures, Guile now has submodule binders, called
  823. if a given submodule is not found. See boot-9.scm for more information.
  824. ** New procedures: module-ref-submodule, module-define-submodule,
  825. nested-ref-module, nested-define-module!, local-ref-module,
  826. local-define-module
  827. These new accessors are like their bare variants, but operate on
  828. namespaces instead of values.
  829. ** The (app modules) module tree is officially deprecated
  830. It used to be that one could access a module named `(foo bar)' via
  831. `(nested-ref the-root-module '(app modules foo bar))'. The `(app
  832. modules)' bit was a never-used and never-documented abstraction, and has
  833. been deprecated. See the following mail for a full discussion:
  834. http://lists.gnu.org/archive/html/guile-devel/2010-04/msg00168.html
  835. The `%app' binding is also deprecated.
  836. ** `module-filename' field and accessor
  837. Modules now record the file in which they are defined. This field may be
  838. accessed with the new `module-filename' procedure.
  839. ** Modules load within a known environment
  840. It takes a few procedure calls to define a module, and those procedure
  841. calls need to be in scope. Now we ensure that the current module when
  842. loading a module is one that has the needed bindings, instead of relying
  843. on chance.
  844. ** `load' is a macro (!) that resolves paths relative to source file dir
  845. The familiar Schem `load' procedure is now a macro that captures the
  846. name of the source file being expanded, and dispatches to the new
  847. `load-in-vicinity'. Referencing `load' by bare name returns a closure
  848. that embeds the current source file name.
  849. This fix allows `load' of relative paths to be resolved with respect to
  850. the location of the file that calls `load'.
  851. ** Many syntax errors have different texts now
  852. Syntax errors still throw to the `syntax-error' key, but the arguments
  853. are often different now. Perhaps in the future, Guile will switch to
  854. using standard SRFI-35 conditions.
  855. ** Returning multiple values to compiled code will silently truncate the
  856. values to the expected number
  857. For example, the interpreter would raise an error evaluating the form,
  858. `(+ (values 1 2) (values 3 4))', because it would see the operands as
  859. being two compound "values" objects, to which `+' does not apply.
  860. The compiler, on the other hand, receives multiple values on the stack,
  861. not as a compound object. Given that it must check the number of values
  862. anyway, if too many values are provided for a continuation, it chooses
  863. to truncate those values, effectively evaluating `(+ 1 3)' instead.
  864. The idea is that the semantics that the compiler implements is more
  865. intuitive, and the use of the interpreter will fade out with time.
  866. This behavior is allowed both by the R5RS and the R6RS.
  867. ** Multiple values in compiled code are not represented by compound
  868. objects
  869. This change may manifest itself in the following situation:
  870. (let ((val (foo))) (do-something) val)
  871. In the interpreter, if `foo' returns multiple values, multiple values
  872. are produced from the `let' expression. In the compiler, those values
  873. are truncated to the first value, and that first value is returned. In
  874. the compiler, if `foo' returns no values, an error will be raised, while
  875. the interpreter would proceed.
  876. Both of these behaviors are allowed by R5RS and R6RS. The compiler's
  877. behavior is more correct, however. If you wish to preserve a potentially
  878. multiply-valued return, you will need to set up a multiple-value
  879. continuation, using `call-with-values'.
  880. ** Defmacros are now implemented in terms of syntax-case.
  881. The practical ramification of this is that the `defmacro?' predicate has
  882. been removed, along with `defmacro-transformer', `macro-table',
  883. `xformer-table', `assert-defmacro?!', `set-defmacro-transformer!' and
  884. `defmacro:transformer'. This is because defmacros are simply macros. If
  885. any of these procedures provided useful facilities to you, we encourage
  886. you to contact the Guile developers.
  887. ** Hygienic macros documented as the primary syntactic extension mechanism.
  888. The macro documentation was finally fleshed out with some documentation
  889. on `syntax-rules' and `syntax-case' macros, and other parts of the macro
  890. expansion process. See "Macros" in the manual, for details.
  891. ** psyntax is now the default expander
  892. Scheme code is now expanded by default by the psyntax hygienic macro
  893. expander. Expansion is performed completely before compilation or
  894. interpretation.
  895. Notably, syntax errors will be signalled before interpretation begins.
  896. In the past, many syntax errors were only detected at runtime if the
  897. code in question was memoized.
  898. As part of its expansion, psyntax renames all lexically-bound
  899. identifiers. Original identifier names are preserved and given to the
  900. compiler, but the interpreter will see the renamed variables, e.g.,
  901. `x432' instead of `x'.
  902. Note that the psyntax that Guile uses is a fork, as Guile already had
  903. modules before incompatible modules were added to psyntax -- about 10
  904. years ago! Thus there are surely a number of bugs that have been fixed
  905. in psyntax since then. If you find one, please notify bug-guile@gnu.org.
  906. ** syntax-rules and syntax-case are available by default.
  907. There is no longer any need to import the `(ice-9 syncase)' module
  908. (which is now deprecated). The expander may be invoked directly via
  909. `macroexpand', though it is normally searched for via the current module
  910. transformer.
  911. Also, the helper routines for syntax-case are available in the default
  912. environment as well: `syntax->datum', `datum->syntax',
  913. `bound-identifier=?', `free-identifier=?', `generate-temporaries',
  914. `identifier?', and `syntax-violation'. See the R6RS for documentation.
  915. ** Tail patterns in syntax-case
  916. Guile has pulled in some more recent changes from the psyntax portable
  917. syntax expander, to implement support for "tail patterns". Such patterns
  918. are supported by syntax-rules and syntax-case. This allows a syntax-case
  919. match clause to have ellipses, then a pattern at the end. For example:
  920. (define-syntax case
  921. (syntax-rules (else)
  922. ((_ val match-clause ... (else e e* ...))
  923. [...])))
  924. Note how there is MATCH-CLAUSE, which is ellipsized, then there is a
  925. tail pattern for the else clause. Thanks to Andreas Rottmann for the
  926. patch, and Kent Dybvig for the code.
  927. ** Lexical bindings introduced by hygienic macros may not be referenced
  928. by nonhygienic macros.
  929. If a lexical binding is introduced by a hygienic macro, it may not be
  930. referenced by a nonhygienic macro. For example, this works:
  931. (let ()
  932. (define-macro (bind-x val body)
  933. `(let ((x ,val)) ,body))
  934. (define-macro (ref x)
  935. x)
  936. (bind-x 10 (ref x)))
  937. But this does not:
  938. (let ()
  939. (define-syntax bind-x
  940. (syntax-rules ()
  941. ((_ val body) (let ((x val)) body))))
  942. (define-macro (ref x)
  943. x)
  944. (bind-x 10 (ref x)))
  945. It is not normal to run into this situation with existing code. However,
  946. if you have defmacros that expand to hygienic macros, it is possible to
  947. run into situations like this. For example, if you have a defmacro that
  948. generates a `while' expression, the `break' bound by the `while' may not
  949. be visible within other parts of your defmacro. The solution is to port
  950. from defmacros to syntax-rules or syntax-case.
  951. ** Macros may no longer be referenced as first-class values.
  952. In the past, you could evaluate e.g. `if', and get its macro value. Now,
  953. expanding this form raises a syntax error.
  954. Macros still /exist/ as first-class values, but they must be
  955. /referenced/ via the module system, e.g. `(module-ref (current-module)
  956. 'if)'.
  957. ** Macros may now have docstrings.
  958. `object-documentation' from `(ice-9 documentation)' may be used to
  959. retrieve the docstring, once you have a macro value -- but see the above
  960. note about first-class macros. Docstrings are associated with the syntax
  961. transformer procedures.
  962. ** `case-lambda' is now available in the default environment.
  963. The binding in the default environment is equivalent to the one from the
  964. `(srfi srfi-16)' module. Use the srfi-16 module explicitly if you wish
  965. to maintain compatibility with Guile 1.8 and earlier.
  966. ** Procedures may now have more than one arity.
  967. This can be the case, for example, in case-lambda procedures. The
  968. arities of compiled procedures may be accessed via procedures from the
  969. `(system vm program)' module; see "Compiled Procedures", "Optional
  970. Arguments", and "Case-lambda" in the manual.
  971. ** Deprecate arity access via (procedure-properties proc 'arity)
  972. Instead of accessing a procedure's arity as a property, use the new
  973. `procedure-minimum-arity' function, which gives the most permissive
  974. arity that the the function has, in the same format as the old arity
  975. accessor.
  976. ** `lambda*' and `define*' are now available in the default environment
  977. As with `case-lambda', `(ice-9 optargs)' continues to be supported, for
  978. compatibility purposes. No semantic change has been made (we hope).
  979. Optional and keyword arguments now dispatch via special VM operations,
  980. without the need to cons rest arguments, making them very fast.
  981. ** New syntax: define-once
  982. `define-once' is like Lisp's `defvar': it creates a toplevel binding,
  983. but only if one does not exist already.
  984. ** New function, `truncated-print', with `format' support
  985. `(ice-9 pretty-print)' now exports `truncated-print', a printer that
  986. will ensure that the output stays within a certain width, truncating the
  987. output in what is hopefully an intelligent manner. See the manual for
  988. more details.
  989. There is a new `format' specifier, `~@y', for doing a truncated
  990. print (as opposed to `~y', which does a pretty-print). See the `format'
  991. documentation for more details.
  992. ** Better pretty-printing
  993. Indentation recognizes more special forms, like `syntax-case', and read
  994. macros like `quote' are printed better.
  995. ** Passing a number as the destination of `format' is deprecated
  996. The `format' procedure in `(ice-9 format)' now emits a deprecation
  997. warning if a number is passed as its first argument.
  998. Also, it used to be that you could omit passing a port to `format', in
  999. some cases. This still works, but has been formally deprecated.
  1000. ** SRFI-4 vectors reimplemented in terms of R6RS bytevectors
  1001. Guile now implements SRFI-4 vectors using bytevectors. Often when you
  1002. have a numeric vector, you end up wanting to write its bytes somewhere,
  1003. or have access to the underlying bytes, or read in bytes from somewhere
  1004. else. Bytevectors are very good at this sort of thing. But the SRFI-4
  1005. APIs are nicer to use when doing number-crunching, because they are
  1006. addressed by element and not by byte.
  1007. So as a compromise, Guile allows all bytevector functions to operate on
  1008. numeric vectors. They address the underlying bytes in the native
  1009. endianness, as one would expect.
  1010. Following the same reasoning, that it's just bytes underneath, Guile
  1011. also allows uniform vectors of a given type to be accessed as if they
  1012. were of any type. One can fill a u32vector, and access its elements with
  1013. u8vector-ref. One can use f64vector-ref on bytevectors. It's all the
  1014. same to Guile.
  1015. In this way, uniform numeric vectors may be written to and read from
  1016. input/output ports using the procedures that operate on bytevectors.
  1017. Calls to SRFI-4 accessors (ref and set functions) from Scheme are now
  1018. inlined to the VM instructions for bytevector access.
  1019. See "SRFI-4" in the manual, for more information.
  1020. ** Nonstandard SRFI-4 procedures now available from `(srfi srfi-4 gnu)'
  1021. Guile's `(srfi srfi-4)' now only exports those srfi-4 procedures that
  1022. are part of the standard. Complex uniform vectors and the
  1023. `any->FOOvector' family are now available only from `(srfi srfi-4 gnu)'.
  1024. Guile's default environment imports `(srfi srfi-4)', and probably should
  1025. import `(srfi srfi-4 gnu)' as well.
  1026. See "SRFI-4 Extensions" in the manual, for more information.
  1027. ** New syntax: include-from-path.
  1028. `include-from-path' is like `include', except it looks for its file in
  1029. the load path. It can be used to compile other files into a file.
  1030. ** New syntax: quasisyntax.
  1031. `quasisyntax' is to `syntax' as `quasiquote' is to `quote'. See the R6RS
  1032. documentation for more information. Thanks to Andre van Tonder for the
  1033. implementation.
  1034. ** `*unspecified*' is identifier syntax
  1035. `*unspecified*' is no longer a variable, so it is optimized properly by
  1036. the compiler, and is not `set!'-able.
  1037. ** Changes and bugfixes in numerics code
  1038. *** Added six new sets of fast quotient and remainder operators
  1039. Added six new sets of fast quotient and remainder operator pairs with
  1040. different semantics than the R5RS operators. They support not only
  1041. integers, but all reals, including exact rationals and inexact
  1042. floating point numbers.
  1043. These procedures accept two real numbers N and D, where the divisor D
  1044. must be non-zero. Each set of operators computes an integer quotient
  1045. Q and a real remainder R such that N = Q*D + R and |R| < |D|. They
  1046. differ only in how N/D is rounded to produce Q.
  1047. `euclidean-quotient' returns the integer Q and `euclidean-remainder'
  1048. returns the real R such that N = Q*D + R and 0 <= R < |D|. `euclidean/'
  1049. returns both Q and R, and is more efficient than computing each
  1050. separately. Note that when D > 0, `euclidean-quotient' returns
  1051. floor(N/D), and when D < 0 it returns ceiling(N/D).
  1052. `centered-quotient', `centered-remainder', and `centered/' are similar
  1053. except that the range of remainders is -abs(D/2) <= R < abs(D/2), and
  1054. `centered-quotient' rounds N/D to the nearest integer. Note that these
  1055. operators are equivalent to the R6RS integer division operators `div',
  1056. `mod', `div-and-mod', `div0', `mod0', and `div0-and-mod0'.
  1057. `floor-quotient' and `floor-remainder' compute Q and R, respectively,
  1058. where Q has been rounded toward negative infinity. `floor/' returns
  1059. both Q and R, and is more efficient than computing each separately.
  1060. Note that when applied to integers, `floor-remainder' is equivalent to
  1061. the R5RS integer-only `modulo' operator. `ceiling-quotient',
  1062. `ceiling-remainder', and `ceiling/' are similar except that Q is
  1063. rounded toward positive infinity.
  1064. For `truncate-quotient', `truncate-remainder', and `truncate/', Q is
  1065. rounded toward zero. Note that when applied to integers,
  1066. `truncate-quotient' and `truncate-remainder' are equivalent to the
  1067. R5RS integer-only operators `quotient' and `remainder'.
  1068. For `round-quotient', `round-remainder', and `round/', Q is rounded to
  1069. the nearest integer, with ties going to the nearest even integer.
  1070. *** Complex number changes
  1071. Guile is now able to represent non-real complex numbers whose
  1072. imaginary part is an _inexact_ zero (0.0 or -0.0), per R6RS.
  1073. Previously, such numbers were immediately changed into inexact reals.
  1074. (real? 0.0+0.0i) now returns #f, per R6RS, although (zero? 0.0+0.0i)
  1075. still returns #t, per R6RS. (= 0 0.0+0.0i) and (= 0.0 0.0+0.0i) are
  1076. #t, but the same comparisons using `eqv?' or `equal?' are #f.
  1077. Like other non-real numbers, these complex numbers with inexact zero
  1078. imaginary part will raise exceptions is passed to procedures requiring
  1079. reals, such as `<', `>', `<=', `>=', `min', `max', `positive?',
  1080. `negative?', `inf?', `nan?', `finite?', etc.
  1081. **** `make-rectangular' changes
  1082. scm_make_rectangular `make-rectangular' now returns a real number only
  1083. if the imaginary part is an _exact_ 0. Previously, it would return a
  1084. real number if the imaginary part was an inexact zero.
  1085. scm_c_make_rectangular now always returns a non-real complex number,
  1086. even if the imaginary part is zero. Previously, it would return a
  1087. real number if the imaginary part was zero.
  1088. **** `make-polar' changes
  1089. scm_make_polar `make-polar' now returns a real number only if the
  1090. angle or magnitude is an _exact_ 0. If the magnitude is an exact 0,
  1091. it now returns an exact 0. Previously, it would return a real
  1092. number if the imaginary part was an inexact zero.
  1093. scm_c_make_polar now always returns a non-real complex number, even if
  1094. the imaginary part is 0.0. Previously, it would return a real number
  1095. if the imaginary part was 0.0.
  1096. **** `imag-part' changes
  1097. scm_imag_part `imag-part' now returns an exact 0 if applied to an
  1098. inexact real number. Previously it returned an inexact zero in this
  1099. case.
  1100. *** `eqv?' and `equal?' now compare numbers equivalently
  1101. scm_equal_p `equal?' now behaves equivalently to scm_eqv_p `eqv?' for
  1102. numeric values, per R5RS. Previously, equal? worked differently,
  1103. e.g. `(equal? 0.0 -0.0)' returned #t but `(eqv? 0.0 -0.0)' returned #f,
  1104. and `(equal? +nan.0 +nan.0)' returned #f but `(eqv? +nan.0 +nan.0)'
  1105. returned #t.
  1106. *** `(equal? +nan.0 +nan.0)' now returns #t
  1107. Previously, `(equal? +nan.0 +nan.0)' returned #f, although
  1108. `(let ((x +nan.0)) (equal? x x))' and `(eqv? +nan.0 +nan.0)'
  1109. both returned #t. R5RS requires that `equal?' behave like
  1110. `eqv?' when comparing numbers.
  1111. *** Change in handling products `*' involving exact 0
  1112. scm_product `*' now handles exact 0 differently. A product containing
  1113. an exact 0 now returns an exact 0 if and only if the other arguments
  1114. are all exact. An inexact zero is returned if and only if the other
  1115. arguments are all finite but not all exact. If an infinite or NaN
  1116. value is present, a NaN value is returned. Previously, any product
  1117. containing an exact 0 yielded an exact 0, regardless of the other
  1118. arguments.
  1119. *** `expt' and `integer-expt' changes when the base is 0
  1120. While `(expt 0 0)' is still 1, and `(expt 0 N)' for N > 0 is still
  1121. zero, `(expt 0 N)' for N < 0 is now a NaN value, and likewise for
  1122. integer-expt. This is more correct, and conforming to R6RS, but seems
  1123. to be incompatible with R5RS, which would return 0 for all non-zero
  1124. values of N.
  1125. *** `expt' and `integer-expt' are more generic, less strict
  1126. When raising to an exact non-negative integer exponent, `expt' and
  1127. `integer-expt' are now able to exponentiate any object that can be
  1128. multiplied using `*'. They can also raise an object to an exact
  1129. negative integer power if its reciprocal can be taken using `/'.
  1130. In order to allow this, the type of the first argument is no longer
  1131. checked when raising to an exact integer power. If the exponent is 0
  1132. or 1, the first parameter is not manipulated at all, and need not
  1133. even support multiplication.
  1134. *** Infinities are no longer integers, nor rationals
  1135. scm_integer_p `integer?' and scm_rational_p `rational?' now return #f
  1136. for infinities, per R6RS. Previously they returned #t for real
  1137. infinities. The real infinities and NaNs are still considered real by
  1138. scm_real `real?' however, per R6RS.
  1139. *** NaNs are no longer rationals
  1140. scm_rational_p `rational?' now returns #f for NaN values, per R6RS.
  1141. Previously it returned #t for real NaN values. They are still
  1142. considered real by scm_real `real?' however, per R6RS.
  1143. *** `inf?' and `nan?' now throw exceptions for non-reals
  1144. The domain of `inf?' and `nan?' is the real numbers. Guile now signals
  1145. an error when a non-real number or non-number is passed to these
  1146. procedures. (Note that NaNs _are_ considered numbers by scheme, despite
  1147. their name).
  1148. *** `rationalize' bugfixes and changes
  1149. Fixed bugs in scm_rationalize `rationalize'. Previously, it returned
  1150. exact integers unmodified, although that was incorrect if the epsilon
  1151. was at least 1 or inexact, e.g. (rationalize 4 1) should return 3 per
  1152. R5RS and R6RS, but previously it returned 4. It also now handles
  1153. cases involving infinities and NaNs properly, per R6RS.
  1154. *** Trigonometric functions now return exact numbers in some cases
  1155. scm_sin `sin', scm_cos `cos', scm_tan `tan', scm_asin `asin', scm_acos
  1156. `acos', scm_atan `atan', scm_sinh `sinh', scm_cosh `cosh', scm_tanh
  1157. `tanh', scm_sys_asinh `asinh', scm_sys_acosh `acosh', and
  1158. scm_sys_atanh `atanh' now return exact results in some cases.
  1159. *** New procedure: `finite?'
  1160. Add scm_finite_p `finite?' from R6RS to guile core, which returns #t
  1161. if and only if its argument is neither infinite nor a NaN. Note that
  1162. this is not the same as (not (inf? x)) or (not (infinite? x)), since
  1163. NaNs are neither finite nor infinite.
  1164. *** Improved exactness handling for complex number parsing
  1165. When parsing non-real complex numbers, exactness specifiers are now
  1166. applied to each component, as is done in PLT Scheme. For complex
  1167. numbers written in rectangular form, exactness specifiers are applied
  1168. to the real and imaginary parts before calling scm_make_rectangular.
  1169. For complex numbers written in polar form, exactness specifiers are
  1170. applied to the magnitude and angle before calling scm_make_polar.
  1171. Previously, exactness specifiers were applied to the number as a whole
  1172. _after_ calling scm_make_rectangular or scm_make_polar.
  1173. For example, (string->number "#i5.0+0i") now does the equivalent of:
  1174. (make-rectangular (exact->inexact 5.0) (exact->inexact 0))
  1175. which yields 5.0+0.0i. Previously it did the equivalent of:
  1176. (exact->inexact (make-rectangular 5.0 0))
  1177. which yielded 5.0.
  1178. ** Unicode characters
  1179. Unicode characters may be entered in octal format via e.g. `#\454', or
  1180. created via (integer->char 300). A hex external representation will
  1181. probably be introduced at some point.
  1182. ** Unicode strings
  1183. Internally, strings are now represented either in the `latin-1'
  1184. encoding, one byte per character, or in UTF-32, with four bytes per
  1185. character. Strings manage their own allocation, switching if needed.
  1186. Extended characters may be written in a literal string using the
  1187. hexadecimal escapes `\xXX', `\uXXXX', or `\UXXXXXX', for 8-bit, 16-bit,
  1188. or 24-bit codepoints, respectively, or entered directly in the native
  1189. encoding of the port on which the string is read.
  1190. ** Unicode symbols
  1191. One may now use U+03BB (GREEK SMALL LETTER LAMBDA) as an identifier.
  1192. ** Support for non-ASCII source code files
  1193. The default reader now handles source code files for some of the
  1194. non-ASCII character encodings, such as UTF-8. A non-ASCII source file
  1195. should have an encoding declaration near the top of the file. Also,
  1196. there is a new function, `file-encoding', that scans a port for a coding
  1197. declaration. See the section of the manual entitled, "Character Encoding
  1198. of Source Files".
  1199. The pre-1.9.3 reader handled 8-bit clean but otherwise unspecified source
  1200. code. This use is now discouraged. Binary input and output is
  1201. currently supported by opening ports in the ISO-8859-1 locale.
  1202. ** Source files default to UTF-8.
  1203. If source files do not specify their encoding via a `coding:' block,
  1204. the default encoding is UTF-8, instead of being taken from the current
  1205. locale.
  1206. ** Interactive Guile installs the current locale.
  1207. Instead of leaving the user in the "C" locale, running the Guile REPL
  1208. installs the current locale. [FIXME xref?]
  1209. ** Support for locale transcoding when reading from and writing to ports
  1210. Ports now have an associated character encoding, and port read and write
  1211. operations do conversion to and from locales automatically. Ports also
  1212. have an associated strategy for how to deal with locale conversion
  1213. failures.
  1214. See the documentation in the manual for the four new support functions,
  1215. `set-port-encoding!', `port-encoding', `set-port-conversion-strategy!',
  1216. and `port-conversion-strategy'.
  1217. ** String and SRFI-13 functions can operate on Unicode strings
  1218. ** Unicode support for SRFI-14 character sets
  1219. The default character sets are no longer locale dependent and contain
  1220. characters from the whole Unicode range. There is a new predefined
  1221. character set, `char-set:designated', which contains all assigned
  1222. Unicode characters. There is a new debugging function, `%char-set-dump'.
  1223. ** Character functions operate on Unicode characters
  1224. `char-upcase' and `char-downcase' use default Unicode casing rules.
  1225. Character comparisons such as `char<?' and `char-ci<?' now sort based on
  1226. Unicode code points.
  1227. ** Global variables `scm_charnames' and `scm_charnums' are removed
  1228. These variables contained the names of control characters and were
  1229. used when writing characters. While these were global, they were
  1230. never intended to be public API. They have been replaced with private
  1231. functions.
  1232. ** EBCDIC support is removed
  1233. There was an EBCDIC compile flag that altered some of the character
  1234. processing. It appeared that full EBCDIC support was never completed
  1235. and was unmaintained.
  1236. ** Compile-time warnings
  1237. Guile can warn about potentially unbound free variables. Pass the
  1238. -Wunbound-variable on the `guile-tools compile' command line, or add
  1239. `#:warnings '(unbound-variable)' to your `compile' or `compile-file'
  1240. invocation. Warnings are also enabled by default for expressions entered
  1241. at the REPL.
  1242. Guile can also warn when you pass the wrong number of arguments to a
  1243. procedure, with -Warity-mismatch, or `arity-mismatch' in the
  1244. `#:warnings' as above.
  1245. Other warnings include `-Wunused-variable' and `-Wunused-toplevel', to
  1246. warn about unused local or global (top-level) variables, and `-Wformat',
  1247. to check for various errors related to the `format' procedure.
  1248. ** A new `memoize-symbol' evaluator trap has been added.
  1249. This trap can be used for efficiently implementing a Scheme code
  1250. coverage.
  1251. ** Duplicate bindings among used modules are resolved lazily.
  1252. This slightly improves program startup times.
  1253. ** New thread cancellation and thread cleanup API
  1254. See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'.
  1255. ** New threads are in `(guile-user)' by default, not `(guile)'
  1256. It used to be that a new thread entering Guile would do so in the
  1257. `(guile)' module, unless this was the first time Guile was initialized,
  1258. in which case it was `(guile-user)'. This has been fixed to have all
  1259. new threads unknown to Guile default to `(guile-user)'.
  1260. ** New helpers: `print-exception', `set-exception-printer!'
  1261. These functions implement an extensible exception printer. Guile
  1262. registers printers for all of the exceptions it throws. Users may add
  1263. their own printers. There is also `scm_print_exception', for use by C
  1264. programs. Pleasantly, this allows SRFI-35 and R6RS exceptions to be
  1265. printed appropriately.
  1266. ** GOOPS dispatch in scheme
  1267. As an implementation detail, GOOPS dispatch is no longer implemented by
  1268. special evaluator bytecodes, but rather directly via a Scheme function
  1269. associated with an applicable struct. There is some VM support for the
  1270. underlying primitives, like `class-of'.
  1271. This change will in the future allow users to customize generic function
  1272. dispatch without incurring a performance penalty, and allow us to
  1273. implement method combinations.
  1274. ** Applicable struct support
  1275. One may now make structs from Scheme that may be applied as procedures.
  1276. To do so, make a struct whose vtable is `<applicable-struct-vtable>'.
  1277. That struct will be the vtable of your applicable structs; instances of
  1278. that new struct are assumed to have the procedure in their first slot.
  1279. `<applicable-struct-vtable>' is like Common Lisp's
  1280. `funcallable-standard-class'. Likewise there is
  1281. `<applicable-struct-with-setter-vtable>', which looks for the setter in
  1282. the second slot. This needs to be better documented.
  1283. ** GOOPS cleanups.
  1284. GOOPS had a number of concepts that were relevant to the days of Tcl,
  1285. but not any more: operators and entities, mainly. These objects were
  1286. never documented, and it is unlikely that they were ever used. Operators
  1287. were a kind of generic specific to the Tcl support. Entities were
  1288. replaced by applicable structs, mentioned above.
  1289. ** New struct slot allocation: "hidden"
  1290. A hidden slot is readable and writable, but will not be initialized by a
  1291. call to make-struct. For example in your layout you would say "ph"
  1292. instead of "pw". Hidden slots are useful for adding new slots to a
  1293. vtable without breaking existing invocations to make-struct.
  1294. ** eqv? not a generic
  1295. One used to be able to extend `eqv?' as a primitive-generic, but no
  1296. more. Because `eqv?' is in the expansion of `case' (via `memv'), which
  1297. should be able to compile to static dispatch tables, it doesn't make
  1298. sense to allow extensions that would subvert this optimization.
  1299. ** `inet-ntop' and `inet-pton' are always available.
  1300. Guile now use a portable implementation of `inet_pton'/`inet_ntop', so
  1301. there is no more need to use `inet-aton'/`inet-ntoa'. The latter
  1302. functions are deprecated.
  1303. ** `getopt-long' parsing errors throw to `quit', not `misc-error'
  1304. This change should inhibit backtraces on argument parsing errors.
  1305. `getopt-long' has been modified to print out the error that it throws
  1306. itself.
  1307. ** New primitive: `tmpfile'.
  1308. See "File System" in the manual.
  1309. ** Random generator state may be serialized to a datum
  1310. `random-state->datum' will serialize a random state to a datum, which
  1311. may be written out, read back in later, and revivified using
  1312. `datum->random-state'. See "Random" in the manual, for more details.
  1313. ** Fix random number generator on 64-bit platforms
  1314. There was a nasty bug on 64-bit platforms in which asking for a random
  1315. integer with a range between 2**32 and 2**64 caused a segfault. After
  1316. many embarrassing iterations, this was fixed.
  1317. ** Fast bit operations.
  1318. The bit-twiddling operations `ash', `logand', `logior', and `logxor' now
  1319. have dedicated bytecodes. Guile is not just for symbolic computation,
  1320. it's for number crunching too.
  1321. ** Faster SRFI-9 record access
  1322. SRFI-9 records are now implemented directly on top of Guile's structs,
  1323. and their accessors are defined in such a way that normal call-sites
  1324. inline to special VM opcodes, while still allowing for the general case
  1325. (e.g. passing a record accessor to `apply').
  1326. ** R6RS block comment support
  1327. Guile now supports R6RS nested block comments. The start of a comment is
  1328. marked with `#|', and the end with `|#'.
  1329. ** `guile-2' cond-expand feature
  1330. To test if your code is running under Guile 2.0 (or its alpha releases),
  1331. test for the `guile-2' cond-expand feature. Like this:
  1332. (cond-expand (guile-2 (eval-when (compile)
  1333. ;; This must be evaluated at compile time.
  1334. (fluid-set! current-reader my-reader)))
  1335. (guile
  1336. ;; Earlier versions of Guile do not have a
  1337. ;; separate compilation phase.
  1338. (fluid-set! current-reader my-reader)))
  1339. ** New global variables: %load-compiled-path, %load-compiled-extensions
  1340. These are analogous to %load-path and %load-extensions.
  1341. ** New fluid: `%file-port-name-canonicalization'
  1342. This fluid parameterizes the file names that are associated with file
  1343. ports. If %file-port-name-canonicalization is 'absolute, then file names
  1344. are canonicalized to be absolute paths. If it is 'relative, then the
  1345. name is canonicalized, but any prefix corresponding to a member of
  1346. `%load-path' is stripped off. Otherwise the names are passed through
  1347. unchanged.
  1348. In addition, the `compile-file' and `compile-and-load' procedures bind
  1349. %file-port-name-canonicalization to their `#:canonicalization' keyword
  1350. argument, which defaults to 'relative. In this way, one might compile
  1351. "../module/ice-9/boot-9.scm", but the path that gets residualized into
  1352. the .go is "ice-9/boot-9.scm".
  1353. ** New procedure, `make-promise'
  1354. `(make-promise (lambda () foo))' is equivalent to `(delay foo)'.
  1355. ** `defined?' may accept a module as its second argument
  1356. Previously it only accepted internal structures from the evaluator.
  1357. ** New entry into %guile-build-info: `ccachedir'
  1358. ** Fix bug in `module-bound?'.
  1359. `module-bound?' was returning true if a module did have a local
  1360. variable, but one that was unbound, but another imported module bound
  1361. the variable. This was an error, and was fixed.
  1362. ** `(ice-9 syncase)' has been deprecated.
  1363. As syntax-case is available by default, importing `(ice-9 syncase)' has
  1364. no effect, and will trigger a deprecation warning.
  1365. ** New readline history functions
  1366. The (ice-9 readline) module now provides add-history, read-history,
  1367. write-history and clear-history, which wrap the corresponding GNU
  1368. History library functions.
  1369. ** Removed deprecated uniform array procedures:
  1370. dimensions->uniform-array, list->uniform-array, array-prototype
  1371. Instead, use make-typed-array, list->typed-array, or array-type,
  1372. respectively.
  1373. ** Deprecate the old `scm-style-repl'
  1374. The following bindings from boot-9 are now found in `(ice-9
  1375. scm-style-repl)': `scm-style-repl', `error-catching-loop',
  1376. `error-catching-repl', `bad-throw', `scm-repl-silent'
  1377. `assert-repl-silence', `repl-print-unspecified',
  1378. `assert-repl-print-unspecified', `scm-repl-verbose',
  1379. `assert-repl-verbosity', `scm-repl-prompt', `set-repl-prompt!', `repl',
  1380. `default-pre-unwind-handler', `handle-system-error',
  1381. The following bindings have been deprecated, with no replacement:
  1382. `pre-unwind-handler-dispatch'.
  1383. The following bindings have been totally removed:
  1384. `before-signal-stack'.
  1385. Deprecated forwarding shims have been installed so that users that
  1386. expect these bindings in the main namespace will still work, but receive
  1387. a deprecation warning.
  1388. ** `set-batch-mode?!' replaced by `ensure-batch-mode!'
  1389. "Batch mode" is a flag used to tell a program that it is not running
  1390. interactively. One usually turns it on after a fork. It may not be
  1391. turned off. `ensure-batch-mode!' deprecates the old `set-batch-mode?!',
  1392. because it is a better interface, as it can only turn on batch mode, not
  1393. turn it off.
  1394. ** Deprecate `save-stack', `the-last-stack'
  1395. It used to be that the way to debug programs in Guile was to capture the
  1396. stack at the time of error, drop back to the REPL, then debug that
  1397. stack. But this approach didn't compose, was tricky to get right in the
  1398. presence of threads, and was not very powerful.
  1399. So `save-stack', `stack-saved?', and `the-last-stack' have been moved to
  1400. `(ice-9 save-stack)', with deprecated bindings left in the root module.
  1401. ** `top-repl' has its own module
  1402. The `top-repl' binding, called with Guile is run interactively, is now
  1403. is its own module, `(ice-9 top-repl)'. A deprecated forwarding shim was
  1404. left in the default environment.
  1405. ** `display-error' takes a frame
  1406. The `display-error' / `scm_display_error' helper now takes a frame as an
  1407. argument instead of a stack. Stacks are still supported in deprecated
  1408. builds. Additionally, `display-error' will again source location
  1409. information for the error.
  1410. ** No more `(ice-9 debug)'
  1411. This module had some debugging helpers that are no longer applicable to
  1412. the current debugging model. Importing this module will produce a
  1413. deprecation warning. Users should contact bug-guile for support.
  1414. ** Remove obsolete debug-options
  1415. Removed `breakpoints', `trace', `procnames', `indent', `frames',
  1416. `maxdepth', and `debug' debug-options.
  1417. ** `backtrace' debug option on by default
  1418. Given that Guile 2.0 can always give you a backtrace, backtraces are now
  1419. on by default.
  1420. ** `turn-on-debugging' deprecated
  1421. ** Remove obsolete print-options
  1422. The `source' and `closure-hook' print options are obsolete, and have
  1423. been removed.
  1424. ** Remove obsolete read-options
  1425. The "elisp-strings" and "elisp-vectors" read options were unused and
  1426. obsolete, so they have been removed.
  1427. ** Remove eval-options and trap-options
  1428. Eval-options and trap-options are obsolete with the new VM and
  1429. evaluator.
  1430. ** Remove (ice-9 debugger) and (ice-9 debugging)
  1431. See "Traps" and "Interactive Debugging" in the manual, for information
  1432. on their replacements.
  1433. ** Remove the GDS Emacs integration
  1434. See "Using Guile in Emacs" in the manual, for info on how we think you
  1435. should use Guile with Emacs.
  1436. ** Deprecated: `lazy-catch'
  1437. `lazy-catch' was a form that captured the stack at the point of a
  1438. `throw', but the dynamic state at the point of the `catch'. It was a bit
  1439. crazy. Please change to use `catch', possibly with a throw-handler, or
  1440. `with-throw-handler'.
  1441. ** Deprecated: primitive properties
  1442. The `primitive-make-property', `primitive-property-set!',
  1443. `primitive-property-ref', and `primitive-property-del!' procedures were
  1444. crufty and only used to implement object properties, which has a new,
  1445. threadsafe implementation. Use object properties or weak hash tables
  1446. instead.
  1447. ** Deprecated `@bind' syntax
  1448. `@bind' was part of an older implementation of the Emacs Lisp language,
  1449. and is no longer used.
  1450. ** Miscellaneous other deprecations
  1451. `cuserid' has been deprecated, as it only returns 8 bytes of a user's
  1452. login. Use `(passwd:name (getpwuid (geteuid)))' instead.
  1453. Additionally, the procedures `apply-to-args', `has-suffix?', `scheme-file-suffix'
  1454. `get-option', `for-next-option', `display-usage-report',
  1455. `transform-usage-lambda', `collect', and `set-batch-mode?!' have all
  1456. been deprecated.
  1457. ** Add support for unbound fluids
  1458. See `make-unbound-fluid', `fluid-unset!', and `fluid-bound?' in the
  1459. manual.
  1460. ** Add `variable-unset!'
  1461. See "Variables" in the manual, for more details.
  1462. ** Last but not least, the `λ' macro can be used in lieu of `lambda'
  1463. * Changes to the C interface
  1464. ** Guile now uses libgc, the Boehm-Demers-Weiser garbage collector
  1465. The semantics of `scm_gc_malloc ()' have been changed, in a
  1466. backward-compatible way. A new allocation routine,
  1467. `scm_gc_malloc_pointerless ()', was added.
  1468. Libgc is a conservative GC, which we hope will make interaction with C
  1469. code easier and less error-prone.
  1470. ** New procedures: `scm_to_stringn', `scm_from_stringn'
  1471. ** New procedures: scm_{to,from}_{utf8,latin1}_symbol{n,}
  1472. ** New procedures: scm_{to,from}_{utf8,utf32,latin1}_string{n,}
  1473. These new procedures convert to and from string representations in
  1474. particular encodings.
  1475. Users should continue to use locale encoding for user input, user
  1476. output, or interacting with the C library.
  1477. Use the Latin-1 functions for ASCII, and for literals in source code.
  1478. Use UTF-8 functions for interaction with modern libraries which deal in
  1479. UTF-8, and UTF-32 for interaction with utf32-using libraries.
  1480. Otherwise, use scm_to_stringn or scm_from_stringn with a specific
  1481. encoding.
  1482. ** New type definitions for `scm_t_intptr' and friends.
  1483. `SCM_T_UINTPTR_MAX', `SCM_T_INTPTR_MIN', `SCM_T_INTPTR_MAX',
  1484. `SIZEOF_SCM_T_BITS', `scm_t_intptr' and `scm_t_uintptr' are now
  1485. available to C. Have fun!
  1486. ** The GH interface (deprecated in version 1.6, 2001) was removed.
  1487. ** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
  1488. This makes these internal functions technically not callable from
  1489. application code.
  1490. ** Functions for handling `scm_option' now no longer require an argument
  1491. indicating length of the `scm_t_option' array.
  1492. ** Procedures-with-setters are now implemented using applicable structs
  1493. From a user's perspective this doesn't mean very much. But if, for some
  1494. odd reason, you used the SCM_PROCEDURE_WITH_SETTER_P, SCM_PROCEDURE, or
  1495. SCM_SETTER macros, know that they're deprecated now. Also, scm_tc7_pws
  1496. is gone.
  1497. ** Remove old evaluator closures
  1498. There used to be ranges of typecodes allocated to interpreted data
  1499. structures, but that it no longer the case, given that interpreted
  1500. procedure are now just regular VM closures. As a result, there is a
  1501. newly free tc3, and a number of removed macros. See the ChangeLog for
  1502. details.
  1503. ** Primitive procedures are now VM trampoline procedures
  1504. It used to be that there were something like 12 different typecodes
  1505. allocated to primitive procedures, each with its own calling convention.
  1506. Now there is only one, the gsubr. This may affect user code if you were
  1507. defining a procedure using scm_c_make_subr rather scm_c_make_gsubr. The
  1508. solution is to switch to use scm_c_make_gsubr. This solution works well
  1509. both with the old 1.8 and and with the current 1.9 branch.
  1510. Guile's old evaluator used to have special cases for applying "gsubrs",
  1511. primitive procedures with specified numbers of required, optional, and
  1512. rest arguments. Now, however, Guile represents gsubrs as normal VM
  1513. procedures, with appropriate bytecode to parse out the correct number of
  1514. arguments, including optional and rest arguments, and then with a
  1515. special bytecode to apply the gsubr.
  1516. This allows primitive procedures to appear on the VM stack, allowing
  1517. them to be accurately counted in profiles. Also they now have more
  1518. debugging information attached to them -- their number of arguments, for
  1519. example. In addition, the VM can completely inline the application
  1520. mechanics, allowing for faster primitive calls.
  1521. However there are some changes on the C level. There is no more
  1522. `scm_tc7_gsubr' or `scm_tcs_subrs' typecode for primitive procedures, as
  1523. they are just VM procedures. Likewise the macros `SCM_GSUBR_TYPE',
  1524. `SCM_GSUBR_MAKTYPE', `SCM_GSUBR_REQ', `SCM_GSUBR_OPT', and
  1525. `SCM_GSUBR_REST' are gone, as are `SCM_SUBR_META_INFO', `SCM_SUBR_PROPS'
  1526. `SCM_SET_SUBR_GENERIC_LOC', and `SCM_SUBR_ARITY_TO_TYPE'.
  1527. Perhaps more significantly, `scm_c_make_subr',
  1528. `scm_c_make_subr_with_generic', `scm_c_define_subr', and
  1529. `scm_c_define_subr_with_generic'. They all operated on subr typecodes,
  1530. and there are no more subr typecodes. Use the scm_c_make_gsubr family
  1531. instead.
  1532. Normal users of gsubrs should not be affected, though, as the
  1533. scm_c_make_gsubr family still is the correct way to create primitive
  1534. procedures.
  1535. ** Remove deprecated array C interfaces
  1536. Removed the deprecated array functions `scm_i_arrayp',
  1537. `scm_i_array_ndim', `scm_i_array_mem', `scm_i_array_v',
  1538. `scm_i_array_base', `scm_i_array_dims', and the deprecated macros
  1539. `SCM_ARRAYP', `SCM_ARRAY_NDIM', `SCM_ARRAY_CONTP', `SCM_ARRAY_MEM',
  1540. `SCM_ARRAY_V', `SCM_ARRAY_BASE', and `SCM_ARRAY_DIMS'.
  1541. ** Remove unused snarf macros
  1542. `SCM_DEFINE1', `SCM_PRIMITIVE_GENERIC_1', `SCM_PROC1, and `SCM_GPROC1'
  1543. are no more. Use SCM_DEFINE or SCM_PRIMITIVE_GENERIC instead.
  1544. ** New functions: `scm_call_n', `scm_c_run_hookn'
  1545. `scm_call_n' applies to apply a function to an array of arguments.
  1546. `scm_c_run_hookn' runs a hook with an array of arguments.
  1547. ** Some SMOB types changed to have static typecodes
  1548. Fluids, dynamic states, and hash tables used to be SMOB objects, but now
  1549. they have statically allocated tc7 typecodes.
  1550. ** Preparations for changing SMOB representation
  1551. If things go right, we'll be changing the SMOB representation soon. To
  1552. that end, we did a lot of cleanups to calls to e.g. SCM_CELL_WORD_2(x) when
  1553. the code meant SCM_SMOB_DATA_2(x); user code will need similar changes
  1554. in the future. Code accessing SMOBs using SCM_CELL macros was never
  1555. correct, but until now things still worked. Users should be aware of
  1556. such changes.
  1557. ** Changed invocation mechanics of applicable SMOBs
  1558. Guile's old evaluator used to have special cases for applying SMOB
  1559. objects. Now, with the VM, when Guile sees a SMOB, it looks up a VM
  1560. trampoline procedure for it, and use the normal mechanics to apply the
  1561. trampoline. This simplifies procedure application in the normal,
  1562. non-SMOB case.
  1563. The upshot is that the mechanics used to apply a SMOB are different from
  1564. 1.8. Descriptors no longer have `apply_0', `apply_1', `apply_2', and
  1565. `apply_3' functions, and the macros SCM_SMOB_APPLY_0 and friends are now
  1566. deprecated. Just use the scm_call_0 family of procedures.
  1567. ** Removed support shlibs for SRFIs 1, 4, 13, 14, and 60
  1568. Though these SRFI support libraries did expose API, they encoded a
  1569. strange version string into their library names. That version was never
  1570. programmatically exported, so there was no way people could use the
  1571. libs.
  1572. This was a fortunate oversight, as it allows us to remove the need for
  1573. extra, needless shared libraries --- the C support code for SRFIs 4, 13,
  1574. and 14 was already in core --- and allow us to incrementally return the
  1575. SRFI implementation to Scheme.
  1576. ** New C function: scm_module_public_interface
  1577. This procedure corresponds to Scheme's `module-public-interface'.
  1578. ** Undeprecate `scm_the_root_module ()'
  1579. It's useful to be able to get the root module from C without doing a
  1580. full module lookup.
  1581. ** Inline vector allocation
  1582. Instead of having vectors point out into the heap for their data, their
  1583. data is now allocated inline to the vector object itself. The same is
  1584. true for bytevectors, by default, though there is an indirection
  1585. available which should allow for making a bytevector from an existing
  1586. memory region.
  1587. ** New struct constructors that don't involve making lists
  1588. `scm_c_make_struct' and `scm_c_make_structv' are new varargs and array
  1589. constructors, respectively, for structs. You might find them useful.
  1590. ** Stack refactor
  1591. In Guile 1.8, there were debugging frames on the C stack. Now there is
  1592. no more need to explicitly mark the stack in this way, because Guile has
  1593. a VM stack that it knows how to walk, which simplifies the C API
  1594. considerably. See the ChangeLog for details; the relevant interface is
  1595. in libguile/stacks.h. The Scheme API has not been changed significantly.
  1596. ** Removal of Guile's primitive object system.
  1597. There were a number of pieces in `objects.[ch]' that tried to be a
  1598. minimal object system, but were never documented, and were quickly
  1599. obseleted by GOOPS' merge into Guile proper. So `scm_make_class_object',
  1600. `scm_make_subclass_object', `scm_metaclass_standard', and like symbols
  1601. from objects.h are no more. In the very unlikely case in which these
  1602. were useful to you, we urge you to contact guile-devel.
  1603. ** No future.
  1604. Actually the future is still in the state that it was, is, and ever
  1605. shall be, Amen, except that `futures.c' and `futures.h' are no longer a
  1606. part of it. These files were experimental, never compiled, and would be
  1607. better implemented in Scheme anyway. In the future, that is.
  1608. ** Deprecate trampolines
  1609. There used to be C functions `scm_trampoline_0', `scm_trampoline_1', and
  1610. so on. The point was to do some precomputation on the type of the
  1611. procedure, then return a specialized "call" procedure. However this
  1612. optimization wasn't actually an optimization, so it is now deprecated.
  1613. Just use `scm_call_0', etc instead.
  1614. ** Deprecated `scm_badargsp'
  1615. This function is unused in Guile, but was part of its API.
  1616. ** Better support for Lisp `nil'.
  1617. The bit representation of `nil' has been tweaked so that it is now very
  1618. efficient to check e.g. if a value is equal to Scheme's end-of-list or
  1619. Lisp's nil. Additionally there are a heap of new, specific predicates
  1620. like scm_is_null_or_nil.
  1621. ** Better integration of Lisp `nil'.
  1622. `scm_is_boolean', `scm_is_false', and `scm_is_null' all return true now
  1623. for Lisp's `nil'. This shouldn't affect any Scheme code at this point,
  1624. but when we start to integrate more with Emacs, it is possible that we
  1625. break code that assumes that, for example, `(not x)' implies that `x' is
  1626. `eq?' to `#f'. This is not a common assumption. Refactoring affected
  1627. code to rely on properties instead of identities will improve code
  1628. correctness. See "Nil" in the manual, for more details.
  1629. ** Support for static allocation of strings, symbols, and subrs.
  1630. Calls to snarfing CPP macros like SCM_DEFINE macro will now allocate
  1631. much of their associated data as static variables, reducing Guile's
  1632. memory footprint.
  1633. ** `scm_stat' has an additional argument, `exception_on_error'
  1634. ** `scm_primitive_load_path' has an additional argument `exception_on_not_found'
  1635. ** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type
  1636. Previously they would use the `off_t' type, which is fragile since its
  1637. definition depends on the application's value for `_FILE_OFFSET_BITS'.
  1638. ** The `long_long' C type, deprecated in 1.8, has been removed
  1639. ** Removed deprecated uniform array procedures: scm_make_uve,
  1640. scm_array_prototype, scm_list_to_uniform_array,
  1641. scm_dimensions_to_uniform_array, scm_make_ra, scm_shap2ra, scm_cvref,
  1642. scm_ra_set_contp, scm_aind, scm_raprin1
  1643. These functions have been deprecated since early 2005.
  1644. * Changes to the distribution
  1645. ** Guile's license is now LGPLv3+
  1646. In other words the GNU Lesser General Public License, version 3 or
  1647. later (at the discretion of each person that chooses to redistribute
  1648. part of Guile).
  1649. ** AM_SILENT_RULES
  1650. Guile's build is visually quieter, due to the use of Automake 1.11's
  1651. AM_SILENT_RULES. Build as `make V=1' to see all of the output.
  1652. ** GOOPS documentation folded into Guile reference manual
  1653. GOOPS, Guile's object system, used to be documented in separate manuals.
  1654. This content is now included in Guile's manual directly.
  1655. ** `guile-config' will be deprecated in favor of `pkg-config'
  1656. `guile-config' has been rewritten to get its information from
  1657. `pkg-config', so this should be a transparent change. Note however that
  1658. guile.m4 has yet to be modified to call pkg-config instead of
  1659. guile-config.
  1660. ** Guile now provides `guile-2.0.pc' instead of `guile-1.8.pc'
  1661. Programs that use `pkg-config' to find Guile or one of its Autoconf
  1662. macros should now require `guile-2.0' instead of `guile-1.8'.
  1663. ** New installation directory: $(pkglibdir)/1.9/ccache
  1664. If $(libdir) is /usr/lib, for example, Guile will install its .go files
  1665. to /usr/lib/guile/1.9/ccache. These files are architecture-specific.
  1666. ** Parallel installability fixes
  1667. Guile now installs its header files to a effective-version-specific
  1668. directory, and includes the effective version (e.g. 2.0) in the library
  1669. name (e.g. libguile-2.0.so).
  1670. This change should be transparent to users, who should detect Guile via
  1671. the guile.m4 macro, or the guile-2.0.pc pkg-config file. It will allow
  1672. parallel installs for multiple versions of Guile development
  1673. environments.
  1674. ** Dynamically loadable extensions may be placed in a Guile-specific path
  1675. Before, Guile only searched the system library paths for extensions
  1676. (e.g. /usr/lib), which meant that the names of Guile extensions had to
  1677. be globally unique. Installing them to a Guile-specific extensions
  1678. directory is cleaner. Use `pkg-config --variable=extensiondir
  1679. guile-2.0' to get the location of the extensions directory.
  1680. ** User Scheme code may be placed in a version-specific path
  1681. Before, there was only one way to install user Scheme code to a
  1682. version-specific Guile directory: install to Guile's own path,
  1683. e.g. /usr/share/guile/2.0. The site directory,
  1684. e.g. /usr/share/guile/site, was unversioned. This has been changed to
  1685. add a version-specific site directory, e.g. /usr/share/guile/site/2.0,
  1686. searched before the global site directory.
  1687. ** New dependency: libgc
  1688. See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for more information.
  1689. ** New dependency: GNU libunistring
  1690. See http://www.gnu.org/software/libunistring/, for more information. Our
  1691. Unicode support uses routines from libunistring.
  1692. ** New dependency: libffi
  1693. See http://sourceware.org/libffi/, for more information.
  1694. Changes in 1.8.8 (since 1.8.7)
  1695. * Bugs fixed
  1696. ** Fix possible buffer overruns when parsing numbers
  1697. ** Avoid clash with system setjmp/longjmp on IA64
  1698. ** Fix `wrong type arg' exceptions with IPv6 addresses
  1699. Changes in 1.8.7 (since 1.8.6)
  1700. * New modules (see the manual for details)
  1701. ** `(srfi srfi-98)', an interface to access environment variables
  1702. * Bugs fixed
  1703. ** Fix compilation with `--disable-deprecated'
  1704. ** Fix %fast-slot-ref/set!, to avoid possible segmentation fault
  1705. ** Fix MinGW build problem caused by HAVE_STRUCT_TIMESPEC confusion
  1706. ** Fix build problem when scm_t_timespec is different from struct timespec
  1707. ** Fix build when compiled with -Wundef -Werror
  1708. ** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
  1709. ** Build fixes for `powerpc-ibm-aix5.3.0.0' (AIX 5.3)
  1710. ** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
  1711. ** Better diagnose broken `(strftime "%z" ...)' in `time.test' (bug #24130)
  1712. ** Fix parsing of SRFI-88/postfix keywords longer than 128 characters
  1713. ** Fix reading of complex numbers where both parts are inexact decimals
  1714. ** Allow @ macro to work with (ice-9 syncase)
  1715. Previously, use of the @ macro in a module whose code is being
  1716. transformed by (ice-9 syncase) would cause an "Invalid syntax" error.
  1717. Now it works as you would expect (giving the value of the specified
  1718. module binding).
  1719. ** Have `scm_take_locale_symbol ()' return an interned symbol (bug #25865)
  1720. Changes in 1.8.6 (since 1.8.5)
  1721. * New features (see the manual for details)
  1722. ** New convenience function `scm_c_symbol_length ()'
  1723. ** Single stepping through code from Emacs
  1724. When you use GDS to evaluate Scheme code from Emacs, you can now use
  1725. `C-u' to indicate that you want to single step through that code. See
  1726. `Evaluating Scheme Code' in the manual for more details.
  1727. ** New "guile(1)" man page!
  1728. * Changes to the distribution
  1729. ** Automake's `AM_MAINTAINER_MODE' is no longer used
  1730. Thus, the `--enable-maintainer-mode' configure option is no longer
  1731. available: Guile is now always configured in "maintainer mode".
  1732. ** `ChangeLog' files are no longer updated
  1733. Instead, changes are detailed in the version control system's logs. See
  1734. the top-level `ChangeLog' files for details.
  1735. * Bugs fixed
  1736. ** `symbol->string' now returns a read-only string, as per R5RS
  1737. ** Fix incorrect handling of the FLAGS argument of `fold-matches'
  1738. ** `guile-config link' now prints `-L$libdir' before `-lguile'
  1739. ** Fix memory corruption involving GOOPS' `class-redefinition'
  1740. ** Fix possible deadlock in `mutex-lock'
  1741. ** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
  1742. ** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
  1743. ** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
  1744. ** Fix build issue on i386-unknown-freebsd7.0 ("break strict-aliasing rules")
  1745. ** Fix misleading output from `(help rationalize)'
  1746. ** Fix build failure on Debian hppa architecture (bad stack growth detection)
  1747. ** Fix `gcd' when called with a single, negative argument.
  1748. ** Fix `Stack overflow' errors seen when building on some platforms
  1749. ** Fix bug when `scm_with_guile ()' was called several times from the
  1750. same thread
  1751. ** The handler of SRFI-34 `with-exception-handler' is now invoked in the
  1752. dynamic environment of the call to `raise'
  1753. ** Fix potential deadlock in `make-struct'
  1754. ** Fix compilation problem with libltdl from Libtool 2.2.x
  1755. ** Fix sloppy bound checking in `string-{ref,set!}' with the empty string
  1756. Changes in 1.8.5 (since 1.8.4)
  1757. * Infrastructure changes
  1758. ** Guile repository switched from CVS to Git
  1759. The new repository can be accessed using
  1760. "git-clone git://git.sv.gnu.org/guile.git", or can be browsed on-line at
  1761. http://git.sv.gnu.org/gitweb/?p=guile.git . See `README' for details.
  1762. ** Add support for `pkg-config'
  1763. See "Autoconf Support" in the manual for details.
  1764. * New modules (see the manual for details)
  1765. ** `(srfi srfi-88)'
  1766. * New features (see the manual for details)
  1767. ** New `postfix' read option, for SRFI-88 keyword syntax
  1768. ** Some I/O primitives have been inlined, which improves I/O performance
  1769. ** New object-based traps infrastructure
  1770. This is a GOOPS-based infrastructure that builds on Guile's low-level
  1771. evaluator trap calls and facilitates the development of debugging
  1772. features like single-stepping, breakpoints, tracing and profiling.
  1773. See the `Traps' node of the manual for details.
  1774. ** New support for working on Guile code from within Emacs
  1775. Guile now incorporates the `GDS' library (previously distributed
  1776. separately) for working on Guile code from within Emacs. See the
  1777. `Using Guile In Emacs' node of the manual for details.
  1778. * Bugs fixed
  1779. ** `scm_add_slot ()' no longer segfaults (fixes bug #22369)
  1780. ** Fixed `(ice-9 match)' for patterns like `((_ ...) ...)'
  1781. Previously, expressions like `(match '((foo) (bar)) (((_ ...) ...) #t))'
  1782. would trigger an unbound variable error for `match:andmap'.
  1783. ** `(oop goops describe)' now properly provides the `describe' feature
  1784. ** Fixed `args-fold' from `(srfi srfi-37)'
  1785. Previously, parsing short option names of argument-less options would
  1786. lead to a stack overflow.
  1787. ** `(srfi srfi-35)' is now visible through `cond-expand'
  1788. ** Fixed type-checking for the second argument of `eval'
  1789. ** Fixed type-checking for SRFI-1 `partition'
  1790. ** Fixed `struct-ref' and `struct-set!' on "light structs"
  1791. ** Honor struct field access rights in GOOPS
  1792. ** Changed the storage strategy of source properties, which fixes a deadlock
  1793. ** Allow compilation of Guile-using programs in C99 mode with GCC 4.3 and later
  1794. ** Fixed build issue for GNU/Linux on IA64
  1795. ** Fixed build issues on NetBSD 1.6
  1796. ** Fixed build issue on Solaris 2.10 x86_64
  1797. ** Fixed build issue with DEC/Compaq/HP's compiler
  1798. ** Fixed `scm_from_complex_double' build issue on FreeBSD
  1799. ** Fixed `alloca' build issue on FreeBSD 6
  1800. ** Removed use of non-portable makefile constructs
  1801. ** Fixed shadowing of libc's <random.h> on Tru64, which broke compilation
  1802. ** Make sure all tests honor `$TMPDIR'
  1803. Changes in 1.8.4 (since 1.8.3)
  1804. * Bugs fixed
  1805. ** CR (ASCII 0x0d) is (again) recognized as a token delimiter by the reader
  1806. ** Fixed a segmentation fault which occurred when displaying the
  1807. backtrace of a stack with a promise object (made by `delay') in it.
  1808. ** Make `accept' leave guile mode while blocking
  1809. ** `scm_c_read ()' and `scm_c_write ()' now type-check their port argument
  1810. ** Fixed a build problem on AIX (use of func_data identifier)
  1811. ** Fixed a segmentation fault which occurred when hashx-ref or hashx-set! was
  1812. called with an associator proc that returns neither a pair nor #f.
  1813. ** Secondary threads now always return a valid module for (current-module).
  1814. ** Avoid MacOS build problems caused by incorrect combination of "64"
  1815. system and library calls.
  1816. ** `guile-snarf' now honors `$TMPDIR'
  1817. ** `guile-config compile' now reports CPPFLAGS used at compile-time
  1818. ** Fixed build with Sun Studio (Solaris 9)
  1819. ** Fixed wrong-type-arg errors when creating zero length SRFI-4
  1820. uniform vectors on AIX.
  1821. ** Fixed a deadlock that occurs upon GC with multiple threads.
  1822. ** Fixed compile problem with GCC on Solaris and AIX (use of _Complex_I)
  1823. ** Fixed autotool-derived build problems on AIX 6.1.
  1824. ** Fixed NetBSD/alpha support
  1825. ** Fixed MacOS build problem caused by use of rl_get_keymap(_name)
  1826. * New modules (see the manual for details)
  1827. ** `(srfi srfi-69)'
  1828. * Documentation fixes and improvements
  1829. ** Removed premature breakpoint documentation
  1830. The features described are not available in the series of 1.8.x
  1831. releases, so the documentation was misleading and has been removed.
  1832. ** More about Guile's default *random-state* variable
  1833. ** GOOPS: more about how to use `next-method'
  1834. * Changes to the distribution
  1835. ** Corrected a few files that referred incorrectly to the old GPL + special exception licence
  1836. In fact Guile since 1.8.0 has been licensed with the GNU Lesser
  1837. General Public License, and the few incorrect files have now been
  1838. fixed to agree with the rest of the Guile distribution.
  1839. ** Removed unnecessary extra copies of COPYING*
  1840. The distribution now contains a single COPYING.LESSER at its top level.
  1841. Changes in 1.8.3 (since 1.8.2)
  1842. * New modules (see the manual for details)
  1843. ** `(srfi srfi-35)'
  1844. ** `(srfi srfi-37)'
  1845. * Bugs fixed
  1846. ** The `(ice-9 slib)' module now works as expected
  1847. ** Expressions like "(set! 'x #t)" no longer yield a crash
  1848. ** Warnings about duplicate bindings now go to stderr
  1849. ** A memory leak in `make-socket-address' was fixed
  1850. ** Alignment issues (e.g., on SPARC) in network routines were fixed
  1851. ** A threading issue that showed up at least on NetBSD was fixed
  1852. ** Build problems on Solaris and IRIX fixed
  1853. * Implementation improvements
  1854. ** The reader is now faster, which reduces startup time
  1855. ** Procedures returned by `record-accessor' and `record-modifier' are faster
  1856. Changes in 1.8.2 (since 1.8.1):
  1857. * New procedures (see the manual for details)
  1858. ** set-program-arguments
  1859. ** make-vtable
  1860. * Incompatible changes
  1861. ** The body of a top-level `define' no longer sees the binding being created
  1862. In a top-level `define', the binding being created is no longer visible
  1863. from the `define' body. This breaks code like
  1864. "(define foo (begin (set! foo 1) (+ foo 1)))", where `foo' is now
  1865. unbound in the body. However, such code was not R5RS-compliant anyway,
  1866. per Section 5.2.1.
  1867. * Bugs fixed
  1868. ** Fractions were not `equal?' if stored in unreduced form.
  1869. (A subtle problem, since printing a value reduced it, making it work.)
  1870. ** srfi-60 `copy-bit' failed on 64-bit systems
  1871. ** "guile --use-srfi" option at the REPL can replace core functions
  1872. (Programs run with that option were ok, but in the interactive REPL
  1873. the core bindings got priority, preventing SRFI replacements or
  1874. extensions.)
  1875. ** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
  1876. ** `kill' on mingw throws an error for a PID other than oneself
  1877. ** Procedure names are attached to procedure-with-setters
  1878. ** Array read syntax works with negative lower bound
  1879. ** `array-in-bounds?' fix if an array has different lower bounds on each index
  1880. ** `*' returns exact 0 for "(* inexact 0)"
  1881. This follows what it always did for "(* 0 inexact)".
  1882. ** SRFI-19: Value returned by `(current-time time-process)' was incorrect
  1883. ** SRFI-19: `date->julian-day' did not account for timezone offset
  1884. ** `ttyname' no longer crashes when passed a non-tty argument
  1885. ** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address
  1886. ** Small memory leaks have been fixed in `make-fluid' and `add-history'
  1887. ** GOOPS: Fixed a bug in `method-more-specific?'
  1888. ** Build problems on Solaris fixed
  1889. ** Build problems on HP-UX IA64 fixed
  1890. ** Build problems on MinGW fixed
  1891. Changes in 1.8.1 (since 1.8.0):
  1892. * LFS functions are now used to access 64-bit files on 32-bit systems.
  1893. * New procedures (see the manual for details)
  1894. ** primitive-_exit - [Scheme] the-root-module
  1895. ** scm_primitive__exit - [C]
  1896. ** make-completion-function - [Scheme] (ice-9 readline)
  1897. ** scm_c_locale_stringn_to_number - [C]
  1898. ** scm_srfi1_append_reverse [C]
  1899. ** scm_srfi1_append_reverse_x [C]
  1900. ** scm_log - [C]
  1901. ** scm_log10 - [C]
  1902. ** scm_exp - [C]
  1903. ** scm_sqrt - [C]
  1904. * Bugs fixed
  1905. ** Build problems have been fixed on MacOS, SunOS, and QNX.
  1906. ** `strftime' fix sign of %z timezone offset.
  1907. ** A one-dimensional array can now be 'equal?' to a vector.
  1908. ** Structures, records, and SRFI-9 records can now be compared with `equal?'.
  1909. ** SRFI-14 standard char sets are recomputed upon a successful `setlocale'.
  1910. ** `record-accessor' and `record-modifier' now have strict type checks.
  1911. Record accessor and modifier procedures now throw an error if the
  1912. record type of the record they're given is not the type expected.
  1913. (Previously accessors returned #f and modifiers silently did nothing).
  1914. ** It is now OK to use both autoload and use-modules on a given module.
  1915. ** `apply' checks the number of arguments more carefully on "0 or 1" funcs.
  1916. Previously there was no checking on primatives like make-vector that
  1917. accept "one or two" arguments. Now there is.
  1918. ** The srfi-1 assoc function now calls its equality predicate properly.
  1919. Previously srfi-1 assoc would call the equality predicate with the key
  1920. last. According to the SRFI, the key should be first.
  1921. ** A bug in n-par-for-each and n-for-each-par-map has been fixed.
  1922. ** The array-set! procedure no longer segfaults when given a bit vector.
  1923. ** Bugs in make-shared-array have been fixed.
  1924. ** string<? and friends now follow char<? etc order on 8-bit chars.
  1925. ** The format procedure now handles inf and nan values for ~f correctly.
  1926. ** exact->inexact should no longer overflow when given certain large fractions.
  1927. ** srfi-9 accessor and modifier procedures now have strict record type checks.
  1928. This matches the srfi-9 specification.
  1929. ** (ice-9 ftw) procedures won't ignore different files with same inode number.
  1930. Previously the (ice-9 ftw) procedures would ignore any file that had
  1931. the same inode number as a file they had already seen, even if that
  1932. file was on a different device.
  1933. Changes in 1.8.0 (changes since the 1.6.x series):
  1934. * Changes to the distribution
  1935. ** Guile is now licensed with the GNU Lesser General Public License.
  1936. ** The manual is now licensed with the GNU Free Documentation License.
  1937. ** Guile now requires GNU MP (http://swox.com/gmp).
  1938. Guile now uses the GNU MP library for arbitrary precision arithmetic.
  1939. ** Guile now has separate private and public configuration headers.
  1940. That is, things like HAVE_STRING_H no longer leak from Guile's
  1941. headers.
  1942. ** Guile now provides and uses an "effective" version number.
  1943. Guile now provides scm_effective_version and effective-version
  1944. functions which return the "effective" version number. This is just
  1945. the normal full version string without the final micro-version number,
  1946. so the current effective-version is "1.8". The effective version
  1947. should remain unchanged during a stable series, and should be used for
  1948. items like the versioned share directory name
  1949. i.e. /usr/share/guile/1.8.
  1950. Providing an unchanging version number during a stable release for
  1951. things like the versioned share directory can be particularly
  1952. important for Guile "add-on" packages, since it provides a directory
  1953. that they can install to that won't be changed out from under them
  1954. with each micro release during a stable series.
  1955. ** Thread implementation has changed.
  1956. When you configure "--with-threads=null", you will get the usual
  1957. threading API (call-with-new-thread, make-mutex, etc), but you can't
  1958. actually create new threads. Also, "--with-threads=no" is now
  1959. equivalent to "--with-threads=null". This means that the thread API
  1960. is always present, although you might not be able to create new
  1961. threads.
  1962. When you configure "--with-threads=pthreads" or "--with-threads=yes",
  1963. you will get threads that are implemented with the portable POSIX
  1964. threads. These threads can run concurrently (unlike the previous
  1965. "coop" thread implementation), but need to cooperate for things like
  1966. the GC.
  1967. The default is "pthreads", unless your platform doesn't have pthreads,
  1968. in which case "null" threads are used.
  1969. See the manual for details, nodes "Initialization", "Multi-Threading",
  1970. "Blocking", and others.
  1971. ** There is the new notion of 'discouraged' features.
  1972. This is a milder form of deprecation.
  1973. Things that are discouraged should not be used in new code, but it is
  1974. OK to leave them in old code for now. When a discouraged feature is
  1975. used, no warning message is printed like there is for 'deprecated'
  1976. features. Also, things that are merely discouraged are nevertheless
  1977. implemented efficiently, while deprecated features can be very slow.
  1978. You can omit discouraged features from libguile by configuring it with
  1979. the '--disable-discouraged' option.
  1980. ** Deprecation warnings can be controlled at run-time.
  1981. (debug-enable 'warn-deprecated) switches them on and (debug-disable
  1982. 'warn-deprecated) switches them off.
  1983. ** Support for SRFI 61, extended cond syntax for multiple values has
  1984. been added.
  1985. This SRFI is always available.
  1986. ** Support for require-extension, SRFI-55, has been added.
  1987. The SRFI-55 special form `require-extension' has been added. It is
  1988. available at startup, and provides a portable way to load Scheme
  1989. extensions. SRFI-55 only requires support for one type of extension,
  1990. "srfi"; so a set of SRFIs may be loaded via (require-extension (srfi 1
  1991. 13 14)).
  1992. ** New module (srfi srfi-26) provides support for `cut' and `cute'.
  1993. The (srfi srfi-26) module is an implementation of SRFI-26 which
  1994. provides the `cut' and `cute' syntax. These may be used to specialize
  1995. parameters without currying.
  1996. ** New module (srfi srfi-31)
  1997. This is an implementation of SRFI-31 which provides a special form
  1998. `rec' for recursive evaluation.
  1999. ** The modules (srfi srfi-13), (srfi srfi-14) and (srfi srfi-4) have
  2000. been merged with the core, making their functionality always
  2001. available.
  2002. The modules are still available, tho, and you could use them together
  2003. with a renaming import, for example.
  2004. ** Guile no longer includes its own version of libltdl.
  2005. The official version is good enough now.
  2006. ** The --enable-htmldoc option has been removed from 'configure'.
  2007. Support for translating the documentation into HTML is now always
  2008. provided. Use 'make html'.
  2009. ** New module (ice-9 serialize):
  2010. (serialize FORM1 ...) and (parallelize FORM1 ...) are useful when you
  2011. don't trust the thread safety of most of your program, but where you
  2012. have some section(s) of code which you consider can run in parallel to
  2013. other sections. See ice-9/serialize.scm for more information.
  2014. ** The configure option '--disable-arrays' has been removed.
  2015. Support for arrays and uniform numeric arrays is now always included
  2016. in Guile.
  2017. * Changes to the stand-alone interpreter
  2018. ** New command line option `-L'.
  2019. This option adds a directory to the front of the load path.
  2020. ** New command line option `--no-debug'.
  2021. Specifying `--no-debug' on the command line will keep the debugging
  2022. evaluator turned off, even for interactive sessions.
  2023. ** User-init file ~/.guile is now loaded with the debugging evaluator.
  2024. Previously, the normal evaluator would have been used. Using the
  2025. debugging evaluator gives better error messages.
  2026. ** The '-e' option now 'read's its argument.
  2027. This is to allow the new '(@ MODULE-NAME VARIABLE-NAME)' construct to
  2028. be used with '-e'. For example, you can now write a script like
  2029. #! /bin/sh
  2030. exec guile -e '(@ (demo) main)' -s "$0" "$@"
  2031. !#
  2032. (define-module (demo)
  2033. :export (main))
  2034. (define (main args)
  2035. (format #t "Demo: ~a~%" args))
  2036. * Changes to Scheme functions and syntax
  2037. ** Guardians have changed back to their original semantics
  2038. Guardians now behave like described in the paper by Dybvig et al. In
  2039. particular, they no longer make guarantees about the order in which
  2040. they return objects, and they can no longer be greedy.
  2041. They no longer drop cyclic data structures.
  2042. The C function scm_make_guardian has been changed incompatibly and no
  2043. longer takes the 'greedy_p' argument.
  2044. ** New function hashx-remove!
  2045. This function completes the set of 'hashx' functions.
  2046. ** The concept of dynamic roots has been factored into continuation
  2047. barriers and dynamic states.
  2048. Each thread has a current dynamic state that carries the values of the
  2049. fluids. You can create and copy dynamic states and use them as the
  2050. second argument for 'eval'. See "Fluids and Dynamic States" in the
  2051. manual.
  2052. To restrict the influence that captured continuations can have on the
  2053. control flow, you can errect continuation barriers. See "Continuation
  2054. Barriers" in the manual.
  2055. The function call-with-dynamic-root now essentially temporarily
  2056. installs a new dynamic state and errects a continuation barrier.
  2057. ** The default load path no longer includes "." at the end.
  2058. Automatically loading modules from the current directory should not
  2059. happen by default. If you want to allow it in a more controlled
  2060. manner, set the environment variable GUILE_LOAD_PATH or the Scheme
  2061. variable %load-path.
  2062. ** The uniform vector and array support has been overhauled.
  2063. It now complies with SRFI-4 and the weird prototype based uniform
  2064. array creation has been deprecated. See the manual for more details.
  2065. Some non-compatible changes have been made:
  2066. - characters can no longer be stored into byte arrays.
  2067. - strings and bit vectors are no longer considered to be uniform numeric
  2068. vectors.
  2069. - array-rank throws an error for non-arrays instead of returning zero.
  2070. - array-ref does no longer accept non-arrays when no indices are given.
  2071. There is the new notion of 'generalized vectors' and corresponding
  2072. procedures like 'generalized-vector-ref'. Generalized vectors include
  2073. strings, bitvectors, ordinary vectors, and uniform numeric vectors.
  2074. Arrays use generalized vectors as their storage, so that you still
  2075. have arrays of characters, bits, etc. However, uniform-array-read!
  2076. and uniform-array-write can no longer read/write strings and
  2077. bitvectors.
  2078. ** There is now support for copy-on-write substrings, mutation-sharing
  2079. substrings and read-only strings.
  2080. Three new procedures are related to this: substring/shared,
  2081. substring/copy, and substring/read-only. See the manual for more
  2082. information.
  2083. ** Backtraces will now highlight the value that caused the error.
  2084. By default, these values are enclosed in "{...}", such as in this
  2085. example:
  2086. guile> (car 'a)
  2087. Backtrace:
  2088. In current input:
  2089. 1: 0* [car {a}]
  2090. <unnamed port>:1:1: In procedure car in expression (car (quote a)):
  2091. <unnamed port>:1:1: Wrong type (expecting pair): a
  2092. ABORT: (wrong-type-arg)
  2093. The prefix and suffix used for highlighting can be set via the two new
  2094. printer options 'highlight-prefix' and 'highlight-suffix'. For
  2095. example, putting this into ~/.guile will output the bad value in bold
  2096. on an ANSI terminal:
  2097. (print-set! highlight-prefix "\x1b[1m")
  2098. (print-set! highlight-suffix "\x1b[22m")
  2099. ** 'gettext' support for internationalization has been added.
  2100. See the manual for details.
  2101. ** New syntax '@' and '@@':
  2102. You can now directly refer to variables exported from a module by
  2103. writing
  2104. (@ MODULE-NAME VARIABLE-NAME)
  2105. For example (@ (ice-9 pretty-print) pretty-print) will directly access
  2106. the pretty-print variable exported from the (ice-9 pretty-print)
  2107. module. You don't need to 'use' that module first. You can also use
  2108. '@' as a target of 'set!', as in (set! (@ mod var) val).
  2109. The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
  2110. but it can also access variables that have not been exported. It is
  2111. intended only for kluges and temporary fixes and for debugging, not
  2112. for ordinary code.
  2113. ** Keyword syntax has been made more disciplined.
  2114. Previously, the name of a keyword was read as a 'token' but printed as
  2115. a symbol. Now, it is read as a general Scheme datum which must be a
  2116. symbol.
  2117. Previously:
  2118. guile> #:12
  2119. #:#{12}#
  2120. guile> #:#{12}#
  2121. #:#{\#{12}\#}#
  2122. guile> #:(a b c)
  2123. #:#{}#
  2124. ERROR: In expression (a b c):
  2125. Unbound variable: a
  2126. guile> #: foo
  2127. #:#{}#
  2128. ERROR: Unbound variable: foo
  2129. Now:
  2130. guile> #:12
  2131. ERROR: Wrong type (expecting symbol): 12
  2132. guile> #:#{12}#
  2133. #:#{12}#
  2134. guile> #:(a b c)
  2135. ERROR: Wrong type (expecting symbol): (a b c)
  2136. guile> #: foo
  2137. #:foo
  2138. ** The printing of symbols that might look like keywords can be
  2139. controlled.
  2140. The new printer option 'quote-keywordish-symbols' controls how symbols
  2141. are printed that have a colon as their first or last character. The
  2142. default now is to only quote a symbol with #{...}# when the read
  2143. option 'keywords' is not '#f'. Thus:
  2144. guile> (define foo (string->symbol ":foo"))
  2145. guile> (read-set! keywords #f)
  2146. guile> foo
  2147. :foo
  2148. guile> (read-set! keywords 'prefix)
  2149. guile> foo
  2150. #{:foo}#
  2151. guile> (print-set! quote-keywordish-symbols #f)
  2152. guile> foo
  2153. :foo
  2154. ** 'while' now provides 'break' and 'continue'
  2155. break and continue were previously bound in a while loop, but not
  2156. documented, and continue didn't quite work properly. The undocumented
  2157. parameter to break which gave a return value for the while has been
  2158. dropped.
  2159. ** 'call-with-current-continuation' is now also available under the name
  2160. 'call/cc'.
  2161. ** The module system now checks for duplicate bindings.
  2162. The module system now can check for name conflicts among imported
  2163. bindings.
  2164. The behavior can be controlled by specifying one or more 'duplicates'
  2165. handlers. For example, to make Guile return an error for every name
  2166. collision, write:
  2167. (define-module (foo)
  2168. :use-module (bar)
  2169. :use-module (baz)
  2170. :duplicates check)
  2171. The new default behavior of the module system when a name collision
  2172. has been detected is to
  2173. 1. Give priority to bindings marked as a replacement.
  2174. 2. Issue a warning (different warning if overriding core binding).
  2175. 3. Give priority to the last encountered binding (this corresponds to
  2176. the old behavior).
  2177. If you want the old behavior back without replacements or warnings you
  2178. can add the line:
  2179. (default-duplicate-binding-handler 'last)
  2180. to your .guile init file.
  2181. ** New define-module option: :replace
  2182. :replace works as :export, but, in addition, marks the binding as a
  2183. replacement.
  2184. A typical example is `format' in (ice-9 format) which is a replacement
  2185. for the core binding `format'.
  2186. ** Adding prefixes to imported bindings in the module system
  2187. There is now a new :use-module option :prefix. It can be used to add
  2188. a prefix to all imported bindings.
  2189. (define-module (foo)
  2190. :use-module ((bar) :prefix bar:))
  2191. will import all bindings exported from bar, but rename them by adding
  2192. the prefix `bar:'.
  2193. ** Conflicting generic functions can be automatically merged.
  2194. When two imported bindings conflict and they are both generic
  2195. functions, the two functions can now be merged automatically. This is
  2196. activated with the 'duplicates' handler 'merge-generics'.
  2197. ** New function: effective-version
  2198. Returns the "effective" version number. This is just the normal full
  2199. version string without the final micro-version number. See "Changes
  2200. to the distribution" above.
  2201. ** New threading functions: parallel, letpar, par-map, and friends
  2202. These are convenient ways to run calculations in parallel in new
  2203. threads. See "Parallel forms" in the manual for details.
  2204. ** New function 'try-mutex'.
  2205. This function will attempt to lock a mutex but will return immediately
  2206. instead of blocking and indicate failure.
  2207. ** Waiting on a condition variable can have a timeout.
  2208. The function 'wait-condition-variable' now takes a third, optional
  2209. argument that specifies the point in time where the waiting should be
  2210. aborted.
  2211. ** New function 'broadcast-condition-variable'.
  2212. ** New functions 'all-threads' and 'current-thread'.
  2213. ** Signals and system asyncs work better with threads.
  2214. The function 'sigaction' now takes a fourth, optional, argument that
  2215. specifies the thread that the handler should run in. When the
  2216. argument is omitted, the handler will run in the thread that called
  2217. 'sigaction'.
  2218. Likewise, 'system-async-mark' takes a second, optional, argument that
  2219. specifies the thread that the async should run in. When it is
  2220. omitted, the async will run in the thread that called
  2221. 'system-async-mark'.
  2222. C code can use the new functions scm_sigaction_for_thread and
  2223. scm_system_async_mark_for_thread to pass the new thread argument.
  2224. When a thread blocks on a mutex, a condition variable or is waiting
  2225. for IO to be possible, it will still execute system asyncs. This can
  2226. be used to interrupt such a thread by making it execute a 'throw', for
  2227. example.
  2228. ** The function 'system-async' is deprecated.
  2229. You can now pass any zero-argument procedure to 'system-async-mark'.
  2230. The function 'system-async' will just return its argument unchanged
  2231. now.
  2232. ** New functions 'call-with-blocked-asyncs' and
  2233. 'call-with-unblocked-asyncs'
  2234. The expression (call-with-blocked-asyncs PROC) will call PROC and will
  2235. block execution of system asyncs for the current thread by one level
  2236. while PROC runs. Likewise, call-with-unblocked-asyncs will call a
  2237. procedure and will unblock the execution of system asyncs by one
  2238. level for the current thread.
  2239. Only system asyncs are affected by these functions.
  2240. ** The functions 'mask-signals' and 'unmask-signals' are deprecated.
  2241. Use 'call-with-blocked-asyncs' or 'call-with-unblocked-asyncs'
  2242. instead. Those functions are easier to use correctly and can be
  2243. nested.
  2244. ** New function 'unsetenv'.
  2245. ** New macro 'define-syntax-public'.
  2246. It works like 'define-syntax' and also exports the defined macro (but
  2247. only on top-level).
  2248. ** There is support for Infinity and NaNs.
  2249. Following PLT Scheme, Guile can now work with infinite numbers, and
  2250. 'not-a-numbers'.
  2251. There is new syntax for numbers: "+inf.0" (infinity), "-inf.0"
  2252. (negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as
  2253. "+nan.0"). These numbers are inexact and have no exact counterpart.
  2254. Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the
  2255. sign of the dividend. The infinities are integers, and they answer #t
  2256. for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is
  2257. not '=' to itself, but '+nan.0' is 'eqv?' to itself.
  2258. For example
  2259. (/ 1 0.0)
  2260. => +inf.0
  2261. (/ 0 0.0)
  2262. => +nan.0
  2263. (/ 0)
  2264. ERROR: Numerical overflow
  2265. Two new predicates 'inf?' and 'nan?' can be used to test for the
  2266. special values.
  2267. ** Inexact zero can have a sign.
  2268. Guile can now distinguish between plus and minus inexact zero, if your
  2269. platform supports this, too. The two zeros are equal according to
  2270. '=', but not according to 'eqv?'. For example
  2271. (- 0.0)
  2272. => -0.0
  2273. (= 0.0 (- 0.0))
  2274. => #t
  2275. (eqv? 0.0 (- 0.0))
  2276. => #f
  2277. ** Guile now has exact rationals.
  2278. Guile can now represent fractions such as 1/3 exactly. Computing with
  2279. them is also done exactly, of course:
  2280. (* 1/3 3/2)
  2281. => 1/2
  2282. ** 'floor', 'ceiling', 'round' and 'truncate' now return exact numbers
  2283. for exact arguments.
  2284. For example: (floor 2) now returns an exact 2 where in the past it
  2285. returned an inexact 2.0. Likewise, (floor 5/4) returns an exact 1.
  2286. ** inexact->exact no longer returns only integers.
  2287. Without exact rationals, the closest exact number was always an
  2288. integer, but now inexact->exact returns the fraction that is exactly
  2289. equal to a floating point number. For example:
  2290. (inexact->exact 1.234)
  2291. => 694680242521899/562949953421312
  2292. When you want the old behavior, use 'round' explicitly:
  2293. (inexact->exact (round 1.234))
  2294. => 1
  2295. ** New function 'rationalize'.
  2296. This function finds a simple fraction that is close to a given real
  2297. number. For example (and compare with inexact->exact above):
  2298. (rationalize (inexact->exact 1.234) 1/2000)
  2299. => 58/47
  2300. Note that, as required by R5RS, rationalize returns only then an exact
  2301. result when both its arguments are exact.
  2302. ** 'odd?' and 'even?' work also for inexact integers.
  2303. Previously, (odd? 1.0) would signal an error since only exact integers
  2304. were recognized as integers. Now (odd? 1.0) returns #t, (odd? 2.0)
  2305. returns #f and (odd? 1.5) signals an error.
  2306. ** Guile now has uninterned symbols.
  2307. The new function 'make-symbol' will return an uninterned symbol. This
  2308. is a symbol that is unique and is guaranteed to remain unique.
  2309. However, uninterned symbols can not yet be read back in.
  2310. Use the new function 'symbol-interned?' to check whether a symbol is
  2311. interned or not.
  2312. ** pretty-print has more options.
  2313. The function pretty-print from the (ice-9 pretty-print) module can now
  2314. also be invoked with keyword arguments that control things like
  2315. maximum output width. See the manual for details.
  2316. ** Variables have no longer a special behavior for `equal?'.
  2317. Previously, comparing two variables with `equal?' would recursivly
  2318. compare their values. This is no longer done. Variables are now only
  2319. `equal?' if they are `eq?'.
  2320. ** `(begin)' is now valid.
  2321. You can now use an empty `begin' form. It will yield #<unspecified>
  2322. when evaluated and simply be ignored in a definition context.
  2323. ** Deprecated: procedure->macro
  2324. Change your code to use 'define-macro' or r5rs macros. Also, be aware
  2325. that macro expansion will not be done during evaluation, but prior to
  2326. evaluation.
  2327. ** Soft ports now allow a `char-ready?' procedure
  2328. The vector argument to `make-soft-port' can now have a length of
  2329. either 5 or 6. (Previously the length had to be 5.) The optional 6th
  2330. element is interpreted as an `input-waiting' thunk -- i.e. a thunk
  2331. that returns the number of characters that can be read immediately
  2332. without the soft port blocking.
  2333. ** Deprecated: undefine
  2334. There is no replacement for undefine.
  2335. ** The functions make-keyword-from-dash-symbol and keyword-dash-symbol
  2336. have been discouraged.
  2337. They are relics from a time where a keyword like #:foo was used
  2338. directly as a Tcl option "-foo" and thus keywords were internally
  2339. stored as a symbol with a starting dash. We now store a symbol
  2340. without the dash.
  2341. Use symbol->keyword and keyword->symbol instead.
  2342. ** The `cheap' debug option is now obsolete
  2343. Evaluator trap calls are now unconditionally "cheap" - in other words,
  2344. they pass a debug object to the trap handler rather than a full
  2345. continuation. The trap handler code can capture a full continuation
  2346. by using `call-with-current-continuation' in the usual way, if it so
  2347. desires.
  2348. The `cheap' option is retained for now so as not to break existing
  2349. code which gets or sets it, but setting it now has no effect. It will
  2350. be removed in the next major Guile release.
  2351. ** Evaluator trap calls now support `tweaking'
  2352. `Tweaking' means that the trap handler code can modify the Scheme
  2353. expression that is about to be evaluated (in the case of an
  2354. enter-frame trap) or the value that is being returned (in the case of
  2355. an exit-frame trap). The trap handler code indicates that it wants to
  2356. do this by returning a pair whose car is the symbol 'instead and whose
  2357. cdr is the modified expression or return value.
  2358. * Changes to the C interface
  2359. ** The functions scm_hash_fn_remove_x and scm_hashx_remove_x no longer
  2360. take a 'delete' function argument.
  2361. This argument makes no sense since the delete function is used to
  2362. remove a pair from an alist, and this must not be configurable.
  2363. This is an incompatible change.
  2364. ** The GH interface is now subject to the deprecation mechanism
  2365. The GH interface has been deprecated for quite some time but now it is
  2366. actually removed from Guile when it is configured with
  2367. --disable-deprecated.
  2368. See the manual "Transitioning away from GH" for more information.
  2369. ** A new family of functions for converting between C values and
  2370. Scheme values has been added.
  2371. These functions follow a common naming scheme and are designed to be
  2372. easier to use, thread-safe and more future-proof than the older
  2373. alternatives.
  2374. - int scm_is_* (...)
  2375. These are predicates that return a C boolean: 1 or 0. Instead of
  2376. SCM_NFALSEP, you can now use scm_is_true, for example.
  2377. - <type> scm_to_<type> (SCM val, ...)
  2378. These are functions that convert a Scheme value into an appropriate
  2379. C value. For example, you can use scm_to_int to safely convert from
  2380. a SCM to an int.
  2381. - SCM scm_from_<type> (<type> val, ...)
  2382. These functions convert from a C type to a SCM value; for example,
  2383. scm_from_int for ints.
  2384. There is a huge number of these functions, for numbers, strings,
  2385. symbols, vectors, etc. They are documented in the reference manual in
  2386. the API section together with the types that they apply to.
  2387. ** New functions for dealing with complex numbers in C have been added.
  2388. The new functions are scm_c_make_rectangular, scm_c_make_polar,
  2389. scm_c_real_part, scm_c_imag_part, scm_c_magnitude and scm_c_angle.
  2390. They work like scm_make_rectangular etc but take or return doubles
  2391. directly.
  2392. ** The function scm_make_complex has been discouraged.
  2393. Use scm_c_make_rectangular instead.
  2394. ** The INUM macros have been deprecated.
  2395. A lot of code uses these macros to do general integer conversions,
  2396. although the macros only work correctly with fixnums. Use the
  2397. following alternatives.
  2398. SCM_INUMP -> scm_is_integer or similar
  2399. SCM_NINUMP -> !scm_is_integer or similar
  2400. SCM_MAKINUM -> scm_from_int or similar
  2401. SCM_INUM -> scm_to_int or similar
  2402. SCM_VALIDATE_INUM_* -> Do not use these; scm_to_int, etc. will
  2403. do the validating for you.
  2404. ** The scm_num2<type> and scm_<type>2num functions and scm_make_real
  2405. have been discouraged.
  2406. Use the newer scm_to_<type> and scm_from_<type> functions instead for
  2407. new code. The functions have been discouraged since they don't fit
  2408. the naming scheme.
  2409. ** The 'boolean' macros SCM_FALSEP etc have been discouraged.
  2410. They have strange names, especially SCM_NFALSEP, and SCM_BOOLP
  2411. evaluates its argument twice. Use scm_is_true, etc. instead for new
  2412. code.
  2413. ** The macro SCM_EQ_P has been discouraged.
  2414. Use scm_is_eq for new code, which fits better into the naming
  2415. conventions.
  2416. ** The macros SCM_CONSP, SCM_NCONSP, SCM_NULLP, and SCM_NNULLP have
  2417. been discouraged.
  2418. Use the function scm_is_pair or scm_is_null instead.
  2419. ** The functions scm_round and scm_truncate have been deprecated and
  2420. are now available as scm_c_round and scm_c_truncate, respectively.
  2421. These functions occupy the names that scm_round_number and
  2422. scm_truncate_number should have.
  2423. ** The functions scm_c_string2str, scm_c_substring2str, and
  2424. scm_c_symbol2str have been deprecated.
  2425. Use scm_to_locale_stringbuf or similar instead, maybe together with
  2426. scm_substring.
  2427. ** New functions scm_c_make_string, scm_c_string_length,
  2428. scm_c_string_ref, scm_c_string_set_x, scm_c_substring,
  2429. scm_c_substring_shared, scm_c_substring_copy.
  2430. These are like scm_make_string, scm_length, etc. but are slightly
  2431. easier to use from C.
  2432. ** The macros SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_LENGTH,
  2433. SCM_SYMBOL_CHARS, and SCM_SYMBOL_LENGTH have been deprecated.
  2434. They export too many assumptions about the implementation of strings
  2435. and symbols that are no longer true in the presence of
  2436. mutation-sharing substrings and when Guile switches to some form of
  2437. Unicode.
  2438. When working with strings, it is often best to use the normal string
  2439. functions provided by Guile, such as scm_c_string_ref,
  2440. scm_c_string_set_x, scm_string_append, etc. Be sure to look in the
  2441. manual since many more such functions are now provided than
  2442. previously.
  2443. When you want to convert a SCM string to a C string, use the
  2444. scm_to_locale_string function or similar instead. For symbols, use
  2445. scm_symbol_to_string and then work with that string. Because of the
  2446. new string representation, scm_symbol_to_string does not need to copy
  2447. and is thus quite efficient.
  2448. ** Some string, symbol and keyword functions have been discouraged.
  2449. They don't fit into the uniform naming scheme and are not explicit
  2450. about the character encoding.
  2451. Replace according to the following table:
  2452. scm_allocate_string -> scm_c_make_string
  2453. scm_take_str -> scm_take_locale_stringn
  2454. scm_take0str -> scm_take_locale_string
  2455. scm_mem2string -> scm_from_locale_stringn
  2456. scm_str2string -> scm_from_locale_string
  2457. scm_makfrom0str -> scm_from_locale_string
  2458. scm_mem2symbol -> scm_from_locale_symboln
  2459. scm_mem2uninterned_symbol -> scm_from_locale_stringn + scm_make_symbol
  2460. scm_str2symbol -> scm_from_locale_symbol
  2461. SCM_SYMBOL_HASH -> scm_hashq
  2462. SCM_SYMBOL_INTERNED_P -> scm_symbol_interned_p
  2463. scm_c_make_keyword -> scm_from_locale_keyword
  2464. ** The functions scm_keyword_to_symbol and sym_symbol_to_keyword are
  2465. now also available to C code.
  2466. ** SCM_KEYWORDP and SCM_KEYWORDSYM have been deprecated.
  2467. Use scm_is_keyword and scm_keyword_to_symbol instead, but note that
  2468. the latter returns the true name of the keyword, not the 'dash name',
  2469. as SCM_KEYWORDSYM used to do.
  2470. ** A new way to access arrays in a thread-safe and efficient way has
  2471. been added.
  2472. See the manual, node "Accessing Arrays From C".
  2473. ** The old uniform vector and bitvector implementations have been
  2474. unceremoniously removed.
  2475. This implementation exposed the details of the tagging system of
  2476. Guile. Use the new C API explained in the manual in node "Uniform
  2477. Numeric Vectors" and "Bit Vectors", respectively.
  2478. The following macros are gone: SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
  2479. SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
  2480. SCM_SET_UVECTOR_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
  2481. SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
  2482. SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
  2483. SCM_SET_BITVECTOR_LENGTH, SCM_BITVEC_REF, SCM_BITVEC_SET,
  2484. SCM_BITVEC_CLR.
  2485. ** The macros dealing with vectors have been deprecated.
  2486. Use the new functions scm_is_vector, scm_vector_elements,
  2487. scm_vector_writable_elements, etc, or scm_is_simple_vector,
  2488. SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, etc instead. See the
  2489. manual for more details.
  2490. Deprecated are SCM_VECTORP, SCM_VELTS, SCM_VECTOR_MAX_LENGTH,
  2491. SCM_VECTOR_LENGTH, SCM_VECTOR_REF, SCM_VECTOR_SET, SCM_WRITABLE_VELTS.
  2492. The following macros have been removed: SCM_VECTOR_BASE,
  2493. SCM_SET_VECTOR_BASE, SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
  2494. SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS.
  2495. ** Some C functions and macros related to arrays have been deprecated.
  2496. Migrate according to the following table:
  2497. scm_make_uve -> scm_make_typed_array, scm_make_u8vector etc.
  2498. scm_make_ra -> scm_make_array
  2499. scm_shap2ra -> scm_make_array
  2500. scm_cvref -> scm_c_generalized_vector_ref
  2501. scm_ra_set_contp -> do not use
  2502. scm_aind -> scm_array_handle_pos
  2503. scm_raprin1 -> scm_display or scm_write
  2504. SCM_ARRAYP -> scm_is_array
  2505. SCM_ARRAY_NDIM -> scm_c_array_rank
  2506. SCM_ARRAY_DIMS -> scm_array_handle_dims
  2507. SCM_ARRAY_CONTP -> do not use
  2508. SCM_ARRAY_MEM -> do not use
  2509. SCM_ARRAY_V -> scm_array_handle_elements or similar
  2510. SCM_ARRAY_BASE -> do not use
  2511. ** SCM_CELL_WORD_LOC has been deprecated.
  2512. Use the new macro SCM_CELL_OBJECT_LOC instead, which returns a pointer
  2513. to a SCM, as opposed to a pointer to a scm_t_bits.
  2514. This was done to allow the correct use of pointers into the Scheme
  2515. heap. Previously, the heap words were of type scm_t_bits and local
  2516. variables and function arguments were of type SCM, making it
  2517. non-standards-conformant to have a pointer that can point to both.
  2518. ** New macros SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, etc.
  2519. These macros should be used instead of SCM_CELL_WORD_2/3 to access the
  2520. second and third words of double smobs. Likewise for
  2521. SCM_SET_SMOB_DATA_2 and SCM_SET_SMOB_DATA_3.
  2522. Also, there is SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS that should be
  2523. used to get and set the 16 exra bits in the zeroth word of a smob.
  2524. And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for
  2525. accesing the first immediate word of a smob as a SCM value, and there
  2526. is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate
  2527. smob word. Like wise for SCM_SMOB_OBJECT_2, etc.
  2528. ** New way to deal with non-local exits and re-entries.
  2529. There is a new set of functions that essentially do what
  2530. scm_internal_dynamic_wind does, but in a way that is more convenient
  2531. for C code in some situations. Here is a quick example of how to
  2532. prevent a potential memory leak:
  2533. void
  2534. foo ()
  2535. {
  2536. char *mem;
  2537. scm_dynwind_begin (0);
  2538. mem = scm_malloc (100);
  2539. scm_dynwind_unwind_handler (free, mem, SCM_F_WIND_EXPLICITLY);
  2540. /* MEM would leak if BAR throws an error.
  2541. SCM_DYNWIND_UNWIND_HANDLER frees it nevertheless.
  2542. */
  2543. bar ();
  2544. scm_dynwind_end ();
  2545. /* Because of SCM_F_WIND_EXPLICITLY, MEM will be freed by
  2546. SCM_DYNWIND_END as well.
  2547. */
  2548. }
  2549. For full documentation, see the node "Dynamic Wind" in the manual.
  2550. ** New function scm_dynwind_free
  2551. This function calls 'free' on a given pointer when a dynwind context
  2552. is left. Thus the call to scm_dynwind_unwind_handler above could be
  2553. replaced with simply scm_dynwind_free (mem).
  2554. ** New functions scm_c_call_with_blocked_asyncs and
  2555. scm_c_call_with_unblocked_asyncs
  2556. Like scm_call_with_blocked_asyncs etc. but for C functions.
  2557. ** New functions scm_dynwind_block_asyncs and scm_dynwind_unblock_asyncs
  2558. In addition to scm_c_call_with_blocked_asyncs you can now also use
  2559. scm_dynwind_block_asyncs in a 'dynwind context' (see above). Likewise for
  2560. scm_c_call_with_unblocked_asyncs and scm_dynwind_unblock_asyncs.
  2561. ** The macros SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
  2562. SCM_REALLOW_INTS have been deprecated.
  2563. They do no longer fulfill their original role of blocking signal
  2564. delivery. Depending on what you want to achieve, replace a pair of
  2565. SCM_DEFER_INTS and SCM_ALLOW_INTS with a dynwind context that locks a
  2566. mutex, blocks asyncs, or both. See node "Critical Sections" in the
  2567. manual.
  2568. ** The value 'scm_mask_ints' is no longer writable.
  2569. Previously, you could set scm_mask_ints directly. This is no longer
  2570. possible. Use scm_c_call_with_blocked_asyncs and
  2571. scm_c_call_with_unblocked_asyncs instead.
  2572. ** New way to temporarily set the current input, output or error ports
  2573. C code can now use scm_dynwind_current_<foo>_port in a 'dynwind
  2574. context' (see above). <foo> is one of "input", "output" or "error".
  2575. ** New way to temporarily set fluids
  2576. C code can now use scm_dynwind_fluid in a 'dynwind context' (see
  2577. above) to temporarily set the value of a fluid.
  2578. ** New types scm_t_intmax and scm_t_uintmax.
  2579. On platforms that have them, these types are identical to intmax_t and
  2580. uintmax_t, respectively. On other platforms, they are identical to
  2581. the largest integer types that Guile knows about.
  2582. ** The functions scm_unmemocopy and scm_unmemoize have been removed.
  2583. You should not have used them.
  2584. ** Many public #defines with generic names have been made private.
  2585. #defines with generic names like HAVE_FOO or SIZEOF_FOO have been made
  2586. private or renamed with a more suitable public name.
  2587. ** The macro SCM_TYP16S has been deprecated.
  2588. This macro is not intended for public use.
  2589. ** The macro SCM_SLOPPY_INEXACTP has been deprecated.
  2590. Use scm_is_true (scm_inexact_p (...)) instead.
  2591. ** The macro SCM_SLOPPY_REALP has been deprecated.
  2592. Use scm_is_real instead.
  2593. ** The macro SCM_SLOPPY_COMPLEXP has been deprecated.
  2594. Use scm_is_complex instead.
  2595. ** Some preprocessor defines have been deprecated.
  2596. These defines indicated whether a certain feature was present in Guile
  2597. or not. Going forward, assume that the features are always present.
  2598. The macros are: USE_THREADS, GUILE_ISELECT, READER_EXTENSIONS,
  2599. DEBUG_EXTENSIONS, DYNAMIC_LINKING.
  2600. The following macros have been removed completely: MEMOIZE_LOCALS,
  2601. SCM_RECKLESS, SCM_CAUTIOUS.
  2602. ** The preprocessor define STACK_DIRECTION has been deprecated.
  2603. There should be no need to know about the stack direction for ordinary
  2604. programs.
  2605. ** New function: scm_effective_version
  2606. Returns the "effective" version number. This is just the normal full
  2607. version string without the final micro-version number. See "Changes
  2608. to the distribution" above.
  2609. ** The function scm_call_with_new_thread has a new prototype.
  2610. Instead of taking a list with the thunk and handler, these two
  2611. arguments are now passed directly:
  2612. SCM scm_call_with_new_thread (SCM thunk, SCM handler);
  2613. This is an incompatible change.
  2614. ** New snarfer macro SCM_DEFINE_PUBLIC.
  2615. This is like SCM_DEFINE, but also calls scm_c_export for the defined
  2616. function in the init section.
  2617. ** The snarfer macro SCM_SNARF_INIT is now officially supported.
  2618. ** Garbage collector rewrite.
  2619. The garbage collector is cleaned up a lot, and now uses lazy
  2620. sweeping. This is reflected in the output of (gc-stats); since cells
  2621. are being freed when they are allocated, the cells-allocated field
  2622. stays roughly constant.
  2623. For malloc related triggers, the behavior is changed. It uses the same
  2624. heuristic as the cell-triggered collections. It may be tuned with the
  2625. environment variables GUILE_MIN_YIELD_MALLOC. This is the percentage
  2626. for minimum yield of malloc related triggers. The default is 40.
  2627. GUILE_INIT_MALLOC_LIMIT sets the initial trigger for doing a GC. The
  2628. default is 200 kb.
  2629. Debugging operations for the freelist have been deprecated, along with
  2630. the C variables that control garbage collection. The environment
  2631. variables GUILE_MAX_SEGMENT_SIZE, GUILE_INIT_SEGMENT_SIZE_2,
  2632. GUILE_INIT_SEGMENT_SIZE_1, and GUILE_MIN_YIELD_2 should be used.
  2633. For understanding the memory usage of a GUILE program, the routine
  2634. gc-live-object-stats returns an alist containing the number of live
  2635. objects for every type.
  2636. ** The function scm_definedp has been renamed to scm_defined_p
  2637. The name scm_definedp is deprecated.
  2638. ** The struct scm_cell type has been renamed to scm_t_cell
  2639. This is in accordance to Guile's naming scheme for types. Note that
  2640. the name scm_cell is now used for a function that allocates and
  2641. initializes a new cell (see below).
  2642. ** New functions for memory management
  2643. A new set of functions for memory management has been added since the
  2644. old way (scm_must_malloc, scm_must_free, etc) was error prone and
  2645. indeed, Guile itself contained some long standing bugs that could
  2646. cause aborts in long running programs.
  2647. The new functions are more symmetrical and do not need cooperation
  2648. from smob free routines, among other improvements.
  2649. The new functions are scm_malloc, scm_realloc, scm_calloc, scm_strdup,
  2650. scm_strndup, scm_gc_malloc, scm_gc_calloc, scm_gc_realloc,
  2651. scm_gc_free, scm_gc_register_collectable_memory, and
  2652. scm_gc_unregister_collectable_memory. Refer to the manual for more
  2653. details and for upgrading instructions.
  2654. The old functions for memory management have been deprecated. They
  2655. are: scm_must_malloc, scm_must_realloc, scm_must_free,
  2656. scm_must_strdup, scm_must_strndup, scm_done_malloc, scm_done_free.
  2657. ** Declarations of exported features are marked with SCM_API.
  2658. Every declaration of a feature that belongs to the exported Guile API
  2659. has been marked by adding the macro "SCM_API" to the start of the
  2660. declaration. This macro can expand into different things, the most
  2661. common of which is just "extern" for Unix platforms. On Win32, it can
  2662. be used to control which symbols are exported from a DLL.
  2663. If you `#define SCM_IMPORT' before including <libguile.h>, SCM_API
  2664. will expand into "__declspec (dllimport) extern", which is needed for
  2665. linking to the Guile DLL in Windows.
  2666. There are also SCM_RL_IMPORT, SCM_SRFI1314_IMPORT, and
  2667. SCM_SRFI4_IMPORT, for the corresponding libraries.
  2668. ** SCM_NEWCELL and SCM_NEWCELL2 have been deprecated.
  2669. Use the new functions scm_cell and scm_double_cell instead. The old
  2670. macros had problems because with them allocation and initialization
  2671. was separated and the GC could sometimes observe half initialized
  2672. cells. Only careful coding by the user of SCM_NEWCELL and
  2673. SCM_NEWCELL2 could make this safe and efficient.
  2674. ** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated.
  2675. Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p
  2676. instead.
  2677. ** SRCBRKP has been deprecated.
  2678. Use scm_c_source_property_breakpoint_p instead.
  2679. ** Deprecated: scm_makmacro
  2680. Change your code to use either scm_makmmacro or to define macros in
  2681. Scheme, using 'define-macro'.
  2682. ** New function scm_c_port_for_each.
  2683. This function is like scm_port_for_each but takes a pointer to a C
  2684. function as the callback instead of a SCM value.
  2685. ** The names scm_internal_select, scm_thread_sleep, and
  2686. scm_thread_usleep have been discouraged.
  2687. Use scm_std_select, scm_std_sleep, scm_std_usleep instead.
  2688. ** The GC can no longer be blocked.
  2689. The global flags scm_gc_heap_lock and scm_block_gc have been removed.
  2690. The GC can now run (partially) concurrently with other code and thus
  2691. blocking it is not well defined.
  2692. ** Many definitions have been removed that were previously deprecated.
  2693. scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify, s_t_ify,
  2694. scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
  2695. scm_m_1_ify, scm_debug_newcell, scm_debug_newcell2,
  2696. scm_tc16_allocated, SCM_SET_SYMBOL_HASH, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
  2697. SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY, SCM_GC_SET_ALLOCATED,
  2698. scm_debug_newcell, scm_debug_newcell2, SCM_HUP_SIGNAL, SCM_INT_SIGNAL,
  2699. SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL,
  2700. SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG,
  2701. SCM_NUM_SIGS, scm_top_level_lookup_closure_var,
  2702. *top-level-lookup-closure*, scm_system_transformer, scm_eval_3,
  2703. scm_eval2, root_module_lookup_closure, SCM_SLOPPY_STRINGP,
  2704. SCM_RWSTRINGP, scm_read_only_string_p, scm_make_shared_substring,
  2705. scm_tc7_substring, sym_huh, SCM_VARVCELL, SCM_UDVARIABLEP,
  2706. SCM_DEFVARIABLEP, scm_mkbig, scm_big2inum, scm_adjbig, scm_normbig,
  2707. scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl, SCM_FIXNUM_BIT,
  2708. SCM_SETCHARS, SCM_SLOPPY_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
  2709. SCM_LENGTH_MAX, SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH,
  2710. SCM_ROCHARS, SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR,
  2711. scm_sym2vcell, scm_intern, scm_intern0, scm_sysintern, scm_sysintern0,
  2712. scm_sysintern0_no_module_lookup, scm_init_symbols_deprecated,
  2713. scm_vector_set_length_x, scm_contregs, scm_debug_info,
  2714. scm_debug_frame, SCM_DSIDEVAL, SCM_CONST_LONG, SCM_VCELL,
  2715. SCM_GLOBAL_VCELL, SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT,
  2716. SCM_HUGE_LENGTH, SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
  2717. SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
  2718. SCM_VALIDATE_RWSTRING, DIGITS, scm_small_istr2int, scm_istr2int,
  2719. scm_istr2flo, scm_istring2number, scm_istr2int, scm_istr2flo,
  2720. scm_istring2number, scm_vtable_index_vcell, scm_si_vcell, SCM_ECONSP,
  2721. SCM_NECONSP, SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL,
  2722. SCM_GLOC_VAL_LOC, scm_make_gloc, scm_gloc_p, scm_tc16_variable,
  2723. SCM_CHARS, SCM_LENGTH, SCM_SET_STRING_CHARS, SCM_SET_STRING_LENGTH.
  2724. * Changes to bundled modules
  2725. ** (ice-9 debug)
  2726. Using the (ice-9 debug) module no longer automatically switches Guile
  2727. to use the debugging evaluator. If you want to switch to the
  2728. debugging evaluator (which is needed for backtrace information if you
  2729. hit an error), please add an explicit "(debug-enable 'debug)" to your
  2730. code just after the code to use (ice-9 debug).
  2731. Changes since Guile 1.4:
  2732. * Changes to the distribution
  2733. ** A top-level TODO file is included.
  2734. ** Guile now uses a versioning scheme similar to that of the Linux kernel.
  2735. Guile now always uses three numbers to represent the version,
  2736. i.e. "1.6.5". The first number, 1, is the major version number, the
  2737. second number, 6, is the minor version number, and the third number,
  2738. 5, is the micro version number. Changes in major version number
  2739. indicate major changes in Guile.
  2740. Minor version numbers that are even denote stable releases, and odd
  2741. minor version numbers denote development versions (which may be
  2742. unstable). The micro version number indicates a minor sub-revision of
  2743. a given MAJOR.MINOR release.
  2744. In keeping with the new scheme, (minor-version) and scm_minor_version
  2745. no longer return everything but the major version number. They now
  2746. just return the minor version number. Two new functions
  2747. (micro-version) and scm_micro_version have been added to report the
  2748. micro version number.
  2749. In addition, ./GUILE-VERSION now defines GUILE_MICRO_VERSION.
  2750. ** New preprocessor definitions are available for checking versions.
  2751. version.h now #defines SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
  2752. SCM_MICRO_VERSION to the appropriate integer values.
  2753. ** Guile now actively warns about deprecated features.
  2754. The new configure option `--enable-deprecated=LEVEL' and the
  2755. environment variable GUILE_WARN_DEPRECATED control this mechanism.
  2756. See INSTALL and README for more information.
  2757. ** Guile is much more likely to work on 64-bit architectures.
  2758. Guile now compiles and passes "make check" with only two UNRESOLVED GC
  2759. cases on Alpha and ia64 based machines now. Thanks to John Goerzen
  2760. for the use of a test machine, and thanks to Stefan Jahn for ia64
  2761. patches.
  2762. ** New functions: setitimer and getitimer.
  2763. These implement a fairly direct interface to the libc functions of the
  2764. same name.
  2765. ** The #. reader extension is now disabled by default.
  2766. For safety reasons, #. evaluation is disabled by default. To
  2767. re-enable it, set the fluid read-eval? to #t. For example:
  2768. (fluid-set! read-eval? #t)
  2769. but make sure you realize the potential security risks involved. With
  2770. read-eval? enabled, reading a data file from an untrusted source can
  2771. be dangerous.
  2772. ** New SRFI modules have been added:
  2773. SRFI-0 `cond-expand' is now supported in Guile, without requiring
  2774. using a module.
  2775. (srfi srfi-1) is a library containing many useful pair- and list-processing
  2776. procedures.
  2777. (srfi srfi-2) exports and-let*.
  2778. (srfi srfi-4) implements homogeneous numeric vector datatypes.
  2779. (srfi srfi-6) is a dummy module for now, since guile already provides
  2780. all of the srfi-6 procedures by default: open-input-string,
  2781. open-output-string, get-output-string.
  2782. (srfi srfi-8) exports receive.
  2783. (srfi srfi-9) exports define-record-type.
  2784. (srfi srfi-10) exports define-reader-ctor and implements the reader
  2785. extension #,().
  2786. (srfi srfi-11) exports let-values and let*-values.
  2787. (srfi srfi-13) implements the SRFI String Library.
  2788. (srfi srfi-14) implements the SRFI Character-Set Library.
  2789. (srfi srfi-17) implements setter and getter-with-setter and redefines
  2790. some accessor procedures as procedures with getters. (such as car,
  2791. cdr, vector-ref etc.)
  2792. (srfi srfi-19) implements the SRFI Time/Date Library.
  2793. ** New scripts / "executable modules"
  2794. Subdirectory "scripts" contains Scheme modules that are packaged to
  2795. also be executable as scripts. At this time, these scripts are available:
  2796. display-commentary
  2797. doc-snarf
  2798. generate-autoload
  2799. punify
  2800. read-scheme-source
  2801. use2dot
  2802. See README there for more info.
  2803. These scripts can be invoked from the shell with the new program
  2804. "guile-tools", which keeps track of installation directory for you.
  2805. For example:
  2806. $ guile-tools display-commentary srfi/*.scm
  2807. guile-tools is copied to the standard $bindir on "make install".
  2808. ** New module (ice-9 stack-catch):
  2809. stack-catch is like catch, but saves the current state of the stack in
  2810. the fluid the-last-stack. This fluid can be useful when using the
  2811. debugger and when re-throwing an error.
  2812. ** The module (ice-9 and-let*) has been renamed to (ice-9 and-let-star)
  2813. This has been done to prevent problems on lesser operating systems
  2814. that can't tolerate `*'s in file names. The exported macro continues
  2815. to be named `and-let*', of course.
  2816. On systems that support it, there is also a compatibility module named
  2817. (ice-9 and-let*). It will go away in the next release.
  2818. ** New modules (oop goops) etc.:
  2819. (oop goops)
  2820. (oop goops describe)
  2821. (oop goops save)
  2822. (oop goops active-slot)
  2823. (oop goops composite-slot)
  2824. The Guile Object Oriented Programming System (GOOPS) has been
  2825. integrated into Guile. For further information, consult the GOOPS
  2826. manual and tutorial in the `doc' directory.
  2827. ** New module (ice-9 rdelim).
  2828. This exports the following procedures which were previously defined
  2829. in the default environment:
  2830. read-line read-line! read-delimited read-delimited! %read-delimited!
  2831. %read-line write-line
  2832. For backwards compatibility the definitions are still imported into the
  2833. default environment in this version of Guile. However you should add:
  2834. (use-modules (ice-9 rdelim))
  2835. to any program which uses the definitions, since this may change in
  2836. future.
  2837. Alternatively, if guile-scsh is installed, the (scsh rdelim) module
  2838. can be used for similar functionality.
  2839. ** New module (ice-9 rw)
  2840. This is a subset of the (scsh rw) module from guile-scsh. Currently
  2841. it defines two procedures:
  2842. *** New function: read-string!/partial str [port_or_fdes [start [end]]]
  2843. Read characters from a port or file descriptor into a string STR.
  2844. A port must have an underlying file descriptor -- a so-called
  2845. fport. This procedure is scsh-compatible and can efficiently read
  2846. large strings.
  2847. *** New function: write-string/partial str [port_or_fdes [start [end]]]
  2848. Write characters from a string STR to a port or file descriptor.
  2849. A port must have an underlying file descriptor -- a so-called
  2850. fport. This procedure is mostly compatible and can efficiently
  2851. write large strings.
  2852. ** New module (ice-9 match)
  2853. This module includes Andrew K. Wright's pattern matcher. See
  2854. ice-9/match.scm for brief description or
  2855. http://www.star-lab.com/wright/code.html
  2856. for complete documentation.
  2857. ** New module (ice-9 buffered-input)
  2858. This module provides procedures to construct an input port from an
  2859. underlying source of input that reads and returns its input in chunks.
  2860. The underlying input source is a Scheme procedure, specified by the
  2861. caller, which the port invokes whenever it needs more input.
  2862. This is useful when building an input port whose back end is Readline
  2863. or a UI element such as the GtkEntry widget.
  2864. ** Documentation
  2865. The reference and tutorial documentation that was previously
  2866. distributed separately, as `guile-doc', is now included in the core
  2867. Guile distribution. The documentation consists of the following
  2868. manuals.
  2869. - The Guile Tutorial (guile-tut.texi) contains a tutorial introduction
  2870. to using Guile.
  2871. - The Guile Reference Manual (guile.texi) contains (or is intended to
  2872. contain) reference documentation on all aspects of Guile.
  2873. - The GOOPS Manual (goops.texi) contains both tutorial-style and
  2874. reference documentation for using GOOPS, Guile's Object Oriented
  2875. Programming System.
  2876. - The Revised^5 Report on the Algorithmic Language Scheme
  2877. (r5rs.texi).
  2878. See the README file in the `doc' directory for more details.
  2879. ** There are a couple of examples in the examples/ directory now.
  2880. * Changes to the stand-alone interpreter
  2881. ** New command line option `--use-srfi'
  2882. Using this option, SRFI modules can be loaded on startup and be
  2883. available right from the beginning. This makes programming portable
  2884. Scheme programs easier.
  2885. The option `--use-srfi' expects a comma-separated list of numbers,
  2886. each representing a SRFI number to be loaded into the interpreter
  2887. before starting evaluating a script file or the REPL. Additionally,
  2888. the feature identifier for the loaded SRFIs is recognized by
  2889. `cond-expand' when using this option.
  2890. Example:
  2891. $ guile --use-srfi=8,13
  2892. guile> (receive (x z) (values 1 2) (+ 1 2))
  2893. 3
  2894. guile> (string-pad "bla" 20)
  2895. " bla"
  2896. ** Guile now always starts up in the `(guile-user)' module.
  2897. Previously, scripts executed via the `-s' option would run in the
  2898. `(guile)' module and the repl would run in the `(guile-user)' module.
  2899. Now every user action takes place in the `(guile-user)' module by
  2900. default.
  2901. * Changes to Scheme functions and syntax
  2902. ** Character classifiers work for non-ASCII characters.
  2903. The predicates `char-alphabetic?', `char-numeric?',
  2904. `char-whitespace?', `char-lower?', `char-upper?' and `char-is-both?'
  2905. no longer check whether their arguments are ASCII characters.
  2906. Previously, a character would only be considered alphabetic when it
  2907. was also ASCII, for example.
  2908. ** Previously deprecated Scheme functions have been removed:
  2909. tag - no replacement.
  2910. fseek - replaced by seek.
  2911. list* - replaced by cons*.
  2912. ** It's now possible to create modules with controlled environments
  2913. Example:
  2914. (use-modules (ice-9 safe))
  2915. (define m (make-safe-module))
  2916. ;;; m will now be a module containing only a safe subset of R5RS
  2917. (eval '(+ 1 2) m) --> 3
  2918. (eval 'load m) --> ERROR: Unbound variable: load
  2919. ** Evaluation of "()", the empty list, is now an error.
  2920. Previously, the expression "()" evaluated to the empty list. This has
  2921. been changed to signal a "missing expression" error. The correct way
  2922. to write the empty list as a literal constant is to use quote: "'()".
  2923. ** New concept of `Guile Extensions'.
  2924. A Guile Extension is just a ordinary shared library that can be linked
  2925. at run-time. We found it advantageous to give this simple concept a
  2926. dedicated name to distinguish the issues related to shared libraries
  2927. from the issues related to the module system.
  2928. *** New function: load-extension
  2929. Executing (load-extension lib init) is mostly equivalent to
  2930. (dynamic-call init (dynamic-link lib))
  2931. except when scm_register_extension has been called previously.
  2932. Whenever appropriate, you should use `load-extension' instead of
  2933. dynamic-link and dynamic-call.
  2934. *** New C function: scm_c_register_extension
  2935. This function registers a initialization function for use by
  2936. `load-extension'. Use it when you don't want specific extensions to
  2937. be loaded as shared libraries (for example on platforms that don't
  2938. support dynamic linking).
  2939. ** Auto-loading of compiled-code modules is deprecated.
  2940. Guile used to be able to automatically find and link a shared
  2941. library to satisfy requests for a module. For example, the module
  2942. `(foo bar)' could be implemented by placing a shared library named
  2943. "foo/libbar.so" (or with a different extension) in a directory on the
  2944. load path of Guile.
  2945. This has been found to be too tricky, and is no longer supported. The
  2946. shared libraries are now called "extensions". You should now write a
  2947. small Scheme file that calls `load-extension' to load the shared
  2948. library and initialize it explicitly.
  2949. The shared libraries themselves should be installed in the usual
  2950. places for shared libraries, with names like "libguile-foo-bar".
  2951. For example, place this into a file "foo/bar.scm"
  2952. (define-module (foo bar))
  2953. (load-extension "libguile-foo-bar" "foobar_init")
  2954. ** Backward incompatible change: eval EXP ENVIRONMENT-SPECIFIER
  2955. `eval' is now R5RS, that is it takes two arguments.
  2956. The second argument is an environment specifier, i.e. either
  2957. (scheme-report-environment 5)
  2958. (null-environment 5)
  2959. (interaction-environment)
  2960. or
  2961. any module.
  2962. ** The module system has been made more disciplined.
  2963. The function `eval' will save and restore the current module around
  2964. the evaluation of the specified expression. While this expression is
  2965. evaluated, `(current-module)' will now return the right module, which
  2966. is the module specified as the second argument to `eval'.
  2967. A consequence of this change is that `eval' is not particularly
  2968. useful when you want allow the evaluated code to change what module is
  2969. designated as the current module and have this change persist from one
  2970. call to `eval' to the next. The read-eval-print-loop is an example
  2971. where `eval' is now inadequate. To compensate, there is a new
  2972. function `primitive-eval' that does not take a module specifier and
  2973. that does not save/restore the current module. You should use this
  2974. function together with `set-current-module', `current-module', etc
  2975. when you want to have more control over the state that is carried from
  2976. one eval to the next.
  2977. Additionally, it has been made sure that forms that are evaluated at
  2978. the top level are always evaluated with respect to the current module.
  2979. Previously, subforms of top-level forms such as `begin', `case',
  2980. etc. did not respect changes to the current module although these
  2981. subforms are at the top-level as well.
  2982. To prevent strange behavior, the forms `define-module',
  2983. `use-modules', `use-syntax', and `export' have been restricted to only
  2984. work on the top level. The forms `define-public' and
  2985. `defmacro-public' only export the new binding on the top level. They
  2986. behave just like `define' and `defmacro', respectively, when they are
  2987. used in a lexical environment.
  2988. Also, `export' will no longer silently re-export bindings imported
  2989. from a used module. It will emit a `deprecation' warning and will
  2990. cease to perform any re-export in the next version. If you actually
  2991. want to re-export bindings, use the new `re-export' in place of
  2992. `export'. The new `re-export' will not make copies of variables when
  2993. rexporting them, as `export' did wrongly.
  2994. ** Module system now allows selection and renaming of imported bindings
  2995. Previously, when using `use-modules' or the `#:use-module' clause in
  2996. the `define-module' form, all the bindings (association of symbols to
  2997. values) for imported modules were added to the "current module" on an
  2998. as-is basis. This has been changed to allow finer control through two
  2999. new facilities: selection and renaming.
  3000. You can now select which of the imported module's bindings are to be
  3001. visible in the current module by using the `:select' clause. This
  3002. clause also can be used to rename individual bindings. For example:
  3003. ;; import all bindings no questions asked
  3004. (use-modules (ice-9 common-list))
  3005. ;; import four bindings, renaming two of them;
  3006. ;; the current module sees: every some zonk-y zonk-n
  3007. (use-modules ((ice-9 common-list)
  3008. :select (every some
  3009. (remove-if . zonk-y)
  3010. (remove-if-not . zonk-n))))
  3011. You can also programmatically rename all selected bindings using the
  3012. `:renamer' clause, which specifies a proc that takes a symbol and
  3013. returns another symbol. Because it is common practice to use a prefix,
  3014. we now provide the convenience procedure `symbol-prefix-proc'. For
  3015. example:
  3016. ;; import four bindings, renaming two of them specifically,
  3017. ;; and all four w/ prefix "CL:";
  3018. ;; the current module sees: CL:every CL:some CL:zonk-y CL:zonk-n
  3019. (use-modules ((ice-9 common-list)
  3020. :select (every some
  3021. (remove-if . zonk-y)
  3022. (remove-if-not . zonk-n))
  3023. :renamer (symbol-prefix-proc 'CL:)))
  3024. ;; import four bindings, renaming two of them specifically,
  3025. ;; and all four by upcasing.
  3026. ;; the current module sees: EVERY SOME ZONK-Y ZONK-N
  3027. (define (upcase-symbol sym)
  3028. (string->symbol (string-upcase (symbol->string sym))))
  3029. (use-modules ((ice-9 common-list)
  3030. :select (every some
  3031. (remove-if . zonk-y)
  3032. (remove-if-not . zonk-n))
  3033. :renamer upcase-symbol))
  3034. Note that programmatic renaming is done *after* individual renaming.
  3035. Also, the above examples show `use-modules', but the same facilities are
  3036. available for the `#:use-module' clause of `define-module'.
  3037. See manual for more info.
  3038. ** The semantics of guardians have changed.
  3039. The changes are for the most part compatible. An important criterion
  3040. was to keep the typical usage of guardians as simple as before, but to
  3041. make the semantics safer and (as a result) more useful.
  3042. *** All objects returned from guardians are now properly alive.
  3043. It is now guaranteed that any object referenced by an object returned
  3044. from a guardian is alive. It's now impossible for a guardian to
  3045. return a "contained" object before its "containing" object.
  3046. One incompatible (but probably not very important) change resulting
  3047. from this is that it is no longer possible to guard objects that
  3048. indirectly reference themselves (i.e. are parts of cycles). If you do
  3049. so accidentally, you'll get a warning.
  3050. *** There are now two types of guardians: greedy and sharing.
  3051. If you call (make-guardian #t) or just (make-guardian), you'll get a
  3052. greedy guardian, and for (make-guardian #f) a sharing guardian.
  3053. Greedy guardians are the default because they are more "defensive".
  3054. You can only greedily guard an object once. If you guard an object
  3055. more than once, once in a greedy guardian and the rest of times in
  3056. sharing guardians, then it is guaranteed that the object won't be
  3057. returned from sharing guardians as long as it is greedily guarded
  3058. and/or alive.
  3059. Guardians returned by calls to `make-guardian' can now take one more
  3060. optional parameter, which says whether to throw an error in case an
  3061. attempt is made to greedily guard an object that is already greedily
  3062. guarded. The default is true, i.e. throw an error. If the parameter
  3063. is false, the guardian invocation returns #t if guarding was
  3064. successful and #f if it wasn't.
  3065. Also, since greedy guarding is, in effect, a side-effecting operation
  3066. on objects, a new function is introduced: `destroy-guardian!'.
  3067. Invoking this function on a guardian renders it unoperative and, if
  3068. the guardian is greedy, clears the "greedily guarded" property of the
  3069. objects that were guarded by it, thus undoing the side effect.
  3070. Note that all this hair is hardly very important, since guardian
  3071. objects are usually permanent.
  3072. ** Continuations created by call-with-current-continuation now accept
  3073. any number of arguments, as required by R5RS.
  3074. ** New function `issue-deprecation-warning'
  3075. This function is used to display the deprecation messages that are
  3076. controlled by GUILE_WARN_DEPRECATION as explained in the README.
  3077. (define (id x)
  3078. (issue-deprecation-warning "`id' is deprecated. Use `identity' instead.")
  3079. (identity x))
  3080. guile> (id 1)
  3081. ;; `id' is deprecated. Use `identity' instead.
  3082. 1
  3083. guile> (id 1)
  3084. 1
  3085. ** New syntax `begin-deprecated'
  3086. When deprecated features are included (as determined by the configure
  3087. option --enable-deprecated), `begin-deprecated' is identical to
  3088. `begin'. When deprecated features are excluded, it always evaluates
  3089. to `#f', ignoring the body forms.
  3090. ** New function `make-object-property'
  3091. This function returns a new `procedure with setter' P that can be used
  3092. to attach a property to objects. When calling P as
  3093. (set! (P obj) val)
  3094. where `obj' is any kind of object, it attaches `val' to `obj' in such
  3095. a way that it can be retrieved by calling P as
  3096. (P obj)
  3097. This function will replace procedure properties, symbol properties and
  3098. source properties eventually.
  3099. ** Module (ice-9 optargs) now uses keywords instead of `#&'.
  3100. Instead of #&optional, #&key, etc you should now use #:optional,
  3101. #:key, etc. Since #:optional is a keyword, you can write it as just
  3102. :optional when (read-set! keywords 'prefix) is active.
  3103. The old reader syntax `#&' is still supported, but deprecated. It
  3104. will be removed in the next release.
  3105. ** New define-module option: pure
  3106. Tells the module system not to include any bindings from the root
  3107. module.
  3108. Example:
  3109. (define-module (totally-empty-module)
  3110. :pure)
  3111. ** New define-module option: export NAME1 ...
  3112. Export names NAME1 ...
  3113. This option is required if you want to be able to export bindings from
  3114. a module which doesn't import one of `define-public' or `export'.
  3115. Example:
  3116. (define-module (foo)
  3117. :pure
  3118. :use-module (ice-9 r5rs)
  3119. :export (bar))
  3120. ;;; Note that we're pure R5RS below this point!
  3121. (define (bar)
  3122. ...)
  3123. ** New function: object->string OBJ
  3124. Return a Scheme string obtained by printing a given object.
  3125. ** New function: port? X
  3126. Returns a boolean indicating whether X is a port. Equivalent to
  3127. `(or (input-port? X) (output-port? X))'.
  3128. ** New function: file-port?
  3129. Determines whether a given object is a port that is related to a file.
  3130. ** New function: port-for-each proc
  3131. Apply PROC to each port in the Guile port table in turn. The return
  3132. value is unspecified. More specifically, PROC is applied exactly once
  3133. to every port that exists in the system at the time PORT-FOR-EACH is
  3134. invoked. Changes to the port table while PORT-FOR-EACH is running
  3135. have no effect as far as PORT-FOR-EACH is concerned.
  3136. ** New function: dup2 oldfd newfd
  3137. A simple wrapper for the `dup2' system call. Copies the file
  3138. descriptor OLDFD to descriptor number NEWFD, replacing the
  3139. previous meaning of NEWFD. Both OLDFD and NEWFD must be integers.
  3140. Unlike for dup->fdes or primitive-move->fdes, no attempt is made
  3141. to move away ports which are using NEWFD. The return value is
  3142. unspecified.
  3143. ** New function: close-fdes fd
  3144. A simple wrapper for the `close' system call. Close file
  3145. descriptor FD, which must be an integer. Unlike close (*note
  3146. close: Ports and File Descriptors.), the file descriptor will be
  3147. closed even if a port is using it. The return value is
  3148. unspecified.
  3149. ** New function: crypt password salt
  3150. Encrypts `password' using the standard unix password encryption
  3151. algorithm.
  3152. ** New function: chroot path
  3153. Change the root directory of the running process to `path'.
  3154. ** New functions: getlogin, cuserid
  3155. Return the login name or the user name of the current effective user
  3156. id, respectively.
  3157. ** New functions: getpriority which who, setpriority which who prio
  3158. Get or set the priority of the running process.
  3159. ** New function: getpass prompt
  3160. Read a password from the terminal, first displaying `prompt' and
  3161. disabling echoing.
  3162. ** New function: flock file operation
  3163. Set/remove an advisory shared or exclusive lock on `file'.
  3164. ** New functions: sethostname name, gethostname
  3165. Set or get the hostname of the machine the current process is running
  3166. on.
  3167. ** New function: mkstemp! tmpl
  3168. mkstemp creates a new unique file in the file system and returns a
  3169. new buffered port open for reading and writing to the file. TMPL
  3170. is a string specifying where the file should be created: it must
  3171. end with `XXXXXX' and will be changed in place to return the name
  3172. of the temporary file.
  3173. ** New function: open-input-string string
  3174. Return an input string port which delivers the characters from
  3175. `string'. This procedure, together with `open-output-string' and
  3176. `get-output-string' implements SRFI-6.
  3177. ** New function: open-output-string
  3178. Return an output string port which collects all data written to it.
  3179. The data can then be retrieved by `get-output-string'.
  3180. ** New function: get-output-string
  3181. Return the contents of an output string port.
  3182. ** New function: identity
  3183. Return the argument.
  3184. ** socket, connect, accept etc., now have support for IPv6. IPv6 addresses
  3185. are represented in Scheme as integers with normal host byte ordering.
  3186. ** New function: inet-pton family address
  3187. Convert a printable string network address into an integer. Note that
  3188. unlike the C version of this function, the result is an integer with
  3189. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  3190. e.g.,
  3191. (inet-pton AF_INET "127.0.0.1") => 2130706433
  3192. (inet-pton AF_INET6 "::1") => 1
  3193. ** New function: inet-ntop family address
  3194. Convert an integer network address into a printable string. Note that
  3195. unlike the C version of this function, the input is an integer with
  3196. normal host byte ordering. FAMILY can be `AF_INET' or `AF_INET6'.
  3197. e.g.,
  3198. (inet-ntop AF_INET 2130706433) => "127.0.0.1"
  3199. (inet-ntop AF_INET6 (- (expt 2 128) 1)) =>
  3200. ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  3201. ** Deprecated: id
  3202. Use `identity' instead.
  3203. ** Deprecated: -1+
  3204. Use `1-' instead.
  3205. ** Deprecated: return-it
  3206. Do without it.
  3207. ** Deprecated: string-character-length
  3208. Use `string-length' instead.
  3209. ** Deprecated: flags
  3210. Use `logior' instead.
  3211. ** Deprecated: close-all-ports-except.
  3212. This was intended for closing ports in a child process after a fork,
  3213. but it has the undesirable side effect of flushing buffers.
  3214. port-for-each is more flexible.
  3215. ** The (ice-9 popen) module now attempts to set up file descriptors in
  3216. the child process from the current Scheme ports, instead of using the
  3217. current values of file descriptors 0, 1, and 2 in the parent process.
  3218. ** Removed function: builtin-weak-bindings
  3219. There is no such concept as a weak binding any more.
  3220. ** Removed constants: bignum-radix, scm-line-incrementors
  3221. ** define-method: New syntax mandatory.
  3222. The new method syntax is now mandatory:
  3223. (define-method (NAME ARG-SPEC ...) BODY ...)
  3224. (define-method (NAME ARG-SPEC ... . REST-ARG) BODY ...)
  3225. ARG-SPEC ::= ARG-NAME | (ARG-NAME TYPE)
  3226. REST-ARG ::= ARG-NAME
  3227. If you have old code using the old syntax, import
  3228. (oop goops old-define-method) before (oop goops) as in:
  3229. (use-modules (oop goops old-define-method) (oop goops))
  3230. ** Deprecated function: builtin-variable
  3231. Removed function: builtin-bindings
  3232. There is no longer a distinction between builtin or other variables.
  3233. Use module system operations for all variables.
  3234. ** Lazy-catch handlers are no longer allowed to return.
  3235. That is, a call to `throw', `error', etc is now guaranteed to not
  3236. return.
  3237. ** Bugfixes for (ice-9 getopt-long)
  3238. This module is now tested using test-suite/tests/getopt-long.test.
  3239. The following bugs have been fixed:
  3240. *** Parsing for options that are specified to have `optional' args now checks
  3241. if the next element is an option instead of unconditionally taking it as the
  3242. option arg.
  3243. *** An error is now thrown for `--opt=val' when the option description
  3244. does not specify `(value #t)' or `(value optional)'. This condition used to
  3245. be accepted w/o error, contrary to the documentation.
  3246. *** The error message for unrecognized options is now more informative.
  3247. It used to be "not a record", an artifact of the implementation.
  3248. *** The error message for `--opt' terminating the arg list (no value), when
  3249. `(value #t)' is specified, is now more informative. It used to be "not enough
  3250. args".
  3251. *** "Clumped" single-char args now preserve trailing string, use it as arg.
  3252. The expansion used to be like so:
  3253. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "--xyz")
  3254. Note that the "5d" is dropped. Now it is like so:
  3255. ("-abc5d" "--xyz") => ("-a" "-b" "-c" "5d" "--xyz")
  3256. This enables single-char options to have adjoining arguments as long as their
  3257. constituent characters are not potential single-char options.
  3258. ** (ice-9 session) procedure `arity' now works with (ice-9 optargs) `lambda*'
  3259. The `lambda*' and derivative forms in (ice-9 optargs) now set a procedure
  3260. property `arglist', which can be retrieved by `arity'. The result is that
  3261. `arity' can give more detailed information than before:
  3262. Before:
  3263. guile> (use-modules (ice-9 optargs))
  3264. guile> (define* (foo #:optional a b c) a)
  3265. guile> (arity foo)
  3266. 0 or more arguments in `lambda*:G0'.
  3267. After:
  3268. guile> (arity foo)
  3269. 3 optional arguments: `a', `b' and `c'.
  3270. guile> (define* (bar a b #:key c d #:allow-other-keys) a)
  3271. guile> (arity bar)
  3272. 2 required arguments: `a' and `b', 2 keyword arguments: `c'
  3273. and `d', other keywords allowed.
  3274. guile> (define* (baz a b #:optional c #:rest r) a)
  3275. guile> (arity baz)
  3276. 2 required arguments: `a' and `b', 1 optional argument: `c',
  3277. the rest in `r'.
  3278. * Changes to the C interface
  3279. ** Types have been renamed from scm_*_t to scm_t_*.
  3280. This has been done for POSIX sake. It reserves identifiers ending
  3281. with "_t". What a concept.
  3282. The old names are still available with status `deprecated'.
  3283. ** scm_t_bits (former scm_bits_t) is now a unsigned type.
  3284. ** Deprecated features have been removed.
  3285. *** Macros removed
  3286. SCM_INPORTP, SCM_OUTPORTP SCM_ICHRP, SCM_ICHR, SCM_MAKICHR
  3287. SCM_SETJMPBUF SCM_NSTRINGP SCM_NRWSTRINGP SCM_NVECTORP SCM_DOUBLE_CELLP
  3288. *** C Functions removed
  3289. scm_sysmissing scm_tag scm_tc16_flo scm_tc_flo
  3290. scm_fseek - replaced by scm_seek.
  3291. gc-thunk - replaced by after-gc-hook.
  3292. gh_int2scmb - replaced by gh_bool2scm.
  3293. scm_tc_dblr - replaced by scm_tc16_real.
  3294. scm_tc_dblc - replaced by scm_tc16_complex.
  3295. scm_list_star - replaced by scm_cons_star.
  3296. ** Deprecated: scm_makfromstr
  3297. Use scm_mem2string instead.
  3298. ** Deprecated: scm_make_shared_substring
  3299. Explicit shared substrings will disappear from Guile.
  3300. Instead, "normal" strings will be implemented using sharing
  3301. internally, combined with a copy-on-write strategy.
  3302. ** Deprecated: scm_read_only_string_p
  3303. The concept of read-only strings will disappear in next release of
  3304. Guile.
  3305. ** Deprecated: scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member
  3306. Instead, use scm_c_memq or scm_memq, scm_memv, scm_member.
  3307. ** New functions: scm_call_0, scm_call_1, scm_call_2, scm_call_3
  3308. Call a procedure with the indicated number of arguments. See "Fly
  3309. Evaluation" in the manual.
  3310. ** New functions: scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3
  3311. Call a procedure with the indicated number of arguments and a list of
  3312. further arguments. See "Fly Evaluation" in the manual.
  3313. ** New functions: scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5
  3314. Create a list of the given number of elements. See "List
  3315. Constructors" in the manual.
  3316. ** Renamed function: scm_listify has been replaced by scm_list_n.
  3317. ** Deprecated macros: SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4,
  3318. SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9.
  3319. Use functions scm_list_N instead.
  3320. ** New function: scm_c_read (SCM port, void *buffer, scm_sizet size)
  3321. Used by an application to read arbitrary number of bytes from a port.
  3322. Same semantics as libc read, except that scm_c_read only returns less
  3323. than SIZE bytes if at end-of-file.
  3324. Warning: Doesn't update port line and column counts!
  3325. ** New function: scm_c_write (SCM port, const void *ptr, scm_sizet size)
  3326. Used by an application to write arbitrary number of bytes to an SCM
  3327. port. Similar semantics as libc write. However, unlike libc
  3328. write, scm_c_write writes the requested number of bytes and has no
  3329. return value.
  3330. Warning: Doesn't update port line and column counts!
  3331. ** New function: scm_init_guile ()
  3332. In contrast to scm_boot_guile, scm_init_guile will return normally
  3333. after initializing Guile. It is not available on all systems, tho.
  3334. ** New functions: scm_str2symbol, scm_mem2symbol
  3335. The function scm_str2symbol takes a const char* pointing to a zero-terminated
  3336. field of characters and creates a scheme symbol object from that C string.
  3337. The function scm_mem2symbol takes a const char* and a number of characters and
  3338. creates a symbol from the characters in that memory area.
  3339. ** New functions: scm_primitive_make_property
  3340. scm_primitive_property_ref
  3341. scm_primitive_property_set_x
  3342. scm_primitive_property_del_x
  3343. These functions implement a new way to deal with object properties.
  3344. See libguile/properties.c for their documentation.
  3345. ** New function: scm_done_free (long size)
  3346. This function is the inverse of scm_done_malloc. Use it to report the
  3347. amount of smob memory you free. The previous method, which involved
  3348. calling scm_done_malloc with negative argument, was somewhat
  3349. unintuitive (and is still available, of course).
  3350. ** New function: scm_c_memq (SCM obj, SCM list)
  3351. This function provides a fast C level alternative for scm_memq for the case
  3352. that the list parameter is known to be a proper list. The function is a
  3353. replacement for scm_sloppy_memq, but is stricter in its requirements on its
  3354. list input parameter, since for anything else but a proper list the function's
  3355. behaviour is undefined - it may even crash or loop endlessly. Further, for
  3356. the case that the object is not found in the list, scm_c_memq returns #f which
  3357. is similar to scm_memq, but different from scm_sloppy_memq's behaviour.
  3358. ** New functions: scm_remember_upto_here_1, scm_remember_upto_here_2,
  3359. scm_remember_upto_here
  3360. These functions replace the function scm_remember.
  3361. ** Deprecated function: scm_remember
  3362. Use one of the new functions scm_remember_upto_here_1,
  3363. scm_remember_upto_here_2 or scm_remember_upto_here instead.
  3364. ** New function: scm_allocate_string
  3365. This function replaces the function scm_makstr.
  3366. ** Deprecated function: scm_makstr
  3367. Use the new function scm_allocate_string instead.
  3368. ** New global variable scm_gc_running_p introduced.
  3369. Use this variable to find out if garbage collection is being executed. Up to
  3370. now applications have used scm_gc_heap_lock to test if garbage collection was
  3371. running, which also works because of the fact that up to know only the garbage
  3372. collector has set this variable. But, this is an implementation detail that
  3373. may change. Further, scm_gc_heap_lock is not set throughout gc, thus the use
  3374. of this variable is (and has been) not fully safe anyway.
  3375. ** New macros: SCM_BITVECTOR_MAX_LENGTH, SCM_UVECTOR_MAX_LENGTH
  3376. Use these instead of SCM_LENGTH_MAX.
  3377. ** New macros: SCM_CONTINUATION_LENGTH, SCM_CCLO_LENGTH, SCM_STACK_LENGTH,
  3378. SCM_STRING_LENGTH, SCM_SYMBOL_LENGTH, SCM_UVECTOR_LENGTH,
  3379. SCM_BITVECTOR_LENGTH, SCM_VECTOR_LENGTH.
  3380. Use these instead of SCM_LENGTH.
  3381. ** New macros: SCM_SET_CONTINUATION_LENGTH, SCM_SET_STRING_LENGTH,
  3382. SCM_SET_SYMBOL_LENGTH, SCM_SET_VECTOR_LENGTH, SCM_SET_UVECTOR_LENGTH,
  3383. SCM_SET_BITVECTOR_LENGTH
  3384. Use these instead of SCM_SETLENGTH
  3385. ** New macros: SCM_STRING_CHARS, SCM_SYMBOL_CHARS, SCM_CCLO_BASE,
  3386. SCM_VECTOR_BASE, SCM_UVECTOR_BASE, SCM_BITVECTOR_BASE, SCM_COMPLEX_MEM,
  3387. SCM_ARRAY_MEM
  3388. Use these instead of SCM_CHARS, SCM_UCHARS, SCM_ROCHARS, SCM_ROUCHARS or
  3389. SCM_VELTS.
  3390. ** New macros: SCM_SET_BIGNUM_BASE, SCM_SET_STRING_CHARS,
  3391. SCM_SET_SYMBOL_CHARS, SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE,
  3392. SCM_SET_VECTOR_BASE
  3393. Use these instead of SCM_SETCHARS.
  3394. ** New macro: SCM_BITVECTOR_P
  3395. ** New macro: SCM_STRING_COERCE_0TERMINATION_X
  3396. Use instead of SCM_COERCE_SUBSTR.
  3397. ** New macros: SCM_DIR_OPEN_P, SCM_DIR_FLAG_OPEN
  3398. For directory objects, use these instead of SCM_OPDIRP and SCM_OPN.
  3399. ** Deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
  3400. SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
  3401. SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
  3402. SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP,
  3403. SCM_VALIDATE_STRINGORSUBSTR, SCM_FREEP, SCM_NFREEP, SCM_CHARS, SCM_UCHARS,
  3404. SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
  3405. SCM_VALIDATE_NULLORROSTRING_COPY, SCM_ROLENGTH, SCM_LENGTH, SCM_HUGE_LENGTH,
  3406. SCM_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR,
  3407. SCM_ROSTRINGP, SCM_RWSTRINGP, SCM_VALIDATE_RWSTRING, SCM_ROCHARS,
  3408. SCM_ROUCHARS, SCM_SETLENGTH, SCM_SETCHARS, SCM_LENGTH_MAX, SCM_GC8MARKP,
  3409. SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR, SCM_SUBR_DOC,
  3410. SCM_OPDIRP, SCM_VALIDATE_OPDIR, SCM_WTA, RETURN_SCM_WTA, SCM_CONST_LONG,
  3411. SCM_WNA, SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
  3412. SCM_VALIDATE_NUMBER_DEF_COPY, SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP,
  3413. SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_SETAND_CAR, SCM_SETOR_CAR
  3414. Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
  3415. Use scm_memory_error instead of SCM_NALLOC.
  3416. Use SCM_STRINGP instead of SCM_SLOPPY_STRINGP.
  3417. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_STRINGORSUBSTR.
  3418. Use SCM_FREE_CELL_P instead of SCM_FREEP/SCM_NFREEP
  3419. Use a type specific accessor macro instead of SCM_CHARS/SCM_UCHARS.
  3420. Use a type specific accessor instead of SCM(_|_RO|_HUGE_)LENGTH.
  3421. Use SCM_VALIDATE_(SYMBOL|STRING) instead of SCM_VALIDATE_ROSTRING.
  3422. Use SCM_STRING_COERCE_0TERMINATION_X instead of SCM_COERCE_SUBSTR.
  3423. Use SCM_STRINGP or SCM_SYMBOLP instead of SCM_ROSTRINGP.
  3424. Use SCM_STRINGP instead of SCM_RWSTRINGP.
  3425. Use SCM_VALIDATE_STRING instead of SCM_VALIDATE_RWSTRING.
  3426. Use SCM_STRING_CHARS instead of SCM_ROCHARS.
  3427. Use SCM_STRING_UCHARS instead of SCM_ROUCHARS.
  3428. Use a type specific setter macro instead of SCM_SETLENGTH.
  3429. Use a type specific setter macro instead of SCM_SETCHARS.
  3430. Use a type specific length macro instead of SCM_LENGTH_MAX.
  3431. Use SCM_GCMARKP instead of SCM_GC8MARKP.
  3432. Use SCM_SETGCMARK instead of SCM_SETGC8MARK.
  3433. Use SCM_CLRGCMARK instead of SCM_CLRGC8MARK.
  3434. Use SCM_TYP16 instead of SCM_GCTYP16.
  3435. Use SCM_CDR instead of SCM_GCCDR.
  3436. Use SCM_DIR_OPEN_P instead of SCM_OPDIRP.
  3437. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of SCM_WTA.
  3438. Use SCM_MISC_ERROR or SCM_WRONG_TYPE_ARG instead of RETURN_SCM_WTA.
  3439. Use SCM_VCELL_INIT instead of SCM_CONST_LONG.
  3440. Use SCM_WRONG_NUM_ARGS instead of SCM_WNA.
  3441. Use SCM_CONSP instead of SCM_SLOPPY_CONSP.
  3442. Use !SCM_CONSP instead of SCM_SLOPPY_NCONSP.
  3443. ** Removed function: scm_struct_init
  3444. ** Removed variable: scm_symhash_dim
  3445. ** Renamed function: scm_make_cont has been replaced by
  3446. scm_make_continuation, which has a different interface.
  3447. ** Deprecated function: scm_call_catching_errors
  3448. Use scm_catch or scm_lazy_catch from throw.[ch] instead.
  3449. ** Deprecated function: scm_strhash
  3450. Use scm_string_hash instead.
  3451. ** Deprecated function: scm_vector_set_length_x
  3452. Instead, create a fresh vector of the desired size and copy the contents.
  3453. ** scm_gensym has changed prototype
  3454. scm_gensym now only takes one argument.
  3455. ** Deprecated type tags: scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols,
  3456. scm_tc7_lvector
  3457. There is now only a single symbol type scm_tc7_symbol.
  3458. The tag scm_tc7_lvector was not used anyway.
  3459. ** Deprecated function: scm_make_smob_type_mfpe, scm_set_smob_mfpe.
  3460. Use scm_make_smob_type and scm_set_smob_XXX instead.
  3461. ** New function scm_set_smob_apply.
  3462. This can be used to set an apply function to a smob type.
  3463. ** Deprecated function: scm_strprint_obj
  3464. Use scm_object_to_string instead.
  3465. ** Deprecated function: scm_wta
  3466. Use scm_wrong_type_arg, or another appropriate error signalling function
  3467. instead.
  3468. ** Explicit support for obarrays has been deprecated.
  3469. Use `scm_str2symbol' and the generic hashtable functions instead.
  3470. ** The concept of `vcells' has been deprecated.
  3471. The data type `variable' is now used exclusively. `Vcells' have been
  3472. a low-level concept so you are likely not affected by this change.
  3473. *** Deprecated functions: scm_sym2vcell, scm_sysintern,
  3474. scm_sysintern0, scm_symbol_value0, scm_intern, scm_intern0.
  3475. Use scm_c_define or scm_c_lookup instead, as appropriate.
  3476. *** New functions: scm_c_module_lookup, scm_c_lookup,
  3477. scm_c_module_define, scm_c_define, scm_module_lookup, scm_lookup,
  3478. scm_module_define, scm_define.
  3479. These functions work with variables instead of with vcells.
  3480. ** New functions for creating and defining `subr's and `gsubr's.
  3481. The new functions more clearly distinguish between creating a subr (or
  3482. gsubr) object and adding it to the current module.
  3483. These new functions are available: scm_c_make_subr, scm_c_define_subr,
  3484. scm_c_make_subr_with_generic, scm_c_define_subr_with_generic,
  3485. scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,
  3486. scm_c_define_gsubr_with_generic.
  3487. ** Deprecated functions: scm_make_subr, scm_make_subr_opt,
  3488. scm_make_subr_with_generic, scm_make_gsubr,
  3489. scm_make_gsubr_with_generic.
  3490. Use the new ones from above instead.
  3491. ** C interface to the module system has changed.
  3492. While we suggest that you avoid as many explicit module system
  3493. operations from C as possible for the time being, the C interface has
  3494. been made more similar to the high-level Scheme module system.
  3495. *** New functions: scm_c_define_module, scm_c_use_module,
  3496. scm_c_export, scm_c_resolve_module.
  3497. They mostly work like their Scheme namesakes. scm_c_define_module
  3498. takes a function that is called a context where the new module is
  3499. current.
  3500. *** Deprecated functions: scm_the_root_module, scm_make_module,
  3501. scm_ensure_user_module, scm_load_scheme_module.
  3502. Use the new functions instead.
  3503. ** Renamed function: scm_internal_with_fluids becomes
  3504. scm_c_with_fluids.
  3505. scm_internal_with_fluids is available as a deprecated function.
  3506. ** New function: scm_c_with_fluid.
  3507. Just like scm_c_with_fluids, but takes one fluid and one value instead
  3508. of lists of same.
  3509. ** Deprecated typedefs: long_long, ulong_long.
  3510. They are of questionable utility and they pollute the global
  3511. namespace.
  3512. ** Deprecated typedef: scm_sizet
  3513. It is of questionable utility now that Guile requires ANSI C, and is
  3514. oddly named.
  3515. ** Deprecated typedefs: scm_port_rw_active, scm_port,
  3516. scm_ptob_descriptor, scm_debug_info, scm_debug_frame, scm_fport,
  3517. scm_option, scm_rstate, scm_rng, scm_array, scm_array_dim.
  3518. Made more compliant with the naming policy by adding a _t at the end.
  3519. ** Deprecated functions: scm_mkbig, scm_big2num, scm_adjbig,
  3520. scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl
  3521. With the exception of the mysterious scm_2ulong2big, they are still
  3522. available under new names (scm_i_mkbig etc). These functions are not
  3523. intended to be used in user code. You should avoid dealing with
  3524. bignums directly, and should deal with numbers in general (which can
  3525. be bignums).
  3526. ** Change in behavior: scm_num2long, scm_num2ulong
  3527. The scm_num2[u]long functions don't any longer accept an inexact
  3528. argument. This change in behavior is motivated by concordance with
  3529. R5RS: It is more common that a primitive doesn't want to accept an
  3530. inexact for an exact.
  3531. ** New functions: scm_short2num, scm_ushort2num, scm_int2num,
  3532. scm_uint2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
  3533. scm_num2ushort, scm_num2int, scm_num2uint, scm_num2ptrdiff,
  3534. scm_num2size.
  3535. These are conversion functions between the various ANSI C integral
  3536. types and Scheme numbers. NOTE: The scm_num2xxx functions don't
  3537. accept an inexact argument.
  3538. ** New functions: scm_float2num, scm_double2num,
  3539. scm_num2float, scm_num2double.
  3540. These are conversion functions between the two ANSI C float types and
  3541. Scheme numbers.
  3542. ** New number validation macros:
  3543. SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,INT,UINT}[_DEF]
  3544. See above.
  3545. ** New functions: scm_gc_protect_object, scm_gc_unprotect_object
  3546. These are just nicer-named old scm_protect_object and
  3547. scm_unprotect_object.
  3548. ** Deprecated functions: scm_protect_object, scm_unprotect_object
  3549. ** New functions: scm_gc_[un]register_root, scm_gc_[un]register_roots
  3550. These functions can be used to register pointers to locations that
  3551. hold SCM values.
  3552. ** Deprecated function: scm_create_hook.
  3553. Its sins are: misleading name, non-modularity and lack of general
  3554. usefulness.
  3555. Changes since Guile 1.3.4:
  3556. * Changes to the distribution
  3557. ** Trees from nightly snapshots and CVS now require you to run autogen.sh.
  3558. We've changed the way we handle generated files in the Guile source
  3559. repository. As a result, the procedure for building trees obtained
  3560. from the nightly FTP snapshots or via CVS has changed:
  3561. - You must have appropriate versions of autoconf, automake, and
  3562. libtool installed on your system. See README for info on how to
  3563. obtain these programs.
  3564. - Before configuring the tree, you must first run the script
  3565. `autogen.sh' at the top of the source tree.
  3566. The Guile repository used to contain not only source files, written by
  3567. humans, but also some generated files, like configure scripts and
  3568. Makefile.in files. Even though the contents of these files could be
  3569. derived mechanically from other files present, we thought it would
  3570. make the tree easier to build if we checked them into CVS.
  3571. However, this approach means that minor differences between
  3572. developer's installed tools and habits affected the whole team.
  3573. So we have removed the generated files from the repository, and
  3574. added the autogen.sh script, which will reconstruct them
  3575. appropriately.
  3576. ** configure now has experimental options to remove support for certain
  3577. features:
  3578. --disable-arrays omit array and uniform array support
  3579. --disable-posix omit posix interfaces
  3580. --disable-networking omit networking interfaces
  3581. --disable-regex omit regular expression interfaces
  3582. These are likely to become separate modules some day.
  3583. ** New configure option --enable-debug-freelist
  3584. This enables a debugging version of SCM_NEWCELL(), and also registers
  3585. an extra primitive, the setter `gc-set-debug-check-freelist!'.
  3586. Configure with the --enable-debug-freelist option to enable
  3587. the gc-set-debug-check-freelist! primitive, and then use:
  3588. (gc-set-debug-check-freelist! #t) # turn on checking of the freelist
  3589. (gc-set-debug-check-freelist! #f) # turn off checking
  3590. Checking of the freelist forces a traversal of the freelist and
  3591. a garbage collection before each allocation of a cell. This can
  3592. slow down the interpreter dramatically, so the setter should be used to
  3593. turn on this extra processing only when necessary.
  3594. ** New configure option --enable-debug-malloc
  3595. Include code for debugging of calls to scm_must_malloc/realloc/free.
  3596. Checks that
  3597. 1. objects freed by scm_must_free has been mallocated by scm_must_malloc
  3598. 2. objects reallocated by scm_must_realloc has been allocated by
  3599. scm_must_malloc
  3600. 3. reallocated objects are reallocated with the same what string
  3601. But, most importantly, it records the number of allocated objects of
  3602. each kind. This is useful when searching for memory leaks.
  3603. A Guile compiled with this option provides the primitive
  3604. `malloc-stats' which returns an alist with pairs of kind and the
  3605. number of objects of that kind.
  3606. ** All includes are now referenced relative to the root directory
  3607. Since some users have had problems with mixups between Guile and
  3608. system headers, we have decided to always refer to Guile headers via
  3609. their parent directories. This essentially creates a "private name
  3610. space" for Guile headers. This means that the compiler only is given
  3611. -I options for the root build and root source directory.
  3612. ** Header files kw.h and genio.h have been removed.
  3613. ** The module (ice-9 getopt-gnu-style) has been removed.
  3614. ** New module (ice-9 documentation)
  3615. Implements the interface to documentation strings associated with
  3616. objects.
  3617. ** New module (ice-9 time)
  3618. Provides a macro `time', which displays execution time of a given form.
  3619. ** New module (ice-9 history)
  3620. Loading this module enables value history in the repl.
  3621. * Changes to the stand-alone interpreter
  3622. ** New command line option --debug
  3623. Start Guile with debugging evaluator and backtraces enabled.
  3624. This is useful when debugging your .guile init file or scripts.
  3625. ** New help facility
  3626. Usage: (help NAME) gives documentation about objects named NAME (a symbol)
  3627. (help REGEXP) ditto for objects with names matching REGEXP (a string)
  3628. (help 'NAME) gives documentation for NAME, even if it is not an object
  3629. (help ,EXPR) gives documentation for object returned by EXPR
  3630. (help (my module)) gives module commentary for `(my module)'
  3631. (help) gives this text
  3632. `help' searches among bindings exported from loaded modules, while
  3633. `apropos' searches among bindings visible from the "current" module.
  3634. Examples: (help help)
  3635. (help cons)
  3636. (help "output-string")
  3637. ** `help' and `apropos' now prints full module names
  3638. ** Dynamic linking now uses libltdl from the libtool package.
  3639. The old system dependent code for doing dynamic linking has been
  3640. replaced with calls to the libltdl functions which do all the hairy
  3641. details for us.
  3642. The major improvement is that you can now directly pass libtool
  3643. library names like "libfoo.la" to `dynamic-link' and `dynamic-link'
  3644. will be able to do the best shared library job you can get, via
  3645. libltdl.
  3646. The way dynamic libraries are found has changed and is not really
  3647. portable across platforms, probably. It is therefore recommended to
  3648. use absolute filenames when possible.
  3649. If you pass a filename without an extension to `dynamic-link', it will
  3650. try a few appropriate ones. Thus, the most platform ignorant way is
  3651. to specify a name like "libfoo", without any directories and
  3652. extensions.
  3653. ** Guile COOP threads are now compatible with LinuxThreads
  3654. Previously, COOP threading wasn't possible in applications linked with
  3655. Linux POSIX threads due to their use of the stack pointer to find the
  3656. thread context. This has now been fixed with a workaround which uses
  3657. the pthreads to allocate the stack.
  3658. ** New primitives: `pkgdata-dir', `site-dir', `library-dir'
  3659. ** Positions of erring expression in scripts
  3660. With version 1.3.4, the location of the erring expression in Guile
  3661. scipts is no longer automatically reported. (This should have been
  3662. documented before the 1.3.4 release.)
  3663. You can get this information by enabling recording of positions of
  3664. source expressions and running the debugging evaluator. Put this at
  3665. the top of your script (or in your "site" file):
  3666. (read-enable 'positions)
  3667. (debug-enable 'debug)
  3668. ** Backtraces in scripts
  3669. It is now possible to get backtraces in scripts.
  3670. Put
  3671. (debug-enable 'debug 'backtrace)
  3672. at the top of the script.
  3673. (The first options enables the debugging evaluator.
  3674. The second enables backtraces.)
  3675. ** Part of module system symbol lookup now implemented in C
  3676. The eval closure of most modules is now implemented in C. Since this
  3677. was one of the bottlenecks for loading speed, Guile now loads code
  3678. substantially faster than before.
  3679. ** Attempting to get the value of an unbound variable now produces
  3680. an exception with a key of 'unbound-variable instead of 'misc-error.
  3681. ** The initial default output port is now unbuffered if it's using a
  3682. tty device. Previously in this situation it was line-buffered.
  3683. ** New hook: after-gc-hook
  3684. after-gc-hook takes over the role of gc-thunk. This hook is run at
  3685. the first SCM_TICK after a GC. (Thus, the code is run at the same
  3686. point during evaluation as signal handlers.)
  3687. Note that this hook should be used only for diagnostic and debugging
  3688. purposes. It is not certain that it will continue to be well-defined
  3689. when this hook is run in the future.
  3690. C programmers: Note the new C level hooks scm_before_gc_c_hook,
  3691. scm_before_sweep_c_hook, scm_after_gc_c_hook.
  3692. ** Improvements to garbage collector
  3693. Guile 1.4 has a new policy for triggering heap allocation and
  3694. determining the sizes of heap segments. It fixes a number of problems
  3695. in the old GC.
  3696. 1. The new policy can handle two separate pools of cells
  3697. (2-word/4-word) better. (The old policy would run wild, allocating
  3698. more and more memory for certain programs.)
  3699. 2. The old code would sometimes allocate far too much heap so that the
  3700. Guile process became gigantic. The new code avoids this.
  3701. 3. The old code would sometimes allocate too little so that few cells
  3702. were freed at GC so that, in turn, too much time was spent in GC.
  3703. 4. The old code would often trigger heap allocation several times in a
  3704. row. (The new scheme predicts how large the segments needs to be
  3705. in order not to need further allocation.)
  3706. All in all, the new GC policy will make larger applications more
  3707. efficient.
  3708. The new GC scheme also is prepared for POSIX threading. Threads can
  3709. allocate private pools of cells ("clusters") with just a single
  3710. function call. Allocation of single cells from such a cluster can
  3711. then proceed without any need of inter-thread synchronization.
  3712. ** New environment variables controlling GC parameters
  3713. GUILE_MAX_SEGMENT_SIZE Maximal segment size
  3714. (default = 2097000)
  3715. Allocation of 2-word cell heaps:
  3716. GUILE_INIT_SEGMENT_SIZE_1 Size of initial heap segment in bytes
  3717. (default = 360000)
  3718. GUILE_MIN_YIELD_1 Minimum number of freed cells at each
  3719. GC in percent of total heap size
  3720. (default = 40)
  3721. Allocation of 4-word cell heaps
  3722. (used for real numbers and misc other objects):
  3723. GUILE_INIT_SEGMENT_SIZE_2, GUILE_MIN_YIELD_2
  3724. (See entry "Way for application to customize GC parameters" under
  3725. section "Changes to the scm_ interface" below.)
  3726. ** Guile now implements reals using 4-word cells
  3727. This speeds up computation with reals. (They were earlier allocated
  3728. with `malloc'.) There is still some room for optimizations, however.
  3729. ** Some further steps toward POSIX thread support have been taken
  3730. *** Guile's critical sections (SCM_DEFER/ALLOW_INTS)
  3731. don't have much effect any longer, and many of them will be removed in
  3732. next release.
  3733. *** Signals
  3734. are only handled at the top of the evaluator loop, immediately after
  3735. I/O, and in scm_equalp.
  3736. *** The GC can allocate thread private pools of pairs.
  3737. * Changes to Scheme functions and syntax
  3738. ** close-input-port and close-output-port are now R5RS
  3739. These procedures have been turned into primitives and have R5RS behaviour.
  3740. ** New procedure: simple-format PORT MESSAGE ARG1 ...
  3741. (ice-9 boot) makes `format' an alias for `simple-format' until possibly
  3742. extended by the more sophisticated version in (ice-9 format)
  3743. (simple-format port message . args)
  3744. Write MESSAGE to DESTINATION, defaulting to `current-output-port'.
  3745. MESSAGE can contain ~A (was %s) and ~S (was %S) escapes. When printed,
  3746. the escapes are replaced with corresponding members of ARGS:
  3747. ~A formats using `display' and ~S formats using `write'.
  3748. If DESTINATION is #t, then use the `current-output-port',
  3749. if DESTINATION is #f, then return a string containing the formatted text.
  3750. Does not add a trailing newline."
  3751. ** string-ref: the second argument is no longer optional.
  3752. ** string, list->string: no longer accept strings in their arguments,
  3753. only characters, for compatibility with R5RS.
  3754. ** New procedure: port-closed? PORT
  3755. Returns #t if PORT is closed or #f if it is open.
  3756. ** Deprecated: list*
  3757. The list* functionality is now provided by cons* (SRFI-1 compliant)
  3758. ** New procedure: cons* ARG1 ARG2 ... ARGn
  3759. Like `list', but the last arg provides the tail of the constructed list,
  3760. returning (cons ARG1 (cons ARG2 (cons ... ARGn))).
  3761. Requires at least one argument. If given one argument, that argument
  3762. is returned as result.
  3763. This function is called `list*' in some other Schemes and in Common LISP.
  3764. ** Removed deprecated: serial-map, serial-array-copy!, serial-array-map!
  3765. ** New procedure: object-documentation OBJECT
  3766. Returns the documentation string associated with OBJECT. The
  3767. procedure uses a caching mechanism so that subsequent lookups are
  3768. faster.
  3769. Exported by (ice-9 documentation).
  3770. ** module-name now returns full names of modules
  3771. Previously, only the last part of the name was returned (`session' for
  3772. `(ice-9 session)'). Ex: `(ice-9 session)'.
  3773. * Changes to the gh_ interface
  3774. ** Deprecated: gh_int2scmb
  3775. Use gh_bool2scm instead.
  3776. * Changes to the scm_ interface
  3777. ** Guile primitives now carry docstrings!
  3778. Thanks to Greg Badros!
  3779. ** Guile primitives are defined in a new way: SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  3780. Now Guile primitives are defined using the SCM_DEFINE/SCM_DEFINE1/SCM_PROC
  3781. macros and must contain a docstring that is extracted into foo.doc using a new
  3782. guile-doc-snarf script (that uses guile-doc-snarf.awk).
  3783. However, a major overhaul of these macros is scheduled for the next release of
  3784. guile.
  3785. ** Guile primitives use a new technique for validation of arguments
  3786. SCM_VALIDATE_* macros are defined to ease the redundancy and improve
  3787. the readability of argument checking.
  3788. ** All (nearly?) K&R prototypes for functions replaced with ANSI C equivalents.
  3789. ** New macros: SCM_PACK, SCM_UNPACK
  3790. Compose/decompose an SCM value.
  3791. The SCM type is now treated as an abstract data type and may be defined as a
  3792. long, a void* or as a struct, depending on the architecture and compile time
  3793. options. This makes it easier to find several types of bugs, for example when
  3794. SCM values are treated as integers without conversion. Values of the SCM type
  3795. should be treated as "atomic" values. These macros are used when
  3796. composing/decomposing an SCM value, either because you want to access
  3797. individual bits, or because you want to treat it as an integer value.
  3798. E.g., in order to set bit 7 in an SCM value x, use the expression
  3799. SCM_PACK (SCM_UNPACK (x) | 0x80)
  3800. ** The name property of hooks is deprecated.
  3801. Thus, the use of SCM_HOOK_NAME and scm_make_hook_with_name is deprecated.
  3802. You can emulate this feature by using object properties.
  3803. ** Deprecated macros: SCM_INPORTP, SCM_OUTPORTP, SCM_CRDY, SCM_ICHRP,
  3804. SCM_ICHR, SCM_MAKICHR, SCM_SETJMPBUF, SCM_NSTRINGP, SCM_NRWSTRINGP,
  3805. SCM_NVECTORP
  3806. These macros will be removed in a future release of Guile.
  3807. ** The following types, functions and macros from numbers.h are deprecated:
  3808. scm_dblproc, SCM_UNEGFIXABLE, SCM_FLOBUFLEN, SCM_INEXP, SCM_CPLXP, SCM_REAL,
  3809. SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP, SCM_NUM2DBL, SCM_NO_BIGDIG
  3810. ** Port internals: the rw_random variable in the scm_port structure
  3811. must be set to non-zero in any random access port. In recent Guile
  3812. releases it was only set for bidirectional random-access ports.
  3813. ** Port internals: the seek ptob procedure is now responsible for
  3814. resetting the buffers if required. The change was made so that in the
  3815. special case of reading the current position (i.e., seek p 0 SEEK_CUR)
  3816. the fport and strport ptobs can avoid resetting the buffers,
  3817. in particular to avoid discarding unread chars. An existing port
  3818. type can be fixed by adding something like the following to the
  3819. beginning of the ptob seek procedure:
  3820. if (pt->rw_active == SCM_PORT_READ)
  3821. scm_end_input (object);
  3822. else if (pt->rw_active == SCM_PORT_WRITE)
  3823. ptob->flush (object);
  3824. although to actually avoid resetting the buffers and discard unread
  3825. chars requires further hacking that depends on the characteristics
  3826. of the ptob.
  3827. ** Deprecated functions: scm_fseek, scm_tag
  3828. These functions are no longer used and will be removed in a future version.
  3829. ** The scm_sysmissing procedure is no longer used in libguile.
  3830. Unless it turns out to be unexpectedly useful to somebody, it will be
  3831. removed in a future version.
  3832. ** The format of error message strings has changed
  3833. The two C procedures: scm_display_error and scm_error, as well as the
  3834. primitive `scm-error', now use scm_simple_format to do their work.
  3835. This means that the message strings of all code must be updated to use
  3836. ~A where %s was used before, and ~S where %S was used before.
  3837. During the period when there still are a lot of old Guiles out there,
  3838. you might want to support both old and new versions of Guile.
  3839. There are basically two methods to achieve this. Both methods use
  3840. autoconf. Put
  3841. AC_CHECK_FUNCS(scm_simple_format)
  3842. in your configure.in.
  3843. Method 1: Use the string concatenation features of ANSI C's
  3844. preprocessor.
  3845. In C:
  3846. #ifdef HAVE_SCM_SIMPLE_FORMAT
  3847. #define FMT_S "~S"
  3848. #else
  3849. #define FMT_S "%S"
  3850. #endif
  3851. Then represent each of your error messages using a preprocessor macro:
  3852. #define E_SPIDER_ERROR "There's a spider in your " ## FMT_S ## "!!!"
  3853. In Scheme:
  3854. (define fmt-s (if (defined? 'simple-format) "~S" "%S"))
  3855. (define make-message string-append)
  3856. (define e-spider-error (make-message "There's a spider in your " fmt-s "!!!"))
  3857. Method 2: Use the oldfmt function found in doc/oldfmt.c.
  3858. In C:
  3859. scm_misc_error ("picnic", scm_c_oldfmt0 ("There's a spider in your ~S!!!"),
  3860. ...);
  3861. In Scheme:
  3862. (scm-error 'misc-error "picnic" (oldfmt "There's a spider in your ~S!!!")
  3863. ...)
  3864. ** Deprecated: coop_mutex_init, coop_condition_variable_init
  3865. Don't use the functions coop_mutex_init and
  3866. coop_condition_variable_init. They will change.
  3867. Use scm_mutex_init and scm_cond_init instead.
  3868. ** New function: int scm_cond_timedwait (scm_cond_t *COND, scm_mutex_t *MUTEX, const struct timespec *ABSTIME)
  3869. `scm_cond_timedwait' atomically unlocks MUTEX and waits on
  3870. COND, as `scm_cond_wait' does, but it also bounds the duration
  3871. of the wait. If COND has not been signaled before time ABSTIME,
  3872. the mutex MUTEX is re-acquired and `scm_cond_timedwait'
  3873. returns the error code `ETIMEDOUT'.
  3874. The ABSTIME parameter specifies an absolute time, with the same
  3875. origin as `time' and `gettimeofday': an ABSTIME of 0 corresponds
  3876. to 00:00:00 GMT, January 1, 1970.
  3877. ** New function: scm_cond_broadcast (scm_cond_t *COND)
  3878. `scm_cond_broadcast' restarts all the threads that are waiting
  3879. on the condition variable COND. Nothing happens if no threads are
  3880. waiting on COND.
  3881. ** New function: scm_key_create (scm_key_t *KEY, void (*destr_function) (void *))
  3882. `scm_key_create' allocates a new TSD key. The key is stored in
  3883. the location pointed to by KEY. There is no limit on the number
  3884. of keys allocated at a given time. The value initially associated
  3885. with the returned key is `NULL' in all currently executing threads.
  3886. The DESTR_FUNCTION argument, if not `NULL', specifies a destructor
  3887. function associated with the key. When a thread terminates,
  3888. DESTR_FUNCTION is called on the value associated with the key in
  3889. that thread. The DESTR_FUNCTION is not called if a key is deleted
  3890. with `scm_key_delete' or a value is changed with
  3891. `scm_setspecific'. The order in which destructor functions are
  3892. called at thread termination time is unspecified.
  3893. Destructors are not yet implemented.
  3894. ** New function: scm_setspecific (scm_key_t KEY, const void *POINTER)
  3895. `scm_setspecific' changes the value associated with KEY in the
  3896. calling thread, storing the given POINTER instead.
  3897. ** New function: scm_getspecific (scm_key_t KEY)
  3898. `scm_getspecific' returns the value currently associated with
  3899. KEY in the calling thread.
  3900. ** New function: scm_key_delete (scm_key_t KEY)
  3901. `scm_key_delete' deallocates a TSD key. It does not check
  3902. whether non-`NULL' values are associated with that key in the
  3903. currently executing threads, nor call the destructor function
  3904. associated with the key.
  3905. ** New function: scm_c_hook_init (scm_c_hook_t *HOOK, void *HOOK_DATA, scm_c_hook_type_t TYPE)
  3906. Initialize a C level hook HOOK with associated HOOK_DATA and type
  3907. TYPE. (See scm_c_hook_run ().)
  3908. ** New function: scm_c_hook_add (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA, int APPENDP)
  3909. Add hook function FUNC with associated FUNC_DATA to HOOK. If APPENDP
  3910. is true, add it last, otherwise first. The same FUNC can be added
  3911. multiple times if FUNC_DATA differ and vice versa.
  3912. ** New function: scm_c_hook_remove (scm_c_hook_t *HOOK, scm_c_hook_function_t FUNC, void *FUNC_DATA)
  3913. Remove hook function FUNC with associated FUNC_DATA from HOOK. A
  3914. function is only removed if both FUNC and FUNC_DATA matches.
  3915. ** New function: void *scm_c_hook_run (scm_c_hook_t *HOOK, void *DATA)
  3916. Run hook HOOK passing DATA to the hook functions.
  3917. If TYPE is SCM_C_HOOK_NORMAL, all hook functions are run. The value
  3918. returned is undefined.
  3919. If TYPE is SCM_C_HOOK_OR, hook functions are run until a function
  3920. returns a non-NULL value. This value is returned as the result of
  3921. scm_c_hook_run. If all functions return NULL, NULL is returned.
  3922. If TYPE is SCM_C_HOOK_AND, hook functions are run until a function
  3923. returns a NULL value, and NULL is returned. If all functions returns
  3924. a non-NULL value, the last value is returned.
  3925. ** New C level GC hooks
  3926. Five new C level hooks has been added to the garbage collector.
  3927. scm_before_gc_c_hook
  3928. scm_after_gc_c_hook
  3929. are run before locking and after unlocking the heap. The system is
  3930. thus in a mode where evaluation can take place. (Except that
  3931. scm_before_gc_c_hook must not allocate new cells.)
  3932. scm_before_mark_c_hook
  3933. scm_before_sweep_c_hook
  3934. scm_after_sweep_c_hook
  3935. are run when the heap is locked. These are intended for extension of
  3936. the GC in a modular fashion. Examples are the weaks and guardians
  3937. modules.
  3938. ** Way for application to customize GC parameters
  3939. The application can set up other default values for the GC heap
  3940. allocation parameters
  3941. GUILE_INIT_HEAP_SIZE_1, GUILE_MIN_YIELD_1,
  3942. GUILE_INIT_HEAP_SIZE_2, GUILE_MIN_YIELD_2,
  3943. GUILE_MAX_SEGMENT_SIZE,
  3944. by setting
  3945. scm_default_init_heap_size_1, scm_default_min_yield_1,
  3946. scm_default_init_heap_size_2, scm_default_min_yield_2,
  3947. scm_default_max_segment_size
  3948. respectively before callong scm_boot_guile.
  3949. (See entry "New environment variables ..." in section
  3950. "Changes to the stand-alone interpreter" above.)
  3951. ** scm_protect_object/scm_unprotect_object now nest
  3952. This means that you can call scm_protect_object multiple times on an
  3953. object and count on the object being protected until
  3954. scm_unprotect_object has been call the same number of times.
  3955. The functions also have better time complexity.
  3956. Still, it is usually possible to structure the application in a way
  3957. that you don't need to use these functions. For example, if you use a
  3958. protected standard Guile list to keep track of live objects rather
  3959. than some custom data type, objects will die a natural death when they
  3960. are no longer needed.
  3961. ** Deprecated type tags: scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc
  3962. Guile does not provide the float representation for inexact real numbers any
  3963. more. Now, only doubles are used to represent inexact real numbers. Further,
  3964. the tag names scm_tc_dblr and scm_tc_dblc have been changed to scm_tc16_real
  3965. and scm_tc16_complex, respectively.
  3966. ** Removed deprecated type scm_smobfuns
  3967. ** Removed deprecated function scm_newsmob
  3968. ** Warning: scm_make_smob_type_mfpe might become deprecated in a future release
  3969. There is an ongoing discussion among the developers whether to
  3970. deprecate `scm_make_smob_type_mfpe' or not. Please use the current
  3971. standard interface (scm_make_smob_type, scm_set_smob_XXX) in new code
  3972. until this issue has been settled.
  3973. ** Removed deprecated type tag scm_tc16_kw
  3974. ** Added type tag scm_tc16_keyword
  3975. (This was introduced already in release 1.3.4 but was not documented
  3976. until now.)
  3977. ** gdb_print now prints "*** Guile not initialized ***" until Guile initialized
  3978. * Changes to system call interfaces:
  3979. ** The "select" procedure now tests port buffers for the ability to
  3980. provide input or accept output. Previously only the underlying file
  3981. descriptors were checked.
  3982. ** New variable PIPE_BUF: the maximum number of bytes that can be
  3983. atomically written to a pipe.
  3984. ** If a facility is not available on the system when Guile is
  3985. compiled, the corresponding primitive procedure will not be defined.
  3986. Previously it would have been defined but would throw a system-error
  3987. exception if called. Exception handlers which catch this case may
  3988. need minor modification: an error will be thrown with key
  3989. 'unbound-variable instead of 'system-error. Alternatively it's
  3990. now possible to use `defined?' to check whether the facility is
  3991. available.
  3992. ** Procedures which depend on the timezone should now give the correct
  3993. result on systems which cache the TZ environment variable, even if TZ
  3994. is changed without calling tzset.
  3995. * Changes to the networking interfaces:
  3996. ** New functions: htons, ntohs, htonl, ntohl: for converting short and
  3997. long integers between network and host format. For now, it's not
  3998. particularly convenient to do this kind of thing, but consider:
  3999. (define write-network-long
  4000. (lambda (value port)
  4001. (let ((v (make-uniform-vector 1 1 0)))
  4002. (uniform-vector-set! v 0 (htonl value))
  4003. (uniform-vector-write v port))))
  4004. (define read-network-long
  4005. (lambda (port)
  4006. (let ((v (make-uniform-vector 1 1 0)))
  4007. (uniform-vector-read! v port)
  4008. (ntohl (uniform-vector-ref v 0)))))
  4009. ** If inet-aton fails, it now throws an error with key 'misc-error
  4010. instead of 'system-error, since errno is not relevant.
  4011. ** Certain gethostbyname/gethostbyaddr failures now throw errors with
  4012. specific keys instead of 'system-error. The latter is inappropriate
  4013. since errno will not have been set. The keys are:
  4014. 'host-not-found, 'try-again, 'no-recovery and 'no-data.
  4015. ** sethostent, setnetent, setprotoent, setservent: now take an
  4016. optional argument STAYOPEN, which specifies whether the database
  4017. remains open after a database entry is accessed randomly (e.g., using
  4018. gethostbyname for the hosts database.) The default is #f. Previously
  4019. #t was always used.
  4020. Changes since Guile 1.3.2:
  4021. * Changes to the stand-alone interpreter
  4022. ** Debugger
  4023. An initial version of the Guile debugger written by Chris Hanson has
  4024. been added. The debugger is still under development but is included
  4025. in the distribution anyway since it is already quite useful.
  4026. Type
  4027. (debug)
  4028. after an error to enter the debugger. Type `help' inside the debugger
  4029. for a description of available commands.
  4030. If you prefer to have stack frames numbered and printed in
  4031. anti-chronological order and prefer up in the stack to be down on the
  4032. screen as is the case in gdb, you can put
  4033. (debug-enable 'backwards)
  4034. in your .guile startup file. (However, this means that Guile can't
  4035. use indentation to indicate stack level.)
  4036. The debugger is autoloaded into Guile at the first use.
  4037. ** Further enhancements to backtraces
  4038. There is a new debug option `width' which controls the maximum width
  4039. on the screen of printed stack frames. Fancy printing parameters
  4040. ("level" and "length" as in Common LISP) are adaptively adjusted for
  4041. each stack frame to give maximum information while still fitting
  4042. within the bounds. If the stack frame can't be made to fit by
  4043. adjusting parameters, it is simply cut off at the end. This is marked
  4044. with a `$'.
  4045. ** Some modules are now only loaded when the repl is started
  4046. The modules (ice-9 debug), (ice-9 session), (ice-9 threads) and (ice-9
  4047. regex) are now loaded into (guile-user) only if the repl has been
  4048. started. The effect is that the startup time for scripts has been
  4049. reduced to 30% of what it was previously.
  4050. Correctly written scripts load the modules they require at the top of
  4051. the file and should not be affected by this change.
  4052. ** Hooks are now represented as smobs
  4053. * Changes to Scheme functions and syntax
  4054. ** Readline support has changed again.
  4055. The old (readline-activator) module is gone. Use (ice-9 readline)
  4056. instead, which now contains all readline functionality. So the code
  4057. to activate readline is now
  4058. (use-modules (ice-9 readline))
  4059. (activate-readline)
  4060. This should work at any time, including from the guile prompt.
  4061. To avoid confusion about the terms of Guile's license, please only
  4062. enable readline for your personal use; please don't make it the
  4063. default for others. Here is why we make this rather odd-sounding
  4064. request:
  4065. Guile is normally licensed under a weakened form of the GNU General
  4066. Public License, which allows you to link code with Guile without
  4067. placing that code under the GPL. This exception is important to some
  4068. people.
  4069. However, since readline is distributed under the GNU General Public
  4070. License, when you link Guile with readline, either statically or
  4071. dynamically, you effectively change Guile's license to the strict GPL.
  4072. Whenever you link any strictly GPL'd code into Guile, uses of Guile
  4073. which are normally permitted become forbidden. This is a rather
  4074. non-obvious consequence of the licensing terms.
  4075. So, to make sure things remain clear, please let people choose for
  4076. themselves whether to link GPL'd libraries like readline with Guile.
  4077. ** regexp-substitute/global has changed slightly, but incompatibly.
  4078. If you include a function in the item list, the string of the match
  4079. object it receives is the same string passed to
  4080. regexp-substitute/global, not some suffix of that string.
  4081. Correspondingly, the match's positions are relative to the entire
  4082. string, not the suffix.
  4083. If the regexp can match the empty string, the way matches are chosen
  4084. from the string has changed. regexp-substitute/global recognizes the
  4085. same set of matches that list-matches does; see below.
  4086. ** New function: list-matches REGEXP STRING [FLAGS]
  4087. Return a list of match objects, one for every non-overlapping, maximal
  4088. match of REGEXP in STRING. The matches appear in left-to-right order.
  4089. list-matches only reports matches of the empty string if there are no
  4090. other matches which begin on, end at, or include the empty match's
  4091. position.
  4092. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  4093. ** New function: fold-matches REGEXP STRING INIT PROC [FLAGS]
  4094. For each match of REGEXP in STRING, apply PROC to the match object,
  4095. and the last value PROC returned, or INIT for the first call. Return
  4096. the last value returned by PROC. We apply PROC to the matches as they
  4097. appear from left to right.
  4098. This function recognizes matches according to the same criteria as
  4099. list-matches.
  4100. Thus, you could define list-matches like this:
  4101. (define (list-matches regexp string . flags)
  4102. (reverse! (apply fold-matches regexp string '() cons flags)))
  4103. If present, FLAGS is passed as the FLAGS argument to regexp-exec.
  4104. ** Hooks
  4105. *** New function: hook? OBJ
  4106. Return #t if OBJ is a hook, otherwise #f.
  4107. *** New function: make-hook-with-name NAME [ARITY]
  4108. Return a hook with name NAME and arity ARITY. The default value for
  4109. ARITY is 0. The only effect of NAME is that it will appear when the
  4110. hook object is printed to ease debugging.
  4111. *** New function: hook-empty? HOOK
  4112. Return #t if HOOK doesn't contain any procedures, otherwise #f.
  4113. *** New function: hook->list HOOK
  4114. Return a list of the procedures that are called when run-hook is
  4115. applied to HOOK.
  4116. ** `map' signals an error if its argument lists are not all the same length.
  4117. This is the behavior required by R5RS, so this change is really a bug
  4118. fix. But it seems to affect a lot of people's code, so we're
  4119. mentioning it here anyway.
  4120. ** Print-state handling has been made more transparent
  4121. Under certain circumstances, ports are represented as a port with an
  4122. associated print state. Earlier, this pair was represented as a pair
  4123. (see "Some magic has been added to the printer" below). It is now
  4124. indistinguishable (almost; see `get-print-state') from a port on the
  4125. user level.
  4126. *** New function: port-with-print-state OUTPUT-PORT PRINT-STATE
  4127. Return a new port with the associated print state PRINT-STATE.
  4128. *** New function: get-print-state OUTPUT-PORT
  4129. Return the print state associated with this port if it exists,
  4130. otherwise return #f.
  4131. *** New function: directory-stream? OBJECT
  4132. Returns true iff OBJECT is a directory stream --- the sort of object
  4133. returned by `opendir'.
  4134. ** New function: using-readline?
  4135. Return #t if readline is in use in the current repl.
  4136. ** structs will be removed in 1.4
  4137. Structs will be replaced in Guile 1.4. We will merge GOOPS into Guile
  4138. and use GOOPS objects as the fundamental record type.
  4139. * Changes to the scm_ interface
  4140. ** structs will be removed in 1.4
  4141. The entire current struct interface (struct.c, struct.h) will be
  4142. replaced in Guile 1.4. We will merge GOOPS into libguile and use
  4143. GOOPS objects as the fundamental record type.
  4144. ** The internal representation of subr's has changed
  4145. Instead of giving a hint to the subr name, the CAR field of the subr
  4146. now contains an index to a subr entry in scm_subr_table.
  4147. *** New variable: scm_subr_table
  4148. An array of subr entries. A subr entry contains the name, properties
  4149. and documentation associated with the subr. The properties and
  4150. documentation slots are not yet used.
  4151. ** A new scheme for "forwarding" calls to a builtin to a generic function
  4152. It is now possible to extend the functionality of some Guile
  4153. primitives by letting them defer a call to a GOOPS generic function on
  4154. argument mismatch. This means that there is no loss of efficiency in
  4155. normal evaluation.
  4156. Example:
  4157. (use-modules (oop goops)) ; Must be GOOPS version 0.2.
  4158. (define-method + ((x <string>) (y <string>))
  4159. (string-append x y))
  4160. + will still be as efficient as usual in numerical calculations, but
  4161. can also be used for concatenating strings.
  4162. Who will be the first one to extend Guile's numerical tower to
  4163. rationals? :) [OK, there a few other things to fix before this can
  4164. be made in a clean way.]
  4165. *** New snarf macros for defining primitives: SCM_GPROC, SCM_GPROC1
  4166. New macro: SCM_GPROC (CNAME, SNAME, REQ, OPT, VAR, CFUNC, GENERIC)
  4167. New macro: SCM_GPROC1 (CNAME, SNAME, TYPE, CFUNC, GENERIC)
  4168. These do the same job as SCM_PROC and SCM_PROC1, but they also define
  4169. a variable GENERIC which can be used by the dispatch macros below.
  4170. [This is experimental code which may change soon.]
  4171. *** New macros for forwarding control to a generic on arg type error
  4172. New macro: SCM_WTA_DISPATCH_1 (GENERIC, ARG1, POS, SUBR)
  4173. New macro: SCM_WTA_DISPATCH_2 (GENERIC, ARG1, ARG2, POS, SUBR)
  4174. These correspond to the scm_wta function call, and have the same
  4175. behaviour until the user has called the GOOPS primitive
  4176. `enable-primitive-generic!'. After that, these macros will apply the
  4177. generic function GENERIC to the argument(s) instead of calling
  4178. scm_wta.
  4179. [This is experimental code which may change soon.]
  4180. *** New macros for argument testing with generic dispatch
  4181. New macro: SCM_GASSERT1 (COND, GENERIC, ARG1, POS, SUBR)
  4182. New macro: SCM_GASSERT2 (COND, GENERIC, ARG1, ARG2, POS, SUBR)
  4183. These correspond to the SCM_ASSERT macro, but will defer control to
  4184. GENERIC on error after `enable-primitive-generic!' has been called.
  4185. [This is experimental code which may change soon.]
  4186. ** New function: SCM scm_eval_body (SCM body, SCM env)
  4187. Evaluates the body of a special form.
  4188. ** The internal representation of struct's has changed
  4189. Previously, four slots were allocated for the procedure(s) of entities
  4190. and operators. The motivation for this representation had to do with
  4191. the structure of the evaluator, the wish to support tail-recursive
  4192. generic functions, and efficiency. Since the generic function
  4193. dispatch mechanism has changed, there is no longer a need for such an
  4194. expensive representation, and the representation has been simplified.
  4195. This should not make any difference for most users.
  4196. ** GOOPS support has been cleaned up.
  4197. Some code has been moved from eval.c to objects.c and code in both of
  4198. these compilation units has been cleaned up and better structured.
  4199. *** New functions for applying generic functions
  4200. New function: SCM scm_apply_generic (GENERIC, ARGS)
  4201. New function: SCM scm_call_generic_0 (GENERIC)
  4202. New function: SCM scm_call_generic_1 (GENERIC, ARG1)
  4203. New function: SCM scm_call_generic_2 (GENERIC, ARG1, ARG2)
  4204. New function: SCM scm_call_generic_3 (GENERIC, ARG1, ARG2, ARG3)
  4205. ** Deprecated function: scm_make_named_hook
  4206. It is now replaced by:
  4207. ** New function: SCM scm_create_hook (const char *name, int arity)
  4208. Creates a hook in the same way as make-hook above but also
  4209. binds a variable named NAME to it.
  4210. This is the typical way of creating a hook from C code.
  4211. Currently, the variable is created in the "current" module.
  4212. This might change when we get the new module system.
  4213. [The behaviour is identical to scm_make_named_hook.]
  4214. Changes since Guile 1.3:
  4215. * Changes to mailing lists
  4216. ** Some of the Guile mailing lists have moved to sourceware.cygnus.com.
  4217. See the README file to find current addresses for all the Guile
  4218. mailing lists.
  4219. * Changes to the distribution
  4220. ** Readline support is no longer included with Guile by default.
  4221. Based on the different license terms of Guile and Readline, we
  4222. concluded that Guile should not *by default* cause the linking of
  4223. Readline into an application program. Readline support is now offered
  4224. as a separate module, which is linked into an application only when
  4225. you explicitly specify it.
  4226. Although Guile is GNU software, its distribution terms add a special
  4227. exception to the usual GNU General Public License (GPL). Guile's
  4228. license includes a clause that allows you to link Guile with non-free
  4229. programs. We add this exception so as not to put Guile at a
  4230. disadvantage vis-a-vis other extensibility packages that support other
  4231. languages.
  4232. In contrast, the GNU Readline library is distributed under the GNU
  4233. General Public License pure and simple. This means that you may not
  4234. link Readline, even dynamically, into an application unless it is
  4235. distributed under a free software license that is compatible the GPL.
  4236. Because of this difference in distribution terms, an application that
  4237. can use Guile may not be able to use Readline. Now users will be
  4238. explicitly offered two independent decisions about the use of these
  4239. two packages.
  4240. You can activate the readline support by issuing
  4241. (use-modules (readline-activator))
  4242. (activate-readline)
  4243. from your ".guile" file, for example.
  4244. * Changes to the stand-alone interpreter
  4245. ** All builtins now print as primitives.
  4246. Previously builtin procedures not belonging to the fundamental subr
  4247. types printed as #<compiled closure #<primitive-procedure gsubr-apply>>.
  4248. Now, they print as #<primitive-procedure NAME>.
  4249. ** Backtraces slightly more intelligible.
  4250. gsubr-apply and macro transformer application frames no longer appear
  4251. in backtraces.
  4252. * Changes to Scheme functions and syntax
  4253. ** Guile now correctly handles internal defines by rewriting them into
  4254. their equivalent letrec. Previously, internal defines would
  4255. incrementally add to the innermost environment, without checking
  4256. whether the restrictions specified in RnRS were met. This lead to the
  4257. correct behaviour when these restriction actually were met, but didn't
  4258. catch all illegal uses. Such an illegal use could lead to crashes of
  4259. the Guile interpreter or or other unwanted results. An example of
  4260. incorrect internal defines that made Guile behave erratically:
  4261. (let ()
  4262. (define a 1)
  4263. (define (b) a)
  4264. (define c (1+ (b)))
  4265. (define d 3)
  4266. (b))
  4267. => 2
  4268. The problem with this example is that the definition of `c' uses the
  4269. value of `b' directly. This confuses the meoization machine of Guile
  4270. so that the second call of `b' (this time in a larger environment that
  4271. also contains bindings for `c' and `d') refers to the binding of `c'
  4272. instead of `a'. You could also make Guile crash with a variation on
  4273. this theme:
  4274. (define (foo flag)
  4275. (define a 1)
  4276. (define (b flag) (if flag a 1))
  4277. (define c (1+ (b flag)))
  4278. (define d 3)
  4279. (b #t))
  4280. (foo #f)
  4281. (foo #t)
  4282. From now on, Guile will issue an `Unbound variable: b' error message
  4283. for both examples.
  4284. ** Hooks
  4285. A hook contains a list of functions which should be called on
  4286. particular occasions in an existing program. Hooks are used for
  4287. customization.
  4288. A window manager might have a hook before-window-map-hook. The window
  4289. manager uses the function run-hooks to call all functions stored in
  4290. before-window-map-hook each time a window is mapped. The user can
  4291. store functions in the hook using add-hook!.
  4292. In Guile, hooks are first class objects.
  4293. *** New function: make-hook [N_ARGS]
  4294. Return a hook for hook functions which can take N_ARGS arguments.
  4295. The default value for N_ARGS is 0.
  4296. (See also scm_make_named_hook below.)
  4297. *** New function: add-hook! HOOK PROC [APPEND_P]
  4298. Put PROC at the beginning of the list of functions stored in HOOK.
  4299. If APPEND_P is supplied, and non-false, put PROC at the end instead.
  4300. PROC must be able to take the number of arguments specified when the
  4301. hook was created.
  4302. If PROC already exists in HOOK, then remove it first.
  4303. *** New function: remove-hook! HOOK PROC
  4304. Remove PROC from the list of functions in HOOK.
  4305. *** New function: reset-hook! HOOK
  4306. Clear the list of hook functions stored in HOOK.
  4307. *** New function: run-hook HOOK ARG1 ...
  4308. Run all hook functions stored in HOOK with arguments ARG1 ... .
  4309. The number of arguments supplied must correspond to the number given
  4310. when the hook was created.
  4311. ** The function `dynamic-link' now takes optional keyword arguments.
  4312. The only keyword argument that is currently defined is `:global
  4313. BOOL'. With it, you can control whether the shared library will be
  4314. linked in global mode or not. In global mode, the symbols from the
  4315. linked library can be used to resolve references from other
  4316. dynamically linked libraries. In non-global mode, the linked
  4317. library is essentially invisible and can only be accessed via
  4318. `dynamic-func', etc. The default is now to link in global mode.
  4319. Previously, the default has been non-global mode.
  4320. The `#:global' keyword is only effective on platforms that support
  4321. the dlopen family of functions.
  4322. ** New function `provided?'
  4323. - Function: provided? FEATURE
  4324. Return true iff FEATURE is supported by this installation of
  4325. Guile. FEATURE must be a symbol naming a feature; the global
  4326. variable `*features*' is a list of available features.
  4327. ** Changes to the module (ice-9 expect):
  4328. *** The expect-strings macro now matches `$' in a regular expression
  4329. only at a line-break or end-of-file by default. Previously it would
  4330. match the end of the string accumulated so far. The old behaviour
  4331. can be obtained by setting the variable `expect-strings-exec-flags'
  4332. to 0.
  4333. *** The expect-strings macro now uses a variable `expect-strings-exec-flags'
  4334. for the regexp-exec flags. If `regexp/noteol' is included, then `$'
  4335. in a regular expression will still match before a line-break or
  4336. end-of-file. The default is `regexp/noteol'.
  4337. *** The expect-strings macro now uses a variable
  4338. `expect-strings-compile-flags' for the flags to be supplied to
  4339. `make-regexp'. The default is `regexp/newline', which was previously
  4340. hard-coded.
  4341. *** The expect macro now supplies two arguments to a match procedure:
  4342. the current accumulated string and a flag to indicate whether
  4343. end-of-file has been reached. Previously only the string was supplied.
  4344. If end-of-file is reached, the match procedure will be called an
  4345. additional time with the same accumulated string as the previous call
  4346. but with the flag set.
  4347. ** New module (ice-9 format), implementing the Common Lisp `format' function.
  4348. This code, and the documentation for it that appears here, was
  4349. borrowed from SLIB, with minor adaptations for Guile.
  4350. - Function: format DESTINATION FORMAT-STRING . ARGUMENTS
  4351. An almost complete implementation of Common LISP format description
  4352. according to the CL reference book `Common LISP' from Guy L.
  4353. Steele, Digital Press. Backward compatible to most of the
  4354. available Scheme format implementations.
  4355. Returns `#t', `#f' or a string; has side effect of printing
  4356. according to FORMAT-STRING. If DESTINATION is `#t', the output is
  4357. to the current output port and `#t' is returned. If DESTINATION
  4358. is `#f', a formatted string is returned as the result of the call.
  4359. NEW: If DESTINATION is a string, DESTINATION is regarded as the
  4360. format string; FORMAT-STRING is then the first argument and the
  4361. output is returned as a string. If DESTINATION is a number, the
  4362. output is to the current error port if available by the
  4363. implementation. Otherwise DESTINATION must be an output port and
  4364. `#t' is returned.
  4365. FORMAT-STRING must be a string. In case of a formatting error
  4366. format returns `#f' and prints a message on the current output or
  4367. error port. Characters are output as if the string were output by
  4368. the `display' function with the exception of those prefixed by a
  4369. tilde (~). For a detailed description of the FORMAT-STRING syntax
  4370. please consult a Common LISP format reference manual. For a test
  4371. suite to verify this format implementation load `formatst.scm'.
  4372. Please send bug reports to `lutzeb@cs.tu-berlin.de'.
  4373. Note: `format' is not reentrant, i.e. only one `format'-call may
  4374. be executed at a time.
  4375. *** Format Specification (Format version 3.0)
  4376. Please consult a Common LISP format reference manual for a detailed
  4377. description of the format string syntax. For a demonstration of the
  4378. implemented directives see `formatst.scm'.
  4379. This implementation supports directive parameters and modifiers (`:'
  4380. and `@' characters). Multiple parameters must be separated by a comma
  4381. (`,'). Parameters can be numerical parameters (positive or negative),
  4382. character parameters (prefixed by a quote character (`''), variable
  4383. parameters (`v'), number of rest arguments parameter (`#'), empty and
  4384. default parameters. Directive characters are case independent. The
  4385. general form of a directive is:
  4386. DIRECTIVE ::= ~{DIRECTIVE-PARAMETER,}[:][@]DIRECTIVE-CHARACTER
  4387. DIRECTIVE-PARAMETER ::= [ [-|+]{0-9}+ | 'CHARACTER | v | # ]
  4388. *** Implemented CL Format Control Directives
  4389. Documentation syntax: Uppercase characters represent the
  4390. corresponding control directive characters. Lowercase characters
  4391. represent control directive parameter descriptions.
  4392. `~A'
  4393. Any (print as `display' does).
  4394. `~@A'
  4395. left pad.
  4396. `~MINCOL,COLINC,MINPAD,PADCHARA'
  4397. full padding.
  4398. `~S'
  4399. S-expression (print as `write' does).
  4400. `~@S'
  4401. left pad.
  4402. `~MINCOL,COLINC,MINPAD,PADCHARS'
  4403. full padding.
  4404. `~D'
  4405. Decimal.
  4406. `~@D'
  4407. print number sign always.
  4408. `~:D'
  4409. print comma separated.
  4410. `~MINCOL,PADCHAR,COMMACHARD'
  4411. padding.
  4412. `~X'
  4413. Hexadecimal.
  4414. `~@X'
  4415. print number sign always.
  4416. `~:X'
  4417. print comma separated.
  4418. `~MINCOL,PADCHAR,COMMACHARX'
  4419. padding.
  4420. `~O'
  4421. Octal.
  4422. `~@O'
  4423. print number sign always.
  4424. `~:O'
  4425. print comma separated.
  4426. `~MINCOL,PADCHAR,COMMACHARO'
  4427. padding.
  4428. `~B'
  4429. Binary.
  4430. `~@B'
  4431. print number sign always.
  4432. `~:B'
  4433. print comma separated.
  4434. `~MINCOL,PADCHAR,COMMACHARB'
  4435. padding.
  4436. `~NR'
  4437. Radix N.
  4438. `~N,MINCOL,PADCHAR,COMMACHARR'
  4439. padding.
  4440. `~@R'
  4441. print a number as a Roman numeral.
  4442. `~:@R'
  4443. print a number as an "old fashioned" Roman numeral.
  4444. `~:R'
  4445. print a number as an ordinal English number.
  4446. `~:@R'
  4447. print a number as a cardinal English number.
  4448. `~P'
  4449. Plural.
  4450. `~@P'
  4451. prints `y' and `ies'.
  4452. `~:P'
  4453. as `~P but jumps 1 argument backward.'
  4454. `~:@P'
  4455. as `~@P but jumps 1 argument backward.'
  4456. `~C'
  4457. Character.
  4458. `~@C'
  4459. prints a character as the reader can understand it (i.e. `#\'
  4460. prefixing).
  4461. `~:C'
  4462. prints a character as emacs does (eg. `^C' for ASCII 03).
  4463. `~F'
  4464. Fixed-format floating-point (prints a flonum like MMM.NNN).
  4465. `~WIDTH,DIGITS,SCALE,OVERFLOWCHAR,PADCHARF'
  4466. `~@F'
  4467. If the number is positive a plus sign is printed.
  4468. `~E'
  4469. Exponential floating-point (prints a flonum like MMM.NNN`E'EE).
  4470. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARE'
  4471. `~@E'
  4472. If the number is positive a plus sign is printed.
  4473. `~G'
  4474. General floating-point (prints a flonum either fixed or
  4475. exponential).
  4476. `~WIDTH,DIGITS,EXPONENTDIGITS,SCALE,OVERFLOWCHAR,PADCHAR,EXPONENTCHARG'
  4477. `~@G'
  4478. If the number is positive a plus sign is printed.
  4479. `~$'
  4480. Dollars floating-point (prints a flonum in fixed with signs
  4481. separated).
  4482. `~DIGITS,SCALE,WIDTH,PADCHAR$'
  4483. `~@$'
  4484. If the number is positive a plus sign is printed.
  4485. `~:@$'
  4486. A sign is always printed and appears before the padding.
  4487. `~:$'
  4488. The sign appears before the padding.
  4489. `~%'
  4490. Newline.
  4491. `~N%'
  4492. print N newlines.
  4493. `~&'
  4494. print newline if not at the beginning of the output line.
  4495. `~N&'
  4496. prints `~&' and then N-1 newlines.
  4497. `~|'
  4498. Page Separator.
  4499. `~N|'
  4500. print N page separators.
  4501. `~~'
  4502. Tilde.
  4503. `~N~'
  4504. print N tildes.
  4505. `~'<newline>
  4506. Continuation Line.
  4507. `~:'<newline>
  4508. newline is ignored, white space left.
  4509. `~@'<newline>
  4510. newline is left, white space ignored.
  4511. `~T'
  4512. Tabulation.
  4513. `~@T'
  4514. relative tabulation.
  4515. `~COLNUM,COLINCT'
  4516. full tabulation.
  4517. `~?'
  4518. Indirection (expects indirect arguments as a list).
  4519. `~@?'
  4520. extracts indirect arguments from format arguments.
  4521. `~(STR~)'
  4522. Case conversion (converts by `string-downcase').
  4523. `~:(STR~)'
  4524. converts by `string-capitalize'.
  4525. `~@(STR~)'
  4526. converts by `string-capitalize-first'.
  4527. `~:@(STR~)'
  4528. converts by `string-upcase'.
  4529. `~*'
  4530. Argument Jumping (jumps 1 argument forward).
  4531. `~N*'
  4532. jumps N arguments forward.
  4533. `~:*'
  4534. jumps 1 argument backward.
  4535. `~N:*'
  4536. jumps N arguments backward.
  4537. `~@*'
  4538. jumps to the 0th argument.
  4539. `~N@*'
  4540. jumps to the Nth argument (beginning from 0)
  4541. `~[STR0~;STR1~;...~;STRN~]'
  4542. Conditional Expression (numerical clause conditional).
  4543. `~N['
  4544. take argument from N.
  4545. `~@['
  4546. true test conditional.
  4547. `~:['
  4548. if-else-then conditional.
  4549. `~;'
  4550. clause separator.
  4551. `~:;'
  4552. default clause follows.
  4553. `~{STR~}'
  4554. Iteration (args come from the next argument (a list)).
  4555. `~N{'
  4556. at most N iterations.
  4557. `~:{'
  4558. args from next arg (a list of lists).
  4559. `~@{'
  4560. args from the rest of arguments.
  4561. `~:@{'
  4562. args from the rest args (lists).
  4563. `~^'
  4564. Up and out.
  4565. `~N^'
  4566. aborts if N = 0
  4567. `~N,M^'
  4568. aborts if N = M
  4569. `~N,M,K^'
  4570. aborts if N <= M <= K
  4571. *** Not Implemented CL Format Control Directives
  4572. `~:A'
  4573. print `#f' as an empty list (see below).
  4574. `~:S'
  4575. print `#f' as an empty list (see below).
  4576. `~<~>'
  4577. Justification.
  4578. `~:^'
  4579. (sorry I don't understand its semantics completely)
  4580. *** Extended, Replaced and Additional Control Directives
  4581. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHD'
  4582. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHX'
  4583. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHO'
  4584. `~MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHB'
  4585. `~N,MINCOL,PADCHAR,COMMACHAR,COMMAWIDTHR'
  4586. COMMAWIDTH is the number of characters between two comma
  4587. characters.
  4588. `~I'
  4589. print a R4RS complex number as `~F~@Fi' with passed parameters for
  4590. `~F'.
  4591. `~Y'
  4592. Pretty print formatting of an argument for scheme code lists.
  4593. `~K'
  4594. Same as `~?.'
  4595. `~!'
  4596. Flushes the output if format DESTINATION is a port.
  4597. `~_'
  4598. Print a `#\space' character
  4599. `~N_'
  4600. print N `#\space' characters.
  4601. `~/'
  4602. Print a `#\tab' character
  4603. `~N/'
  4604. print N `#\tab' characters.
  4605. `~NC'
  4606. Takes N as an integer representation for a character. No arguments
  4607. are consumed. N is converted to a character by `integer->char'. N
  4608. must be a positive decimal number.
  4609. `~:S'
  4610. Print out readproof. Prints out internal objects represented as
  4611. `#<...>' as strings `"#<...>"' so that the format output can always
  4612. be processed by `read'.
  4613. `~:A'
  4614. Print out readproof. Prints out internal objects represented as
  4615. `#<...>' as strings `"#<...>"' so that the format output can always
  4616. be processed by `read'.
  4617. `~Q'
  4618. Prints information and a copyright notice on the format
  4619. implementation.
  4620. `~:Q'
  4621. prints format version.
  4622. `~F, ~E, ~G, ~$'
  4623. may also print number strings, i.e. passing a number as a string
  4624. and format it accordingly.
  4625. *** Configuration Variables
  4626. The format module exports some configuration variables to suit the
  4627. systems and users needs. There should be no modification necessary for
  4628. the configuration that comes with Guile. Format detects automatically
  4629. if the running scheme system implements floating point numbers and
  4630. complex numbers.
  4631. format:symbol-case-conv
  4632. Symbols are converted by `symbol->string' so the case type of the
  4633. printed symbols is implementation dependent.
  4634. `format:symbol-case-conv' is a one arg closure which is either
  4635. `#f' (no conversion), `string-upcase', `string-downcase' or
  4636. `string-capitalize'. (default `#f')
  4637. format:iobj-case-conv
  4638. As FORMAT:SYMBOL-CASE-CONV but applies for the representation of
  4639. implementation internal objects. (default `#f')
  4640. format:expch
  4641. The character prefixing the exponent value in `~E' printing.
  4642. (default `#\E')
  4643. *** Compatibility With Other Format Implementations
  4644. SLIB format 2.x:
  4645. See `format.doc'.
  4646. SLIB format 1.4:
  4647. Downward compatible except for padding support and `~A', `~S',
  4648. `~P', `~X' uppercase printing. SLIB format 1.4 uses C-style
  4649. `printf' padding support which is completely replaced by the CL
  4650. `format' padding style.
  4651. MIT C-Scheme 7.1:
  4652. Downward compatible except for `~', which is not documented
  4653. (ignores all characters inside the format string up to a newline
  4654. character). (7.1 implements `~a', `~s', ~NEWLINE, `~~', `~%',
  4655. numerical and variable parameters and `:/@' modifiers in the CL
  4656. sense).
  4657. Elk 1.5/2.0:
  4658. Downward compatible except for `~A' and `~S' which print in
  4659. uppercase. (Elk implements `~a', `~s', `~~', and `~%' (no
  4660. directive parameters or modifiers)).
  4661. Scheme->C 01nov91:
  4662. Downward compatible except for an optional destination parameter:
  4663. S2C accepts a format call without a destination which returns a
  4664. formatted string. This is equivalent to a #f destination in S2C.
  4665. (S2C implements `~a', `~s', `~c', `~%', and `~~' (no directive
  4666. parameters or modifiers)).
  4667. ** Changes to string-handling functions.
  4668. These functions were added to support the (ice-9 format) module, above.
  4669. *** New function: string-upcase STRING
  4670. *** New function: string-downcase STRING
  4671. These are non-destructive versions of the existing string-upcase! and
  4672. string-downcase! functions.
  4673. *** New function: string-capitalize! STRING
  4674. *** New function: string-capitalize STRING
  4675. These functions convert the first letter of each word in the string to
  4676. upper case. Thus:
  4677. (string-capitalize "howdy there")
  4678. => "Howdy There"
  4679. As with the other functions, string-capitalize! modifies the string in
  4680. place, while string-capitalize returns a modified copy of its argument.
  4681. *** New function: string-ci->symbol STRING
  4682. Return a symbol whose name is STRING, but having the same case as if
  4683. the symbol had be read by `read'.
  4684. Guile can be configured to be sensitive or insensitive to case
  4685. differences in Scheme identifiers. If Guile is case-insensitive, all
  4686. symbols are converted to lower case on input. The `string-ci->symbol'
  4687. function returns a symbol whose name in STRING, transformed as Guile
  4688. would if STRING were input.
  4689. *** New function: substring-move! STRING1 START END STRING2 START
  4690. Copy the substring of STRING1 from START (inclusive) to END
  4691. (exclusive) to STRING2 at START. STRING1 and STRING2 may be the same
  4692. string, and the source and destination areas may overlap; in all
  4693. cases, the function behaves as if all the characters were copied
  4694. simultanously.
  4695. *** Extended functions: substring-move-left! substring-move-right!
  4696. These functions now correctly copy arbitrarily overlapping substrings;
  4697. they are both synonyms for substring-move!.
  4698. ** New module (ice-9 getopt-long), with the function `getopt-long'.
  4699. getopt-long is a function for parsing command-line arguments in a
  4700. manner consistent with other GNU programs.
  4701. (getopt-long ARGS GRAMMAR)
  4702. Parse the arguments ARGS according to the argument list grammar GRAMMAR.
  4703. ARGS should be a list of strings. Its first element should be the
  4704. name of the program; subsequent elements should be the arguments
  4705. that were passed to the program on the command line. The
  4706. `program-arguments' procedure returns a list of this form.
  4707. GRAMMAR is a list of the form:
  4708. ((OPTION (PROPERTY VALUE) ...) ...)
  4709. Each OPTION should be a symbol. `getopt-long' will accept a
  4710. command-line option named `--OPTION'.
  4711. Each option can have the following (PROPERTY VALUE) pairs:
  4712. (single-char CHAR) --- Accept `-CHAR' as a single-character
  4713. equivalent to `--OPTION'. This is how to specify traditional
  4714. Unix-style flags.
  4715. (required? BOOL) --- If BOOL is true, the option is required.
  4716. getopt-long will raise an error if it is not found in ARGS.
  4717. (value BOOL) --- If BOOL is #t, the option accepts a value; if
  4718. it is #f, it does not; and if it is the symbol
  4719. `optional', the option may appear in ARGS with or
  4720. without a value.
  4721. (predicate FUNC) --- If the option accepts a value (i.e. you
  4722. specified `(value #t)' for this option), then getopt
  4723. will apply FUNC to the value, and throw an exception
  4724. if it returns #f. FUNC should be a procedure which
  4725. accepts a string and returns a boolean value; you may
  4726. need to use quasiquotes to get it into GRAMMAR.
  4727. The (PROPERTY VALUE) pairs may occur in any order, but each
  4728. property may occur only once. By default, options do not have
  4729. single-character equivalents, are not required, and do not take
  4730. values.
  4731. In ARGS, single-character options may be combined, in the usual
  4732. Unix fashion: ("-x" "-y") is equivalent to ("-xy"). If an option
  4733. accepts values, then it must be the last option in the
  4734. combination; the value is the next argument. So, for example, using
  4735. the following grammar:
  4736. ((apples (single-char #\a))
  4737. (blimps (single-char #\b) (value #t))
  4738. (catalexis (single-char #\c) (value #t)))
  4739. the following argument lists would be acceptable:
  4740. ("-a" "-b" "bang" "-c" "couth") ("bang" and "couth" are the values
  4741. for "blimps" and "catalexis")
  4742. ("-ab" "bang" "-c" "couth") (same)
  4743. ("-ac" "couth" "-b" "bang") (same)
  4744. ("-abc" "couth" "bang") (an error, since `-b' is not the
  4745. last option in its combination)
  4746. If an option's value is optional, then `getopt-long' decides
  4747. whether it has a value by looking at what follows it in ARGS. If
  4748. the next element is a string, and it does not appear to be an
  4749. option itself, then that string is the option's value.
  4750. The value of a long option can appear as the next element in ARGS,
  4751. or it can follow the option name, separated by an `=' character.
  4752. Thus, using the same grammar as above, the following argument lists
  4753. are equivalent:
  4754. ("--apples" "Braeburn" "--blimps" "Goodyear")
  4755. ("--apples=Braeburn" "--blimps" "Goodyear")
  4756. ("--blimps" "Goodyear" "--apples=Braeburn")
  4757. If the option "--" appears in ARGS, argument parsing stops there;
  4758. subsequent arguments are returned as ordinary arguments, even if
  4759. they resemble options. So, in the argument list:
  4760. ("--apples" "Granny Smith" "--" "--blimp" "Goodyear")
  4761. `getopt-long' will recognize the `apples' option as having the
  4762. value "Granny Smith", but it will not recognize the `blimp'
  4763. option; it will return the strings "--blimp" and "Goodyear" as
  4764. ordinary argument strings.
  4765. The `getopt-long' function returns the parsed argument list as an
  4766. assocation list, mapping option names --- the symbols from GRAMMAR
  4767. --- onto their values, or #t if the option does not accept a value.
  4768. Unused options do not appear in the alist.
  4769. All arguments that are not the value of any option are returned
  4770. as a list, associated with the empty list.
  4771. `getopt-long' throws an exception if:
  4772. - it finds an unrecognized option in ARGS
  4773. - a required option is omitted
  4774. - an option that requires an argument doesn't get one
  4775. - an option that doesn't accept an argument does get one (this can
  4776. only happen using the long option `--opt=value' syntax)
  4777. - an option predicate fails
  4778. So, for example:
  4779. (define grammar
  4780. `((lockfile-dir (required? #t)
  4781. (value #t)
  4782. (single-char #\k)
  4783. (predicate ,file-is-directory?))
  4784. (verbose (required? #f)
  4785. (single-char #\v)
  4786. (value #f))
  4787. (x-includes (single-char #\x))
  4788. (rnet-server (single-char #\y)
  4789. (predicate ,string?))))
  4790. (getopt-long '("my-prog" "-vk" "/tmp" "foo1" "--x-includes=/usr/include"
  4791. "--rnet-server=lamprod" "--" "-fred" "foo2" "foo3")
  4792. grammar)
  4793. => ((() "foo1" "-fred" "foo2" "foo3")
  4794. (rnet-server . "lamprod")
  4795. (x-includes . "/usr/include")
  4796. (lockfile-dir . "/tmp")
  4797. (verbose . #t))
  4798. ** The (ice-9 getopt-gnu-style) module is obsolete; use (ice-9 getopt-long).
  4799. It will be removed in a few releases.
  4800. ** New syntax: lambda*
  4801. ** New syntax: define*
  4802. ** New syntax: define*-public
  4803. ** New syntax: defmacro*
  4804. ** New syntax: defmacro*-public
  4805. Guile now supports optional arguments.
  4806. `lambda*', `define*', `define*-public', `defmacro*' and
  4807. `defmacro*-public' are identical to the non-* versions except that
  4808. they use an extended type of parameter list that has the following BNF
  4809. syntax (parentheses are literal, square brackets indicate grouping,
  4810. and `*', `+' and `?' have the usual meaning):
  4811. ext-param-list ::= ( [identifier]* [#&optional [ext-var-decl]+]?
  4812. [#&key [ext-var-decl]+ [#&allow-other-keys]?]?
  4813. [[#&rest identifier]|[. identifier]]? ) | [identifier]
  4814. ext-var-decl ::= identifier | ( identifier expression )
  4815. The semantics are best illustrated with the following documentation
  4816. and examples for `lambda*':
  4817. lambda* args . body
  4818. lambda extended for optional and keyword arguments
  4819. lambda* creates a procedure that takes optional arguments. These
  4820. are specified by putting them inside brackets at the end of the
  4821. paramater list, but before any dotted rest argument. For example,
  4822. (lambda* (a b #&optional c d . e) '())
  4823. creates a procedure with fixed arguments a and b, optional arguments c
  4824. and d, and rest argument e. If the optional arguments are omitted
  4825. in a call, the variables for them are unbound in the procedure. This
  4826. can be checked with the bound? macro.
  4827. lambda* can also take keyword arguments. For example, a procedure
  4828. defined like this:
  4829. (lambda* (#&key xyzzy larch) '())
  4830. can be called with any of the argument lists (#:xyzzy 11)
  4831. (#:larch 13) (#:larch 42 #:xyzzy 19) (). Whichever arguments
  4832. are given as keywords are bound to values.
  4833. Optional and keyword arguments can also be given default values
  4834. which they take on when they are not present in a call, by giving a
  4835. two-item list in place of an optional argument, for example in:
  4836. (lambda* (foo #&optional (bar 42) #&key (baz 73)) (list foo bar baz))
  4837. foo is a fixed argument, bar is an optional argument with default
  4838. value 42, and baz is a keyword argument with default value 73.
  4839. Default value expressions are not evaluated unless they are needed
  4840. and until the procedure is called.
  4841. lambda* now supports two more special parameter list keywords.
  4842. lambda*-defined procedures now throw an error by default if a
  4843. keyword other than one of those specified is found in the actual
  4844. passed arguments. However, specifying #&allow-other-keys
  4845. immediately after the kyword argument declarations restores the
  4846. previous behavior of ignoring unknown keywords. lambda* also now
  4847. guarantees that if the same keyword is passed more than once, the
  4848. last one passed is the one that takes effect. For example,
  4849. ((lambda* (#&key (heads 0) (tails 0)) (display (list heads tails)))
  4850. #:heads 37 #:tails 42 #:heads 99)
  4851. would result in (99 47) being displayed.
  4852. #&rest is also now provided as a synonym for the dotted syntax rest
  4853. argument. The argument lists (a . b) and (a #&rest b) are equivalent in
  4854. all respects to lambda*. This is provided for more similarity to DSSSL,
  4855. MIT-Scheme and Kawa among others, as well as for refugees from other
  4856. Lisp dialects.
  4857. Further documentation may be found in the optargs.scm file itself.
  4858. The optional argument module also exports the macros `let-optional',
  4859. `let-optional*', `let-keywords', `let-keywords*' and `bound?'. These
  4860. are not documented here because they may be removed in the future, but
  4861. full documentation is still available in optargs.scm.
  4862. ** New syntax: and-let*
  4863. Guile now supports the `and-let*' form, described in the draft SRFI-2.
  4864. Syntax: (land* (<clause> ...) <body> ...)
  4865. Each <clause> should have one of the following forms:
  4866. (<variable> <expression>)
  4867. (<expression>)
  4868. <bound-variable>
  4869. Each <variable> or <bound-variable> should be an identifier. Each
  4870. <expression> should be a valid expression. The <body> should be a
  4871. possibly empty sequence of expressions, like the <body> of a
  4872. lambda form.
  4873. Semantics: A LAND* expression is evaluated by evaluating the
  4874. <expression> or <bound-variable> of each of the <clause>s from
  4875. left to right. The value of the first <expression> or
  4876. <bound-variable> that evaluates to a false value is returned; the
  4877. remaining <expression>s and <bound-variable>s are not evaluated.
  4878. The <body> forms are evaluated iff all the <expression>s and
  4879. <bound-variable>s evaluate to true values.
  4880. The <expression>s and the <body> are evaluated in an environment
  4881. binding each <variable> of the preceding (<variable> <expression>)
  4882. clauses to the value of the <expression>. Later bindings
  4883. shadow earlier bindings.
  4884. Guile's and-let* macro was contributed by Michael Livshin.
  4885. ** New sorting functions
  4886. *** New function: sorted? SEQUENCE LESS?
  4887. Returns `#t' when the sequence argument is in non-decreasing order
  4888. according to LESS? (that is, there is no adjacent pair `... x y
  4889. ...' for which `(less? y x)').
  4890. Returns `#f' when the sequence contains at least one out-of-order
  4891. pair. It is an error if the sequence is neither a list nor a
  4892. vector.
  4893. *** New function: merge LIST1 LIST2 LESS?
  4894. LIST1 and LIST2 are sorted lists.
  4895. Returns the sorted list of all elements in LIST1 and LIST2.
  4896. Assume that the elements a and b1 in LIST1 and b2 in LIST2 are "equal"
  4897. in the sense that (LESS? x y) --> #f for x, y in {a, b1, b2},
  4898. and that a < b1 in LIST1. Then a < b1 < b2 in the result.
  4899. (Here "<" should read "comes before".)
  4900. *** New procedure: merge! LIST1 LIST2 LESS?
  4901. Merges two lists, re-using the pairs of LIST1 and LIST2 to build
  4902. the result. If the code is compiled, and LESS? constructs no new
  4903. pairs, no pairs at all will be allocated. The first pair of the
  4904. result will be either the first pair of LIST1 or the first pair of
  4905. LIST2.
  4906. *** New function: sort SEQUENCE LESS?
  4907. Accepts either a list or a vector, and returns a new sequence
  4908. which is sorted. The new sequence is the same type as the input.
  4909. Always `(sorted? (sort sequence less?) less?)'. The original
  4910. sequence is not altered in any way. The new sequence shares its
  4911. elements with the old one; no elements are copied.
  4912. *** New procedure: sort! SEQUENCE LESS
  4913. Returns its sorted result in the original boxes. No new storage is
  4914. allocated at all. Proper usage: (set! slist (sort! slist <))
  4915. *** New function: stable-sort SEQUENCE LESS?
  4916. Similar to `sort' but stable. That is, if "equal" elements are
  4917. ordered a < b in the original sequence, they will have the same order
  4918. in the result.
  4919. *** New function: stable-sort! SEQUENCE LESS?
  4920. Similar to `sort!' but stable.
  4921. Uses temporary storage when sorting vectors.
  4922. *** New functions: sort-list, sort-list!
  4923. Added for compatibility with scsh.
  4924. ** New built-in random number support
  4925. *** New function: random N [STATE]
  4926. Accepts a positive integer or real N and returns a number of the
  4927. same type between zero (inclusive) and N (exclusive). The values
  4928. returned have a uniform distribution.
  4929. The optional argument STATE must be of the type produced by
  4930. `copy-random-state' or `seed->random-state'. It defaults to the value
  4931. of the variable `*random-state*'. This object is used to maintain the
  4932. state of the pseudo-random-number generator and is altered as a side
  4933. effect of the `random' operation.
  4934. *** New variable: *random-state*
  4935. Holds a data structure that encodes the internal state of the
  4936. random-number generator that `random' uses by default. The nature
  4937. of this data structure is implementation-dependent. It may be
  4938. printed out and successfully read back in, but may or may not
  4939. function correctly as a random-number state object in another
  4940. implementation.
  4941. *** New function: copy-random-state [STATE]
  4942. Returns a new object of type suitable for use as the value of the
  4943. variable `*random-state*' and as a second argument to `random'.
  4944. If argument STATE is given, a copy of it is returned. Otherwise a
  4945. copy of `*random-state*' is returned.
  4946. *** New function: seed->random-state SEED
  4947. Returns a new object of type suitable for use as the value of the
  4948. variable `*random-state*' and as a second argument to `random'.
  4949. SEED is a string or a number. A new state is generated and
  4950. initialized using SEED.
  4951. *** New function: random:uniform [STATE]
  4952. Returns an uniformly distributed inexact real random number in the
  4953. range between 0 and 1.
  4954. *** New procedure: random:solid-sphere! VECT [STATE]
  4955. Fills VECT with inexact real random numbers the sum of whose
  4956. squares is less than 1.0. Thinking of VECT as coordinates in
  4957. space of dimension N = `(vector-length VECT)', the coordinates are
  4958. uniformly distributed within the unit N-shere. The sum of the
  4959. squares of the numbers is returned. VECT can be either a vector
  4960. or a uniform vector of doubles.
  4961. *** New procedure: random:hollow-sphere! VECT [STATE]
  4962. Fills VECT with inexact real random numbers the sum of whose squares
  4963. is equal to 1.0. Thinking of VECT as coordinates in space of
  4964. dimension n = `(vector-length VECT)', the coordinates are uniformly
  4965. distributed over the surface of the unit n-shere. VECT can be either
  4966. a vector or a uniform vector of doubles.
  4967. *** New function: random:normal [STATE]
  4968. Returns an inexact real in a normal distribution with mean 0 and
  4969. standard deviation 1. For a normal distribution with mean M and
  4970. standard deviation D use `(+ M (* D (random:normal)))'.
  4971. *** New procedure: random:normal-vector! VECT [STATE]
  4972. Fills VECT with inexact real random numbers which are independent and
  4973. standard normally distributed (i.e., with mean 0 and variance 1).
  4974. VECT can be either a vector or a uniform vector of doubles.
  4975. *** New function: random:exp STATE
  4976. Returns an inexact real in an exponential distribution with mean 1.
  4977. For an exponential distribution with mean U use (* U (random:exp)).
  4978. ** The range of logand, logior, logxor, logtest, and logbit? have changed.
  4979. These functions now operate on numbers in the range of a C unsigned
  4980. long.
  4981. These functions used to operate on numbers in the range of a C signed
  4982. long; however, this seems inappropriate, because Guile integers don't
  4983. overflow.
  4984. ** New function: make-guardian
  4985. This is an implementation of guardians as described in
  4986. R. Kent Dybvig, Carl Bruggeman, and David Eby (1993) "Guardians in a
  4987. Generation-Based Garbage Collector" ACM SIGPLAN Conference on
  4988. Programming Language Design and Implementation, June 1993
  4989. ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/guardians.ps.gz
  4990. ** New functions: delq1!, delv1!, delete1!
  4991. These procedures behave similar to delq! and friends but delete only
  4992. one object if at all.
  4993. ** New function: unread-string STRING PORT
  4994. Unread STRING to PORT, that is, push it back onto the port so that
  4995. next read operation will work on the pushed back characters.
  4996. ** unread-char can now be called multiple times
  4997. If unread-char is called multiple times, the unread characters will be
  4998. read again in last-in first-out order.
  4999. ** the procedures uniform-array-read! and uniform-array-write! now
  5000. work on any kind of port, not just ports which are open on a file.
  5001. ** Now 'l' in a port mode requests line buffering.
  5002. ** The procedure truncate-file now works on string ports as well
  5003. as file ports. If the size argument is omitted, the current
  5004. file position is used.
  5005. ** new procedure: seek PORT/FDES OFFSET WHENCE
  5006. The arguments are the same as for the old fseek procedure, but it
  5007. works on string ports as well as random-access file ports.
  5008. ** the fseek procedure now works on string ports, since it has been
  5009. redefined using seek.
  5010. ** the setvbuf procedure now uses a default size if mode is _IOFBF and
  5011. size is not supplied.
  5012. ** the newline procedure no longer flushes the port if it's not
  5013. line-buffered: previously it did if it was the current output port.
  5014. ** open-pipe and close-pipe are no longer primitive procedures, but
  5015. an emulation can be obtained using `(use-modules (ice-9 popen))'.
  5016. ** the freopen procedure has been removed.
  5017. ** new procedure: drain-input PORT
  5018. Drains PORT's read buffers (including any pushed-back characters)
  5019. and returns the contents as a single string.
  5020. ** New function: map-in-order PROC LIST1 LIST2 ...
  5021. Version of `map' which guarantees that the procedure is applied to the
  5022. lists in serial order.
  5023. ** Renamed `serial-array-copy!' and `serial-array-map!' to
  5024. `array-copy-in-order!' and `array-map-in-order!'. The old names are
  5025. now obsolete and will go away in release 1.5.
  5026. ** New syntax: collect BODY1 ...
  5027. Version of `begin' which returns a list of the results of the body
  5028. forms instead of the result of the last body form. In contrast to
  5029. `begin', `collect' allows an empty body.
  5030. ** New functions: read-history FILENAME, write-history FILENAME
  5031. Read/write command line history from/to file. Returns #t on success
  5032. and #f if an error occured.
  5033. ** `ls' and `lls' in module (ice-9 ls) now handle no arguments.
  5034. These procedures return a list of definitions available in the specified
  5035. argument, a relative module reference. In the case of no argument,
  5036. `(current-module)' is now consulted for definitions to return, instead
  5037. of simply returning #f, the former behavior.
  5038. ** The #/ syntax for lists is no longer supported.
  5039. Earlier versions of Scheme accepted this syntax, but printed a
  5040. warning.
  5041. ** Guile no longer consults the SCHEME_LOAD_PATH environment variable.
  5042. Instead, you should set GUILE_LOAD_PATH to tell Guile where to find
  5043. modules.
  5044. * Changes to the gh_ interface
  5045. ** gh_scm2doubles
  5046. Now takes a second argument which is the result array. If this
  5047. pointer is NULL, a new array is malloced (the old behaviour).
  5048. ** gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
  5049. gh_scm2shorts, gh_scm2longs, gh_scm2floats
  5050. New functions.
  5051. * Changes to the scm_ interface
  5052. ** Function: scm_make_named_hook (char* name, int n_args)
  5053. Creates a hook in the same way as make-hook above but also
  5054. binds a variable named NAME to it.
  5055. This is the typical way of creating a hook from C code.
  5056. Currently, the variable is created in the "current" module. This
  5057. might change when we get the new module system.
  5058. ** The smob interface
  5059. The interface for creating smobs has changed. For documentation, see
  5060. data-rep.info (made from guile-core/doc/data-rep.texi).
  5061. *** Deprecated function: SCM scm_newsmob (scm_smobfuns *)
  5062. >>> This function will be removed in 1.3.4. <<<
  5063. It is replaced by:
  5064. *** Function: SCM scm_make_smob_type (const char *name, scm_sizet size)
  5065. This function adds a new smob type, named NAME, with instance size
  5066. SIZE to the system. The return value is a tag that is used in
  5067. creating instances of the type. If SIZE is 0, then no memory will
  5068. be allocated when instances of the smob are created, and nothing
  5069. will be freed by the default free function.
  5070. *** Function: void scm_set_smob_mark (long tc, SCM (*mark) (SCM))
  5071. This function sets the smob marking procedure for the smob type
  5072. specified by the tag TC. TC is the tag returned by
  5073. `scm_make_smob_type'.
  5074. *** Function: void scm_set_smob_free (long tc, SCM (*mark) (SCM))
  5075. This function sets the smob freeing procedure for the smob type
  5076. specified by the tag TC. TC is the tag returned by
  5077. `scm_make_smob_type'.
  5078. *** Function: void scm_set_smob_print (tc, print)
  5079. - Function: void scm_set_smob_print (long tc,
  5080. scm_sizet (*print) (SCM,
  5081. SCM,
  5082. scm_print_state *))
  5083. This function sets the smob printing procedure for the smob type
  5084. specified by the tag TC. TC is the tag returned by
  5085. `scm_make_smob_type'.
  5086. *** Function: void scm_set_smob_equalp (long tc, SCM (*equalp) (SCM, SCM))
  5087. This function sets the smob equality-testing predicate for the
  5088. smob type specified by the tag TC. TC is the tag returned by
  5089. `scm_make_smob_type'.
  5090. *** Macro: void SCM_NEWSMOB (SCM var, long tc, void *data)
  5091. Make VALUE contain a smob instance of the type with type code TC and
  5092. smob data DATA. VALUE must be previously declared as C type `SCM'.
  5093. *** Macro: fn_returns SCM_RETURN_NEWSMOB (long tc, void *data)
  5094. This macro expands to a block of code that creates a smob instance
  5095. of the type with type code TC and smob data DATA, and returns that
  5096. `SCM' value. It should be the last piece of code in a block.
  5097. ** The interfaces for using I/O ports and implementing port types
  5098. (ptobs) have changed significantly. The new interface is based on
  5099. shared access to buffers and a new set of ptob procedures.
  5100. *** scm_newptob has been removed
  5101. It is replaced by:
  5102. *** Function: SCM scm_make_port_type (type_name, fill_buffer, write_flush)
  5103. - Function: SCM scm_make_port_type (char *type_name,
  5104. int (*fill_buffer) (SCM port),
  5105. void (*write_flush) (SCM port));
  5106. Similarly to the new smob interface, there is a set of function
  5107. setters by which the user can customize the behaviour of his port
  5108. type. See ports.h (scm_set_port_XXX).
  5109. ** scm_strport_to_string: New function: creates a new string from
  5110. a string port's buffer.
  5111. ** Plug in interface for random number generators
  5112. The variable `scm_the_rng' in random.c contains a value and three
  5113. function pointers which together define the current random number
  5114. generator being used by the Scheme level interface and the random
  5115. number library functions.
  5116. The user is free to replace the default generator with the generator
  5117. of his own choice.
  5118. *** Variable: size_t scm_the_rng.rstate_size
  5119. The size of the random state type used by the current RNG
  5120. measured in chars.
  5121. *** Function: unsigned long scm_the_rng.random_bits (scm_rstate *STATE)
  5122. Given the random STATE, return 32 random bits.
  5123. *** Function: void scm_the_rng.init_rstate (scm_rstate *STATE, chars *S, int N)
  5124. Seed random state STATE using string S of length N.
  5125. *** Function: scm_rstate *scm_the_rng.copy_rstate (scm_rstate *STATE)
  5126. Given random state STATE, return a malloced copy.
  5127. ** Default RNG
  5128. The default RNG is the MWC (Multiply With Carry) random number
  5129. generator described by George Marsaglia at the Department of
  5130. Statistics and Supercomputer Computations Research Institute, The
  5131. Florida State University (http://stat.fsu.edu/~geo).
  5132. It uses 64 bits, has a period of 4578426017172946943 (4.6e18), and
  5133. passes all tests in the DIEHARD test suite
  5134. (http://stat.fsu.edu/~geo/diehard.html). The generation of 32 bits
  5135. costs one multiply and one add on platforms which either supports long
  5136. longs (gcc does this on most systems) or have 64 bit longs. The cost
  5137. is four multiply on other systems but this can be optimized by writing
  5138. scm_i_uniform32 in assembler.
  5139. These functions are provided through the scm_the_rng interface for use
  5140. by libguile and the application.
  5141. *** Function: unsigned long scm_i_uniform32 (scm_i_rstate *STATE)
  5142. Given the random STATE, return 32 random bits.
  5143. Don't use this function directly. Instead go through the plugin
  5144. interface (see "Plug in interface" above).
  5145. *** Function: void scm_i_init_rstate (scm_i_rstate *STATE, char *SEED, int N)
  5146. Initialize STATE using SEED of length N.
  5147. *** Function: scm_i_rstate *scm_i_copy_rstate (scm_i_rstate *STATE)
  5148. Return a malloc:ed copy of STATE. This function can easily be re-used
  5149. in the interfaces to other RNGs.
  5150. ** Random number library functions
  5151. These functions use the current RNG through the scm_the_rng interface.
  5152. It might be a good idea to use these functions from your C code so
  5153. that only one random generator is used by all code in your program.
  5154. The default random state is stored in:
  5155. *** Variable: SCM scm_var_random_state
  5156. Contains the vcell of the Scheme variable "*random-state*" which is
  5157. used as default state by all random number functions in the Scheme
  5158. level interface.
  5159. Example:
  5160. double x = scm_c_uniform01 (SCM_RSTATE (SCM_CDR (scm_var_random_state)));
  5161. *** Function: scm_rstate *scm_c_default_rstate (void)
  5162. This is a convenience function which returns the value of
  5163. scm_var_random_state. An error message is generated if this value
  5164. isn't a random state.
  5165. *** Function: scm_rstate *scm_c_make_rstate (char *SEED, int LENGTH)
  5166. Make a new random state from the string SEED of length LENGTH.
  5167. It is generally not a good idea to use multiple random states in a
  5168. program. While subsequent random numbers generated from one random
  5169. state are guaranteed to be reasonably independent, there is no such
  5170. guarantee for numbers generated from different random states.
  5171. *** Macro: unsigned long scm_c_uniform32 (scm_rstate *STATE)
  5172. Return 32 random bits.
  5173. *** Function: double scm_c_uniform01 (scm_rstate *STATE)
  5174. Return a sample from the uniform(0,1) distribution.
  5175. *** Function: double scm_c_normal01 (scm_rstate *STATE)
  5176. Return a sample from the normal(0,1) distribution.
  5177. *** Function: double scm_c_exp1 (scm_rstate *STATE)
  5178. Return a sample from the exp(1) distribution.
  5179. *** Function: unsigned long scm_c_random (scm_rstate *STATE, unsigned long M)
  5180. Return a sample from the discrete uniform(0,M) distribution.
  5181. *** Function: SCM scm_c_random_bignum (scm_rstate *STATE, SCM M)
  5182. Return a sample from the discrete uniform(0,M) distribution.
  5183. M must be a bignum object. The returned value may be an INUM.
  5184. Changes in Guile 1.3 (released Monday, October 19, 1998):
  5185. * Changes to the distribution
  5186. ** We renamed the SCHEME_LOAD_PATH environment variable to GUILE_LOAD_PATH.
  5187. To avoid conflicts, programs should name environment variables after
  5188. themselves, except when there's a common practice establishing some
  5189. other convention.
  5190. For now, Guile supports both GUILE_LOAD_PATH and SCHEME_LOAD_PATH,
  5191. giving the former precedence, and printing a warning message if the
  5192. latter is set. Guile 1.4 will not recognize SCHEME_LOAD_PATH at all.
  5193. ** The header files related to multi-byte characters have been removed.
  5194. They were: libguile/extchrs.h and libguile/mbstrings.h. Any C code
  5195. which referred to these explicitly will probably need to be rewritten,
  5196. since the support for the variant string types has been removed; see
  5197. below.
  5198. ** The header files append.h and sequences.h have been removed. These
  5199. files implemented non-R4RS operations which would encourage
  5200. non-portable programming style and less easy-to-read code.
  5201. * Changes to the stand-alone interpreter
  5202. ** New procedures have been added to implement a "batch mode":
  5203. *** Function: batch-mode?
  5204. Returns a boolean indicating whether the interpreter is in batch
  5205. mode.
  5206. *** Function: set-batch-mode?! ARG
  5207. If ARG is true, switches the interpreter to batch mode. The `#f'
  5208. case has not been implemented.
  5209. ** Guile now provides full command-line editing, when run interactively.
  5210. To use this feature, you must have the readline library installed.
  5211. The Guile build process will notice it, and automatically include
  5212. support for it.
  5213. The readline library is available via anonymous FTP from any GNU
  5214. mirror site; the canonical location is "ftp://prep.ai.mit.edu/pub/gnu".
  5215. ** the-last-stack is now a fluid.
  5216. * Changes to the procedure for linking libguile with your programs
  5217. ** You can now use the `guile-config' utility to build programs that use Guile.
  5218. Guile now includes a command-line utility called `guile-config', which
  5219. can provide information about how to compile and link programs that
  5220. use Guile.
  5221. *** `guile-config compile' prints any C compiler flags needed to use Guile.
  5222. You should include this command's output on the command line you use
  5223. to compile C or C++ code that #includes the Guile header files. It's
  5224. usually just a `-I' flag to help the compiler find the Guile headers.
  5225. *** `guile-config link' prints any linker flags necessary to link with Guile.
  5226. This command writes to its standard output a list of flags which you
  5227. must pass to the linker to link your code against the Guile library.
  5228. The flags include '-lguile' itself, any other libraries the Guile
  5229. library depends upon, and any `-L' flags needed to help the linker
  5230. find those libraries.
  5231. For example, here is a Makefile rule that builds a program named 'foo'
  5232. from the object files ${FOO_OBJECTS}, and links them against Guile:
  5233. foo: ${FOO_OBJECTS}
  5234. ${CC} ${CFLAGS} ${FOO_OBJECTS} `guile-config link` -o foo
  5235. Previous Guile releases recommended that you use autoconf to detect
  5236. which of a predefined set of libraries were present on your system.
  5237. It is more robust to use `guile-config', since it records exactly which
  5238. libraries the installed Guile library requires.
  5239. This was originally called `build-guile', but was renamed to
  5240. `guile-config' before Guile 1.3 was released, to be consistent with
  5241. the analogous script for the GTK+ GUI toolkit, which is called
  5242. `gtk-config'.
  5243. ** Use the GUILE_FLAGS macro in your configure.in file to find Guile.
  5244. If you are using the GNU autoconf package to configure your program,
  5245. you can use the GUILE_FLAGS autoconf macro to call `guile-config'
  5246. (described above) and gather the necessary values for use in your
  5247. Makefiles.
  5248. The GUILE_FLAGS macro expands to configure script code which runs the
  5249. `guile-config' script, to find out where Guile's header files and
  5250. libraries are installed. It sets two variables, marked for
  5251. substitution, as by AC_SUBST.
  5252. GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
  5253. code that uses Guile header files. This is almost always just a
  5254. -I flag.
  5255. GUILE_LDFLAGS --- flags to pass to the linker to link a
  5256. program against Guile. This includes `-lguile' for the Guile
  5257. library itself, any libraries that Guile itself requires (like
  5258. -lqthreads), and so on. It may also include a -L flag to tell the
  5259. compiler where to find the libraries.
  5260. GUILE_FLAGS is defined in the file guile.m4, in the top-level
  5261. directory of the Guile distribution. You can copy it into your
  5262. package's aclocal.m4 file, and then use it in your configure.in file.
  5263. If you are using the `aclocal' program, distributed with GNU automake,
  5264. to maintain your aclocal.m4 file, the Guile installation process
  5265. installs guile.m4 where aclocal will find it. All you need to do is
  5266. use GUILE_FLAGS in your configure.in file, and then run `aclocal';
  5267. this will copy the definition of GUILE_FLAGS into your aclocal.m4
  5268. file.
  5269. * Changes to Scheme functions and syntax
  5270. ** Multi-byte strings have been removed, as have multi-byte and wide
  5271. ports. We felt that these were the wrong approach to
  5272. internationalization support.
  5273. ** New function: readline [PROMPT]
  5274. Read a line from the terminal, and allow the user to edit it,
  5275. prompting with PROMPT. READLINE provides a large set of Emacs-like
  5276. editing commands, lets the user recall previously typed lines, and
  5277. works on almost every kind of terminal, including dumb terminals.
  5278. READLINE assumes that the cursor is at the beginning of the line when
  5279. it is invoked. Thus, you can't print a prompt yourself, and then call
  5280. READLINE; you need to package up your prompt as a string, pass it to
  5281. the function, and let READLINE print the prompt itself. This is
  5282. because READLINE needs to know the prompt's screen width.
  5283. For Guile to provide this function, you must have the readline
  5284. library, version 2.1 or later, installed on your system. Readline is
  5285. available via anonymous FTP from prep.ai.mit.edu in pub/gnu, or from
  5286. any GNU mirror site.
  5287. See also ADD-HISTORY function.
  5288. ** New function: add-history STRING
  5289. Add STRING as the most recent line in the history used by the READLINE
  5290. command. READLINE does not add lines to the history itself; you must
  5291. call ADD-HISTORY to make previous input available to the user.
  5292. ** The behavior of the read-line function has changed.
  5293. This function now uses standard C library functions to read the line,
  5294. for speed. This means that it doesn not respect the value of
  5295. scm-line-incrementors; it assumes that lines are delimited with
  5296. #\newline.
  5297. (Note that this is read-line, the function that reads a line of text
  5298. from a port, not readline, the function that reads a line from a
  5299. terminal, providing full editing capabilities.)
  5300. ** New module (ice-9 getopt-gnu-style): Parse command-line arguments.
  5301. This module provides some simple argument parsing. It exports one
  5302. function:
  5303. Function: getopt-gnu-style ARG-LS
  5304. Parse a list of program arguments into an alist of option
  5305. descriptions.
  5306. Each item in the list of program arguments is examined to see if
  5307. it meets the syntax of a GNU long-named option. An argument like
  5308. `--MUMBLE' produces an element of the form (MUMBLE . #t) in the
  5309. returned alist, where MUMBLE is a keyword object with the same
  5310. name as the argument. An argument like `--MUMBLE=FROB' produces
  5311. an element of the form (MUMBLE . FROB), where FROB is a string.
  5312. As a special case, the returned alist also contains a pair whose
  5313. car is the symbol `rest'. The cdr of this pair is a list
  5314. containing all the items in the argument list that are not options
  5315. of the form mentioned above.
  5316. The argument `--' is treated specially: all items in the argument
  5317. list appearing after such an argument are not examined, and are
  5318. returned in the special `rest' list.
  5319. This function does not parse normal single-character switches.
  5320. You will need to parse them out of the `rest' list yourself.
  5321. ** The read syntax for byte vectors and short vectors has changed.
  5322. Instead of #bytes(...), write #y(...).
  5323. Instead of #short(...), write #h(...).
  5324. This may seem nutty, but, like the other uniform vectors, byte vectors
  5325. and short vectors want to have the same print and read syntax (and,
  5326. more basic, want to have read syntax!). Changing the read syntax to
  5327. use multiple characters after the hash sign breaks with the
  5328. conventions used in R5RS and the conventions used for the other
  5329. uniform vectors. It also introduces complexity in the current reader,
  5330. both on the C and Scheme levels. (The Right solution is probably to
  5331. change the syntax and prototypes for uniform vectors entirely.)
  5332. ** The new module (ice-9 session) provides useful interactive functions.
  5333. *** New procedure: (apropos REGEXP OPTION ...)
  5334. Display a list of top-level variables whose names match REGEXP, and
  5335. the modules they are imported from. Each OPTION should be one of the
  5336. following symbols:
  5337. value --- Show the value of each matching variable.
  5338. shadow --- Show bindings shadowed by subsequently imported modules.
  5339. full --- Same as both `shadow' and `value'.
  5340. For example:
  5341. guile> (apropos "trace" 'full)
  5342. debug: trace #<procedure trace args>
  5343. debug: untrace #<procedure untrace args>
  5344. the-scm-module: display-backtrace #<compiled-closure #<primitive-procedure gsubr-apply>>
  5345. the-scm-module: before-backtrace-hook ()
  5346. the-scm-module: backtrace #<primitive-procedure backtrace>
  5347. the-scm-module: after-backtrace-hook ()
  5348. the-scm-module: has-shown-backtrace-hint? #f
  5349. guile>
  5350. ** There are new functions and syntax for working with macros.
  5351. Guile implements macros as a special object type. Any variable whose
  5352. top-level binding is a macro object acts as a macro. The macro object
  5353. specifies how the expression should be transformed before evaluation.
  5354. *** Macro objects now print in a reasonable way, resembling procedures.
  5355. *** New function: (macro? OBJ)
  5356. True iff OBJ is a macro object.
  5357. *** New function: (primitive-macro? OBJ)
  5358. Like (macro? OBJ), but true only if OBJ is one of the Guile primitive
  5359. macro transformers, implemented in eval.c rather than Scheme code.
  5360. Why do we have this function?
  5361. - For symmetry with procedure? and primitive-procedure?,
  5362. - to allow custom print procedures to tell whether a macro is
  5363. primitive, and display it differently, and
  5364. - to allow compilers and user-written evaluators to distinguish
  5365. builtin special forms from user-defined ones, which could be
  5366. compiled.
  5367. *** New function: (macro-type OBJ)
  5368. Return a value indicating what kind of macro OBJ is. Possible return
  5369. values are:
  5370. The symbol `syntax' --- a macro created by procedure->syntax.
  5371. The symbol `macro' --- a macro created by procedure->macro.
  5372. The symbol `macro!' --- a macro created by procedure->memoizing-macro.
  5373. The boolean #f --- if OBJ is not a macro object.
  5374. *** New function: (macro-name MACRO)
  5375. Return the name of the macro object MACRO's procedure, as returned by
  5376. procedure-name.
  5377. *** New function: (macro-transformer MACRO)
  5378. Return the transformer procedure for MACRO.
  5379. *** New syntax: (use-syntax MODULE ... TRANSFORMER)
  5380. Specify a new macro expander to use in the current module. Each
  5381. MODULE is a module name, with the same meaning as in the `use-modules'
  5382. form; each named module's exported bindings are added to the current
  5383. top-level environment. TRANSFORMER is an expression evaluated in the
  5384. resulting environment which must yield a procedure to use as the
  5385. module's eval transformer: every expression evaluated in this module
  5386. is passed to this function, and the result passed to the Guile
  5387. interpreter.
  5388. *** macro-eval! is removed. Use local-eval instead.
  5389. ** Some magic has been added to the printer to better handle user
  5390. written printing routines (like record printers, closure printers).
  5391. The problem is that these user written routines must have access to
  5392. the current `print-state' to be able to handle fancy things like
  5393. detection of circular references. These print-states have to be
  5394. passed to the builtin printing routines (display, write, etc) to
  5395. properly continue the print chain.
  5396. We didn't want to change all existing print code so that it
  5397. explicitly passes thru a print state in addition to a port. Instead,
  5398. we extented the possible values that the builtin printing routines
  5399. accept as a `port'. In addition to a normal port, they now also take
  5400. a pair of a normal port and a print-state. Printing will go to the
  5401. port and the print-state will be used to control the detection of
  5402. circular references, etc. If the builtin function does not care for a
  5403. print-state, it is simply ignored.
  5404. User written callbacks are now called with such a pair as their
  5405. `port', but because every function now accepts this pair as a PORT
  5406. argument, you don't have to worry about that. In fact, it is probably
  5407. safest to not check for these pairs.
  5408. However, it is sometimes necessary to continue a print chain on a
  5409. different port, for example to get a intermediate string
  5410. representation of the printed value, mangle that string somehow, and
  5411. then to finally print the mangled string. Use the new function
  5412. inherit-print-state OLD-PORT NEW-PORT
  5413. for this. It constructs a new `port' that prints to NEW-PORT but
  5414. inherits the print-state of OLD-PORT.
  5415. ** struct-vtable-offset renamed to vtable-offset-user
  5416. ** New constants: vtable-index-layout, vtable-index-vtable, vtable-index-printer
  5417. ** There is now a third optional argument to make-vtable-vtable
  5418. (and fourth to make-struct) when constructing new types (vtables).
  5419. This argument initializes field vtable-index-printer of the vtable.
  5420. ** The detection of circular references has been extended to structs.
  5421. That is, a structure that -- in the process of being printed -- prints
  5422. itself does not lead to infinite recursion.
  5423. ** There is now some basic support for fluids. Please read
  5424. "libguile/fluid.h" to find out more. It is accessible from Scheme with
  5425. the following functions and macros:
  5426. Function: make-fluid
  5427. Create a new fluid object. Fluids are not special variables or
  5428. some other extension to the semantics of Scheme, but rather
  5429. ordinary Scheme objects. You can store them into variables (that
  5430. are still lexically scoped, of course) or into any other place you
  5431. like. Every fluid has a initial value of `#f'.
  5432. Function: fluid? OBJ
  5433. Test whether OBJ is a fluid.
  5434. Function: fluid-ref FLUID
  5435. Function: fluid-set! FLUID VAL
  5436. Access/modify the fluid FLUID. Modifications are only visible
  5437. within the current dynamic root (that includes threads).
  5438. Function: with-fluids* FLUIDS VALUES THUNK
  5439. FLUIDS is a list of fluids and VALUES a corresponding list of
  5440. values for these fluids. Before THUNK gets called the values are
  5441. installed in the fluids and the old values of the fluids are
  5442. saved in the VALUES list. When the flow of control leaves THUNK
  5443. or reenters it, the values get swapped again. You might think of
  5444. this as a `safe-fluid-excursion'. Note that the VALUES list is
  5445. modified by `with-fluids*'.
  5446. Macro: with-fluids ((FLUID VALUE) ...) FORM ...
  5447. The same as `with-fluids*' but with a different syntax. It looks
  5448. just like `let', but both FLUID and VALUE are evaluated. Remember,
  5449. fluids are not special variables but ordinary objects. FLUID
  5450. should evaluate to a fluid.
  5451. ** Changes to system call interfaces:
  5452. *** close-port, close-input-port and close-output-port now return a
  5453. boolean instead of an `unspecified' object. #t means that the port
  5454. was successfully closed, while #f means it was already closed. It is
  5455. also now possible for these procedures to raise an exception if an
  5456. error occurs (some errors from write can be delayed until close.)
  5457. *** the first argument to chmod, fcntl, ftell and fseek can now be a
  5458. file descriptor.
  5459. *** the third argument to fcntl is now optional.
  5460. *** the first argument to chown can now be a file descriptor or a port.
  5461. *** the argument to stat can now be a port.
  5462. *** The following new procedures have been added (most use scsh
  5463. interfaces):
  5464. *** procedure: close PORT/FD
  5465. Similar to close-port (*note close-port: Closing Ports.), but also
  5466. works on file descriptors. A side effect of closing a file
  5467. descriptor is that any ports using that file descriptor are moved
  5468. to a different file descriptor and have their revealed counts set
  5469. to zero.
  5470. *** procedure: port->fdes PORT
  5471. Returns the integer file descriptor underlying PORT. As a side
  5472. effect the revealed count of PORT is incremented.
  5473. *** procedure: fdes->ports FDES
  5474. Returns a list of existing ports which have FDES as an underlying
  5475. file descriptor, without changing their revealed counts.
  5476. *** procedure: fdes->inport FDES
  5477. Returns an existing input port which has FDES as its underlying
  5478. file descriptor, if one exists, and increments its revealed count.
  5479. Otherwise, returns a new input port with a revealed count of 1.
  5480. *** procedure: fdes->outport FDES
  5481. Returns an existing output port which has FDES as its underlying
  5482. file descriptor, if one exists, and increments its revealed count.
  5483. Otherwise, returns a new output port with a revealed count of 1.
  5484. The next group of procedures perform a `dup2' system call, if NEWFD
  5485. (an integer) is supplied, otherwise a `dup'. The file descriptor to be
  5486. duplicated can be supplied as an integer or contained in a port. The
  5487. type of value returned varies depending on which procedure is used.
  5488. All procedures also have the side effect when performing `dup2' that
  5489. any ports using NEWFD are moved to a different file descriptor and have
  5490. their revealed counts set to zero.
  5491. *** procedure: dup->fdes PORT/FD [NEWFD]
  5492. Returns an integer file descriptor.
  5493. *** procedure: dup->inport PORT/FD [NEWFD]
  5494. Returns a new input port using the new file descriptor.
  5495. *** procedure: dup->outport PORT/FD [NEWFD]
  5496. Returns a new output port using the new file descriptor.
  5497. *** procedure: dup PORT/FD [NEWFD]
  5498. Returns a new port if PORT/FD is a port, with the same mode as the
  5499. supplied port, otherwise returns an integer file descriptor.
  5500. *** procedure: dup->port PORT/FD MODE [NEWFD]
  5501. Returns a new port using the new file descriptor. MODE supplies a
  5502. mode string for the port (*note open-file: File Ports.).
  5503. *** procedure: setenv NAME VALUE
  5504. Modifies the environment of the current process, which is also the
  5505. default environment inherited by child processes.
  5506. If VALUE is `#f', then NAME is removed from the environment.
  5507. Otherwise, the string NAME=VALUE is added to the environment,
  5508. replacing any existing string with name matching NAME.
  5509. The return value is unspecified.
  5510. *** procedure: truncate-file OBJ SIZE
  5511. Truncates the file referred to by OBJ to at most SIZE bytes. OBJ
  5512. can be a string containing a file name or an integer file
  5513. descriptor or port open for output on the file. The underlying
  5514. system calls are `truncate' and `ftruncate'.
  5515. The return value is unspecified.
  5516. *** procedure: setvbuf PORT MODE [SIZE]
  5517. Set the buffering mode for PORT. MODE can be:
  5518. `_IONBF'
  5519. non-buffered
  5520. `_IOLBF'
  5521. line buffered
  5522. `_IOFBF'
  5523. block buffered, using a newly allocated buffer of SIZE bytes.
  5524. However if SIZE is zero or unspecified, the port will be made
  5525. non-buffered.
  5526. This procedure should not be used after I/O has been performed with
  5527. the port.
  5528. Ports are usually block buffered by default, with a default buffer
  5529. size. Procedures e.g., *Note open-file: File Ports, which accept a
  5530. mode string allow `0' to be added to request an unbuffered port.
  5531. *** procedure: fsync PORT/FD
  5532. Copies any unwritten data for the specified output file descriptor
  5533. to disk. If PORT/FD is a port, its buffer is flushed before the
  5534. underlying file descriptor is fsync'd. The return value is
  5535. unspecified.
  5536. *** procedure: open-fdes PATH FLAGS [MODES]
  5537. Similar to `open' but returns a file descriptor instead of a port.
  5538. *** procedure: execle PATH ENV [ARG] ...
  5539. Similar to `execl', but the environment of the new process is
  5540. specified by ENV, which must be a list of strings as returned by
  5541. the `environ' procedure.
  5542. This procedure is currently implemented using the `execve' system
  5543. call, but we call it `execle' because of its Scheme calling
  5544. interface.
  5545. *** procedure: strerror ERRNO
  5546. Returns the Unix error message corresponding to ERRNO, an integer.
  5547. *** procedure: primitive-exit [STATUS]
  5548. Terminate the current process without unwinding the Scheme stack.
  5549. This is would typically be useful after a fork. The exit status
  5550. is STATUS if supplied, otherwise zero.
  5551. *** procedure: times
  5552. Returns an object with information about real and processor time.
  5553. The following procedures accept such an object as an argument and
  5554. return a selected component:
  5555. `tms:clock'
  5556. The current real time, expressed as time units relative to an
  5557. arbitrary base.
  5558. `tms:utime'
  5559. The CPU time units used by the calling process.
  5560. `tms:stime'
  5561. The CPU time units used by the system on behalf of the
  5562. calling process.
  5563. `tms:cutime'
  5564. The CPU time units used by terminated child processes of the
  5565. calling process, whose status has been collected (e.g., using
  5566. `waitpid').
  5567. `tms:cstime'
  5568. Similarly, the CPU times units used by the system on behalf of
  5569. terminated child processes.
  5570. ** Removed: list-length
  5571. ** Removed: list-append, list-append!
  5572. ** Removed: list-reverse, list-reverse!
  5573. ** array-map renamed to array-map!
  5574. ** serial-array-map renamed to serial-array-map!
  5575. ** catch doesn't take #f as first argument any longer
  5576. Previously, it was possible to pass #f instead of a key to `catch'.
  5577. That would cause `catch' to pass a jump buffer object to the procedure
  5578. passed as second argument. The procedure could then use this jump
  5579. buffer objekt as an argument to throw.
  5580. This mechanism has been removed since its utility doesn't motivate the
  5581. extra complexity it introduces.
  5582. ** The `#/' notation for lists now provokes a warning message from Guile.
  5583. This syntax will be removed from Guile in the near future.
  5584. To disable the warning message, set the GUILE_HUSH environment
  5585. variable to any non-empty value.
  5586. ** The newline character now prints as `#\newline', following the
  5587. normal Scheme notation, not `#\nl'.
  5588. * Changes to the gh_ interface
  5589. ** The gh_enter function now takes care of loading the Guile startup files.
  5590. gh_enter works by calling scm_boot_guile; see the remarks below.
  5591. ** Function: void gh_write (SCM x)
  5592. Write the printed representation of the scheme object x to the current
  5593. output port. Corresponds to the scheme level `write'.
  5594. ** gh_list_length renamed to gh_length.
  5595. ** vector handling routines
  5596. Several major changes. In particular, gh_vector() now resembles
  5597. (vector ...) (with a caveat -- see manual), and gh_make_vector() now
  5598. exists and behaves like (make-vector ...). gh_vset() and gh_vref()
  5599. have been renamed gh_vector_set_x() and gh_vector_ref(). Some missing
  5600. vector-related gh_ functions have been implemented.
  5601. ** pair and list routines
  5602. Implemented several of the R4RS pair and list functions that were
  5603. missing.
  5604. ** gh_scm2doubles, gh_doubles2scm, gh_doubles2dvect
  5605. New function. Converts double arrays back and forth between Scheme
  5606. and C.
  5607. * Changes to the scm_ interface
  5608. ** The function scm_boot_guile now takes care of loading the startup files.
  5609. Guile's primary initialization function, scm_boot_guile, now takes
  5610. care of loading `boot-9.scm', in the `ice-9' module, to initialize
  5611. Guile, define the module system, and put together some standard
  5612. bindings. It also loads `init.scm', which is intended to hold
  5613. site-specific initialization code.
  5614. Since Guile cannot operate properly until boot-9.scm is loaded, there
  5615. is no reason to separate loading boot-9.scm from Guile's other
  5616. initialization processes.
  5617. This job used to be done by scm_compile_shell_switches, which didn't
  5618. make much sense; in particular, it meant that people using Guile for
  5619. non-shell-like applications had to jump through hoops to get Guile
  5620. initialized properly.
  5621. ** The function scm_compile_shell_switches no longer loads the startup files.
  5622. Now, Guile always loads the startup files, whenever it is initialized;
  5623. see the notes above for scm_boot_guile and scm_load_startup_files.
  5624. ** Function: scm_load_startup_files
  5625. This new function takes care of loading Guile's initialization file
  5626. (`boot-9.scm'), and the site initialization file, `init.scm'. Since
  5627. this is always called by the Guile initialization process, it's
  5628. probably not too useful to call this yourself, but it's there anyway.
  5629. ** The semantics of smob marking have changed slightly.
  5630. The smob marking function (the `mark' member of the scm_smobfuns
  5631. structure) is no longer responsible for setting the mark bit on the
  5632. smob. The generic smob handling code in the garbage collector will
  5633. set this bit. The mark function need only ensure that any other
  5634. objects the smob refers to get marked.
  5635. Note that this change means that the smob's GC8MARK bit is typically
  5636. already set upon entry to the mark function. Thus, marking functions
  5637. which look like this:
  5638. {
  5639. if (SCM_GC8MARKP (ptr))
  5640. return SCM_BOOL_F;
  5641. SCM_SETGC8MARK (ptr);
  5642. ... mark objects to which the smob refers ...
  5643. }
  5644. are now incorrect, since they will return early, and fail to mark any
  5645. other objects the smob refers to. Some code in the Guile library used
  5646. to work this way.
  5647. ** The semantics of the I/O port functions in scm_ptobfuns have changed.
  5648. If you have implemented your own I/O port type, by writing the
  5649. functions required by the scm_ptobfuns and then calling scm_newptob,
  5650. you will need to change your functions slightly.
  5651. The functions in a scm_ptobfuns structure now expect the port itself
  5652. as their argument; they used to expect the `stream' member of the
  5653. port's scm_port_table structure. This allows functions in an
  5654. scm_ptobfuns structure to easily access the port's cell (and any flags
  5655. it its CAR), and the port's scm_port_table structure.
  5656. Guile now passes the I/O port itself as the `port' argument in the
  5657. following scm_ptobfuns functions:
  5658. int (*free) (SCM port);
  5659. int (*fputc) (int, SCM port);
  5660. int (*fputs) (char *, SCM port);
  5661. scm_sizet (*fwrite) SCM_P ((char *ptr,
  5662. scm_sizet size,
  5663. scm_sizet nitems,
  5664. SCM port));
  5665. int (*fflush) (SCM port);
  5666. int (*fgetc) (SCM port);
  5667. int (*fclose) (SCM port);
  5668. The interfaces to the `mark', `print', `equalp', and `fgets' methods
  5669. are unchanged.
  5670. If you have existing code which defines its own port types, it is easy
  5671. to convert your code to the new interface; simply apply SCM_STREAM to
  5672. the port argument to yield the value you code used to expect.
  5673. Note that since both the port and the stream have the same type in the
  5674. C code --- they are both SCM values --- the C compiler will not remind
  5675. you if you forget to update your scm_ptobfuns functions.
  5676. ** Function: int scm_internal_select (int fds,
  5677. SELECT_TYPE *rfds,
  5678. SELECT_TYPE *wfds,
  5679. SELECT_TYPE *efds,
  5680. struct timeval *timeout);
  5681. This is a replacement for the `select' function provided by the OS.
  5682. It enables I/O blocking and sleeping to happen for one cooperative
  5683. thread without blocking other threads. It also avoids busy-loops in
  5684. these situations. It is intended that all I/O blocking and sleeping
  5685. will finally go through this function. Currently, this function is
  5686. only available on systems providing `gettimeofday' and `select'.
  5687. ** Function: SCM scm_internal_stack_catch (SCM tag,
  5688. scm_catch_body_t body,
  5689. void *body_data,
  5690. scm_catch_handler_t handler,
  5691. void *handler_data)
  5692. A new sibling to the other two C level `catch' functions
  5693. scm_internal_catch and scm_internal_lazy_catch. Use it if you want
  5694. the stack to be saved automatically into the variable `the-last-stack'
  5695. (scm_the_last_stack_var) on error. This is necessary if you want to
  5696. use advanced error reporting, such as calling scm_display_error and
  5697. scm_display_backtrace. (They both take a stack object as argument.)
  5698. ** Function: SCM scm_spawn_thread (scm_catch_body_t body,
  5699. void *body_data,
  5700. scm_catch_handler_t handler,
  5701. void *handler_data)
  5702. Spawns a new thread. It does a job similar to
  5703. scm_call_with_new_thread but takes arguments more suitable when
  5704. spawning threads from application C code.
  5705. ** The hook scm_error_callback has been removed. It was originally
  5706. intended as a way for the user to install his own error handler. But
  5707. that method works badly since it intervenes between throw and catch,
  5708. thereby changing the semantics of expressions like (catch #t ...).
  5709. The correct way to do it is to use one of the C level catch functions
  5710. in throw.c: scm_internal_catch/lazy_catch/stack_catch.
  5711. ** Removed functions:
  5712. scm_obj_length, scm_list_length, scm_list_append, scm_list_append_x,
  5713. scm_list_reverse, scm_list_reverse_x
  5714. ** New macros: SCM_LISTn where n is one of the integers 0-9.
  5715. These can be used for pretty list creation from C. The idea is taken
  5716. from Erick Gallesio's STk.
  5717. ** scm_array_map renamed to scm_array_map_x
  5718. ** mbstrings are now removed
  5719. This means that the type codes scm_tc7_mb_string and
  5720. scm_tc7_mb_substring has been removed.
  5721. ** scm_gen_putc, scm_gen_puts, scm_gen_write, and scm_gen_getc have changed.
  5722. Since we no longer support multi-byte strings, these I/O functions
  5723. have been simplified, and renamed. Here are their old names, and
  5724. their new names and arguments:
  5725. scm_gen_putc -> void scm_putc (int c, SCM port);
  5726. scm_gen_puts -> void scm_puts (char *s, SCM port);
  5727. scm_gen_write -> void scm_lfwrite (char *ptr, scm_sizet size, SCM port);
  5728. scm_gen_getc -> void scm_getc (SCM port);
  5729. ** The macros SCM_TYP7D and SCM_TYP7SD has been removed.
  5730. ** The macro SCM_TYP7S has taken the role of the old SCM_TYP7D
  5731. SCM_TYP7S now masks away the bit which distinguishes substrings from
  5732. strings.
  5733. ** scm_catch_body_t: Backward incompatible change!
  5734. Body functions to scm_internal_catch and friends do not any longer
  5735. take a second argument. This is because it is no longer possible to
  5736. pass a #f arg to catch.
  5737. ** Calls to scm_protect_object and scm_unprotect now nest properly.
  5738. The function scm_protect_object protects its argument from being freed
  5739. by the garbage collector. scm_unprotect_object removes that
  5740. protection.
  5741. These functions now nest properly. That is, for every object O, there
  5742. is a counter which scm_protect_object(O) increments and
  5743. scm_unprotect_object(O) decrements, if the counter is greater than
  5744. zero. Every object's counter is zero when it is first created. If an
  5745. object's counter is greater than zero, the garbage collector will not
  5746. reclaim its storage.
  5747. This allows you to use scm_protect_object in your code without
  5748. worrying that some other function you call will call
  5749. scm_unprotect_object, and allow it to be freed. Assuming that the
  5750. functions you call are well-behaved, and unprotect only those objects
  5751. they protect, you can follow the same rule and have confidence that
  5752. objects will be freed only at appropriate times.
  5753. Changes in Guile 1.2 (released Tuesday, June 24 1997):
  5754. * Changes to the distribution
  5755. ** Nightly snapshots are now available from ftp.red-bean.com.
  5756. The old server, ftp.cyclic.com, has been relinquished to its rightful
  5757. owner.
  5758. Nightly snapshots of the Guile development sources are now available via
  5759. anonymous FTP from ftp.red-bean.com, as /pub/guile/guile-snap.tar.gz.
  5760. Via the web, that's: ftp://ftp.red-bean.com/pub/guile/guile-snap.tar.gz
  5761. For getit, that's: ftp.red-bean.com:/pub/guile/guile-snap.tar.gz
  5762. ** To run Guile without installing it, the procedure has changed a bit.
  5763. If you used a separate build directory to compile Guile, you'll need
  5764. to include the build directory in SCHEME_LOAD_PATH, as well as the
  5765. source directory. See the `INSTALL' file for examples.
  5766. * Changes to the procedure for linking libguile with your programs
  5767. ** The standard Guile load path for Scheme code now includes
  5768. $(datadir)/guile (usually /usr/local/share/guile). This means that
  5769. you can install your own Scheme files there, and Guile will find them.
  5770. (Previous versions of Guile only checked a directory whose name
  5771. contained the Guile version number, so you had to re-install or move
  5772. your Scheme sources each time you installed a fresh version of Guile.)
  5773. The load path also includes $(datadir)/guile/site; we recommend
  5774. putting individual Scheme files there. If you want to install a
  5775. package with multiple source files, create a directory for them under
  5776. $(datadir)/guile.
  5777. ** Guile 1.2 will now use the Rx regular expression library, if it is
  5778. installed on your system. When you are linking libguile into your own
  5779. programs, this means you will have to link against -lguile, -lqt (if
  5780. you configured Guile with thread support), and -lrx.
  5781. If you are using autoconf to generate configuration scripts for your
  5782. application, the following lines should suffice to add the appropriate
  5783. libraries to your link command:
  5784. ### Find Rx, quickthreads and libguile.
  5785. AC_CHECK_LIB(rx, main)
  5786. AC_CHECK_LIB(qt, main)
  5787. AC_CHECK_LIB(guile, scm_shell)
  5788. The Guile 1.2 distribution does not contain sources for the Rx
  5789. library, as Guile 1.0 did. If you want to use Rx, you'll need to
  5790. retrieve it from a GNU FTP site and install it separately.
  5791. * Changes to Scheme functions and syntax
  5792. ** The dynamic linking features of Guile are now enabled by default.
  5793. You can disable them by giving the `--disable-dynamic-linking' option
  5794. to configure.
  5795. (dynamic-link FILENAME)
  5796. Find the object file denoted by FILENAME (a string) and link it
  5797. into the running Guile application. When everything works out,
  5798. return a Scheme object suitable for representing the linked object
  5799. file. Otherwise an error is thrown. How object files are
  5800. searched is system dependent.
  5801. (dynamic-object? VAL)
  5802. Determine whether VAL represents a dynamically linked object file.
  5803. (dynamic-unlink DYNOBJ)
  5804. Unlink the indicated object file from the application. DYNOBJ
  5805. should be one of the values returned by `dynamic-link'.
  5806. (dynamic-func FUNCTION DYNOBJ)
  5807. Search the C function indicated by FUNCTION (a string or symbol)
  5808. in DYNOBJ and return some Scheme object that can later be used
  5809. with `dynamic-call' to actually call this function. Right now,
  5810. these Scheme objects are formed by casting the address of the
  5811. function to `long' and converting this number to its Scheme
  5812. representation.
  5813. (dynamic-call FUNCTION DYNOBJ)
  5814. Call the C function indicated by FUNCTION and DYNOBJ. The
  5815. function is passed no arguments and its return value is ignored.
  5816. When FUNCTION is something returned by `dynamic-func', call that
  5817. function and ignore DYNOBJ. When FUNCTION is a string (or symbol,
  5818. etc.), look it up in DYNOBJ; this is equivalent to
  5819. (dynamic-call (dynamic-func FUNCTION DYNOBJ) #f)
  5820. Interrupts are deferred while the C function is executing (with
  5821. SCM_DEFER_INTS/SCM_ALLOW_INTS).
  5822. (dynamic-args-call FUNCTION DYNOBJ ARGS)
  5823. Call the C function indicated by FUNCTION and DYNOBJ, but pass it
  5824. some arguments and return its return value. The C function is
  5825. expected to take two arguments and return an `int', just like
  5826. `main':
  5827. int c_func (int argc, char **argv);
  5828. ARGS must be a list of strings and is converted into an array of
  5829. `char *'. The array is passed in ARGV and its size in ARGC. The
  5830. return value is converted to a Scheme number and returned from the
  5831. call to `dynamic-args-call'.
  5832. When dynamic linking is disabled or not supported on your system,
  5833. the above functions throw errors, but they are still available.
  5834. Here is a small example that works on GNU/Linux:
  5835. (define libc-obj (dynamic-link "libc.so"))
  5836. (dynamic-args-call 'rand libc-obj '())
  5837. See the file `libguile/DYNAMIC-LINKING' for additional comments.
  5838. ** The #/ syntax for module names is depreciated, and will be removed
  5839. in a future version of Guile. Instead of
  5840. #/foo/bar/baz
  5841. instead write
  5842. (foo bar baz)
  5843. The latter syntax is more consistent with existing Lisp practice.
  5844. ** Guile now does fancier printing of structures. Structures are the
  5845. underlying implementation for records, which in turn are used to
  5846. implement modules, so all of these object now print differently and in
  5847. a more informative way.
  5848. The Scheme printer will examine the builtin variable *struct-printer*
  5849. whenever it needs to print a structure object. When this variable is
  5850. not `#f' it is deemed to be a procedure and will be applied to the
  5851. structure object and the output port. When *struct-printer* is `#f'
  5852. or the procedure return `#f' the structure object will be printed in
  5853. the boring #<struct 80458270> form.
  5854. This hook is used by some routines in ice-9/boot-9.scm to implement
  5855. type specific printing routines. Please read the comments there about
  5856. "printing structs".
  5857. One of the more specific uses of structs are records. The printing
  5858. procedure that could be passed to MAKE-RECORD-TYPE is now actually
  5859. called. It should behave like a *struct-printer* procedure (described
  5860. above).
  5861. ** Guile now supports a new R4RS-compliant syntax for keywords. A
  5862. token of the form #:NAME, where NAME has the same syntax as a Scheme
  5863. symbol, is the external representation of the keyword named NAME.
  5864. Keyword objects print using this syntax as well, so values containing
  5865. keyword objects can be read back into Guile. When used in an
  5866. expression, keywords are self-quoting objects.
  5867. Guile suports this read syntax, and uses this print syntax, regardless
  5868. of the current setting of the `keyword' read option. The `keyword'
  5869. read option only controls whether Guile recognizes the `:NAME' syntax,
  5870. which is incompatible with R4RS. (R4RS says such token represent
  5871. symbols.)
  5872. ** Guile has regular expression support again. Guile 1.0 included
  5873. functions for matching regular expressions, based on the Rx library.
  5874. In Guile 1.1, the Guile/Rx interface was removed to simplify the
  5875. distribution, and thus Guile had no regular expression support. Guile
  5876. 1.2 again supports the most commonly used functions, and supports all
  5877. of SCSH's regular expression functions.
  5878. If your system does not include a POSIX regular expression library,
  5879. and you have not linked Guile with a third-party regexp library such as
  5880. Rx, these functions will not be available. You can tell whether your
  5881. Guile installation includes regular expression support by checking
  5882. whether the `*features*' list includes the `regex' symbol.
  5883. *** regexp functions
  5884. By default, Guile supports POSIX extended regular expressions. That
  5885. means that the characters `(', `)', `+' and `?' are special, and must
  5886. be escaped if you wish to match the literal characters.
  5887. This regular expression interface was modeled after that implemented
  5888. by SCSH, the Scheme Shell. It is intended to be upwardly compatible
  5889. with SCSH regular expressions.
  5890. **** Function: string-match PATTERN STR [START]
  5891. Compile the string PATTERN into a regular expression and compare
  5892. it with STR. The optional numeric argument START specifies the
  5893. position of STR at which to begin matching.
  5894. `string-match' returns a "match structure" which describes what,
  5895. if anything, was matched by the regular expression. *Note Match
  5896. Structures::. If STR does not match PATTERN at all,
  5897. `string-match' returns `#f'.
  5898. Each time `string-match' is called, it must compile its PATTERN
  5899. argument into a regular expression structure. This operation is
  5900. expensive, which makes `string-match' inefficient if the same regular
  5901. expression is used several times (for example, in a loop). For better
  5902. performance, you can compile a regular expression in advance and then
  5903. match strings against the compiled regexp.
  5904. **** Function: make-regexp STR [FLAGS]
  5905. Compile the regular expression described by STR, and return the
  5906. compiled regexp structure. If STR does not describe a legal
  5907. regular expression, `make-regexp' throws a
  5908. `regular-expression-syntax' error.
  5909. FLAGS may be the bitwise-or of one or more of the following:
  5910. **** Constant: regexp/extended
  5911. Use POSIX Extended Regular Expression syntax when interpreting
  5912. STR. If not set, POSIX Basic Regular Expression syntax is used.
  5913. If the FLAGS argument is omitted, we assume regexp/extended.
  5914. **** Constant: regexp/icase
  5915. Do not differentiate case. Subsequent searches using the
  5916. returned regular expression will be case insensitive.
  5917. **** Constant: regexp/newline
  5918. Match-any-character operators don't match a newline.
  5919. A non-matching list ([^...]) not containing a newline matches a
  5920. newline.
  5921. Match-beginning-of-line operator (^) matches the empty string
  5922. immediately after a newline, regardless of whether the FLAGS
  5923. passed to regexp-exec contain regexp/notbol.
  5924. Match-end-of-line operator ($) matches the empty string
  5925. immediately before a newline, regardless of whether the FLAGS
  5926. passed to regexp-exec contain regexp/noteol.
  5927. **** Function: regexp-exec REGEXP STR [START [FLAGS]]
  5928. Match the compiled regular expression REGEXP against `str'. If
  5929. the optional integer START argument is provided, begin matching
  5930. from that position in the string. Return a match structure
  5931. describing the results of the match, or `#f' if no match could be
  5932. found.
  5933. FLAGS may be the bitwise-or of one or more of the following:
  5934. **** Constant: regexp/notbol
  5935. The match-beginning-of-line operator always fails to match (but
  5936. see the compilation flag regexp/newline above) This flag may be
  5937. used when different portions of a string are passed to
  5938. regexp-exec and the beginning of the string should not be
  5939. interpreted as the beginning of the line.
  5940. **** Constant: regexp/noteol
  5941. The match-end-of-line operator always fails to match (but see the
  5942. compilation flag regexp/newline above)
  5943. **** Function: regexp? OBJ
  5944. Return `#t' if OBJ is a compiled regular expression, or `#f'
  5945. otherwise.
  5946. Regular expressions are commonly used to find patterns in one string
  5947. and replace them with the contents of another string.
  5948. **** Function: regexp-substitute PORT MATCH [ITEM...]
  5949. Write to the output port PORT selected contents of the match
  5950. structure MATCH. Each ITEM specifies what should be written, and
  5951. may be one of the following arguments:
  5952. * A string. String arguments are written out verbatim.
  5953. * An integer. The submatch with that number is written.
  5954. * The symbol `pre'. The portion of the matched string preceding
  5955. the regexp match is written.
  5956. * The symbol `post'. The portion of the matched string
  5957. following the regexp match is written.
  5958. PORT may be `#f', in which case nothing is written; instead,
  5959. `regexp-substitute' constructs a string from the specified ITEMs
  5960. and returns that.
  5961. **** Function: regexp-substitute/global PORT REGEXP TARGET [ITEM...]
  5962. Similar to `regexp-substitute', but can be used to perform global
  5963. substitutions on STR. Instead of taking a match structure as an
  5964. argument, `regexp-substitute/global' takes two string arguments: a
  5965. REGEXP string describing a regular expression, and a TARGET string
  5966. which should be matched against this regular expression.
  5967. Each ITEM behaves as in REGEXP-SUBSTITUTE, with the following
  5968. exceptions:
  5969. * A function may be supplied. When this function is called, it
  5970. will be passed one argument: a match structure for a given
  5971. regular expression match. It should return a string to be
  5972. written out to PORT.
  5973. * The `post' symbol causes `regexp-substitute/global' to recurse
  5974. on the unmatched portion of STR. This *must* be supplied in
  5975. order to perform global search-and-replace on STR; if it is
  5976. not present among the ITEMs, then `regexp-substitute/global'
  5977. will return after processing a single match.
  5978. *** Match Structures
  5979. A "match structure" is the object returned by `string-match' and
  5980. `regexp-exec'. It describes which portion of a string, if any, matched
  5981. the given regular expression. Match structures include: a reference to
  5982. the string that was checked for matches; the starting and ending
  5983. positions of the regexp match; and, if the regexp included any
  5984. parenthesized subexpressions, the starting and ending positions of each
  5985. submatch.
  5986. In each of the regexp match functions described below, the `match'
  5987. argument must be a match structure returned by a previous call to
  5988. `string-match' or `regexp-exec'. Most of these functions return some
  5989. information about the original target string that was matched against a
  5990. regular expression; we will call that string TARGET for easy reference.
  5991. **** Function: regexp-match? OBJ
  5992. Return `#t' if OBJ is a match structure returned by a previous
  5993. call to `regexp-exec', or `#f' otherwise.
  5994. **** Function: match:substring MATCH [N]
  5995. Return the portion of TARGET matched by subexpression number N.
  5996. Submatch 0 (the default) represents the entire regexp match. If
  5997. the regular expression as a whole matched, but the subexpression
  5998. number N did not match, return `#f'.
  5999. **** Function: match:start MATCH [N]
  6000. Return the starting position of submatch number N.
  6001. **** Function: match:end MATCH [N]
  6002. Return the ending position of submatch number N.
  6003. **** Function: match:prefix MATCH
  6004. Return the unmatched portion of TARGET preceding the regexp match.
  6005. **** Function: match:suffix MATCH
  6006. Return the unmatched portion of TARGET following the regexp match.
  6007. **** Function: match:count MATCH
  6008. Return the number of parenthesized subexpressions from MATCH.
  6009. Note that the entire regular expression match itself counts as a
  6010. subexpression, and failed submatches are included in the count.
  6011. **** Function: match:string MATCH
  6012. Return the original TARGET string.
  6013. *** Backslash Escapes
  6014. Sometimes you will want a regexp to match characters like `*' or `$'
  6015. exactly. For example, to check whether a particular string represents
  6016. a menu entry from an Info node, it would be useful to match it against
  6017. a regexp like `^* [^:]*::'. However, this won't work; because the
  6018. asterisk is a metacharacter, it won't match the `*' at the beginning of
  6019. the string. In this case, we want to make the first asterisk un-magic.
  6020. You can do this by preceding the metacharacter with a backslash
  6021. character `\'. (This is also called "quoting" the metacharacter, and
  6022. is known as a "backslash escape".) When Guile sees a backslash in a
  6023. regular expression, it considers the following glyph to be an ordinary
  6024. character, no matter what special meaning it would ordinarily have.
  6025. Therefore, we can make the above example work by changing the regexp to
  6026. `^\* [^:]*::'. The `\*' sequence tells the regular expression engine
  6027. to match only a single asterisk in the target string.
  6028. Since the backslash is itself a metacharacter, you may force a
  6029. regexp to match a backslash in the target string by preceding the
  6030. backslash with itself. For example, to find variable references in a
  6031. TeX program, you might want to find occurrences of the string `\let\'
  6032. followed by any number of alphabetic characters. The regular expression
  6033. `\\let\\[A-Za-z]*' would do this: the double backslashes in the regexp
  6034. each match a single backslash in the target string.
  6035. **** Function: regexp-quote STR
  6036. Quote each special character found in STR with a backslash, and
  6037. return the resulting string.
  6038. *Very important:* Using backslash escapes in Guile source code (as
  6039. in Emacs Lisp or C) can be tricky, because the backslash character has
  6040. special meaning for the Guile reader. For example, if Guile encounters
  6041. the character sequence `\n' in the middle of a string while processing
  6042. Scheme code, it replaces those characters with a newline character.
  6043. Similarly, the character sequence `\t' is replaced by a horizontal tab.
  6044. Several of these "escape sequences" are processed by the Guile reader
  6045. before your code is executed. Unrecognized escape sequences are
  6046. ignored: if the characters `\*' appear in a string, they will be
  6047. translated to the single character `*'.
  6048. This translation is obviously undesirable for regular expressions,
  6049. since we want to be able to include backslashes in a string in order to
  6050. escape regexp metacharacters. Therefore, to make sure that a backslash
  6051. is preserved in a string in your Guile program, you must use *two*
  6052. consecutive backslashes:
  6053. (define Info-menu-entry-pattern (make-regexp "^\\* [^:]*"))
  6054. The string in this example is preprocessed by the Guile reader before
  6055. any code is executed. The resulting argument to `make-regexp' is the
  6056. string `^\* [^:]*', which is what we really want.
  6057. This also means that in order to write a regular expression that
  6058. matches a single backslash character, the regular expression string in
  6059. the source code must include *four* backslashes. Each consecutive pair
  6060. of backslashes gets translated by the Guile reader to a single
  6061. backslash, and the resulting double-backslash is interpreted by the
  6062. regexp engine as matching a single backslash character. Hence:
  6063. (define tex-variable-pattern (make-regexp "\\\\let\\\\=[A-Za-z]*"))
  6064. The reason for the unwieldiness of this syntax is historical. Both
  6065. regular expression pattern matchers and Unix string processing systems
  6066. have traditionally used backslashes with the special meanings described
  6067. above. The POSIX regular expression specification and ANSI C standard
  6068. both require these semantics. Attempting to abandon either convention
  6069. would cause other kinds of compatibility problems, possibly more severe
  6070. ones. Therefore, without extending the Scheme reader to support
  6071. strings with different quoting conventions (an ungainly and confusing
  6072. extension when implemented in other languages), we must adhere to this
  6073. cumbersome escape syntax.
  6074. * Changes to the gh_ interface
  6075. * Changes to the scm_ interface
  6076. * Changes to system call interfaces:
  6077. ** The value returned by `raise' is now unspecified. It throws an exception
  6078. if an error occurs.
  6079. *** A new procedure `sigaction' can be used to install signal handlers
  6080. (sigaction signum [action] [flags])
  6081. signum is the signal number, which can be specified using the value
  6082. of SIGINT etc.
  6083. If action is omitted, sigaction returns a pair: the CAR is the current
  6084. signal hander, which will be either an integer with the value SIG_DFL
  6085. (default action) or SIG_IGN (ignore), or the Scheme procedure which
  6086. handles the signal, or #f if a non-Scheme procedure handles the
  6087. signal. The CDR contains the current sigaction flags for the handler.
  6088. If action is provided, it is installed as the new handler for signum.
  6089. action can be a Scheme procedure taking one argument, or the value of
  6090. SIG_DFL (default action) or SIG_IGN (ignore), or #f to restore
  6091. whatever signal handler was installed before sigaction was first used.
  6092. Flags can optionally be specified for the new handler (SA_RESTART is
  6093. always used if the system provides it, so need not be specified.) The
  6094. return value is a pair with information about the old handler as
  6095. described above.
  6096. This interface does not provide access to the "signal blocking"
  6097. facility. Maybe this is not needed, since the thread support may
  6098. provide solutions to the problem of consistent access to data
  6099. structures.
  6100. *** A new procedure `flush-all-ports' is equivalent to running
  6101. `force-output' on every port open for output.
  6102. ** Guile now provides information on how it was built, via the new
  6103. global variable, %guile-build-info. This variable records the values
  6104. of the standard GNU makefile directory variables as an assocation
  6105. list, mapping variable names (symbols) onto directory paths (strings).
  6106. For example, to find out where the Guile link libraries were
  6107. installed, you can say:
  6108. guile -c "(display (assq-ref %guile-build-info 'libdir)) (newline)"
  6109. * Changes to the scm_ interface
  6110. ** The new function scm_handle_by_message_noexit is just like the
  6111. existing scm_handle_by_message function, except that it doesn't call
  6112. exit to terminate the process. Instead, it prints a message and just
  6113. returns #f. This might be a more appropriate catch-all handler for
  6114. new dynamic roots and threads.
  6115. Changes in Guile 1.1 (released Friday, May 16 1997):
  6116. * Changes to the distribution.
  6117. The Guile 1.0 distribution has been split up into several smaller
  6118. pieces:
  6119. guile-core --- the Guile interpreter itself.
  6120. guile-tcltk --- the interface between the Guile interpreter and
  6121. Tcl/Tk; Tcl is an interpreter for a stringy language, and Tk
  6122. is a toolkit for building graphical user interfaces.
  6123. guile-rgx-ctax --- the interface between Guile and the Rx regular
  6124. expression matcher, and the translator for the Ctax
  6125. programming language. These are packaged together because the
  6126. Ctax translator uses Rx to parse Ctax source code.
  6127. This NEWS file describes the changes made to guile-core since the 1.0
  6128. release.
  6129. We no longer distribute the documentation, since it was either out of
  6130. date, or incomplete. As soon as we have current documentation, we
  6131. will distribute it.
  6132. * Changes to the stand-alone interpreter
  6133. ** guile now accepts command-line arguments compatible with SCSH, Olin
  6134. Shivers' Scheme Shell.
  6135. In general, arguments are evaluated from left to right, but there are
  6136. exceptions. The following switches stop argument processing, and
  6137. stash all remaining command-line arguments as the value returned by
  6138. the (command-line) function.
  6139. -s SCRIPT load Scheme source code from FILE, and exit
  6140. -c EXPR evalute Scheme expression EXPR, and exit
  6141. -- stop scanning arguments; run interactively
  6142. The switches below are processed as they are encountered.
  6143. -l FILE load Scheme source code from FILE
  6144. -e FUNCTION after reading script, apply FUNCTION to
  6145. command line arguments
  6146. -ds do -s script at this point
  6147. --emacs enable Emacs protocol (experimental)
  6148. -h, --help display this help and exit
  6149. -v, --version display version information and exit
  6150. \ read arguments from following script lines
  6151. So, for example, here is a Guile script named `ekko' (thanks, Olin)
  6152. which re-implements the traditional "echo" command:
  6153. #!/usr/local/bin/guile -s
  6154. !#
  6155. (define (main args)
  6156. (map (lambda (arg) (display arg) (display " "))
  6157. (cdr args))
  6158. (newline))
  6159. (main (command-line))
  6160. Suppose we invoke this script as follows:
  6161. ekko a speckled gecko
  6162. Through the magic of Unix script processing (triggered by the `#!'
  6163. token at the top of the file), /usr/local/bin/guile receives the
  6164. following list of command-line arguments:
  6165. ("-s" "./ekko" "a" "speckled" "gecko")
  6166. Unix inserts the name of the script after the argument specified on
  6167. the first line of the file (in this case, "-s"), and then follows that
  6168. with the arguments given to the script. Guile loads the script, which
  6169. defines the `main' function, and then applies it to the list of
  6170. remaining command-line arguments, ("a" "speckled" "gecko").
  6171. In Unix, the first line of a script file must take the following form:
  6172. #!INTERPRETER ARGUMENT
  6173. where INTERPRETER is the absolute filename of the interpreter
  6174. executable, and ARGUMENT is a single command-line argument to pass to
  6175. the interpreter.
  6176. You may only pass one argument to the interpreter, and its length is
  6177. limited. These restrictions can be annoying to work around, so Guile
  6178. provides a general mechanism (borrowed from, and compatible with,
  6179. SCSH) for circumventing them.
  6180. If the ARGUMENT in a Guile script is a single backslash character,
  6181. `\', Guile will open the script file, parse arguments from its second
  6182. and subsequent lines, and replace the `\' with them. So, for example,
  6183. here is another implementation of the `ekko' script:
  6184. #!/usr/local/bin/guile \
  6185. -e main -s
  6186. !#
  6187. (define (main args)
  6188. (for-each (lambda (arg) (display arg) (display " "))
  6189. (cdr args))
  6190. (newline))
  6191. If the user invokes this script as follows:
  6192. ekko a speckled gecko
  6193. Unix expands this into
  6194. /usr/local/bin/guile \ ekko a speckled gecko
  6195. When Guile sees the `\' argument, it replaces it with the arguments
  6196. read from the second line of the script, producing:
  6197. /usr/local/bin/guile -e main -s ekko a speckled gecko
  6198. This tells Guile to load the `ekko' script, and apply the function
  6199. `main' to the argument list ("a" "speckled" "gecko").
  6200. Here is how Guile parses the command-line arguments:
  6201. - Each space character terminates an argument. This means that two
  6202. spaces in a row introduce an empty-string argument.
  6203. - The tab character is not permitted (unless you quote it with the
  6204. backslash character, as described below), to avoid confusion.
  6205. - The newline character terminates the sequence of arguments, and will
  6206. also terminate a final non-empty argument. (However, a newline
  6207. following a space will not introduce a final empty-string argument;
  6208. it only terminates the argument list.)
  6209. - The backslash character is the escape character. It escapes
  6210. backslash, space, tab, and newline. The ANSI C escape sequences
  6211. like \n and \t are also supported. These produce argument
  6212. constituents; the two-character combination \n doesn't act like a
  6213. terminating newline. The escape sequence \NNN for exactly three
  6214. octal digits reads as the character whose ASCII code is NNN. As
  6215. above, characters produced this way are argument constituents.
  6216. Backslash followed by other characters is not allowed.
  6217. * Changes to the procedure for linking libguile with your programs
  6218. ** Guile now builds and installs a shared guile library, if your
  6219. system support shared libraries. (It still builds a static library on
  6220. all systems.) Guile automatically detects whether your system
  6221. supports shared libraries. To prevent Guile from buildisg shared
  6222. libraries, pass the `--disable-shared' flag to the configure script.
  6223. Guile takes longer to compile when it builds shared libraries, because
  6224. it must compile every file twice --- once to produce position-
  6225. independent object code, and once to produce normal object code.
  6226. ** The libthreads library has been merged into libguile.
  6227. To link a program against Guile, you now need only link against
  6228. -lguile and -lqt; -lthreads is no longer needed. If you are using
  6229. autoconf to generate configuration scripts for your application, the
  6230. following lines should suffice to add the appropriate libraries to
  6231. your link command:
  6232. ### Find quickthreads and libguile.
  6233. AC_CHECK_LIB(qt, main)
  6234. AC_CHECK_LIB(guile, scm_shell)
  6235. * Changes to Scheme functions
  6236. ** Guile Scheme's special syntax for keyword objects is now optional,
  6237. and disabled by default.
  6238. The syntax variation from R4RS made it difficult to port some
  6239. interesting packages to Guile. The routines which accepted keyword
  6240. arguments (mostly in the module system) have been modified to also
  6241. accept symbols whose names begin with `:'.
  6242. To change the keyword syntax, you must first import the (ice-9 debug)
  6243. module:
  6244. (use-modules (ice-9 debug))
  6245. Then you can enable the keyword syntax as follows:
  6246. (read-set! keywords 'prefix)
  6247. To disable keyword syntax, do this:
  6248. (read-set! keywords #f)
  6249. ** Many more primitive functions accept shared substrings as
  6250. arguments. In the past, these functions required normal, mutable
  6251. strings as arguments, although they never made use of this
  6252. restriction.
  6253. ** The uniform array functions now operate on byte vectors. These
  6254. functions are `array-fill!', `serial-array-copy!', `array-copy!',
  6255. `serial-array-map', `array-map', `array-for-each', and
  6256. `array-index-map!'.
  6257. ** The new functions `trace' and `untrace' implement simple debugging
  6258. support for Scheme functions.
  6259. The `trace' function accepts any number of procedures as arguments,
  6260. and tells the Guile interpreter to display each procedure's name and
  6261. arguments each time the procedure is invoked. When invoked with no
  6262. arguments, `trace' returns the list of procedures currently being
  6263. traced.
  6264. The `untrace' function accepts any number of procedures as arguments,
  6265. and tells the Guile interpreter not to trace them any more. When
  6266. invoked with no arguments, `untrace' untraces all curretly traced
  6267. procedures.
  6268. The tracing in Guile has an advantage over most other systems: we
  6269. don't create new procedure objects, but mark the procedure objects
  6270. themselves. This means that anonymous and internal procedures can be
  6271. traced.
  6272. ** The function `assert-repl-prompt' has been renamed to
  6273. `set-repl-prompt!'. It takes one argument, PROMPT.
  6274. - If PROMPT is #f, the Guile read-eval-print loop will not prompt.
  6275. - If PROMPT is a string, we use it as a prompt.
  6276. - If PROMPT is a procedure accepting no arguments, we call it, and
  6277. display the result as a prompt.
  6278. - Otherwise, we display "> ".
  6279. ** The new function `eval-string' reads Scheme expressions from a
  6280. string and evaluates them, returning the value of the last expression
  6281. in the string. If the string contains no expressions, it returns an
  6282. unspecified value.
  6283. ** The new function `thunk?' returns true iff its argument is a
  6284. procedure of zero arguments.
  6285. ** `defined?' is now a builtin function, instead of syntax. This
  6286. means that its argument should be quoted. It returns #t iff its
  6287. argument is bound in the current module.
  6288. ** The new syntax `use-modules' allows you to add new modules to your
  6289. environment without re-typing a complete `define-module' form. It
  6290. accepts any number of module names as arguments, and imports their
  6291. public bindings into the current module.
  6292. ** The new function (module-defined? NAME MODULE) returns true iff
  6293. NAME, a symbol, is defined in MODULE, a module object.
  6294. ** The new function `builtin-bindings' creates and returns a hash
  6295. table containing copies of all the root module's bindings.
  6296. ** The new function `builtin-weak-bindings' does the same as
  6297. `builtin-bindings', but creates a doubly-weak hash table.
  6298. ** The `equal?' function now considers variable objects to be
  6299. equivalent if they have the same name and the same value.
  6300. ** The new function `command-line' returns the command-line arguments
  6301. given to Guile, as a list of strings.
  6302. When using guile as a script interpreter, `command-line' returns the
  6303. script's arguments; those processed by the interpreter (like `-s' or
  6304. `-c') are omitted. (In other words, you get the normal, expected
  6305. behavior.) Any application that uses scm_shell to process its
  6306. command-line arguments gets this behavior as well.
  6307. ** The new function `load-user-init' looks for a file called `.guile'
  6308. in the user's home directory, and loads it if it exists. This is
  6309. mostly for use by the code generated by scm_compile_shell_switches,
  6310. but we thought it might also be useful in other circumstances.
  6311. ** The new function `log10' returns the base-10 logarithm of its
  6312. argument.
  6313. ** Changes to I/O functions
  6314. *** The functions `read', `primitive-load', `read-and-eval!', and
  6315. `primitive-load-path' no longer take optional arguments controlling
  6316. case insensitivity and a `#' parser.
  6317. Case sensitivity is now controlled by a read option called
  6318. `case-insensitive'. The user can add new `#' syntaxes with the
  6319. `read-hash-extend' function (see below).
  6320. *** The new function `read-hash-extend' allows the user to change the
  6321. syntax of Guile Scheme in a somewhat controlled way.
  6322. (read-hash-extend CHAR PROC)
  6323. When parsing S-expressions, if we read a `#' character followed by
  6324. the character CHAR, use PROC to parse an object from the stream.
  6325. If PROC is #f, remove any parsing procedure registered for CHAR.
  6326. The reader applies PROC to two arguments: CHAR and an input port.
  6327. *** The new functions read-delimited and read-delimited! provide a
  6328. general mechanism for doing delimited input on streams.
  6329. (read-delimited DELIMS [PORT HANDLE-DELIM])
  6330. Read until we encounter one of the characters in DELIMS (a string),
  6331. or end-of-file. PORT is the input port to read from; it defaults to
  6332. the current input port. The HANDLE-DELIM parameter determines how
  6333. the terminating character is handled; it should be one of the
  6334. following symbols:
  6335. 'trim omit delimiter from result
  6336. 'peek leave delimiter character in input stream
  6337. 'concat append delimiter character to returned value
  6338. 'split return a pair: (RESULT . TERMINATOR)
  6339. HANDLE-DELIM defaults to 'peek.
  6340. (read-delimited! DELIMS BUF [PORT HANDLE-DELIM START END])
  6341. A side-effecting variant of `read-delimited'.
  6342. The data is written into the string BUF at the indices in the
  6343. half-open interval [START, END); the default interval is the whole
  6344. string: START = 0 and END = (string-length BUF). The values of
  6345. START and END must specify a well-defined interval in BUF, i.e.
  6346. 0 <= START <= END <= (string-length BUF).
  6347. It returns NBYTES, the number of bytes read. If the buffer filled
  6348. up without a delimiter character being found, it returns #f. If the
  6349. port is at EOF when the read starts, it returns the EOF object.
  6350. If an integer is returned (i.e., the read is successfully terminated
  6351. by reading a delimiter character), then the HANDLE-DELIM parameter
  6352. determines how to handle the terminating character. It is described
  6353. above, and defaults to 'peek.
  6354. (The descriptions of these functions were borrowed from the SCSH
  6355. manual, by Olin Shivers and Brian Carlstrom.)
  6356. *** The `%read-delimited!' function is the primitive used to implement
  6357. `read-delimited' and `read-delimited!'.
  6358. (%read-delimited! DELIMS BUF GOBBLE? [PORT START END])
  6359. This returns a pair of values: (TERMINATOR . NUM-READ).
  6360. - TERMINATOR describes why the read was terminated. If it is a
  6361. character or the eof object, then that is the value that terminated
  6362. the read. If it is #f, the function filled the buffer without finding
  6363. a delimiting character.
  6364. - NUM-READ is the number of characters read into BUF.
  6365. If the read is successfully terminated by reading a delimiter
  6366. character, then the gobble? parameter determines what to do with the
  6367. terminating character. If true, the character is removed from the
  6368. input stream; if false, the character is left in the input stream
  6369. where a subsequent read operation will retrieve it. In either case,
  6370. the character is also the first value returned by the procedure call.
  6371. (The descriptions of this function was borrowed from the SCSH manual,
  6372. by Olin Shivers and Brian Carlstrom.)
  6373. *** The `read-line' and `read-line!' functions have changed; they now
  6374. trim the terminator by default; previously they appended it to the
  6375. returned string. For the old behavior, use (read-line PORT 'concat).
  6376. *** The functions `uniform-array-read!' and `uniform-array-write!' now
  6377. take new optional START and END arguments, specifying the region of
  6378. the array to read and write.
  6379. *** The `ungetc-char-ready?' function has been removed. We feel it's
  6380. inappropriate for an interface to expose implementation details this
  6381. way.
  6382. ** Changes to the Unix library and system call interface
  6383. *** The new fcntl function provides access to the Unix `fcntl' system
  6384. call.
  6385. (fcntl PORT COMMAND VALUE)
  6386. Apply COMMAND to PORT's file descriptor, with VALUE as an argument.
  6387. Values for COMMAND are:
  6388. F_DUPFD duplicate a file descriptor
  6389. F_GETFD read the descriptor's close-on-exec flag
  6390. F_SETFD set the descriptor's close-on-exec flag to VALUE
  6391. F_GETFL read the descriptor's flags, as set on open
  6392. F_SETFL set the descriptor's flags, as set on open to VALUE
  6393. F_GETOWN return the process ID of a socket's owner, for SIGIO
  6394. F_SETOWN set the process that owns a socket to VALUE, for SIGIO
  6395. FD_CLOEXEC not sure what this is
  6396. For details, see the documentation for the fcntl system call.
  6397. *** The arguments to `select' have changed, for compatibility with
  6398. SCSH. The TIMEOUT parameter may now be non-integral, yielding the
  6399. expected behavior. The MILLISECONDS parameter has been changed to
  6400. MICROSECONDS, to more closely resemble the underlying system call.
  6401. The RVEC, WVEC, and EVEC arguments can now be vectors; the type of the
  6402. corresponding return set will be the same.
  6403. *** The arguments to the `mknod' system call have changed. They are
  6404. now:
  6405. (mknod PATH TYPE PERMS DEV)
  6406. Create a new file (`node') in the file system. PATH is the name of
  6407. the file to create. TYPE is the kind of file to create; it should
  6408. be 'fifo, 'block-special, or 'char-special. PERMS specifies the
  6409. permission bits to give the newly created file. If TYPE is
  6410. 'block-special or 'char-special, DEV specifies which device the
  6411. special file refers to; its interpretation depends on the kind of
  6412. special file being created.
  6413. *** The `fork' function has been renamed to `primitive-fork', to avoid
  6414. clashing with various SCSH forks.
  6415. *** The `recv' and `recvfrom' functions have been renamed to `recv!'
  6416. and `recvfrom!'. They no longer accept a size for a second argument;
  6417. you must pass a string to hold the received value. They no longer
  6418. return the buffer. Instead, `recv' returns the length of the message
  6419. received, and `recvfrom' returns a pair containing the packet's length
  6420. and originating address.
  6421. *** The file descriptor datatype has been removed, as have the
  6422. `read-fd', `write-fd', `close', `lseek', and `dup' functions.
  6423. We plan to replace these functions with a SCSH-compatible interface.
  6424. *** The `create' function has been removed; it's just a special case
  6425. of `open'.
  6426. *** There are new functions to break down process termination status
  6427. values. In the descriptions below, STATUS is a value returned by
  6428. `waitpid'.
  6429. (status:exit-val STATUS)
  6430. If the child process exited normally, this function returns the exit
  6431. code for the child process (i.e., the value passed to exit, or
  6432. returned from main). If the child process did not exit normally,
  6433. this function returns #f.
  6434. (status:stop-sig STATUS)
  6435. If the child process was suspended by a signal, this function
  6436. returns the signal that suspended the child. Otherwise, it returns
  6437. #f.
  6438. (status:term-sig STATUS)
  6439. If the child process terminated abnormally, this function returns
  6440. the signal that terminated the child. Otherwise, this function
  6441. returns false.
  6442. POSIX promises that exactly one of these functions will return true on
  6443. a valid STATUS value.
  6444. These functions are compatible with SCSH.
  6445. *** There are new accessors and setters for the broken-out time vectors
  6446. returned by `localtime', `gmtime', and that ilk. They are:
  6447. Component Accessor Setter
  6448. ========================= ============ ============
  6449. seconds tm:sec set-tm:sec
  6450. minutes tm:min set-tm:min
  6451. hours tm:hour set-tm:hour
  6452. day of the month tm:mday set-tm:mday
  6453. month tm:mon set-tm:mon
  6454. year tm:year set-tm:year
  6455. day of the week tm:wday set-tm:wday
  6456. day in the year tm:yday set-tm:yday
  6457. daylight saving time tm:isdst set-tm:isdst
  6458. GMT offset, seconds tm:gmtoff set-tm:gmtoff
  6459. name of time zone tm:zone set-tm:zone
  6460. *** There are new accessors for the vectors returned by `uname',
  6461. describing the host system:
  6462. Component Accessor
  6463. ============================================== ================
  6464. name of the operating system implementation utsname:sysname
  6465. network name of this machine utsname:nodename
  6466. release level of the operating system utsname:release
  6467. version level of the operating system utsname:version
  6468. machine hardware platform utsname:machine
  6469. *** There are new accessors for the vectors returned by `getpw',
  6470. `getpwnam', `getpwuid', and `getpwent', describing entries from the
  6471. system's user database:
  6472. Component Accessor
  6473. ====================== =================
  6474. user name passwd:name
  6475. user password passwd:passwd
  6476. user id passwd:uid
  6477. group id passwd:gid
  6478. real name passwd:gecos
  6479. home directory passwd:dir
  6480. shell program passwd:shell
  6481. *** There are new accessors for the vectors returned by `getgr',
  6482. `getgrnam', `getgrgid', and `getgrent', describing entries from the
  6483. system's group database:
  6484. Component Accessor
  6485. ======================= ============
  6486. group name group:name
  6487. group password group:passwd
  6488. group id group:gid
  6489. group members group:mem
  6490. *** There are new accessors for the vectors returned by `gethost',
  6491. `gethostbyaddr', `gethostbyname', and `gethostent', describing
  6492. internet hosts:
  6493. Component Accessor
  6494. ========================= ===============
  6495. official name of host hostent:name
  6496. alias list hostent:aliases
  6497. host address type hostent:addrtype
  6498. length of address hostent:length
  6499. list of addresses hostent:addr-list
  6500. *** There are new accessors for the vectors returned by `getnet',
  6501. `getnetbyaddr', `getnetbyname', and `getnetent', describing internet
  6502. networks:
  6503. Component Accessor
  6504. ========================= ===============
  6505. official name of net netent:name
  6506. alias list netent:aliases
  6507. net number type netent:addrtype
  6508. net number netent:net
  6509. *** There are new accessors for the vectors returned by `getproto',
  6510. `getprotobyname', `getprotobynumber', and `getprotoent', describing
  6511. internet protocols:
  6512. Component Accessor
  6513. ========================= ===============
  6514. official protocol name protoent:name
  6515. alias list protoent:aliases
  6516. protocol number protoent:proto
  6517. *** There are new accessors for the vectors returned by `getserv',
  6518. `getservbyname', `getservbyport', and `getservent', describing
  6519. internet protocols:
  6520. Component Accessor
  6521. ========================= ===============
  6522. official service name servent:name
  6523. alias list servent:aliases
  6524. port number servent:port
  6525. protocol to use servent:proto
  6526. *** There are new accessors for the sockaddr structures returned by
  6527. `accept', `getsockname', `getpeername', `recvfrom!':
  6528. Component Accessor
  6529. ======================================== ===============
  6530. address format (`family') sockaddr:fam
  6531. path, for file domain addresses sockaddr:path
  6532. address, for internet domain addresses sockaddr:addr
  6533. TCP or UDP port, for internet sockaddr:port
  6534. *** The `getpwent', `getgrent', `gethostent', `getnetent',
  6535. `getprotoent', and `getservent' functions now return #f at the end of
  6536. the user database. (They used to throw an exception.)
  6537. Note that calling MUMBLEent function is equivalent to calling the
  6538. corresponding MUMBLE function with no arguments.
  6539. *** The `setpwent', `setgrent', `sethostent', `setnetent',
  6540. `setprotoent', and `setservent' routines now take no arguments.
  6541. *** The `gethost', `getproto', `getnet', and `getserv' functions now
  6542. provide more useful information when they throw an exception.
  6543. *** The `lnaof' function has been renamed to `inet-lnaof'.
  6544. *** Guile now claims to have the `current-time' feature.
  6545. *** The `mktime' function now takes an optional second argument ZONE,
  6546. giving the time zone to use for the conversion. ZONE should be a
  6547. string, in the same format as expected for the "TZ" environment variable.
  6548. *** The `strptime' function now returns a pair (TIME . COUNT), where
  6549. TIME is the parsed time as a vector, and COUNT is the number of
  6550. characters from the string left unparsed. This function used to
  6551. return the remaining characters as a string.
  6552. *** The `gettimeofday' function has replaced the old `time+ticks' function.
  6553. The return value is now (SECONDS . MICROSECONDS); the fractional
  6554. component is no longer expressed in "ticks".
  6555. *** The `ticks/sec' constant has been removed, in light of the above change.
  6556. * Changes to the gh_ interface
  6557. ** gh_eval_str() now returns an SCM object which is the result of the
  6558. evaluation
  6559. ** gh_scm2str() now copies the Scheme data to a caller-provided C
  6560. array
  6561. ** gh_scm2newstr() now makes a C array, copies the Scheme data to it,
  6562. and returns the array
  6563. ** gh_scm2str0() is gone: there is no need to distinguish
  6564. null-terminated from non-null-terminated, since gh_scm2newstr() allows
  6565. the user to interpret the data both ways.
  6566. * Changes to the scm_ interface
  6567. ** The new function scm_symbol_value0 provides an easy way to get a
  6568. symbol's value from C code:
  6569. SCM scm_symbol_value0 (char *NAME)
  6570. Return the value of the symbol named by the null-terminated string
  6571. NAME in the current module. If the symbol named NAME is unbound in
  6572. the current module, return SCM_UNDEFINED.
  6573. ** The new function scm_sysintern0 creates new top-level variables,
  6574. without assigning them a value.
  6575. SCM scm_sysintern0 (char *NAME)
  6576. Create a new Scheme top-level variable named NAME. NAME is a
  6577. null-terminated string. Return the variable's value cell.
  6578. ** The function scm_internal_catch is the guts of catch. It handles
  6579. all the mechanics of setting up a catch target, invoking the catch
  6580. body, and perhaps invoking the handler if the body does a throw.
  6581. The function is designed to be usable from C code, but is general
  6582. enough to implement all the semantics Guile Scheme expects from throw.
  6583. TAG is the catch tag. Typically, this is a symbol, but this function
  6584. doesn't actually care about that.
  6585. BODY is a pointer to a C function which runs the body of the catch;
  6586. this is the code you can throw from. We call it like this:
  6587. BODY (BODY_DATA, JMPBUF)
  6588. where:
  6589. BODY_DATA is just the BODY_DATA argument we received; we pass it
  6590. through to BODY as its first argument. The caller can make
  6591. BODY_DATA point to anything useful that BODY might need.
  6592. JMPBUF is the Scheme jmpbuf object corresponding to this catch,
  6593. which we have just created and initialized.
  6594. HANDLER is a pointer to a C function to deal with a throw to TAG,
  6595. should one occur. We call it like this:
  6596. HANDLER (HANDLER_DATA, THROWN_TAG, THROW_ARGS)
  6597. where
  6598. HANDLER_DATA is the HANDLER_DATA argument we recevied; it's the
  6599. same idea as BODY_DATA above.
  6600. THROWN_TAG is the tag that the user threw to; usually this is
  6601. TAG, but it could be something else if TAG was #t (i.e., a
  6602. catch-all), or the user threw to a jmpbuf.
  6603. THROW_ARGS is the list of arguments the user passed to the THROW
  6604. function.
  6605. BODY_DATA is just a pointer we pass through to BODY. HANDLER_DATA
  6606. is just a pointer we pass through to HANDLER. We don't actually
  6607. use either of those pointers otherwise ourselves. The idea is
  6608. that, if our caller wants to communicate something to BODY or
  6609. HANDLER, it can pass a pointer to it as MUMBLE_DATA, which BODY and
  6610. HANDLER can then use. Think of it as a way to make BODY and
  6611. HANDLER closures, not just functions; MUMBLE_DATA points to the
  6612. enclosed variables.
  6613. Of course, it's up to the caller to make sure that any data a
  6614. MUMBLE_DATA needs is protected from GC. A common way to do this is
  6615. to make MUMBLE_DATA a pointer to data stored in an automatic
  6616. structure variable; since the collector must scan the stack for
  6617. references anyway, this assures that any references in MUMBLE_DATA
  6618. will be found.
  6619. ** The new function scm_internal_lazy_catch is exactly like
  6620. scm_internal_catch, except:
  6621. - It does not unwind the stack (this is the major difference).
  6622. - If handler returns, its value is returned from the throw.
  6623. - BODY always receives #f as its JMPBUF argument (since there's no
  6624. jmpbuf associated with a lazy catch, because we don't unwind the
  6625. stack.)
  6626. ** scm_body_thunk is a new body function you can pass to
  6627. scm_internal_catch if you want the body to be like Scheme's `catch'
  6628. --- a thunk, or a function of one argument if the tag is #f.
  6629. BODY_DATA is a pointer to a scm_body_thunk_data structure, which
  6630. contains the Scheme procedure to invoke as the body, and the tag
  6631. we're catching. If the tag is #f, then we pass JMPBUF (created by
  6632. scm_internal_catch) to the body procedure; otherwise, the body gets
  6633. no arguments.
  6634. ** scm_handle_by_proc is a new handler function you can pass to
  6635. scm_internal_catch if you want the handler to act like Scheme's catch
  6636. --- call a procedure with the tag and the throw arguments.
  6637. If the user does a throw to this catch, this function runs a handler
  6638. procedure written in Scheme. HANDLER_DATA is a pointer to an SCM
  6639. variable holding the Scheme procedure object to invoke. It ought to
  6640. be a pointer to an automatic variable (i.e., one living on the stack),
  6641. or the procedure object should be otherwise protected from GC.
  6642. ** scm_handle_by_message is a new handler function to use with
  6643. `scm_internal_catch' if you want Guile to print a message and die.
  6644. It's useful for dealing with throws to uncaught keys at the top level.
  6645. HANDLER_DATA, if non-zero, is assumed to be a char * pointing to a
  6646. message header to print; if zero, we use "guile" instead. That
  6647. text is followed by a colon, then the message described by ARGS.
  6648. ** The return type of scm_boot_guile is now void; the function does
  6649. not return a value, and indeed, never returns at all.
  6650. ** The new function scm_shell makes it easy for user applications to
  6651. process command-line arguments in a way that is compatible with the
  6652. stand-alone guile interpreter (which is in turn compatible with SCSH,
  6653. the Scheme shell).
  6654. To use the scm_shell function, first initialize any guile modules
  6655. linked into your application, and then call scm_shell with the values
  6656. of ARGC and ARGV your `main' function received. scm_shell will add
  6657. any SCSH-style meta-arguments from the top of the script file to the
  6658. argument vector, and then process the command-line arguments. This
  6659. generally means loading a script file or starting up an interactive
  6660. command interpreter. For details, see "Changes to the stand-alone
  6661. interpreter" above.
  6662. ** The new functions scm_get_meta_args and scm_count_argv help you
  6663. implement the SCSH-style meta-argument, `\'.
  6664. char **scm_get_meta_args (int ARGC, char **ARGV)
  6665. If the second element of ARGV is a string consisting of a single
  6666. backslash character (i.e. "\\" in Scheme notation), open the file
  6667. named by the following argument, parse arguments from it, and return
  6668. the spliced command line. The returned array is terminated by a
  6669. null pointer.
  6670. For details of argument parsing, see above, under "guile now accepts
  6671. command-line arguments compatible with SCSH..."
  6672. int scm_count_argv (char **ARGV)
  6673. Count the arguments in ARGV, assuming it is terminated by a null
  6674. pointer.
  6675. For an example of how these functions might be used, see the source
  6676. code for the function scm_shell in libguile/script.c.
  6677. You will usually want to use scm_shell instead of calling this
  6678. function yourself.
  6679. ** The new function scm_compile_shell_switches turns an array of
  6680. command-line arguments into Scheme code to carry out the actions they
  6681. describe. Given ARGC and ARGV, it returns a Scheme expression to
  6682. evaluate, and calls scm_set_program_arguments to make any remaining
  6683. command-line arguments available to the Scheme code. For example,
  6684. given the following arguments:
  6685. -e main -s ekko a speckled gecko
  6686. scm_set_program_arguments will return the following expression:
  6687. (begin (load "ekko") (main (command-line)) (quit))
  6688. You will usually want to use scm_shell instead of calling this
  6689. function yourself.
  6690. ** The function scm_shell_usage prints a usage message appropriate for
  6691. an interpreter that uses scm_compile_shell_switches to handle its
  6692. command-line arguments.
  6693. void scm_shell_usage (int FATAL, char *MESSAGE)
  6694. Print a usage message to the standard error output. If MESSAGE is
  6695. non-zero, write it before the usage message, followed by a newline.
  6696. If FATAL is non-zero, exit the process, using FATAL as the
  6697. termination status. (If you want to be compatible with Guile,
  6698. always use 1 as the exit status when terminating due to command-line
  6699. usage problems.)
  6700. You will usually want to use scm_shell instead of calling this
  6701. function yourself.
  6702. ** scm_eval_0str now returns SCM_UNSPECIFIED if the string contains no
  6703. expressions. It used to return SCM_EOL. Earth-shattering.
  6704. ** The macros for declaring scheme objects in C code have been
  6705. rearranged slightly. They are now:
  6706. SCM_SYMBOL (C_NAME, SCHEME_NAME)
  6707. Declare a static SCM variable named C_NAME, and initialize it to
  6708. point to the Scheme symbol whose name is SCHEME_NAME. C_NAME should
  6709. be a C identifier, and SCHEME_NAME should be a C string.
  6710. SCM_GLOBAL_SYMBOL (C_NAME, SCHEME_NAME)
  6711. Just like SCM_SYMBOL, but make C_NAME globally visible.
  6712. SCM_VCELL (C_NAME, SCHEME_NAME)
  6713. Create a global variable at the Scheme level named SCHEME_NAME.
  6714. Declare a static SCM variable named C_NAME, and initialize it to
  6715. point to the Scheme variable's value cell.
  6716. SCM_GLOBAL_VCELL (C_NAME, SCHEME_NAME)
  6717. Just like SCM_VCELL, but make C_NAME globally visible.
  6718. The `guile-snarf' script writes initialization code for these macros
  6719. to its standard output, given C source code as input.
  6720. The SCM_GLOBAL macro is gone.
  6721. ** The scm_read_line and scm_read_line_x functions have been replaced
  6722. by Scheme code based on the %read-delimited! procedure (known to C
  6723. code as scm_read_delimited_x). See its description above for more
  6724. information.
  6725. ** The function scm_sys_open has been renamed to scm_open. It now
  6726. returns a port instead of an FD object.
  6727. * The dynamic linking support has changed. For more information, see
  6728. libguile/DYNAMIC-LINKING.
  6729. Guile 1.0b3
  6730. User-visible changes from Thursday, September 5, 1996 until Guile 1.0
  6731. (Sun 5 Jan 1997):
  6732. * Changes to the 'guile' program:
  6733. ** Guile now loads some new files when it starts up. Guile first
  6734. searches the load path for init.scm, and loads it if found. Then, if
  6735. Guile is not being used to execute a script, and the user's home
  6736. directory contains a file named `.guile', Guile loads that.
  6737. ** You can now use Guile as a shell script interpreter.
  6738. To paraphrase the SCSH manual:
  6739. When Unix tries to execute an executable file whose first two
  6740. characters are the `#!', it treats the file not as machine code to
  6741. be directly executed by the native processor, but as source code
  6742. to be executed by some interpreter. The interpreter to use is
  6743. specified immediately after the #! sequence on the first line of
  6744. the source file. The kernel reads in the name of the interpreter,
  6745. and executes that instead. It passes the interpreter the source
  6746. filename as its first argument, with the original arguments
  6747. following. Consult the Unix man page for the `exec' system call
  6748. for more information.
  6749. Now you can use Guile as an interpreter, using a mechanism which is a
  6750. compatible subset of that provided by SCSH.
  6751. Guile now recognizes a '-s' command line switch, whose argument is the
  6752. name of a file of Scheme code to load. It also treats the two
  6753. characters `#!' as the start of a comment, terminated by `!#'. Thus,
  6754. to make a file of Scheme code directly executable by Unix, insert the
  6755. following two lines at the top of the file:
  6756. #!/usr/local/bin/guile -s
  6757. !#
  6758. Guile treats the argument of the `-s' command-line switch as the name
  6759. of a file of Scheme code to load, and treats the sequence `#!' as the
  6760. start of a block comment, terminated by `!#'.
  6761. For example, here's a version of 'echo' written in Scheme:
  6762. #!/usr/local/bin/guile -s
  6763. !#
  6764. (let loop ((args (cdr (program-arguments))))
  6765. (if (pair? args)
  6766. (begin
  6767. (display (car args))
  6768. (if (pair? (cdr args))
  6769. (display " "))
  6770. (loop (cdr args)))))
  6771. (newline)
  6772. Why does `#!' start a block comment terminated by `!#', instead of the
  6773. end of the line? That is the notation SCSH uses, and although we
  6774. don't yet support the other SCSH features that motivate that choice,
  6775. we would like to be backward-compatible with any existing Guile
  6776. scripts once we do. Furthermore, if the path to Guile on your system
  6777. is too long for your kernel, you can start the script with this
  6778. horrible hack:
  6779. #!/bin/sh
  6780. exec /really/long/path/to/guile -s "$0" ${1+"$@"}
  6781. !#
  6782. Note that some very old Unix systems don't support the `#!' syntax.
  6783. ** You can now run Guile without installing it.
  6784. Previous versions of the interactive Guile interpreter (`guile')
  6785. couldn't start up unless Guile's Scheme library had been installed;
  6786. they used the value of the environment variable `SCHEME_LOAD_PATH'
  6787. later on in the startup process, but not to find the startup code
  6788. itself. Now Guile uses `SCHEME_LOAD_PATH' in all searches for Scheme
  6789. code.
  6790. To run Guile without installing it, build it in the normal way, and
  6791. then set the environment variable `SCHEME_LOAD_PATH' to a
  6792. colon-separated list of directories, including the top-level directory
  6793. of the Guile sources. For example, if you unpacked Guile so that the
  6794. full filename of this NEWS file is /home/jimb/guile-1.0b3/NEWS, then
  6795. you might say
  6796. export SCHEME_LOAD_PATH=/home/jimb/my-scheme:/home/jimb/guile-1.0b3
  6797. ** Guile's read-eval-print loop no longer prints #<unspecified>
  6798. results. If the user wants to see this, she can evaluate the
  6799. expression (assert-repl-print-unspecified #t), perhaps in her startup
  6800. file.
  6801. ** Guile no longer shows backtraces by default when an error occurs;
  6802. however, it does display a message saying how to get one, and how to
  6803. request that they be displayed by default. After an error, evaluate
  6804. (backtrace)
  6805. to see a backtrace, and
  6806. (debug-enable 'backtrace)
  6807. to see them by default.
  6808. * Changes to Guile Scheme:
  6809. ** Guile now distinguishes between #f and the empty list.
  6810. This is for compatibility with the IEEE standard, the (possibly)
  6811. upcoming Revised^5 Report on Scheme, and many extant Scheme
  6812. implementations.
  6813. Guile used to have #f and '() denote the same object, to make Scheme's
  6814. type system more compatible with Emacs Lisp's. However, the change
  6815. caused too much trouble for Scheme programmers, and we found another
  6816. way to reconcile Emacs Lisp with Scheme that didn't require this.
  6817. ** Guile's delq, delv, delete functions, and their destructive
  6818. counterparts, delq!, delv!, and delete!, now remove all matching
  6819. elements from the list, not just the first. This matches the behavior
  6820. of the corresponding Emacs Lisp functions, and (I believe) the Maclisp
  6821. functions which inspired them.
  6822. I recognize that this change may break code in subtle ways, but it
  6823. seems best to make the change before the FSF's first Guile release,
  6824. rather than after.
  6825. ** The compiled-library-path function has been deleted from libguile.
  6826. ** The facilities for loading Scheme source files have changed.
  6827. *** The variable %load-path now tells Guile which directories to search
  6828. for Scheme code. Its value is a list of strings, each of which names
  6829. a directory.
  6830. *** The variable %load-extensions now tells Guile which extensions to
  6831. try appending to a filename when searching the load path. Its value
  6832. is a list of strings. Its default value is ("" ".scm").
  6833. *** (%search-load-path FILENAME) searches the directories listed in the
  6834. value of the %load-path variable for a Scheme file named FILENAME,
  6835. with all the extensions listed in %load-extensions. If it finds a
  6836. match, then it returns its full filename. If FILENAME is absolute, it
  6837. returns it unchanged. Otherwise, it returns #f.
  6838. %search-load-path will not return matches that refer to directories.
  6839. *** (primitive-load FILENAME :optional CASE-INSENSITIVE-P SHARP)
  6840. uses %seach-load-path to find a file named FILENAME, and loads it if
  6841. it finds it. If it can't read FILENAME for any reason, it throws an
  6842. error.
  6843. The arguments CASE-INSENSITIVE-P and SHARP are interpreted as by the
  6844. `read' function.
  6845. *** load uses the same searching semantics as primitive-load.
  6846. *** The functions %try-load, try-load-with-path, %load, load-with-path,
  6847. basic-try-load-with-path, basic-load-with-path, try-load-module-with-
  6848. path, and load-module-with-path have been deleted. The functions
  6849. above should serve their purposes.
  6850. *** If the value of the variable %load-hook is a procedure,
  6851. `primitive-load' applies its value to the name of the file being
  6852. loaded (without the load path directory name prepended). If its value
  6853. is #f, it is ignored. Otherwise, an error occurs.
  6854. This is mostly useful for printing load notification messages.
  6855. ** The function `eval!' is no longer accessible from the scheme level.
  6856. We can't allow operations which introduce glocs into the scheme level,
  6857. because Guile's type system can't handle these as data. Use `eval' or
  6858. `read-and-eval!' (see below) as replacement.
  6859. ** The new function read-and-eval! reads an expression from PORT,
  6860. evaluates it, and returns the result. This is more efficient than
  6861. simply calling `read' and `eval', since it is not necessary to make a
  6862. copy of the expression for the evaluator to munge.
  6863. Its optional arguments CASE_INSENSITIVE_P and SHARP are interpreted as
  6864. for the `read' function.
  6865. ** The function `int?' has been removed; its definition was identical
  6866. to that of `integer?'.
  6867. ** The functions `<?', `<?', `<=?', `=?', `>?', and `>=?'. Code should
  6868. use the R4RS names for these functions.
  6869. ** The function object-properties no longer returns the hash handle;
  6870. it simply returns the object's property list.
  6871. ** Many functions have been changed to throw errors, instead of
  6872. returning #f on failure. The point of providing exception handling in
  6873. the language is to simplify the logic of user code, but this is less
  6874. useful if Guile's primitives don't throw exceptions.
  6875. ** The function `fileno' has been renamed from `%fileno'.
  6876. ** The function primitive-mode->fdes returns #t or #f now, not 1 or 0.
  6877. * Changes to Guile's C interface:
  6878. ** The library's initialization procedure has been simplified.
  6879. scm_boot_guile now has the prototype:
  6880. void scm_boot_guile (int ARGC,
  6881. char **ARGV,
  6882. void (*main_func) (),
  6883. void *closure);
  6884. scm_boot_guile calls MAIN_FUNC, passing it CLOSURE, ARGC, and ARGV.
  6885. MAIN_FUNC should do all the work of the program (initializing other
  6886. packages, reading user input, etc.) before returning. When MAIN_FUNC
  6887. returns, call exit (0); this function never returns. If you want some
  6888. other exit value, MAIN_FUNC may call exit itself.
  6889. scm_boot_guile arranges for program-arguments to return the strings
  6890. given by ARGC and ARGV. If MAIN_FUNC modifies ARGC/ARGV, should call
  6891. scm_set_program_arguments with the final list, so Scheme code will
  6892. know which arguments have been processed.
  6893. scm_boot_guile establishes a catch-all catch handler which prints an
  6894. error message and exits the process. This means that Guile exits in a
  6895. coherent way when system errors occur and the user isn't prepared to
  6896. handle it. If the user doesn't like this behavior, they can establish
  6897. their own universal catcher in MAIN_FUNC to shadow this one.
  6898. Why must the caller do all the real work from MAIN_FUNC? The garbage
  6899. collector assumes that all local variables of type SCM will be above
  6900. scm_boot_guile's stack frame on the stack. If you try to manipulate
  6901. SCM values after this function returns, it's the luck of the draw
  6902. whether the GC will be able to find the objects you allocate. So,
  6903. scm_boot_guile function exits, rather than returning, to discourage
  6904. people from making that mistake.
  6905. The IN, OUT, and ERR arguments were removed; there are other
  6906. convenient ways to override these when desired.
  6907. The RESULT argument was deleted; this function should never return.
  6908. The BOOT_CMD argument was deleted; the MAIN_FUNC argument is more
  6909. general.
  6910. ** Guile's header files should no longer conflict with your system's
  6911. header files.
  6912. In order to compile code which #included <libguile.h>, previous
  6913. versions of Guile required you to add a directory containing all the
  6914. Guile header files to your #include path. This was a problem, since
  6915. Guile's header files have names which conflict with many systems'
  6916. header files.
  6917. Now only <libguile.h> need appear in your #include path; you must
  6918. refer to all Guile's other header files as <libguile/mumble.h>.
  6919. Guile's installation procedure puts libguile.h in $(includedir), and
  6920. the rest in $(includedir)/libguile.
  6921. ** Two new C functions, scm_protect_object and scm_unprotect_object,
  6922. have been added to the Guile library.
  6923. scm_protect_object (OBJ) protects OBJ from the garbage collector.
  6924. OBJ will not be freed, even if all other references are dropped,
  6925. until someone does scm_unprotect_object (OBJ). Both functions
  6926. return OBJ.
  6927. Note that calls to scm_protect_object do not nest. You can call
  6928. scm_protect_object any number of times on a given object, and the
  6929. next call to scm_unprotect_object will unprotect it completely.
  6930. Basically, scm_protect_object and scm_unprotect_object just
  6931. maintain a list of references to things. Since the GC knows about
  6932. this list, all objects it mentions stay alive. scm_protect_object
  6933. adds its argument to the list; scm_unprotect_object remove its
  6934. argument from the list.
  6935. ** scm_eval_0str now returns the value of the last expression
  6936. evaluated.
  6937. ** The new function scm_read_0str reads an s-expression from a
  6938. null-terminated string, and returns it.
  6939. ** The new function `scm_stdio_to_port' converts a STDIO file pointer
  6940. to a Scheme port object.
  6941. ** The new function `scm_set_program_arguments' allows C code to set
  6942. the value returned by the Scheme `program-arguments' function.
  6943. Older changes:
  6944. * Guile no longer includes sophisticated Tcl/Tk support.
  6945. The old Tcl/Tk support was unsatisfying to us, because it required the
  6946. user to link against the Tcl library, as well as Tk and Guile. The
  6947. interface was also un-lispy, in that it preserved Tcl/Tk's practice of
  6948. referring to widgets by names, rather than exporting widgets to Scheme
  6949. code as a special datatype.
  6950. In the Usenix Tk Developer's Workshop held in July 1996, the Tcl/Tk
  6951. maintainers described some very interesting changes in progress to the
  6952. Tcl/Tk internals, which would facilitate clean interfaces between lone
  6953. Tk and other interpreters --- even for garbage-collected languages
  6954. like Scheme. They expected the new Tk to be publicly available in the
  6955. fall of 1996.
  6956. Since it seems that Guile might soon have a new, cleaner interface to
  6957. lone Tk, and that the old Guile/Tk glue code would probably need to be
  6958. completely rewritten, we (Jim Blandy and Richard Stallman) have
  6959. decided not to support the old code. We'll spend the time instead on
  6960. a good interface to the newer Tk, as soon as it is available.
  6961. Until then, gtcltk-lib provides trivial, low-maintenance functionality.
  6962. Copyright information:
  6963. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
  6964. Permission is granted to anyone to make or distribute verbatim copies
  6965. of this document as received, in any medium, provided that the
  6966. copyright notice and this permission notice are preserved,
  6967. thus giving the recipient permission to redistribute in turn.
  6968. Permission is granted to distribute modified versions
  6969. of this document, or of portions of it,
  6970. under the above conditions, provided also that they
  6971. carry prominent notices stating who last changed them.
  6972. Local variables:
  6973. mode: outline
  6974. paragraph-separate: "[ ]*$"
  6975. end: