kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 139 forks source link

please help me for using K #544

Open cl-03 opened 5 years ago

cl-03 commented 5 years ago

there comes an error when I followed the 《K USER MANUAL》。on the page of 32, I want the object displayed on the screen,by saying “show it”, kona \ for help. \ to exit. \d .server \d customers name:("Jones, B.G."; "Thomas, I.B.") number: 63545 42554 balance: 1546 161 \d ^ "customerDb" 1: customers

\d .atm credit_card_number: "xxxxx" cash_amount: "xxx" show $credit_card_number type error show $credit_card_number ^

tavmem commented 5 years ago

Well, first of all, I don't think that the GUI portion of k3 was ever implemented in kona.

Second, here is the result when I try k2.8 using Fedora:

$ rlwrap -n ./k
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.

  \d .server
  \d customers
  name:("Jones, B.G."; "Thomas, I.B.")
  number: 63545 42554
  balance: 1546 161
  \d ^
  "customerDb" 1: customers

  \d .atm
  credit_card_number: "xxxxxxx"
  cash_amount: "xxx"
  `show $ `credit_card_number
invalid font
domain error
`show $ `credit_card_number
      ^
> 

It looks like either

I can also try k3.2 using Windows. I will let you know the result.

tavmem commented 5 years ago

Just an FYI:
k3.2 does work using Windows & Msys2 & MINGW32:

tavme@DESKTOP-FVKENU9 MINGW32 ~/k3.2
$ ./k
K 3.2 2005-06-25 Copyright (C) 1993-2004 Kx Systems
  \d .server
  \d customers
  name:("Jones, B.G."; "Thomas, I.B.")
  number: 63545 42554
  balance: 1546 161
  \d ^
  "customerDb" 1: customers

  \d .atm
  credit_card_number: "xxxxxxx"
  cash_amount: "xxx"
  `show $ `credit_card_number

The credit card number does get displayed as on page 32 of the K User Manual.

tavmem commented 5 years ago

I will leave this issue open as an enhancement. Someone might attempt to implement the GUI in kona.

bakul commented 5 years ago

I haven't used the GUI in over 13 years!

I don't recall what the default fonts are for k3 but you can set env. var. KFONT and KLFONT to fonts that exist on your x-server. At least on FreeBSD this works (in linux emulation mode). One change I had to make was to replace "localhost" in the env. var DISPLAY to "127.0.0.1" -- otherwise it seemed to get resolved to an IPv6 address. Since I was using this over ssh, for me it was

export DISPLAY="127.0.0.1:10.0"

But not sure if is worth adding a GUI to kona. For one thing, user expectations these days are such that a barebones X11 window may not be good enough.