guile

    1熱度

    1回答

    讀取POST數據在狡詐的Web服務器,我似乎無法找到閱讀POST數據的任何文件。它似乎與「請求」一起作爲「body」發送到我的入口函數。它看起來像體被編碼爲bytevector,我可以將其解碼爲一個字符串: (use-modules (rnrs bytevectors)) (utf8->string body) 所以從這裏我可以繼續分析該字符串,但似乎相當繁瑣,而且容易出錯。有沒有辦法將PO

    -1熱度

    1回答

    我正在嘗試在詭計中寫let over lambda defmacro/g!。我有這個: (use-modules (srfi srfi-1)) (define (flatten x) (let rec ((x x) (acc '())) (cond ((null? x) acc) ((not (pair? x)) (cons x acc))

    0熱度

    2回答

    我是linux和shell腳本的新手。我想連接到本地主機並進行交互。 #! /bin/bash (exec /opt/scripts/run_server.sh) 當我執行這個bash腳本時,它開始監聽端口。 Listening on port xxxxx 現在我想發出此命令「遠程登錄本地主機XXXXX」 我想是這樣的: #! /bin/bash (exec /opt/opencog/

    0熱度

    2回答

    我正在執行guile shell中的一些命令。 我想將命令的結果寫入文件。 我想是這樣的: some command | nc localhost abc >> file.txt 但對我來說沒有工作。

    2熱度

    1回答

    enter link description here詭計-2.0.11停止並出現以下錯誤的構建, Undefined symbols for architecture x86_64: "_clock_getcpuclockid", referenced from: _scm_init_stime in libguile_2.0_la-stime.o ld: symbol(s) no

    2熱度

    2回答

    我寫了一個代碼,它使用延遲評估來產生無限的數據結構,但有一個錯誤。 下面是代碼: #!/usr/bin/guile \ -e main -s !# (define ints-f (lambda (n) (let ((n1 (delay (ints-f (+ n 1))))) (cons n (force n1))))) (define (main args

    0熱度

    1回答

    (call-with-output-file "b.txt" (lambda (output-port) (display "hello, world" output-port))) 如何以追加模式打開b.txt。所以,我的結果將被附加在文本文件中。我在下面找到了一些答案。但那不是我所期望的。 Append in scheme 我想用「呼叫與輸出文件」的工作。因爲我覺得這個工作正常。通過這

    2熱度

    1回答

    我試圖使用guile函數跟蹤,但每次我都會得到一個可能的未綁定變量。 [email protected](guile-user)> (define (fact1 n) (if (zero? n) 1 (* n (fact1 (- n 1))))) [email protected](guile-user)> (trace fact1) ;;; <stdin>:4:0: warning: p

    0熱度

    1回答

    狡詐的化妝C-結構的不明原因的行爲接受以下代碼: (define ptr (make-c-struct '(int int) '(300 43))) : (use-modules (system foreign)) (define ptr (make-c-struct (list int int) '(300 43))) 然而,它拋出一個錯誤時,第二行被替換 有人能夠推斷出問題所在? $

    0熱度

    1回答

    在的Emacs Lisp (boundp 'symbol)回報t如果symbol勢必會有些價值,否則nil。 Guile Scheme中是否有等效的程序?