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

Problem with examples #6133

Closed
ManPython opened this issue Aug 14, 2020 · 25 comments
Closed

Problem with examples #6133

ManPython opened this issue Aug 14, 2020 · 25 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@ManPython
Copy link

ManPython commented Aug 14, 2020

  1. terminal_control.exe
v-0.1.29\v\examples\terminal_control.exe"
←[2J←[5;5H←[1m←[33m*←[39m←[22m←[5;6H←[1m←[33m*←[39m←[22m←[5;7H←[1m←[33m*←[39m←[22m←[5;8H←[1m←[33m*←[39m←[22m←[5;9H←[1m←[33m*←[39m←[22m←[5;5H←[1m←[33m*←[39m←[22m←[6;5H←[1m←[33m*←[39m←[22m←[7;5H←[1m←[33m*←[39m←[22m←[8;5H←[1m←[33m*←[39m←[22m←[9;5H←[1m←[33m*←[39m←[22m←[10;5H←[1m←[33m*←[39m←[22m←[10;6H←[1m←[33m*←[39m←[22m←[10;7H←[1m←[33m*←[39m←[22m←[10;8H←[1m←[33m*←[39m←[22m←[10;9H←[1m←[33m*←[39m←[22m←[5;9H←[1m←[33m*←[39m←[22m←[6;9H←[1m←[33m*←[39m←[22m←[7;9H←[1m←[33m*←[39m←[22m←[8;9H←[1m←[33m*←[39m←[22m←[9;9H←[1m←[33m*←[39m←[22m←[5B
←[1m←[31mIt Worked!←[39m←[22m

Is this normall?

@ManPython ManPython added the Bug This tag is applied to issues which reports bugs. label Aug 14, 2020
@ManPython ManPython changed the title Problem with tetris.v (ld.exe: cannot find -lfreetype) Problem with terminal_control.v Aug 14, 2020
@ManPython ManPython changed the title Problem with terminal_control.v Problem with examples Aug 14, 2020
@ManPython
Copy link
Author

  1. rune.v
v-0.1.29\v\examples>v run rune.v
rune.v:3:19: error: unknown function: rune
    1 | fn main() {
    2 |     // GRINNING FACE?? => f0 09 98 80
    3 |     grinning_face := rune(0xf09f9880)
      |                      ~~~~~~~~~~~~~~~~
    4 |     println(grinning_face)
    5 |
rune.v:7:19: error: unknown function: rune
    5 |
    6 |     // COMMERCIAL AT@ => 0x40
    7 |     commercial_at := rune(0x40000000)
      |                      ~~~~~~~~~~~~~~~~
    8 |     println(commercial_at)
    9 | }

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython
Copy link
Author

v-0.1.29\v\examples>v run path_tracing.v
Unhandled Exception 0xC00000FD
print_backtrace_skipping_top_frames is not implemented
  • crashed

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython
Copy link
Author

v-0.1.29\v\examples\sokol>v run fonts.v
loaded font: 114624

When scaling then strange issues in bacground

v_fonts

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython

This comment has been minimized.

@ManPython
Copy link
Author

v-0.1.29\v\examples\game_of_life>v run life_gg.v
life_gg.v:14:2: error: undefined ident: `glfw`
   12 |
   13 | fn new_graphics() &gg.Context {
   14 |     glfw.init_glfw()
      |     ~~~~
   15 |     return gg.new_context(gg.Cfg{
   16 |         width: screen_width
life_gg.v:15:27: error: unknown struct: gg.Cfg
   13 | fn new_graphics() &gg.Context {
   14 |     glfw.init_glfw()
   15 |     return gg.new_context(gg.Cfg{
      |                              ~~~~
   16 |         width: screen_width
   17 |         height: screen_height
life_gg.v:32:5: error: unknown function: gg.clear
   30 | [live]
   31 | fn print_automaton(a &automaton.Automaton){
   32 |     gg.clear(gx.white)
      |        ~~~~~~~~~~~~~~~
   33 |     square_size := 18
   34 |     for y := 1; y<a.field.maxy; y++ {
life_gg.v:48:22: error: unknown method: `C.sapp_desc.should_close`
   46 |     mut a := automaton.gun()
   47 |     for {
   48 |         if graphics.window.should_close() { graphics.window.destroy() break }
      |                            ~~~~~~~~~~~~~~~
   49 |         gg.post_empty_event() // needed so the animation does not stop
   50 |         ///////////////////////////////////////////////
life_gg.v:49:6: error: unknown function: gg.post_empty_event
   47 |     for {
   48 |         if graphics.window.should_close() { graphics.window.destroy() break }
   49 |         gg.post_empty_event() // needed so the animation does not stop
      |            ~~~~~~~~~~~~~~~~~~
   50 |         ///////////////////////////////////////////////
   51 |         a.update()
life_gg.v:53:12: error: unknown method: `gg.Context.render`
   51 |         a.update()
   52 |         print_automaton(a)
   53 |         graphics.render()
      |                  ~~~~~~~~
   54 |     }
   55 | }

@ntrel
Copy link
Contributor

ntrel commented Aug 15, 2020

Is this normall?

Probably, you need a Bourne shell for that. Try MSYS if you're interested.

@aqilc
Copy link
Contributor

aqilc commented Aug 17, 2020

I'm on Windows 2004 and none of the GUI based examples work at all, while less than half of the command line based ones barely hold themselves together. Problems like this in natively coded examples is likely to cause people(like myself) to view the language or the compiler as buggy and unstable, while disproving your own statements as the language being "stable", and "cross-platform". However, I love the work you guys have put into this and am sure you will fix these someday :D

@medvednikov
Copy link
Member

The problem's only on Windows, all of these will be fixed of course.

Graphical applications should all work now.

@JalonSolov
Copy link
Contributor

With V 0.1.29 c599a4c on Windows 10 2004:

  1. Works.
  2. Runes aren't implemented, yet.
  3. Works, no warnings.
  4. Works, no warnings.
  5. path_tracing.v needs updated to the latest changes in V. Shows a lot of warnings, now.
  6. Same as 2.
  7. Works, with one warning (due to recent change in V).
  8. This was with v run log.v... and I still get the same output. Is it supposed to crash?
  9. Works, with one warning (due to recent change in V).
  10. Works, with one warning (due to recent change in V).
  11. Works, with one warning (due to recent change in V).
  12. I got a different error.
  13. Works, with one warning (due to recent change in V).
  14. Works.
  15. Works.
  16. Several errors, but this was for older version of V. New net.http code is in a PR.
  17. Definitely needs updated.
  18. I get the same error.
  19. There is no such file in the examples/gg directory now. Probably because the last vestiges of freetype have been removed.
  20. There is no such file in the examples/gg directory now.
  21. Works.

So, with the latest V, there are some warnings to clean up due to recent V changes, a couple of examples need to be updated (they were just plain written for older versions of V), a few things to update, and one duplication for a feature that isn't implemented, yet. Should probably remove that example until it does.

Not as bad as it looked from the list of things above.

@JalonSolov
Copy link
Contributor

As of V 0.1.29 7727aad (commit pushed this morning):

2 - Runes aren't implemented, yet.
5 - path_tracing.v needs updated to the latest changes in V. Shows a lot of warnings, now.
6 - DUPLICATE - Same as 2.
8 - This was with v run log.v... and I still get the same output. Is it supposed to crash?
12 - I got a different error.
16 - Several errors, but this was for older version of V. New net.http code is in a PR.
17 - Definitely needs updated.
18 - I get the same error.

The rest work as expected (or are no longer there). The warnings reported on others are gone.

So out of the 21 issues reported, we're down to only 7 that need some attention. They'll get it once things settle a bit with the compiler and library.

@shadowninja55
Copy link
Member

these all work on latest v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

6 participants