Git Product home page Git Product logo

Comments (17)

pepa65 avatar pepa65 commented on May 27, 2024 1

I did cd git/vid and then v .
But the editor doesn't do anything. I think I'll leave you to work on it for a bit, because I don't know how I can help. I think v looks fantastic, and I'm really looking forward to using it!

from ved.

pepa65 avatar pepa65 commented on May 27, 2024 1

./vid .

create window wnd=0x559d15d47fb0 ptr==0x559d15d46d10
Trying to load font from RobotoMono-Regular.ttf
["./vid", "."]
PATH="." cur_dir="/home/pp/git/vid"
load session "/home/pp/.vid/session"
Segmentation fault

(There is no /home/pp/.vid/session.)

from ved.

watzon avatar watzon commented on May 27, 2024

Looks like this has been fixed. Can you confirm @pepa65?

from ved.

pepa65 avatar pepa65 commented on May 27, 2024

After pulling v again from current, making and installing that, I now get as output of v .:

./vid.v:15:3: cannot import module "ui" (not found)
   13| 	os
   14| 	time
   15| 	ui
         ^
   16| 	strings
   17| 	//darwin

from ved.

watzon avatar watzon commented on May 27, 2024

Did you pull the most recent version of vid as well? Because that line has been changed.

from ved.

pepa65 avatar pepa65 commented on May 27, 2024

Sorry, I forgot... Now I'm getting:

warning: ./vid.v:1819:1: the following imports were never used: 
 * uiold
In file included from /home/pp/git/v/thirdparty/stb_image/stb_image.h:547:0,
                 from /home/pp/.cache/v/vid.tmp.c:297:
/home/pp/git/v/thirdparty/stb_image/stb_image.h: In function ‘stbi__...
(Use `v -g` to print the entire error message)

V error: C error. This should never happen. 
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose

from ved.

watzon avatar watzon commented on May 27, 2024

Gonna need the full error trace. Build with -g.

from ved.

pepa65 avatar pepa65 commented on May 27, 2024

After v -g .:

C compiler=cc
warning: ./vid.v:1819:1: the following imports were never used: 
 * uiold
In file included from /home/pp/git/v/thirdparty/stb_image/stb_image.h:547:0,
                 from /home/pp/git/vid/zquery.v:361:
/home/pp/git/v/thirdparty/stb_image/stb_image.h: In function ‘stbi__shiftsigned’:
/home/pp/git/v/thirdparty/stb_image/stb_image.h:5116:18: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    STBI_ASSERT(v >= 0 && v < 256);
                  ^
/home/pp/git/v/thirdparty/stb_image/stb_image.h:5116:4: note: in expansion of macro ‘STBI_ASSERT’
    STBI_ASSERT(v >= 0 && v < 256);
    ^~~~~~~~~~~
/home/pp/git/v/thirdparty/stb_image/stb_image.h:5116:18: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    STBI_ASSERT(v >= 0 && v < 256);
                  ^
/home/pp/git/v/thirdparty/stb_image/stb_image.h:5116:4: note: in expansion of macro ‘STBI_ASSERT’
    STBI_ASSERT(v >= 0 && v < 256);
    ^~~~~~~~~~~
/home/pp/git/v/vlib/gl/1shader.v: In function ‘gl__new_shader’:
/home/pp/git/v/vlib/gl/1shader.v:108:8: warning: variable ‘dir’ set but not used [-Wunused-but-set-variable]
  // Already have absolute path
        ^~~
/home/pp/git/v/vlib/gl/gl.v: In function ‘gl__init_glad’:
/home/pp/git/v/vlib/gl/gl.v:15:11: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
  ok := C.gladLoadGL()
           ^~~~~~~~~~
/home/pp/git/v/vlib/gl/gl.v: In function ‘gl__shader_source’:
/home/pp/git/v/vlib/gl/gl.v:43:34: warning: passing argument 3 of ‘glad_glShaderSource’ from incompatible pointer type [-Wincompatible-pointer-types]
  C.glShaderSource(shader, a, &source.str, b)
                                  ^
/home/pp/git/v/vlib/gl/gl.v:43:34: note: expected ‘const GLchar * const* {aka const char * const*}’ but argument is of type ‘byte ** {aka unsigned char **}’
/home/pp/git/v/vlib/gl/gl.v:43:51: warning: passing argument 4 of ‘glad_glShaderSource’ makes pointer from integer without a cast [-Wint-conversion]
  C.glShaderSource(shader, a, &source.str, b)
                                                   ^
/home/pp/git/v/vlib/gl/gl.v:43:51: note: expected ‘const GLint * {aka const int *}’ but argument is of type ‘int’
/home/pp/git/v/vlib/gl/gl.v: In function ‘gl__shader_info_log’:
/home/pp/git/v/vlib/gl/gl.v:77:45: warning: pointer targets in passing argument 4 of ‘glad_glGetShaderInfoLog’ differ in signedness [-Wpointer-sign]
  C.glGetShaderInfoLog(shader, 512, 0, info_log)
                                             ^~~     
/home/pp/git/v/vlib/gl/gl.v:77:45: note: expected ‘GLchar * {aka char *}’ but argument is of type ‘byte * {aka unsigned char *}’
/home/pp/git/v/vlib/gl/gl.v: In function ‘gl__get_program_info_log’:
/home/pp/git/v/vlib/gl/gl.v:83:48: warning: pointer targets in passing argument 4 of ‘glad_glGetProgramInfoLog’ differ in signedness [-Wpointer-sign]
  C.glGetProgramInfoLog(program, 1024, 0, info_log)
                                                ^~~     
/home/pp/git/v/vlib/gl/gl.v:83:48: note: expected ‘GLchar * {aka char *}’ but argument is of type ‘byte * {aka unsigned char *}’
/home/pp/git/v/vlib/gl/gl.v: In function ‘gl__draw_elements’:
/home/pp/git/v/vlib/gl/gl.v:147:43: warning: passing argument 4 of ‘glad_glDrawElements’ makes pointer from integer without a cast [-Wint-conversion]
  C.glDrawElements(mode, count, typ, indices)
                                           ^~     
/home/pp/git/v/vlib/gl/gl.v:147:43: note: expected ‘const void *’ but argument is of type ‘int’
/home/pp/git/v/vlib/gl/gl.v: In function ‘gl__vertex_attrib_pointer’:
/home/pp/git/v/vlib/gl/gl.v:177:74: warning: passing argument 6 of ‘glad_glVertexAttribPointer’ makes pointer from integer without a cast [-Wint-conversion]
  C.glVertexAttribPointer(index, size, typ, normalized, stride, ptr)
                                                                          ^  
/home/pp/git/v/vlib/gl/gl.v:177:74: note: expected ‘const void *’ but argument is of type ‘int’
/home/pp/git/v/vlib/stbi/stbi.v: In function ‘stbi__load_from_memory’:
/home/pp/git/v/vlib/stbi/stbi.v:52:39: warning: pointer targets in passing argument 1 of ‘stbi_load_from_memory’ differ in signedness [-Wpointer-sign]
  res.data = C.stbi_load_from_memory(buf, 3812, &res.width, &res.height, &res.nr_channels, flag)
                                       ^
In file included from /home/pp/git/vid/zquery.v:361:0:
/home/pp/git/v/thirdparty/stb_image/stb_image.h:1287:18: note: expected ‘const stbi_uc * {aka const unsigned char *}’ but argument is of type ‘char *’
 STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
                  ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/pp/git/vid/zquery.v:363:0:
/home/pp/git/v/vlib/glfw/glfw.v: In function ‘glfw__set_cursor’:
/home/pp/git/v/thirdparty/glfw/GLFW/glfw3.h:1051:37: warning: passing argument 2 of ‘glfwSetCursor’ makes pointer from integer without a cast [-Wint-conversion]
 #define GLFW_IBEAM_CURSOR           0x00036002
                                     ^
/home/pp/git/v/vlib/glfw/glfw.v:247:23: note: in expansion of macro ‘GLFW_IBEAM_CURSOR’
  C.glfwSetCursor(0, C.GLFW_IBEAM_CURSOR)
                       ^~~~~~~~~~~~~~~~~
In file included from /home/pp/git/vid/zquery.v:363:0:
/home/pp/git/v/thirdparty/glfw/GLFW/glfw3.h:4329:14: note: expected ‘GLFWcursor * {aka struct GLFWcursor *}’ but argument is of type ‘int’
 GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);
              ^~~~~~~~~~~~~
In file included from /home/pp/git/vid/zquery.v:363:0:
/home/pp/git/v/vlib/glfw/glfw.v: In function ‘glfw__Window_set_cursor’:
/home/pp/git/v/thirdparty/glfw/GLFW/glfw3.h:1051:37: warning: passing argument 2 of ‘glfwSetCursor’ makes pointer from integer without a cast [-Wint-conversion]
 #define GLFW_IBEAM_CURSOR           0x00036002
                                     ^
/home/pp/git/v/vlib/glfw/glfw.v:252:30: note: in expansion of macro ‘GLFW_IBEAM_CURSOR’
 
                              ^                
In file included from /home/pp/git/vid/zquery.v:363:0:
/home/pp/git/v/thirdparty/glfw/GLFW/glfw3.h:4329:14: note: expected ‘GLFWcursor * {aka struct GLFWcursor *}’ but argument is of type ‘int’
 GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor);
              ^~~~~~~~~~~~~
/home/pp/git/v/vlib/glfw/glfw.v: In function ‘glfw__get_monitor_size’:
/home/pp/git/v/vlib/glfw/glfw.v:272:20: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  mode := C.glfwGetVideoMode(C.glfwGetPrimaryMonitor())
                    ^~~~~~~~~~~~~~~~
/home/pp/git/v/vlib/glm/glm.v: In function ‘glm__identity2’:
/home/pp/git/v/vlib/glm/glm.v:254:31: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  res[0] = 1
                               ^
/home/pp/git/v/vlib/glm/glm.v:255:31: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  res[5] = 1
                               ^
/home/pp/git/v/vlib/glm/glm.v:256:32: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  res[10] = 1
                                ^
/home/pp/git/v/vlib/glm/glm.v:261:32: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  // # gl__Shader_set_mat4(shader, tos2("projection"), f) ;
                                ^
/home/pp/git/v/vlib/freetype/freetype.v: In function ‘freetype__ft_load_char’:
/home/pp/git/v/vlib/freetype/freetype.v:116:23: warning: pointer targets in passing argument 2 of ‘glad_glGenTextures’ differ in signedness [-Wpointer-sign]
  C.glGenTextures(1, &texture)
                       ^
/home/pp/git/v/vlib/freetype/freetype.v:116:23: note: expected ‘GLuint * {aka unsigned int *}’ but argument is of type ‘int *’
/home/pp/git/v/vlib/freetype/freetype.v: In function ‘freetype__new_context’:
/home/pp/git/v/vlib/freetype/freetype.v:168:12: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
  mut ret := C.FT_Init_FreeType(&ft)
            ^~~~~~~~~~~~~~~~
/home/pp/git/v/vlib/freetype/freetype.v:188:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  ret = int(C.FT_New_Face(ft, font_path.str, 0, &face))
       ^
/home/pp/git/v/vlib/freetype/freetype.v: In function ‘freetype__FreeType_private_draw_text’:
/home/pp/git/v/vlib/freetype/freetype.v:288:11: warning: comparison is always false due to limited range of data type [-Wtype-limits]
    idx := _rune[0]
           ^
/home/pp/git/v/vlib/freetype/freetype.v: In function ‘freetype__FreeType_text_width’:
/home/pp/git/v/vlib/freetype/freetype.v:366:11: warning: comparison is always false due to limited range of data type [-Wtype-limits]
    idx := _rune[0]
           ^
/usr/bin/ld: cannot find -lglfw
collect2: error: ld returned 1 exit status
V error: C error. This should never happen. 
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose

from ved.

pepa65 avatar pepa65 commented on May 27, 2024

I did a v up and tried again v . on vid:

warning: ./vid.v:1819:1: the following imports were never used: 
 * uiold
 -lglfw
collect2: error: ld returned 1 exit statusV error: C error. This should never happen. 
Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose

This was so different from the last try I thought I'd post again.

from ved.

medvednikov avatar medvednikov commented on May 27, 2024

If you follow instructions in the readme, everything will work.

Install glfw.

from ved.

pepa65 avatar pepa65 commented on May 27, 2024

dpkg -l |grep glfw:

ii  libglfw3:amd64                         3.2.1-1                                         amd64        portable library for OpenGL, window and input (x11 libraries)
ii  libglfw3-dev:amd64                     3.2.1-1                                         amd64        portable library for OpenGL, window and input (development files)

from ved.

pepa65 avatar pepa65 commented on May 27, 2024

But just now trying v . on vid gives:

warning: ./vid.v:1819:1: the following imports were never used: 
 * uiold

And vid gets built. Can't use it yet though, it's unresponsive.

from ved.

pepa65 avatar pepa65 commented on May 27, 2024

Usually it's not good to close an issue before you get confirmation that it's working.

from ved.

medvednikov avatar medvednikov commented on May 27, 2024

What did you do differently to make it build?

from ved.

medvednikov avatar medvednikov commented on May 27, 2024

Try running it with ./vid path_to_git_project and use ctrl-p to navigate files.

from ved.

pepa65 avatar pepa65 commented on May 27, 2024

If I copy the file RobotoMono-Regular.ttf into the vid directory and try to open a single file, it works:
./vid timer.v
And I can navigate the file and insert/delete etc.

from ved.

watzon avatar watzon commented on May 27, 2024

./vid .

create window wnd=0x559d15d47fb0 ptr==0x559d15d46d10
Trying to load font from RobotoMono-Regular.ttf
["./vid", "."]
PATH="." cur_dir="/home/pp/git/vid"
load session "/home/pp/.vid/session"
Segmentation fault

(There is no /home/pp/.vid/session.)

I've gotten this too actually, when trying to open a path. Works fine with a single file.

from ved.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.