public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Panicz Maciej Godek <godek.maciek@gmail.com>
To: Per Bothner <per@bothner.com>
Cc: kawa@sourceware.org
Subject: Re: Building for Android
Date: Sat, 22 Oct 2022 14:08:40 +0200	[thread overview]
Message-ID: <CAMFYt2b5Yw10wfzm6xWbwFni_u0HqpcnSFuCAgSFDLZ=XCd47Q@mail.gmail.com> (raw)
In-Reply-To: <CAMFYt2ZycvzvhbFyh6M6Gy6Svrzdiu5CSL_0Kc+qskvUy5Nkmw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5481 bytes --]

It perhaps might have something to do with the fact, that I override the
"cons" operator with my own one, which uses eq? as equals, and Java's
default hash functions for objects:


https://github.com/panicz/grasp-android/blob/master/stages/retreat/GRASP/src/primitive.scm#L151

sob., 22 paź 2022, 11:31 użytkownik Panicz Maciej Godek <
godek.maciek@gmail.com> napisał:

> This is weird.
> Without the patch, the only complaint concerns the identifiers - and if I
> rename them to legal Java identifiers, everything works fine.
>
> However, when I apply the patch and try to run the editor, I get the
> following:
>
> java.lang.RuntimeException: wrong number of indexes 0 to 1-rank array
>                      at
> gnu.lists.AbstractSequence.badRank(AbstractSequence.java:55)
>          at gnu.lists.AbstractSequence.checkRank(AbstractSequence.java:51)
>                      at
> gnu.lists.AbstractSequence.effectiveIndex(AbstractSequence.java:84)
>           at gnu.lists.AbstractSequence.getInt(AbstractSequence.java:173)
>                        at cons.hashCode(primitive.scm:156)
>                                    at
> java.base/java.util.WeakHashMap.hash(WeakHashMap.java:303)
>          at java.base/java.util.WeakHashMap.getEntry(WeakHashMap.java:432)
>                      at
> java.base/java.util.WeakHashMap.containsKey(WeakHashMap.java:423)
>           at hash$Mntable.hashRef$Pl$V(hash-table.scm:21)
>                        at hash$Mntable.hashRef$Pl$check(hash-table.scm:20)
>                                    at
> gnu.mapping.CallContext.runUntilValue(CallContext.java:656)
>           at gnu.mapping.Procedure.apply3(Procedure.java:167)
>                        at space.getter$2(space.scm:504)
>                                     at space.getter$2$check(space.scm:504)
>                                                 at
> gnu.mapping.CallContext.runUntilValue(CallContext.java:656)
>           at gnu.mapping.Procedure.apply1(Procedure.java:154)
>                        at
> gnu.kawa.functions.ApplyToArgs.apply2(ApplyToArgs.java:52)
>          at parse$frame1.lambda5addElement$Ex(parse.scm:183)
>                      at parse.readList(parse.scm:275)
>                                   at parse.readList(parse.scm)
>                                               at
> parse.readList(parse.scm:223)
>           at parse.readList(parse.scm)
>                       at parse.readList$check(parse.scm:165)
>                                   at
> gnu.mapping.CallContext.runUntilValue(CallContext.java:656)
>           at gnu.mapping.Procedure.apply0(Procedure.java:148)
>                        at parse.parseDocument(parse.scm:291)
>                                    at parse.parseDocument(parse.scm:289)
>                                                at
> parse.parseDocument$check(parse.scm:288)
>          at
> gnu.mapping.Procedure.applyToConsumerDefault(Procedure.java:75)
>           at
> gnu.kawa.functions.ApplyToArgs.applyToConsumerA2A(ApplyToArgs.java:132)
>           at gnu.mapping.CallContext.runUntilDone(CallContext.java:586)
>                        at
> gnu.mapping.CallContext.runUntilValue(CallContext.java:669)
>           at gnu.mapping.Procedure.apply1(Procedure.java:154)
>                        at conversions$frame0.lambda2(conversions.scm:14)
>                                    at
> conversions$frame0.lambda2$check(conversions.scm:12)
>          at gnu.mapping.CallContext.runUntilValue(CallContext.java:656)
>                       at gnu.mapping.Procedure.apply1(Procedure.java:154)
>                                    at
> kawa.lib.ports.callWithInputString(ports.scm:154)
>           at conversions.withInputFromString(conversions.scm:12)
>                       at
> conversions.withInputFromString$check(conversions.scm:10)
>           at gnu.mapping.CallContext.runUntilValue(CallContext.java:656)
>                       at gnu.mapping.Procedure.apply2(Procedure.java:160)
>                                    at
> atInteractiveLevel$Mn3.run(primitive-terminal-client.scm:48)
>          at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:290)
>                      at kawa.Shell.run(Shell.java:300)
>                                  at kawa.Shell.runFile(Shell.java:562)
>                                              at
> kawa.Shell.runFileOrClass(Shell.java:485)
>           at kawa.repl.processArgs(repl.java:298)
>                        at kawa.repl.main(repl.java:830)
>
> The exception clearly comes from my code. It's a bit convoluted to explain
> what's going in there, but if you'd like to take a glimpse, you can find it
> here:
>
>
> https://github.com/panicz/grasp-android/tree/master/stages/retreat/GRASP/src
>
> Android isn't required to run any of these. You can either try running
> ./grasp-terminal (in vt100-compatible terminal with unicode)
> ./grasp-desktop (with AWT)
> or
> ./primitive-terminal-client (in terminal)
>
>
> sob., 22 paź 2022, 08:26 użytkownik Per Bothner <per@bothner.com> napisał:
>
>>
>>
>> On 10/21/22 12:45, Panicz Maciej Godek wrote:
>> > During its compilation, Kawa issues the following warning:
>> >
>> > subclass-refering-to-mangled-superclass-property.scm:6:4: warning - no
>> declaration seen for mangled-name
>>
>> The attached patch seems to fix it.
>>
>> --
>>         --Per Bothner
>> per@bothner.com   http://per.bothner.com/
>
>

  reply	other threads:[~2022-10-22 12:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 14:57 Panicz Maciej Godek
2022-10-18 15:25 ` Per Bothner
2022-10-18 18:25   ` Panicz Maciej Godek
2022-10-19  9:15     ` Panicz Maciej Godek
2022-10-19 16:05       ` Per Bothner
2022-10-19 17:09         ` Panicz Maciej Godek
2022-10-20  5:35           ` Panicz Maciej Godek
2022-10-20 20:48             ` Panicz Maciej Godek
2022-10-21  5:14               ` Panicz Maciej Godek
2022-10-21 13:59                 ` Panicz Maciej Godek
2022-10-21 18:11                   ` Per Bothner
2022-10-21 19:19                     ` Panicz Maciej Godek
2022-10-21 19:31                       ` Per Bothner
2022-10-21 19:45                         ` Panicz Maciej Godek
2022-10-21 20:13                           ` Panicz Maciej Godek
2022-10-22  6:26                           ` Per Bothner
2022-10-22  9:31                             ` Panicz Maciej Godek
2022-10-22 12:08                               ` Panicz Maciej Godek [this message]
2022-10-24  7:22                                 ` Panicz Maciej Godek
2022-10-24 10:48                                   ` Per Bothner
2022-10-24 12:01                                     ` Panicz Maciej Godek
2022-10-21 18:00           ` Per Bothner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMFYt2b5Yw10wfzm6xWbwFni_u0HqpcnSFuCAgSFDLZ=XCd47Q@mail.gmail.com' \
    --to=godek.maciek@gmail.com \
    --cc=kawa@sourceware.org \
    --cc=per@bothner.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).