Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

Homework #5 #14

Open
saucisson opened this issue Dec 1, 2017 · 6 comments
Open

Homework #5 #14

saucisson opened this issue Dec 1, 2017 · 6 comments

Comments

@saucisson
Copy link

Homework #5 has been released. Deadline is 13 december 2017 at 23:59.
Look at the course homepage for more information.

@sergentd
Copy link

sergentd commented Dec 6, 2017

I can't find the homework 5 directory. What is its name and where is it located ?
Thank you

@saucisson
Copy link
Author

Sorry, i have forgotten to push. Fixed.

@partizanos
Copy link

partizanos commented Dec 13, 2017

Hello,

I have an issue with my linux environment setup and I had to format everything.
After installing OS etc.. and the lesson related packages lua the busted atom etc with the bash script
I have an issue with the tests
in beginning busted could not locate fun

./src/adt/init.lua:1: module 'fun' not found:No LuaRocks module found for fun
	no field package.preload['fun']
	no file './src/fun.lua'


so i installed it
luarocks install fun
and after that the test files not only from the ctl folder all have the same mistake:
test file attempt to call a nil value (field 'frommap') I post the whole log in the end because its a bit long
which is a Fun module function

Any ideas?
possibly helpful info:
installed fun version : fun-scm-1.rockspec
lua version:
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio

I will need to use my 1 extra day if needed since time is tight.
Thank you in advance

PS the log

Error → src/adt/init_spec.lua @ 57
#adt can create an operation from a sort
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
	./src/adt/init.lua:76: in metamethod '__newindex'
	src/adt/init_spec.lua:59: in function <src/adt/init_spec.lua:57>


Error → src/adt/init_spec.lua @ 63
#adt can print an operation
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
	./src/adt/init.lua:76: in metamethod '__newindex'
	src/adt/init_spec.lua:66: in function <src/adt/init_spec.lua:63>


Error → src/adt/init_spec.lua @ 70
#adt can check if two operations are equal
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
	./src/adt/init.lua:76: in metamethod '__newindex'
	src/adt/init_spec.lua:74: in function <src/adt/init_spec.lua:70>


Error → src/adt/init_spec.lua @ 80
#adt can create a term from an operation
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
	./src/adt/init.lua:76: in metamethod '__newindex'
	src/adt/init_spec.lua:82: in function <src/adt/init_spec.lua:80>


Error → src/adt/init_spec.lua @ 88
#adt can print a term
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
	./src/adt/init.lua:76: in metamethod '__newindex'
	src/adt/init_spec.lua:90: in function <src/adt/init_spec.lua:88>


Error → src/adt/init_spec.lua @ 96
#adt can check if two terms are equal
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
	./src/adt/init.lua:76: in metamethod '__newindex'
	src/adt/init_spec.lua:98: in function <src/adt/init_spec.lua:96>


Error → src/adt/init_spec.lua @ 109
#adt can check if two terms equivalent
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
	./src/adt/init.lua:76: in metamethod '__newindex'
	src/adt/init_spec.lua:111: in function <src/adt/init_spec.lua:109>


Error → src/adt/init_spec.lua @ 145
#adt can get the equivalence mapping between two terms
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
	./src/adt/init.lua:76: in metamethod '__newindex'
	src/adt/init_spec.lua:147: in function <src/adt/init_spec.lua:145>


Error → src/adt/init_spec.lua @ 215
#adt can replace variables in terms
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
	./src/adt/init.lua:76: in metamethod '__newindex'
	src/adt/init_spec.lua:217: in function <src/adt/init_spec.lua:215>


Error → src/adt/init_spec.lua @ 224
#adt can create an rule from two terms
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:

@saucisson
Copy link
Author

You must not install fun using the command you typed, but instead using the following command, as stated in the README:

luarocks install rockspec/fun-scm-1.rockspec

@partizanos
Copy link

works, thanks for the quick feedback! what is the difference between the two (just curiosity)

@saucisson
Copy link
Author

I have changed a bit the fun module in order to know if {} represents an empty list or an empty map. Tried to put an issue in the original module, but with no answer :'(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants