Paste: Program that only outputs "Kernel =" due to a stack underflow

Author: Phate6660
Mode: factor
Date: Wed, 10 Mar 2021 21:56:32
Plain Text |
USING: io io.files kernel namespaces ;
IN: factorfetch

: get-kernel ( -- str )
  with-file-reader (
    /proc/sys/kernel/osrelease 
    utf8 
    --
    str
  )
  ; inline

: print-kernel ( -- str )
  "Kernel = " write 
  get-kernel print  ; inline

: output ( -- )
  print-kernel
  print ; inline

New Annotation

Summary:
Author:
Mode:
Body: