Parsec library sucks in Frege 3.24-7.100

45 views
Skip to first unread message

zhou...@163.com

unread,
Jan 24, 2018, 12:40:57 AM1/24/18
to Frege Programming Language
I want to port a toy interpreter to android, I try parsec library https://github.com/alexander-myltsev/parsec-frege using it's own sample code and the parsec stuck and never return,how can I debug this library in this situation?

zhou...@163.com

unread,
Jan 24, 2018, 1:29:20 AM1/24/18
to Frege Programming Language
When I switch to frege3.23.422, everything is OK. The following picture was my parsec frege3.24 build process while 3.23 build process does not have the last two warnings



在 2018年1月24日星期三 UTC+8下午1:40:57,zhou...@163.com写道:

zhou...@163.com

unread,
Jan 24, 2018, 1:48:05 AM1/24/18
to Frege Programming Language
I use jvisualvm tool and found the flowing stack trace



在 2018年1月24日星期三 UTC+8下午1:40:57,zhou...@163.com写道:
I want to port a toy interpreter to android, I try parsec library https://github.com/alexander-myltsev/parsec-frege using it's own sample code and the parsec stuck and never return,how can I debug this library in this situation?

zhou...@163.com

unread,
Jan 24, 2018, 1:57:29 AM1/24/18
to Frege Programming Language
I really suspect GenParser monad's pure function cause this issue



在 2018年1月24日星期三 UTC+8下午1:40:57,zhou...@163.com写道:
I want to port a toy interpreter to android, I try parsec library https://github.com/alexander-myltsev/parsec-frege using it's own sample code and the parsec stuck and never return,how can I debug this library in this situation?

Message has been deleted

zhou...@163.com

unread,
Jan 24, 2018, 2:08:10 AM1/24/18
to Frege Programming Language
In order to get parsec compiled by frege 3.24, I change the GenParser monad's return x method to pure x, I don't know if this cause this issue



在 2018年1月24日星期三 UTC+8下午1:40:57,zhou...@163.com写道:
I want to port a toy interpreter to android, I try parsec library https://github.com/alexander-myltsev/parsec-frege using it's own sample code and the parsec stuck and never return,how can I debug this library in this situation?

zhou...@163.com

unread,
Jan 25, 2018, 12:54:09 AM1/25/18
to Frege Programming Language
At last I give up and learn to use NanoParsec


在 2018年1月24日星期三 UTC+8下午1:40:57,zhou...@163.com写道:
I want to port a toy interpreter to android, I try parsec library https://github.com/alexander-myltsev/parsec-frege using it's own sample code and the parsec stuck and never return,how can I debug this library in this situation?

Ingo W.

unread,
Jan 27, 2018, 12:30:13 PM1/27/18
to Frege Programming Language
Yes, it should be quite similar.
It is very difficult to interpret that stack trace from a distance, so I can't comment here.

zhou...@163.com

unread,
Jan 27, 2018, 11:25:17 PM1/27/18
to Frege Programming Language
Thank you inventing Frege, absolutely life saver when I program BLE smart card reader on Android. I feel great confidence when I deal with dozen of callback per device and still get the things right, never had a chance to block the UI thread, never leak a resource. Thinking in asyn is so nature with Frege support. not just First class monad, monad transformer, Record , Continuation, STM, Parsec, REPL made me a better programmer, but the group of people devote the whole life to guarantee the new more abstract idea is keeping coming out

Ingo W.

unread,
Jan 28, 2018, 4:58:12 AM1/28/18
to Frege Programming Language
Thank you for your nice words, I shall be happy if Frege helps you with your work.
Reply all
Reply to author
Forward
0 new messages