Coder Social home page Coder Social logo

ded's Introduction

ded's People

Contributors

billkek avatar jayhawker6 avatar kolumb avatar mate-h avatar mjkloeckner avatar niyrme avatar nonvegan avatar rexim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ded's Issues

it's not an issue, just a question

does this editor depends on the victor-mono fonts or it's not necessary?

plus i suggest to reduce the zoom when viewing big long files. however i really really like this editor for how cool it is :D

build.sh gives error

KDE Neon (ubuntu 22.04 based)
Attempting build.sh gives this error

+ CC=cc
+ PKGS=sdl2 glew freetype2
+ CFLAGS=-Wall -Wextra -std=c11 -pedantic -ggdb
+ LIBS=-lm
+ SRC=src/main.c src/la.c src/editor.c src/file_browser.c src/free_glyph.c src/simple_renderer.c src/common.c src/lexer.c
+ uname
+ [ Linux = Darwin ]
+ pkg-config --cflags sdl2 glew freetype2
Package sdl2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl2' found
Package glew was not found in the pkg-config search path.
Perhaps you should add the directory containing `glew.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glew' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
+ pkg-config --libs sdl2 glew freetype2
Package sdl2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl2' found
Package glew was not found in the pkg-config search path.
Perhaps you should add the directory containing `glew.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glew' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
+ cc -Wall -Wextra -std=c11 -pedantic -ggdb -o ded src/main.c src/la.c src/editor.c src/file_browser.c src/free_glyph.c src/simple_renderer.c src/common.c src/lexer.c -lm
src/main.c:7:10: fatal error: SDL2/SDL.h: No such file or directory
    7 | #include <SDL2/SDL.h>
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from src/./editor.h:6,
                 from src/editor.c:6:
src/./free_glyph.h:8:10: fatal error: GL/glew.h: No such file or directory
    8 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.
In file included from src/file_browser.h:5,
                 from src/file_browser.c:2:
src/free_glyph.h:8:10: fatal error: GL/glew.h: No such file or directory
    8 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.
In file included from src/free_glyph.c:3:
src/./free_glyph.h:8:10: fatal error: GL/glew.h: No such file or directory
    8 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.
In file included from src/simple_renderer.c:7:
src/./simple_renderer.h:5:10: fatal error: GL/glew.h: No such file or directory
    5 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.
In file included from src/lexer.h:6,
                 from src/lexer.c:6:
src/./free_glyph.h:8:10: fatal error: GL/glew.h: No such file or directory
    8 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.

Issue building on Windows.

I tried to install on windows and got this message.

C:\Users\Chip\Desktop\ded>.\build_msvc.bat
'cl.exe' is not recognized as an internal or external command,
operable program or batch file.```

file_size() gives crazy big values back

./ded .
Loading .
bruh result 9223372036854775807 saved 0
bruh size 9223372036854775807
bruh cap 9223372036854775807 items 1 9223372036854775807
ded: src/common.c:109: read_entire_file: Assertion `sb->items != NULL && "Buy more RAM lol"' failed.
Aborted (core dumped)

after some diagnosing, fseek(fp, 0, SEEK_END) is giving back some crazy weird values.

Updated DED crashed on Ubuntu 22

I recently built DED with the new changes (clipboard and runtime shader updates) but it crashes when I try to open a file or even the text editor itself.

./ded src/main.c 
Loading src/main.c
GL version 3.3
ERROR: could not load glyph of a character with code 32

The previous version worked like a charm. If anyone can help I would really appreciate it. Thanks to Tsoding for this wonderful project.

Hung on resize, now unkillable (WSL2)

Pretty sure I've not had a program hang this badly in at least 15 years but here we are.
Upon trying to maximize the window, the program started hanging.

Running killall ded closed all ded processes yet the program window is still there. Unwilling to be killed by Windows or Linux

image

msvc build not working

Tested on 0b7b6fd under windows 10, visual studio 2019.

If I run

setup_dependencies.bat
build_msvc.bat

And then If I run ded.exe from the command prompt I get the following error:

The code execution cannot proceed because SDL2.dll was not found. Reinstalling the program may fix this problem.

image

Failed to compile simple_color.frag on mac OS Ventura 13.2.1

I am not able to even launch the editor at the moment. I understand that it is not developed for mac OS but I thought I would add this in here just in case it can be fixed easily.
the error message I get when I try to run ./ded after running the ./build.sh is the following:

GL version 3.3
WARNING: GLEW_ARB_debug_output is not availableERROR: could not compile GL_FRAGMENT_SHADER
ERROR: 0:6: Use of undeclared identifier 'gl_FragColor'

ERROR: failed to compile ./shaders/simple_color.frag shader file

Could not load glyph of a character with code 32

Error while running ./ded after building ./build.sh

GL version 3.3
ERROR: could not load glyph of a character with code 32

Info:

OS: Ubuntu 22.04.2 LTS x86_64 
Kernel: 5.19.0-35-generic 
Shell: bash 5.1.16 
DE: GNOME 42.5 
CPU: 11th Gen Intel i5-1135G7 (8) @ 4.200GHz 
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] 

I tried https://stackoverflow.com/questions/22234407/freetype-with-unicode-error; Replaced FT_Load_Char with FT_Load_Glyph; OpenGL window opens but fails with message when typing any character:

GL version 3.3
ERROR: could not load glyph of a character with code 98

GL issues on macOS 11.7.2

Caveats

I don't write many graphical programs. Perhaps macOS is always a pain and you don't want to support it. Given that build.sh contains a uname check for "Darwin" though, I'm giving it a shot.

Problem

I installed the following versions of the dependencies (latest in Homebrew):

  • sdl2 2.26.3
  • freetype 2.13.0
  • glew 2.2.0_1

The build went fine without warnings or errors.

Running the first build:

❯ ./ded
GL version 3.3
ARB_draw_instanced is not supported; game may not work properly!!

I added a YOLO environment variable to skip returning 1 for all those "game may not work properly" checks, to press on and see where I got.

❯ YOLO=1 ./ded
GL version 3.3
ARB_draw_instanced is not supported; game may not work properly!!
WARNING! GLEW_ARB_debug_output is not availableERROR: could not compile GL_FRAGMENT_SHADER
ERROR: 0:6: Use of undeclared identifier 'gl_FragColor'

ERROR: failed to compile `./shaders/simple_color.frag` shader file

Is the program written for a different GL version than what macOS 11.7.2 provides perhaps?

I edited each of the shaders/simple_*.frag programs to stop using gl_FragColor and instead declare out vec4 fragColor; and use that.

Solved?

It looks like everything is working for now, with two changes:

  • make the "game may not work properly" warnings ignorable
  • stop using gl_FragColor for shader output

epic_file_browser

setup_dependencies.bat lacking dependencies / build_msys2_mingw64.sh fails to build

having some issues trying to build and use ded, these are the results thus far

Result of running setup_dependencies.bat:
1 dir(s) moved.
1 dir(s) moved.
1 dir(s) moved.
1 file(s) moved.
1 file(s) moved.
1 file(s) moved.
1 file(s) moved.

Dependencies folder contents:
dependencies.txt

And thus, the result of running "build_msys2_mingw64.sh":

+ PKGS='--static sdl2 glew freetype2' ++ pkg-config --cflags --static sdl2 glew freetype2 Package sdl2 was not found in the pkg-config search path. Perhaps you should add the directory containing sdl2.pc'
to the PKG_CONFIG_PATH environment variable
Package 'sdl2', required by 'virtual:world', not found
Package 'glew', required by 'virtual:world', not found
Package 'freetype2', required by 'virtual:world', not found

  • CFLAGS='-Wall -Wextra -pedantic -ggdb -DGLEW_STATIC -Isrc -Dassert(expression)=((void)0) '
    `

Execution Error:

I am trying to run the editor on my computer. I cloned the latest repo (7f3638d). Building with ./build.sh worked fine. However, when I run the executable I get the following Error:

Command:

./ded

Output

GL version 3.3
ERROR: could not load glyph of a character with code 32

For a fraction of a second a window pops up. It then closes with the error.

Is there a way I can fix this? I think it might have something to do with freetype since googling the error lead me in that direction.

opengl can't compile the shader

GL version 3.3
GL CALLBACK: type = 0x8251, severity = 0x826b, message = Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
ERROR: could not compile GL_VERTEX_SHADER
0(28) : error C0000: syntax error, unexpected $undefined at token ""

ERROR: failed to compile ./shaders/free_glyph.vert shader file

Better Name

We still didn't come up with the proper name. Leave your suggestions in the comments. The name should be short ('cause we don't wanna type too much in the terminal to start the editor) and memorable.

Problem Trying to Build with MSVC

After running .\setup_dependencies.bat . It says
Screenshot 2021-10-21 155917

Then when I run .\build_msvc.bat. I am getting this error.
Screenshot 2021-10-21 160106

I am new to adding and using libraries like this.
If anyone can help me with this. It would be helpful.
Thank You in advance.

./build_msvc.bat is not working

I tried #42 to build on Windows but I am getting LINK : fatal error LNK1181: Cannot open 'dependencies\freetype2\release.obj' error when I try to build.

How can I fix that is there a problem with ./build_msvc.bat ?

startup failure

During running the startup script, it prints some errors.
Looks like a dependencies absence

src/main.c:5:10: fatal error: SDL2/SDL.h: No such file or directory
    5 | #include <SDL2/SDL.h>
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from src/sdl_extra.c:1:
src/./sdl_extra.h:4:10: fatal error: SDL2/SDL.h: No such file or directory
    4 | #include <SDL2/SDL.h>
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from src/gl_extra.c:4:
src/gl_extra.h:5:10: fatal error: GL/glew.h: No such file or directory
    5 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.
In file included from src/free_glyph.c:3:
src/./free_glyph.h:8:10: fatal error: GL/glew.h: No such file or directory
    8 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.
In file included from src/cursor_renderer.c:2:
src/./gl_extra.h:5:10: fatal error: GL/glew.h: No such file or directory
    5 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.
In file included from src/uniforms.c:2:
src/./uniforms.h:5:10: fatal error: GL/glew.h: No such file or directory
    5 | #include <GL/glew.h>
      |          ^~~~~~~~~~~
compilation terminated.

On Linux Kernel: 5.15.0-56-generic

Rainbow effect

In the Youtube vidéo, when you start typing, the text start to do a rainbow/rgb color effect which is pretty cool. But when I start, even with the font installed, all I got is just white text. How can I get the rainbow effect ?

Can't go to the previous folder, in the file browser

.
..
<files>

when you try to visit the ../ directory, using the file browser, it fails, on the assertion:-
ded: src/common.c:102: read_entire_file: Assertion 'sb->items != NULL && "Buy more RAM lol"' failed.

The problem is that my machine has 8 gigs of ram, which should be enough for a minimal editor like this, but I could be wrong.
Does anyone know, if the issue regarding my machine, or ded?

Memory: 3778MiB / 7833MiB
OS: Ubuntu 20.04.5 LTS x86_64
Kernel: 5.15.0-58-generic
CPU: Intel i5-9400 (6) @ 4.100GHz

Thanks.

ERROR: Could not initialize GLEW!

Hey,
I am trying to install ded on Debian.
I have all of the dependencies installed but when i try to run ./ded src/main.c i get:

Loading src/main.c
GL version 3.3
ERROR: Could not initialize GLEW!

`da_move` could lead to undesired side effects

ded/src/common.h

Lines 37 to 43 in 57d23fa

#define da_move(dst, src) \
do { \
free((dst)->items); \
(dst)->items = (src).items; \
(dst)->count = (src).count; \
(dst)->capacity = (src).capacity; \
} while (0)

I think that we should "clear" src after moving it to dst (setting (src).items = NULL; and zeroing its count and capacity).

Since src still holds a pointer to items it could cause undesired side effects.

build.sh using CRLF line terminators

Shows it here:
asciicast

The build.sh file didn't even show as executable beforehand because It wasn't the right file type, so I had to chmod +x build.sh. After fixing, out.sh worked without any changes. These issues are likely due to making the file with something that saved it to a DOS like format.

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.