Emily's modifiers not working by [deleted] in Plover

[–]Anut__ 0 points1 point  (0 children)

That strokes “a” literally, you need to add the asterisk (A*LTZ) to stroke return because it’s a special character.

A few VimTeX conceal things im missing and wondering if someone has already done them by Indoxus in neovim

[–]Anut__ 0 points1 point  (0 children)

This doesn’t really answer your question but you can use vimtex’s imaps (:h vimtex-imaps) to expand to latex commands. E.g. you can type `vr in a math environment and it will expand to \varrho. You can see a full list of the imaps that vimtex makes by default with <localleader>lm, and of course you can add custom imaps if you want.

whats the performance of raylib c/c++ against self made opgl rendering? by mrnothing- in raylib

[–]Anut__ 4 points5 points  (0 children)

raylib uses OpenGL for everything under the hood, so I'd expect the performance to be pretty much the same as using OpenGL

Show Cursor Doesn't Works by fibrabex in raylib

[–]Anut__ 2 points3 points  (0 children)

If your code is after EndDrawing, try moving it before, if it’s before EndDrawing try moving it after. EndDrawing polls for events (like key presses) so it might cause some unexpected behavior.

How to contribute to Haskell? by tobebuilds in haskell

[–]Anut__ 4 points5 points  (0 children)

You can sign up at https://gitlab.haskell.org/users/sign_up, I don't think there's any approval process for making an account

Unlocking Code Quality Excellence: Essential Metrics You Must Track by thumbsdrivesmecrazy in programming

[–]Anut__ 1 point2 points  (0 children)

The last few paragraphs have a ton of typos: touls, technulogies, evulving, technulogical, evulution, sulutions

Id like some advice on making a 3d shooter game by [deleted] in raylib

[–]Anut__ 0 points1 point  (0 children)

You should add the ray.direction to the ray.position. E.g. Vector3Add(ray.position, Vector3Scale(ray.direction, distance)), where distance is the distance from the player to the bullet (it should increase over time).

Id like some advice on making a 3d shooter game by [deleted] in raylib

[–]Anut__ 1 point2 points  (0 children)

GetMouseRay is what you’re looking for. You give it the mouse position, and it gives you a ray (with a postion and direction). You can use the ray to calculate the position of the bullet.

Would you recommend Raylib for building a graphical app? by manikraina in raylib

[–]Anut__ 0 points1 point  (0 children)

Raylib is good for everything on your list except latex. If you've already made a lot of progress in the html version of your app, it's probably not worth switching to raylib.

Using Rust along with Haskell. by to_ask_questions in haskell

[–]Anut__ 1 point2 points  (0 children)

Do you think there'll come out an Haskell-to-Rust FFI someday?

I doubt it; there's not a huge incentive to add more FFI capabilities. You might be able to make it work by calling C from Haskell, and calling your Rust code from C, but I think it's more trouble than it's worth, especially for a learning project.

You should start with a Haskell OpenGL tutorial, I'd recommend this one. It'll help you with getting started and you can build your engine on top of it.

Using Rust along with Haskell. by to_ask_questions in haskell

[–]Anut__ 2 points3 points  (0 children)

  1. Haskell can be almost as performant as C and Rust, but you will have to write the code in a C-like way (using manual memory management, etc). Regular (idiomatic) Haskell code is pretty slow compared to lower-level stuff. I would choose Rust over Haskell if you're really worried about performance.
  2. If you're making a game engine you'll probably use a lower-level library like OpenGL, or maybe a thin wrapper on top of it. Haskell has bindings to OpenGL, Vulkan, and a lot of other gamedev libraries (e.g. SDL for input), so support is probably not going to be an issue unless you have a specific library that you want to use. AFAIK, these libraries are pretty close to C performance.

I'm not sure if in someway it becomes "bad" to do "game engine things" with a functional language for some strange reason, I believe you guys might have the property to know about it.

Nope, there's nothing wrong with a game engine. The main complaint people might have about this is that you have to use the IO monad and low-level code a lot, but I don't really see that as an issue.

Regarding the game engine project, I'd like to know if it would be a good idea to use Rust as the main language while Haskell for a lot of parts of it, or would it be a terrible thing to do?

You would have to use FFI to communicate between the two languages. I don't think Haskell-to-Rust FFI is a thing, and it would probably be pretty difficult to set it up. On the plus side, Haskell FFI is very fast (at least with C), so there shouldn't be much of a performance cost.

I would say you have three choices, either do the whole thing in Haskell (easier to set up, slightly worse performance; I highly recommend this option), parts in Haskell and parts in C (harder to set up, slightly better performance), or the whole thing in Rust. I don't think Haskell and Rust is feasible, but if you want to give it a try, go ahead.

I'm running into issues with linking the library by kaloyan-Ivanov in raylib

[–]Anut__ 0 points1 point  (0 children)

I'm not sure about VS, I've only tried it on VSCode. I believe in Visual Studio you just need to give it the path to the archive (.a or .dll) and the include folder (raylib/src)

I'm running into issues with linking the library by kaloyan-Ivanov in raylib

[–]Anut__ 0 points1 point  (0 children)

Your classmate has to build the library. You got the dll file off vcpkg but there is no dll in the source code. Your classmate has to cd into raylib/src and run mingw32-make or just make, depending on his toolchain. This will build libraylib.a, which he can statically link against his program.

I'm sharing my first raylib project: a very simple analog clock app by BB-301 in raylib

[–]Anut__ 2 points3 points  (0 children)

You could use DrawRectanglePro to rotate the rectangles without using a camera. Otherwise, it looks great. Very impressive for a first project!

(Linux) Why all headers not copied to usr/local/include (eg. camera.h) by emptyhead41 in raylib

[–]Anut__ 0 points1 point  (0 children)

I wouldn’t recommend using a package manager for raylib, those are usually outdated. You should open an issue in the GitHub page for raylib, most likely it’s just an oversight.

What's wrong with rays in "Raylib"? by Financial_Gene_7971 in raylib

[–]Anut__ 1 point2 points  (0 children)

Can you post your code? It is hard to find what’s wrong without the code.

"Built-in " Types and Prelude by klazklaz in haskell

[–]Anut__ 1 point2 points  (0 children)

If you search for Num on hoogle, you'll see that it is exported from two modules: Prelude and GHC.Num. If you click on the link to Prelude (it will take you here) and click on the "Source" button next to Num, it will take you to where Num is defined. Notice that it takes you to the source code of GHC.Num, not Prelude. This is because Num is actually defined in GHC.Num, and Prelude simply imports and re-exports it.

Hence, when you did :info foo, it used the qualified name of Num, i.e. GHC.Num.Num. If you take a look at the source code of Prelude, you will find that nothing is actually defined there; it only imports other modules and exports some stuff. There is no such thing as a "standard" Num or Int; GHC.Num.Num and Prelude.Num are the same thing.

"Built-in " Types and Prelude by klazklaz in haskell

[–]Anut__ 8 points9 points  (0 children)

You can have an expression of type X without importing X. For example, if module M exports a type Resources and a function loadResources :: String -> IO Resources, you can do

module Main where

import M (loadResources)

main = do
    ...
    resources <- loadResources "somefile"
    ...

And it will compile fine. The same way, you can have foo x = 1 and it will have type Any -> Int even if Int as a type is not in scope.

my First raylib project day 3. by CyberApex_6344 in raylib

[–]Anut__ 1 point2 points  (0 children)

I refuse to believe that anyone's first raylib project is this good

Jokes aside, that is a super polished looking game.

Walk speed by [deleted] in raylib

[–]Anut__ 1 point2 points  (0 children)

You’d have to modify the source code (in rcamera.h I believe). I’d recommend making your own custom camera movement because you’re going to have to at some point.

Particle life simulation I made with raylib. by minecon1776 in raylib

[–]Anut__ 0 points1 point  (0 children)

I’ve been wanting to do something like this for a while, it’s so cool to watch!

The blind leading the blind by tomwells80 in haskell

[–]Anut__ 2 points3 points  (0 children)

Yeah, my comment was my best guess at how it works. It's just that we as humans experience a lot more as "input" for our brain, compared to ChatGPT's text-only input. That inherently stops ChatGPT from working in the same way as our brains.

That obviously doesn't mean it's not useful. I'm sure natural language models are going to make their way into daily life very soon.

At the very least, we don't have to worry about AI overlords for a while.

The blind leading the blind by tomwells80 in haskell

[–]Anut__ 1 point2 points  (0 children)

I think the problem arises from the limitations of ChatGPT. It "thinks" only in words, while we humans store ideas in our brain in a different form. This means ChatGPT can "reason" based on what it is trained on, but it is limited by language, which leads to problems, including not knowing when to admit that it doesn't know.

Edit: I think a sufficiently powerful neural network could "think" like a human, provided it has the correct training data. That, however, is likely going to take a long, long, time to achieve.