From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119372 invoked by alias); 14 Sep 2017 00:28:43 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 118870 invoked by uid 89); 14 Sep 2017 00:28:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Sep 2017 00:28:40 +0000 Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1dsI1G-0008FJ-94; Thu, 14 Sep 2017 02:28:38 +0200 Received: from 70-36-239-177.dsl.dynamic.fusionbroadband.com ([70.36.239.177] helo=localhost.localdomain) by mailfront12.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1dsI0t-0004E9-VO; Thu, 14 Sep 2017 02:28:16 +0200 Subject: Re: putting symbols into Environment To: Sonny To , Kawa mailing list References: From: Per Bothner Message-ID: <7ebc09b0-2243-a1c0-4da2-d4f0fb73827e@bothner.com> Date: Thu, 14 Sep 2017 00:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00039.txt.bz2 On 09/13/2017 05:05 PM, Sonny To wrote: > I'm trying to use the TelnetRepl in an android Service but cannot > figure out how to put bindings into the environment > env.put(Symbol.makeUninterned("context", null), > applicationContext) > I can telnet to it but the "context" symbol is not available > > #|kawa:4|# context > /dev/stdin:4:1: unbound location: context That would be expected if you use Symbol.makeUninterned. An uninterned symbol is a unique object that you can *not* "lookup". For example (string->symbol "context") is the same as 'symbol - but (Symbol:makeUninterned "context") is a completely different object. Instead, try Symbol.valueOf("context"). > Do I have the wrong environment? if so how to get the correct environment? There might be other problems, but fix the above-mentioned problem first. -- --Per Bothner per@bothner.com http://per.bothner.com/