Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grafito and its samples need updates #48

Open
hamidb80 opened this issue May 27, 2024 · 4 comments
Open

Grafito and its samples need updates #48

hamidb80 opened this issue May 27, 2024 · 4 comments

Comments

@hamidb80
Copy link

hamidb80 commented May 27, 2024

Hey! I've just ran the code and seems like it does not work

══╡ Type Error ╞═════════════════════════════════════════

  Erroneous type found

  Cannot call function:
      function .import: ◄
  
  Wrong attribute value: 
      true :logical
  
  Expected: 
      :block

  ┃ File: grafito.art
  ┃ Line: 46
  ┃ 
  ┃   44 ║      dbpath :string :null
  ┃   45 ║      body :block
  ┃   46 ║► ][
  ┃   47 ║      ;; description: « initiate a new graph environment with given name and body
  ┃   48 ║      ;; options: [

@hamidb80
Copy link
Author

when I make it inline like this:

graph: function [dbpath :string :null body :block][

it nags different line:


══╡ Type Error ╞═════════════════════════════════════════════════════════════════════════ <script> ══

  Erroneous type found

  Cannot call function:
      function .import: ◄
  
  Wrong attribute value: 
      true :logical
  
  Expected: 
      :block

  ┃ File: grafito.art
  ┃ Line: 1326
  ┃ 
  ┃ 1324 ║      ; and that was it :)
  ┃ 1325 ║      return result
  ┃ 1326 ║► ]
  ┃ 1327 ║  
  ┃ 1328 ║  ;--------------------------

@hamidb80 hamidb80 changed the title error when running example4.art error when running sample4.art May 27, 2024
@RickBarretto
Copy link
Collaborator

RickBarretto commented May 27, 2024

This is because most of our examples are currently deprecated.
Basically on sample4.art, this uses do.import, and we don't provide this kind of importing anymore.
Now, the right way of doing this is by using the function import.

Well, I'll rename your title to "Samples need to be updated.".

@RickBarretto RickBarretto changed the title error when running sample4.art Samples needs to be updated May 27, 2024
@hamidb80
Copy link
Author

I couldn't find import example in https://arturo-lang.io/documentation/language/ 😥

@RickBarretto
Copy link
Collaborator

@hamidb80 this is because import is a new feature, and since we didn't create the new release, the documentation is not fully updated.

If you want to check the import, have a look on:

https://arturo-lang.io/master/documentation/library/core/import/

We've been using this for some time, and this have been very stable to us...

I'll put this update on my TODO list, and fix this very soon.

@RickBarretto RickBarretto changed the title Samples needs to be updated Grafito and its samples need updates May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants