VirtualWorldsRepos / lslforge

Automatically exported from code.google.com/p/lslforge
0 stars 0 forks source link

llJson* Not implemented #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use llJsonSetValue() or other.

What is the expected output? What do you see instead?
Expect JSON to be returned.
Get: unimplemented predefined function called: llJsonSetValue("", 
["2342342342"], "")

What version of the product are you using? On what operating system?
0.1.6 w/ x64 linux platform

Please provide any additional information below.
Only expected this to work since it was in the 0.1.6 release notes.

Original issue reported on code.google.com by whitefir...@gmail.com on 25 Feb 2014 at 10:04

GoogleCodeExporter commented 9 years ago
Are you sure ? All llJson...() functions work well in my config
Eclipse Kepler SR 2, LSLforge 0.16

Original comment by kool.mek...@gmail.com on 18 Mar 2014 at 5:17

GoogleCodeExporter commented 9 years ago
I can not cut and paste from the Sim Watcher window, which may be a seperate 
problem, so please forgive the typos:

00:36:02.589 00000000-...:LV_Gen_Dialog.lslp unimplemented predefined function 
called: llJsonSetValue("", ["st"], "1000002162")

This repeats for every llJson* function called in the script.

In Installed Software I see:
LSLForge 0.1.6
lslforge_part_linux_x86 0.1.6
lslforge_part_linux_x86_64 0.1.6

Is it possibly a prereq I need that it didn't install? Some backend json 
handling lib that it's using?

Original comment by whitefir...@gmail.com on 19 Mar 2014 at 10:52

GoogleCodeExporter commented 9 years ago
You know, I plan to open source the LSL I am testing when i am done with it 
anyway, so here is the work in progress that is failing for me.

Original comment by whitefir...@gmail.com on 20 Mar 2014 at 12:23

Attachments:

GoogleCodeExporter commented 9 years ago
  It takes more than 2 weeks implementing new JSON functions, very good practice for me to write Haskell code.  3 files changed and needs linking Text.JSON library which can be obtained from http://hackage.haskell.org/package/json-0.7

  1. Install Text.JSON.
  2. Apply patches attached here
     InternalLLFuncs.patch_20140417 covers Issue 18,
     if you already have patch for it,
     patch this to original InternalLLFuncs.hs.
  3. Build, see 'Building the Native Executable'
     on http://lslplus.sourceforge.net/installation.html
     but take care you need Glasgow Haskell Compiler (GHC) version 6.10.4,
     6.11 or later won't work with LSLForge.

  Try it out and let me know you find any bugs.
  Have fun!

Original comment by pells...@gmail.com on 17 Apr 2014 at 5:59

Attachments:

GoogleCodeExporter commented 9 years ago
to me it looks like you have to use json-0.4.4, as higher versions give me 
dependency conflicts:

Resolving dependencies...
cabal: dependencies conflict: base-4.1.0.0 requires syb ==0.1.0.1 however
syb-0.1.0.1 was excluded because json-0.5 requires syb >=0.3.3

btw. where did you get the platform version of Haskell? - found that one on the 
official page, but ...
http://www.haskell.org/platform/prior.html

2009

2009.2.0.2 - July 2009 ⟹ Mac OS X, 32bit - Windows - Source

^^leads to nowhere, had to manually download GHC 6.10.4 and install needed 
cabal sources one by one (before building cabal-install-0.6.0)
http://www.haskell.org/ghc/download_ghc_6_10_4

Original comment by sl-z...@postman.homeip.net on 25 Apr 2014 at 2:16

GoogleCodeExporter commented 9 years ago
cannot get my patched version compiled:

[37 of 57] Compiling Language.Lsl.Internal.InternalLLFuncs ( 
src\Language\Lsl\Internal\InternalLLFuncs.hs, dist\build\LS
LForge\LSLForge-tmp\Language\Lsl\Internal\InternalLLFuncs.o )
[38 of 57] Compiling Language.Lsl.UnitTestEnv ( 
src\Language\Lsl\UnitTestEnv.hs, dist\build\LSLForge\LSLForge-tmp\Langua
ge\Lsl\UnitTestEnv.o )

src\Language\Lsl\UnitTestEnv.hs:144:17:
    Overlapping instances for Monad (Either [Char])
      arising from a use of `liftM2'
                   at src\Language\Lsl\UnitTestEnv.hs:144:17-52
    Matching instances:
      instance (mtl-1.1.0.2:Control.Monad.Error.Class.Error e) =>
               Monad (Either e)
        -- Defined in mtl-1.1.0.2:Control.Monad.Error
      instance (Control.Monad.Trans.Error.Error e) => Monad (Either e)
        -- Defined in Control.Monad.Trans.Error
    In the second argument of `($)', namely
        `liftM2 (,) script (Right [funcName])'
    In the expression: return $ liftM2 (,) script (Right [funcName])
    In the expression:
        do script <- getValidScript scriptName
             return $ liftM2 (,) script (Right [funcName])

those are the libs I use:[28 of 57] Compiling Language.Lsl.Syntax ( 
src\Language\Lsl\Syntax.hs, dist\build\LSLForge\LSLForge-tmp\Language\Lsl\Syn
tax.o )
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Loading package bytestring-0.9.1.4 ... linking ... done.
Loading package utf8-string-0.3.7 ... linking ... done.
Loading package syb ... linking ... done.
Loading package array-0.2.0.0 ... linking ... done.
Loading package containers-0.2.0.1 ... linking ... done.
Loading package binary-0.4.5 ... linking ... done.
Loading package pureMD5-0.2.4 ... linking ... done.
Loading package parsec-2.1.0.1 ... linking ... done.
Loading package network-2.2.1.2 ... linking ... done.
Loading package mtl-1.1.0.2 ... linking ... done.
Loading package pretty-1.0.1.0 ... linking ... done.
Loading package json-0.4.4 ... linking ... done.
Loading package transformers-0.1.4.0 ... linking ... done.
Loading package monads-fd-0.0.0.1 ... linking ... done.
Loading package packedstring-0.1.0.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package fclabels-0.4.2.1 ... linking ... done.
Loading package filepath-1.1.0.2 ... linking ... done.
Loading package Win32-2.2.0.0 ... linking ... done.
Loading package old-locale-1.0.0.1 ... linking ... done.
Loading package old-time-1.0.0.2 ... linking ... done.
Loading package directory-1.0.0.3 ... linking ... done.
Loading package process-1.0.1.1 ... linking ... done.
Loading package random-1.0.0.1 ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package polyparse-1.2 ... linking ... done.
Loading package HaXml-1.19.7 ... linking ... done.

src\Language\Lsl\Syntax.hs:65:38:
    Warning: Imported from `Data.List' but not used: `foldl''

Original comment by sl-z...@postman.homeip.net on 25 Apr 2014 at 3:00

GoogleCodeExporter commented 9 years ago
  Where did I get GHC?  Hmmm, that was so long ago , I don't remember.  I think it came from Haskell download site.  I think I didn't install it from source code, but I'm not sure...
  I don't use cabal install because I read some blog articles saying it caused dependency problems. They call it 'dependency hell'.  Usually I install packages by 'runhaskell Setup.hs' or 'make'.  I could install json-0.7 using this way.
  It means I did install all packages manually which LSLForge depends on.

  List of packages I installed manually:
    HaXml-1.19.7
    binary-0.5.0.2
    cereal-0.4.0.1
    fclabels-0.4.2
    json-0.7
    monads-fd-0.0.0.1
    polyparse-1.2
    pureMD5-0.2.4
    text-0.5
    transformers-0.1.4.0
    utf8-string-0.3.7

  Depending package version is written in LslForge.cabal.  I don't remember why I installed cereal and text but they on my loading package list:

Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Loading package bytestring-0.9.1.4 ... linking ... done.
Loading package utf8-string-0.3.7 ... linking ... done.
Loading package syb ... linking ... done.
Loading package array-0.2.0.0 ... linking ... done.
Loading package containers-0.2.0.1 ... linking ... done.
Loading package binary-0.5.0.2 ... linking ... done.
Loading package cereal-0.4.0.1 ... linking ... done.
Loading package pureMD5-1.1.0.0 ... linking ... done.
Loading package parsec-2.1.0.1 ... linking ... done.
Loading package network-2.2.1.2 ... linking ... done.
Loading package mtl-1.1.0.2 ... linking ... done.
Loading package pretty-1.0.1.0 ... linking ... done.
Loading package text-0.5 ... linking ... done.
Loading package json-0.7 ... linking ... done.
Loading package transformers-0.1.4.0 ... linking ... done.
Loading package monads-fd-0.0.0.1 ... linking ... done.
Loading package packedstring-0.1.0.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package fclabels-0.4.2 ... linking ... done.
Loading package filepath-1.1.0.2 ... linking ... done.
Loading package old-locale-1.0.0.1 ... linking ... done.
Loading package old-time-1.0.0.2 ... linking ... done.
Loading package unix-2.3.2.0 ... linking ... done.
Loading package directory-1.0.0.3 ... linking ... done.
Loading package process-1.0.1.1 ... linking ... done.
Loading package random-1.0.0.1 ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package polyparse-1.2 ... linking ... done.
Loading package HaXml-1.19.7 ... linking ... done.

Original comment by pells...@gmail.com on 26 Apr 2014 at 5:39

GoogleCodeExporter commented 9 years ago
cereal is needed for your version of pureMD5 (pureMD5-1.1.0.0, instead of 
pureMD5-0.2.4)
text is needed for json-0.7

and here is my full lib list (C:\ghc\ghc-6.10.4\bin\ghc-pkg list):
C:/ghc/ghc-6.10.4\package.conf:
    Cabal-1.6.0.3, HTTP-3001.1.5, HUnit-1.2.0.3, HaXml-1.19.7,
    QuickCheck-1.2.0.0, Win32-2.2.0.0, array-0.2.0.0, base-3.0.3.1,
    base-4.1.0.0, binary-0.4.5, binary-0.5.0.2, bytestring-0.9.1.4,
    cereal-0.4.0.1, containers-0.2.0.1, directory-1.0.0.3,
    (dph-base-0.3), (dph-par-0.3), (dph-prim-interface-0.3),
    (dph-prim-par-0.3), (dph-prim-seq-0.3), (dph-seq-0.3),
    extensible-exceptions-0.1.1.0, fclabels-0.4.2.1, filepath-1.1.0.2,
    (ghc-6.10.4), ghc-prim-0.1.0.0, haddock-2.4.2, haskell-src-1.0.1.3,
    haskell98-1.0.1.0, hpc-0.5.0.3, html-1.0.1.2, integer-0.1.0.1,
    json-0.7, monads-fd-0.0.0.1, mtl-1.1.0.2, network-2.2.1.2,
    old-locale-1.0.0.1, old-time-1.0.0.2, packedstring-0.1.0.1,
    parallel-1.1.0.1, parsec-2.1.0.1, polyparse-1.2, pretty-1.0.1.0,
    process-1.0.1.1, pureMD5-0.2.4, pureMD5-1.1.0.0, random-1.0.0.1,
    regex-base-0.72.0.2, regex-compat-0.71.0.1, regex-posix-0.72.0.3,
    rts-1.0, stm-2.1.1.2, syb-0.1.0.1, template-haskell-2.3.0.1,
    text-0.5, time-1.1.4, transformers-0.1.4.0, utf8-string-0.3.7,
    xhtml-3000.2.0.1, zlib-0.4.0.4

after adding text-0.5 via cabal and manually replacing json (now using -0.7) I 
could finally compile LSLForge
BUT: I did not test the new patches... currently not using the LSL json stuff

Original comment by sl-z...@postman.homeip.net on 26 Apr 2014 at 10:37