From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dragonfly.birch.relay.mailchannels.net (dragonfly.birch.relay.mailchannels.net [23.83.209.51]) by sourceware.org (Postfix) with ESMTPS id D5D24387084B for ; Fri, 3 Jul 2020 21:53:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D5D24387084B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=eip10.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=chaw@eip10.org X-Sender-Id: dreamhost|x-authsender|chaw@eip10.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 3E88992139D; Fri, 3 Jul 2020 21:53:00 +0000 (UTC) Received: from pdx1-sub0-mail-a91.g.dreamhost.com (100-96-9-10.trex.outbound.svc.cluster.local [100.96.9.10]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 7868B9217C6; Fri, 3 Jul 2020 21:52:59 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|chaw@eip10.org Received: from pdx1-sub0-mail-a91.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.8); Fri, 03 Jul 2020 21:53:00 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|chaw@eip10.org X-MailChannels-Auth-Id: dreamhost X-Wide-Eyed-Army: 593dc92e42feabe4_1593813179956_919896695 X-MC-Loop-Signature: 1593813179956:746991894 X-MC-Ingress-Time: 1593813179956 Received: from pdx1-sub0-mail-a91.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a91.g.dreamhost.com (Postfix) with ESMTP id 3187DB32FE; Fri, 3 Jul 2020 14:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=eip10.org; h=to:cc:subject :from:reply-to:in-reply-to:mime-version:content-type:content-id :date:message-id; s=eip10.org; bh=RMDylGlxalWoCryPNRED1LbQ8KU=; b= NDYiMFM1ctOIA0zWP6y6WRfxhWYNqQIRkKrVWVWn8U16O0OsXbY+5PEBt+3XMRxm LZNqNAYMFADwekp0O8q2UDMX2DyYWlNqgaxe9TDXH4sDq6zS5Cj6K1/+CvZk+9UY R8pbeJy+4xcH+xndh8pwmCp9Ftore+6U7td1WMrJZyE= Received: from vpaur.eip10.org (cpe-74-75-233-46.maine.res.rr.com [74.75.233.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: chaw@eip10.org) by pdx1-sub0-mail-a91.g.dreamhost.com (Postfix) with ESMTPSA id 9EE85B4EBB; Fri, 3 Jul 2020 14:52:58 -0700 (PDT) Received: from chaw by vpaur.eip10.org with local (Exim 4.89) (envelope-from ) id 1jrTc9-0008C9-Cx; Fri, 03 Jul 2020 17:52:57 -0400 To: Duncan Mak cc: kawa mailing list Subject: Re: Working with string keys in a java.util.Map X-DH-BACKEND: pdx1-sub0-mail-a91 From: "Sudarshan S Chawathe" Reply-To: "Sudarshan S Chawathe" In-reply-to: Your message of "Fri, 03 Jul 2020 17:46:19 -0400." X-Mailer: MH-E 8.5; nmh 1.6; GNU Emacs 24.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31503.1593813177.1@localhost> Date: Fri, 03 Jul 2020 17:52:57 -0400 Message-ID: <31504.1593813177@localhost> X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrtdejgddtfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefvuffhrhgjofggtgffkfesthdtredtredtvdenucfhrhhomhepfdfuuhgurghrshhhrghnucfuucevhhgrfigrthhhvgdfuceotghhrgifsegvihhpuddtrdhorhhgqeenucggtffrrghtthgvrhhnpeffgfejtefgheelhfeltdfggffhledvueeutdetfeehgeeukeeuledvtdetjeevleenucffohhmrghinhepuhhtihhlrdhmrghppdhgnhhurdhorhhgnecukfhppeejgedrjeehrddvfeefrdegieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehvphgruhhrrdgvihhpuddtrdhorhhgpdhinhgvthepjeegrdejhedrvdeffedrgeeipdhrvghtuhhrnhdqphgrthhhpedfufhuuggrrhhshhgrnhcuufcuvehhrgifrghthhgvfdcuoegthhgrfiesvghiphdutddrohhrgheqpdhmrghilhhfrhhomheptghhrgifsegvihhpuddtrdhorhhgpdhnrhgtphhtthhopehkrgifrgesshhouhhrtggvfigrrhgvrdhorhhg X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: kawa@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Kawa mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 21:53:03 -0000 I've had to get Java "String"s from Kawa strings often for similar reasons when using other JVM libraries, etc., and I have just used '(String "kawa string)'; it seems to work well, although it does introduce clutter. Regards, -chaw > Date: Fri, 3 Jul 2020 17:46:19 -0400 > Subject: Working with string keys in a java.util.Map > To: kawa mailing list > From: Duncan Mak via Kawa > > Hello all, > > I've been playing around with the java.nio APIs. > > Using Files:readAttributes, you can get a Map of attributes. > > #|kawa:80|# attrs > {owner=duncan, lastAccessTime=2020-07-03T00:12:53.682826Z, > lastModifiedTime=2019-04-22T18:53:02.529968Z, gid=20, > creationTime=2019-04-22T18:53:02Z, isRegularFile=true, nlink=1, > fileKey=(dev=1000007,ino=12896309012), ino=12896309012, mode=33261, > uid=501, size=20799, dev=16777223, isSymbolicLink=false, > permissions=[GROUP_READ, OWNER_READ, OTHERS_READ, OTHERS_EXECUTE, > OWNER_WRITE, GROUP_EXECUTE, OWNER_EXECUTE], rdev=0, > ctime=2019-04-22T18:53:02.533688Z, isOther=false, isDirectory=false, > group=staff} > > #|kawa:81|# (attrs:containsKey "owner") > #f > #|kawa:82|# (attrs:get "owner") > #!null > #|kawa:83|# (attrs:get "gid") > #!null > > I think this is failing because the literal string that I typed in is a > gnu.lists.IString (https://www.gnu.org/software/kawa/Strings.html) and I > don't see a function to force any one of Kawa's many string representations > into a java.lang.String. > > -- > Duncan. > >