Search Results

Search found 13 results on 1 pages for 'r5rs'.

Page 1/1 | 1 

  • What is the meaning of # in R5RS Scheme number literals

    - by ikmac
    There is a partial answer on Stack Overflow, but I'm asking something a teeny bit more specific than the answers there. So... Does the formal semantics (Section 7.2) specify the meaning of such a numeric literal? Does it specify the meaning of numeric operations on the value resulting from interpreting the literal? If yes, what are the meanings (in English -- denotational semantics is all greek characters to me :))?

    Read the article

  • Do you have to use display to output stuff using r6rs?

    - by incrediman
    Background: I am new to scheme, and am using DrScheme to write my programs. The following program outputs 12345 when I run the program as r5rs: 12345 However the following program outputs nothing (it's an r6rs program): #!r6rs (import (rnrs)) 12345 That being said, I can get it to output 12345 by doing this: #!r6rs (import (rnrs)) (display 1235) Is that something new with r6rs, where output only occurs when specifically specified using display? Or am I just doing something else wrong

    Read the article

  • What, if any, is wrong with this definition of letrec in Scheme?

    - by Lajla
    R5RS gives proposed macro definitions for library forms of syntax: http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-10.html#%_sec_7.3 Which also defines letrec, in a very complicated way, certainly not how I would define it, I would simply use: (define-syntax letrec2 (syntax-rules () ((letrec2 ((name val) ...) body bodies ...) ((lambda () (define name val) ... body bodies ...))))) As far as I understand the semantics of letrec, which I use very often as a named let. It works in this way, however as I've had my fair share of debates with philosophers who think they can just disprove special relativity or established phonological theories, I know that when you think you have a simple solution to a complex problem, it's probably WRONG. There has got to be some point where this macro does not satify the semantics of letrec else they'd probably have used it. In this definition, the definitions are local to the body of the letrec, they can refer to each other for mutual recursion, I'm not quite sure what (if any) is wrong.

    Read the article

  • number->string and related procedures in GIMP scheme scripting

    - by dim fish
    I am frustrated with string-to-number and number-to-string conversion in GIMP scripting. I am runnning GIMP 2.6.8 in Windows Vista. I understand that GIMP's internal Scheme implementation changes over the versions and I can't seem to nail down the documentation. From what I can gather GIMP's Scheme is a subset of TinyScheme and/or supports the R5RS standard procedures. In any case, I usually just look in the packaged script directory for examples when I want to try something new, because that should work for sure, right? For example, grid-system.scm comes with the latest GIMP release and has the expression, (string-append (number->string obj) " ") which is exactly what I want. However, if I use number-string in my own script, or even type it into GIMP's script console (which is how I usually test out new stuff I want to do) it tells me number-string is an unbound variable: > (number->string 3) Error: eval: unbound variable: number->string Other standard procedures from, say R5RS, work just fine: > (string-append "frust" "rated") "frustrated" So, 1) Is there some lurking documentation for current GIMP Scheme scripting other than something drastic like searching GIMP's source code? 2) Can I use the GIMP console to spit out a list of all defined procedures to find something I need? 3) Anyone else confirm that number-string is not defined for the current Windows build, even though it appears in the packaged scripts? My web searches haven't turned up any related problems, and a complete uninstall of all GIMP versions, back to latest puts me in the same scrape.

    Read the article

  • small & readable scheme interpreter in C++ ?

    - by anon
    Anyone know of a good / small scheme interpreter in C++? Perferably something < 2000 LOC, with a simple garbage collectro (either compacting or mark & sweep), no need to support all of R5RS, just basics of if/lambda/set!/cons/car/cdr and some basic operations. Thanks!

    Read the article

  • Adding an element to a list in Scheme

    - by user272483
    I'm using R5RS Scheme and I just want to implement a function that returns the intersection of two given lists, but I can't do that because I cannot add an element to a list. Here is my code. How can I fix it? I'm really a beginner in Scheme - this is my first work using Scheme. thx in advance.. (define list3 '()) (define (E7 list1 list2) (cond ((null? list1) list3) ((member (car list1) list2) (append list3 (list (car list1)))) ) (cond ((null? list1) list3) ((not(null? list1)) (E7 (cdr list1) list2) ) ) ) (E7 '(4 5) '(3 4))

    Read the article

  • How are vector patterns used in syntax-rules?

    - by Jay
    Hi, I have been writing Common Lisp macros, so Scheme's R5Rs macros are a bit unnatural to me. I think I got the idea, except that I don't understand how one would use vector patterns in syntax-rules: (define-syntax mac (syntax-rules () ((mac #(a b c d)) (let () (display a) (newline) (display d) (newline))))) (expand '(mac #(1 2 3 4))) ;; Chicken's expand-full extension shows macroexpansion => (let746 () (display747 1) (newline748) (display747 4) (newline748)) I don't see how I'd use a macro that requires its arguments to be written as a vector: (mac #(1 2 3 4)) => 1 4 Is there some kind of technique that uses those patterns? Thank you!

    Read the article

  • adding an element to a list in lisp

    - by user272483
    i'm using r5rs and i just want to implement a function that returns the intersection of two given lists but i can't do that because i can npot add element to a list. here is my code. how can i fix it? i'm really a beginner in lisp, this is my first work on lisp? thx in advance.. (define list3 '()) (define (E7 list1 list2) (cond ((null? list1) list3) ((member (car list1) list2) (append list3 (list (car list1)))) ) (cond ((null? list1) list3) ((not(null? list1)) (E7 (cdr list1) list2) ) ) ) (E7 '(4 5) '(3 4))

    Read the article

  • How do I map a macro across a list in Scheme?

    - by josh
    I have a Scheme macro and a long list, and I'd like to map the macro across the list, just as if it were a function. How can I do that using R5RS? The macro accepts several arguments: (mac a b c d) The list has (define my-list ((a1 b1 c1 d1) (a2 b2 c2 d2) ... (an bn cn dn))) And I'd like to have this: (begin (mac a1 b1 c1 d2) (mac a2 b2 c2 d2) ... (mac an bn cn dn)) (By the way, as you can see I'd like to splice the list of arguments too)

    Read the article

  • What Scheme Does Ghuloum Use?

    - by Don Wakefield
    I'm trying to work my way through Compilers: Backend to Frontend (and Back to Front Again) by Abdulaziz Ghuloum. It seems abbreviated from what one would expect in a full course/seminar, so I'm trying to fill in the pieces myself. For instance, I have tried to use his testing framework in the R5RS flavor of DrScheme, but it doesn't seem to like the macro stuff: src/ghuloum/tests/tests-driver.scm:6:4: read: illegal use of open square bracket I've read his intro paper on the course, An Incremental Approach to Compiler Construction, which gives a great overview of the techniques used, and mentions a couple of Schemes with features one might want to implement for 'extra credit', but he doesn't mention the Scheme he uses in the course. Update I'm still digging into the original question (investigating options such as Petit Scheme suggested by Eli below), but found an interesting link relating to Gholoum's work, so I am including it here. [Ikarus Scheme](http://en.wikipedia.org/wiki/Ikarus_(Scheme_implementation)) is the actual implementation of Ghuloum's ideas, and appears to have been part of his Ph.D. work. It's supposed to be one of the first implementations of R6RS. I'm trying to install Ikarus now, but the configure script doesn't want to recognize my system's install of libgmp.so, so my problems are still unresolved. Example The following example seems to work in PLT 2.4.2 running in DrEd using the Pretty Big (require lang/plt-pretty-big) (load "/Users/donaldwakefield/ghuloum/tests/tests-driver.scm") (load "/Users/donaldwakefield/ghuloum/tests/tests-1.1-req.scm") (define (emit-program x) (unless (integer? x) (error "---")) (emit " .text") (emit " .globl scheme_entry") (emit " .type scheme_entry, @function") (emit "scheme_entry:") (emit " movl $~s, %eax" x) (emit " ret") ) Attempting to replace the require directive with #lang scheme results in the error message foo.scm:7:3: expand: unbound identifier in module in: emit which appears to be due to a failure to load tests-driver.scm. Attempting to use #lang r6rs disables the REPL, which I'd really like to use, so I'm going to try to continue with Pretty Big. My thanks to Eli Barzilay for his patient help.

    Read the article

  • Why does Scala apply thunks automatically, sometimes?

    - by Anonymouse
    At just after 2:40 in ShadowofCatron's Scala Tutorial 3 video, it's pointed out that the parentheses following the name of a thunk are optional. "Buh?" said my functional programming brain, since the value of a function and the value it evaluates to when applied are completely different things. So I wrote the following to try this out. My thought process is described in the comments. object Main { var counter: Int = 10 def f(): Int = { counter = counter + 1; counter } def runThunk(t: () => Int): Int = { t() } def main(args: Array[String]): Unit = { val a = f() // I expect this to mean "apply f to no args" println(a) // and apparently it does val b = f // I expect this to mean "the value f", a function value println(b) // but it's the value it evaluates to when applied to no args println(b) // and the evaluation happens immediately, not in the call runThunk(b) // This is an error: it's not println doing something funny runThunk(f) // Not an error: seems to be val doing something funny } }   To be clear about the problem, this Scheme program (and the console dump which follows) shows what I expected the Scala program to do. (define counter (list 10)) (define f (lambda () (set-car! counter (+ (car counter) 1)) (car counter))) (define runThunk (lambda (t) (t))) (define main (lambda args (let ((a (f)) (b f)) (display a) (newline) (display b) (newline) (display b) (newline) (runThunk b) (runThunk f)))) > (main) 11 #<procedure:f> #<procedure:f> 13   After coming to this site to ask about this, I came across this answer which told me how to fix the above Scala program: val b = f _ // Hey Scala, I mean f, not f() But the underscore 'hint' is only needed sometimes. When I call runThunk(f), no hint is required. But when I 'alias' f to b with a val then apply it, it doesn't work: the evaluation happens in the val; and even lazy val works this way, so it's not the point of evaluation causing this behaviour.   That all leaves me with the question: Why does Scala sometimes automatically apply thunks when evaluating them? Is it, as I suspect, type inference? And if so, shouldn't a type system stay out of the language's semantics? Is this a good idea? Do Scala programmers apply thunks rather than refer to their values so much more often that making the parens optional is better overall? Examples written using Scala 2.8.0RC3, DrScheme 4.0.1 in R5RS.

    Read the article

  • CodePlex Daily Summary for Saturday, June 30, 2012

    CodePlex Daily Summary for Saturday, June 30, 2012Popular ReleasesDotChess: DotChess v0.5.0: v0.5.0 Rearchitected the domain. Updated solution to Framework 4. Initiated test project. Implemented exceptions for errors. Improved coding style. Fixed minor bugs. Fixed setup shortcuts to use executable's icon. v0.4.0 Converted to Visual Studio 2010. Improved architecture.Magelia WebStore Open-source Ecommerce software: Magelia WebStore 2.0: User Right Licensing ContentType version 2.0.267.1EPPlus-Create advanced Excel 2007 spreadsheets on the server: EPPlus 3.1 Beta: EPPlus-Create advanced Excel 2010 spreadsheets This version contain version contains two new major features - VBA and conditional formatting New featuresVBACreate,read and write a VBA project from scratch or in a template. Add and modify modules and classes. Read and write code to documents(workbook and worksheets), modules and classes. VBA protection Code signing And more... Conditional FormattingApply conditional formatting on any range of cells. Choose between more than 40 diff...Supporting Guidance and Whitepapers: v1 - Supporting Media: Welcome to the Release Candidate (RC) release of the ALM Rangers Readiness supporting edia As this is a RC release and the quality bar for the final Release has not been achieved, we value your candid feedback and recommend that you do not use or deploy these RC artifacts in a production environment. Quality-Bar Details All critical bugs have been resolved Known Issues / Bugs Practical Ruck training workshop not yet includedDesigning Windows 8 Applications with C# and XAML: Chapters 1 - 7 Release Preview: Source code for all examples from Chapters 1 - 7 for the Release PreviewHyperStat.NET: Public Alpha Release: Ubuntu Installation Instructionssudo add-apt-repository ppa:xexenon/hyperstat.net sudo apt-get update sudo apt-get install hyperstatMicrosoft Ajax Minifier: Microsoft Ajax Minifier 4.57: Fix for issue #18284: evaluating literal expressions in the pattern c1 * (x / c2) where c1/c2 is an integer value (as opposed to c2/c1 being the integer) caused the expression to be destroyed.Visual Studio ALM Quick Reference Guidance: v2 - Visual Studio 2010 (Japanese): Rex Tang (?? ??) http://blogs.msdn.com/b/willy-peter_schaub/archive/2011/12/08/introducing-the-visual-studio-alm-rangers-rex-tang.aspx, Takaho Yamaguchi (?? ??), Masashi Fujiwara (?? ??), localized and reviewed the Quick Reference Guidance for the Japanese communities, based on http://vsarquickguide.codeplex.com/releases/view/52402. The Japanese guidance is available in AllGuides and Everything packages. The AllGuides package contains guidances in PDF file format, while the Everything packag...Visual Studio Team Foundation Server Branching and Merging Guide: v1 - Visual Studio 2010 (Japanese): Rex Tang (?? ??) http://blogs.msdn.com/b/willy-peter_schaub/archive/2011/12/08/introducing-the-visual-studio-alm-rangers-rex-tang.aspx, Takaho Yamaguchi (?? ??), Hirokazu Higashino (?? ??), localized and reviewed the Branching Guidance for the Japanese communities, based on http://vsarbranchingguide.codeplex.com/releases/view/38849. The Japanese guidance is available in AllGuides and Everything packages. The AllGuides package contains guidances in PDF file format, while the Everything packag...SQL Server FineBuild: Version 3.1.0: Top SQL Server FineBuild Version 3.1.0This is the stable version of FineBuild for SQL Server 2012, 2008 R2, 2008 and 2005 Documentation FineBuild Wiki containing details of the FineBuild process Known Issues Limitations with this release FineBuild V3.1.0 Release Contents List of changes included in this release Please DonateFineBuild is free, but please donate what you think FineBuild is worth as everything goes to charity. Tearfund is one of the UK's leading relief and de...EasySL: RapidSL V2: Rewrite RapidSL UI Framework, Using Silverlight 5.0 EF4.1 Code First Ria Service SP2 + Lastest Silverlight Toolkit.SOLID by example: All examples: All solid examplesSiteMap Editor for Microsoft Dynamics CRM 2011: SiteMap Editor (1.1.1726.406): Use of new version of connection controls for a full support of OSDP authentication mechanism for CRM Online.Umbraco CMS: Umbraco CMS 5.2: Development on Umbraco v5 discontinued After much discussion and consultation with leaders from the Umbraco community it was decided that work on the v5 branch would be discontinued with efforts being refocused on the stable and feature rich v4 branch. For full details as to why this decision was made please watch the CodeGarden 12 Keynote. What about all that hard work?!?? We are not binning everything and it does not mean that all work done on 5 is lost! we are taking all of the best and m...CodeGenerate: CodeGenerate Alpha: The Project can auto generate C# code. Include BLL Layer、Domain Layer、IDAL Layer、DAL Layer. Support SqlServer And Oracle This is a alpha program,but which can run and generate code. Generate database table info into MS WordXDA ROM HUB: XDA ROM HUB v0.9: Kernel listing added -- Thanks to iONEx Added scripts installer button. Added "Nandroid On The Go" -- Perform a Nandroid backup without a PC! Added official Android app!ExtAspNet: ExtAspNet v3.1.8.2: +2012-06-24 v3.1.8 +????Grid???????(???????ExpandUnusedSpace????????)(??)。 -????MinColumnWidth(??????)。 -????AutoExpandColumn,???????????????(ColumnID)(?????ForceFitFirstTime??ForceFitAllTime,??????)。 -????AutoExpandColumnMax?AutoExpandColumnMin。 -????ForceFitFirstTime,????????????,??????????(????????????)。 -????ForceFitAllTime,????????????,??????????(??????????????????)。 -????VerticalScrollWidth,????????(??????????,0?????????????)。 -????grid/grid_forcefit.aspx。 -???????????En...AJAX Control Toolkit: June 2012 Release: AJAX Control Toolkit Release Notes - June 2012 Release Version 60623June 2012 release of the AJAX Control Toolkit. AJAX Control Toolkit .NET 4 – AJAX Control Toolkit for .NET 4 and sample site (Recommended). AJAX Control Toolkit .NET 3.5 – AJAX Control Toolkit for .NET 3.5 and sample site (Recommended). Notes: - The current version of the AJAX Control Toolkit is not compatible with ASP.NET 2.0. The latest version that is compatible with ASP.NET 2.0 can be found here: 11121. - Pages using ...Cloud Media SharePoint Extension: Cloud Media SharePoint Extension: Version 0.1 Enables adding YouTube and Vimeo Video to a asset libraryComputation Visualizer: V 1.1d: ????????? ??????????, ??????????? ?? ??????New ProjectsCEP: CEP With Esper on Android Colorific: Colorific is a Visual Studio extension which enhances the syntax coloring support for C#.Dan's Utility Libraries: Dan's Utility Library is a collection of reusable code that I've written or found throughout my programming career.Delete Inactive TS Ports: The presence of Inactive TS Ports causes systems to hang or become sluggish and unresponsive. Printer redirection also suffers when there are a lot of Inactive TS Ports presents in the machine.FastNet: Extremely efficient WCF client and server for exchanging binary messages.FoodBank: Track what you eat with FoodBankGUIMalort: Malort is a raytracer developed in C++ and using Qt for the user interface. For now, it implements basic primitives, lights sources, global ambient light. Future improvements are about textures and procedural textures, bump mapping and animations.ImapClient for .NET: This ImapClient was created to incorporate Imap Mailbox Syncing with following features. This client is not full featured client, but it provides sufficient features to sync remote mail box easily and it is only free library which supports BODYSTRUCTURE correctly.iTunesContorol: iTunes??????????????、iTunes????????????????????????。JavascriptHelper - Managing JS files for ASP.NET MVC: JavascriptHelper is a MVC component to manage Javascript usage handling dependencies, CSS files and file placement.Jeanfish.com: JeanFish.comjFadeList: JQuery List Fade Plugin v1.0 betaLogwiz - Automate the collection of Performance monitor logs using logman.exe: This tool is used to automate the process of collecting Performance monitoring data using the logman.exe on Windows Vista/Windows 7/Windows 2008 and Windows 2008 R2MtelAnalyzer: Mtel Analyzator analyze the transactions that your emplyees were made and find the best plan for lower pricing.patterns practices - HiloJS: Dev a Windows Metro style app using JavaScript: Hilo guides you though the development of a Windows Metro style app. The Hilo sample is a photo viewing app using HTML 5, CSS3 and JavaScript.PHP Database Management: A PHP library to facilitate MySql database managementpintos: pintosPlay N Hunt: Scanner for the website eternal-apocalypse.frPokemon Text Tools: Pokemon Stars SP ??ProjectEulerIssues: Collection of solved/processing tasks from ProkectEuler.netScheme.Net: A R5RS Scheme interpreter/compiler for the .NET runtime.Speed up Printer migration using PrintBrm and it's configuration files: This tool is used to create the BrmConfig.XML file that can be used for quickly restoring all the print queues using the Generic / Text Only driver when migrating from a 32bit to a 64bit server.SvnLightClient: ???? svn server url, username, password ??,???????svn??????。 ??????project checkout??????。(??)WikiQuizz: It's the first real game on Wikipedia!xlsdiff: Show changes between Excel filesXNATetris: Il gioco è un clone in XNA del classico Tetris. Permette la modalità single player con aumento della velocità di gioco in relazione al livello raggiunto.Xperf123 - Xperf perf data collection made as easy as 1-2-3: This tool is used to automate the process of collecting xperf traces easy without the user worring about the various settings and configuration options. Just select the kind of trace you want and this tool does the rest for you.

    Read the article

1