Skip to content

Commit

Permalink
No useless prints for translation API
Browse files Browse the repository at this point in the history
  • Loading branch information
pavpanchekha committed Jan 22, 2025
1 parent 95a9dd3 commit 34cddc3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/api/demo.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@
(post-with-json-response (lambda (post-data)
(define formula
(read-syntax 'web (open-input-string (hash-ref post-data 'formula))))
(eprintf "Converting to Math.js ~a..." formula)

(define result (core->mathjs (syntax->datum formula)))
(hasheq 'mathjs result))))
Expand All @@ -508,9 +507,7 @@
(post-with-json-response (lambda (post-data)
; FPCore formula and target language
(define formula (read (open-input-string (hash-ref post-data 'formula))))
(eprintf "Translating formula: ~a...\n" formula)
(define target-lang (hash-ref post-data 'language))
(eprintf "Target language: ~a...\n" target-lang)
; Select the appropriate conversion function
(define lang-converter
(case target-lang
Expand All @@ -527,7 +524,6 @@

; convert the expression
(define converted (lang-converter formula "expr"))
(eprintf "Converted Expression: \n~a...\n" converted)
(hasheq 'result converted 'language target-lang))))

(define (run-demo #:quiet [quiet? #f]
Expand Down

0 comments on commit 34cddc3

Please sign in to comment.