Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

how to hack on pugs in ghci? how to use perl6 regexen and grammars in haskell?

by tphyahoo (Vicar)
on Mar 15, 2009 at 18:48 UTC ( [id://750768]=perlquestion: print w/replies, xml ) Need Help??

tphyahoo has asked for the wisdom of the Perl Monks concerning the following question:

I asked this question long ago at can you use perl6 from haskell?

and am asking again now because pugs is now available with cabal install and I am wondering if this changes anything.

I don't even see the option for "make ghci" target anymore (as educated_foo suggested).

Specifically, I would like to be able to do

ghci Main.hs (in pugs distro) or perhaps ghci Pugs.hs and just poke around and see how pugs works.

Currently, this fails with

thartman@ubuntu:~/haskellInstalls/Pugs-6.2.13.14/src>ghci Main.hs

Pugs/Prim/Match.hs:12:7: Could not find module `Paths_Pugs': Use -v to see a list of the files searched for. Failed, modules loaded: none. Prelude> :q
when I attempt to run the ghci command in the unzipped Pugs-6 distro directory copied from where cabal installed it.

UPDATE: Checked out the svn head from http://www.perlfoundation.org/perl6/index.cgi?download_pugs

and this has a lot more files than the contents of the cabal tar, including an INSTALL file in the top dir that says there should be a make ghci target for hacking in ghci.

However,

thartman@ubuntu:~/haskellInstalls/pugs>make ghci make: *** No rule to make target `ghci'. Stop.

Also, crossposted this question to perl6-compiler mailing list. (google "Is there a reasonable way to access perl 6 regexen and grammars in haskell, via the pugs modules? (where's the make ghci target?)")

Replies are listed 'Best First'.
Re: how to hack on pugs in ghci? how to use perl6 regexen and grammars in haskell?
by grinder (Bishop) on Mar 15, 2009 at 20:36 UTC
    ...asking again now because pugs is now available

    I could be wrong about this, so feel free to correct me, but my understanding is that Pugs is a dead project. Already the Perl 6 spec has moved some considerable distance from what Pugs was targetting at the time (circa 2006-2007).

    If you are a black belt über Haskell programmer of the seventeenth dan, then you should be able to figure out what's going wrong anyway. If you want to poke around at a decent Perl 6 implementation, then you ought to be looking at Rakudo.

    • another intruder with the mooring in the heart of the Perl

      The thing is, haskell could really use =~ s/../../ Parsec is great and all, but sometimes you just want to do the easy thing, especially if you're coming from perl. Since pugs exists, I can't help this feeling that I'm tantalizingly close...
Re: how to hack on pugs in ghci?
by tphyahoo (Vicar) on Mar 15, 2009 at 19:12 UTC
    seems a solution is here: http://neilmitchell.blogspot.com/2008/02/adding-data-files-using-cabal.html
      This was a partial solution: it got me past the missing datafile problem. However, now I have another error:

      During interactive linking, GHCi couldn't find the following symbol: text__prelude_pm This may be due to you not asking GHCi to load extra object files, arc +hives or DLLs needed by your current session. Restart GHCi, specifyi +ng the missing library using the -L/path/to/object/dir and -lmissingl +ibname flags, or simply by naming the relevant files on the GHCi comm +and line. Alternatively, this link failure might indicate a bug in GH +Ci. If you suspect the latter, please send a bug report to: glasgow-h +askell-bugs@haskell.org
        dev.pugscode.org/browser will show activity in the pugs subversion tree- it's generally busy since that's where the specs and tests live. But drilling into the src/Pugs directory shows it's pretty quiet in there. Dead is too strong a word, quiescent is better...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://750768]
Approved by ELISHEVA
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-25 11:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found