00:01:13 | pydsigner | Hmm seems like the stdlib random module could be a little better |
00:01:45 | pydsigner | Having a nice Mersenne twister RNG is something I took for granted in Python |
00:02:15 | FromGitter | <RSDuck> isn't there a Mersenne twister module? |
00:02:43 | FromGitter | <RSDuck> https://nim-lang.org/docs/mersenne.html |
00:03:54 | FromGitter | <RSDuck> it lacks some functions like generating functions in a specific range or generating float point numbers |
00:08:41 | pydsigner | Yeah that's my point |
00:09:22 | pydsigner | The random module is more convenient but isn't self-seeding |
00:24:21 | FromGitter | <Varriount> pydsigner: Pull requests are welcome. |
00:26:08 | FromGitter | <Varriount> @barcharcraz Most of those exploits target SMB. As long as you completely disable it ( or even let it remain in the partially disabled state it comes in) you should be ok |
00:46:39 | * | aedigix quit (Quit: disconnecting) |
00:55:26 | * | fastrom quit (Quit: Leaving.) |
01:01:27 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
01:07:35 | * | aedigix joined #nim |
01:25:28 | * | arnetheduck joined #nim |
01:38:13 | * | zachcarter joined #nim |
01:40:22 | * | zachcarter quit (Read error: Connection reset by peer) |
01:43:40 | * | zachcarter joined #nim |
01:53:50 | * | chemist69_ quit (Ping timeout: 258 seconds) |
01:55:42 | zachcarter | can’t figure out how to handle resizing well in this space invaders game |
02:01:09 | * | j75__ quit (Quit: WeeChat 1.4) |
02:08:25 | * | chemist69 joined #nim |
02:10:01 | pydsigner | Wow I am embarrassingly exited to actually have text rendering on the screen finally |
02:10:27 | zachcarter | rendering with what? |
02:11:48 | pydsigner | SDL2 |
02:12:18 | zachcarter | ah |
02:13:07 | pydsigner | It doesn't even look good |
02:15:13 | zachcarter | screenshot? |
02:17:05 | pydsigner | http://i.imgur.com/q2Dkxvp.png |
02:17:23 | pydsigner | And that's after I switched to antialiasing |
02:17:38 | pydsigner | I'm gonna try a different font maybe |
02:18:26 | zachcarter | hrm |
02:18:37 | pydsigner | Oh actually |
02:18:43 | pydsigner | I think I know what the problem is |
02:18:59 | pydsigner | I have scaling set to 2 in the engine |
02:19:06 | zachcarter | ahhh |
02:20:43 | pydsigner | Yeah that's better http://i.imgur.com/sSrpTBu.png |
02:20:58 | zachcarter | much! |
02:21:09 | zachcarter | are you building a game? |
02:21:23 | pydsigner | That's my goal |
02:21:37 | pydsigner | Currently I'm making building blocks for a game |
02:21:45 | zachcarter | did I tell you already about the project I’m working on? |
02:21:58 | zachcarter | yesterday or something? |
02:22:00 | pydsigner | Presumably something like space invaders? |
02:22:14 | zachcarter | it’s a bit larger than that in scope |
02:22:20 | zachcarter | http://fragworks.io |
02:22:24 | pydsigner | Yesterday I was mostly knocked off of IRC so I wouldn't have seen it |
02:22:28 | zachcarter | ah okay |
02:22:43 | pydsigner | Yeah that's bigger |
02:22:52 | zachcarter | :P |
02:23:07 | zachcarter | it does a few things that sdl2 doesn't |
02:23:14 | zachcarter | but it does use sdl |
02:23:17 | zachcarter | 2 |
02:24:09 | pydsigner | Nice! |
02:24:12 | zachcarter | thanks |
02:24:23 | pydsigner | You have a bunch of cool integrations for sure |
02:24:57 | zachcarter | it’s getting there slowly but surely |
02:25:15 | pydsigner | Who knows, maybe I'll switch |
02:25:31 | zachcarter | well, no reason to anytime in the immediate future as I don’t think it’s really ready yet |
02:25:34 | pydsigner | Currently I'm using ldlework's dadren thing |
02:25:40 | zachcarter | ah cool! |
02:25:48 | zachcarter | there’s also Nimgame2 |
02:25:53 | zachcarter | which is sdl2 based |
02:25:57 | pydsigner | But I'm getting minimal utility out of that because I'm not doing that sort of data driven |
02:26:09 | zachcarter | yeah I’d check out Nimgame2 |
02:26:29 | zachcarter | https://github.com/Vladar4/nimgame2 |
02:26:39 | pydsigner | Ah Vladar4 |
02:27:03 | pydsigner | I was super confused trying to use sdl2 and reading the sdl2_nim docs lol |
02:27:15 | pydsigner | He has good docs on his stuff |
02:27:22 | zachcarter | definitely |
02:27:34 | zachcarter | it’s a nice project if you are okay with sdl2 |
02:27:37 | zachcarter | for rendering |
02:27:46 | zachcarter | I wasn’t which is why I made my own framework |
02:27:57 | pydsigner | I don't see performance being an issue with my project |
02:27:58 | zachcarter | but for smalller projects the sdl2 renderer should hold up fine |
02:28:18 | pydsigner | I've done a game with SDL1.2 before via Pygame |
02:28:30 | zachcarter | well I can explain some things about the SDL2 renderer if you’d like |
02:28:32 | zachcarter | and how it works |
02:28:37 | pydsigner | Software rendering will take you a long way until you hit a wall |
02:28:40 | zachcarter | it’s actually pretty interesting |
02:28:45 | zachcarter | ah yeah |
02:28:53 | zachcarter | I guess if your’e already familiar with it |
02:29:10 | zachcarter | the only real things to note are the hardware acellerated renderer doesn’t use draw call batching |
02:29:16 | pydsigner | I have to go right now but if there's anything I should know feel free to fill my backlog |
02:29:21 | zachcarter | and obviously no built in support for texture atlasing |
02:29:52 | zachcarter | alrighty, well have a good one! and good luck on the project! |
02:47:27 | FromGitter | <Varriount> zachcarter: perhaps the first contribution I should make is a truly-original icon for Frag. The current icon is easily recognized by Google's image recognition search. |
02:48:15 | zachcarter | Varriount: that would be awesome, I am admittedly using stock images |
02:48:28 | zachcarter | slightly altered but not much :P |
02:57:05 | * | def-pri-pub joined #nim |
02:57:05 | * | def-pri-pub quit (Changing host) |
02:57:05 | * | def-pri-pub joined #nim |
03:12:56 | FromGitter | <Varriount> zachcarter: Any idea why SDL2 doesn't use draw call batching? It doesn't seem that hard of a concept to expose to users. |
03:14:13 | zachcarter | it seems narrow sighted to me not to have, but I guess they were trying to make a low level utility library |
03:14:30 | zachcarter | but it makes their renderer basically useless for anything outside of a smaller project |
03:15:01 | zachcarter | and you end up having to write your own OpenGL code |
03:15:59 | FromGitter | <Varriount> Hm. https://gamedev.stackexchange.com/a/83847 |
03:16:21 | zachcarter | yeah I’ve read that before I think he’s incorrect |
03:16:53 | zachcarter | his second paragraph is correct |
03:17:12 | zachcarter | but the backends don’t do draw call batching |
03:17:57 | FromGitter | <Varriount> I think he means that they "can", in the sense that it's possible for a backend to implement such functionality. |
03:18:15 | zachcarter | ah yeah |
03:18:53 | zachcarter | best way to do draw call batching with sdl2 : implement your own sprite batch using OpenGL |
03:19:11 | zachcarter | unfortunately not the easiest way |
03:21:10 | zachcarter | also Varriount: another huge disadvantage to using just SDL2 |
03:21:19 | zachcarter | no custom shaders :/ |
03:21:26 | FromGitter | <Varriount> Eek |
03:22:01 | zachcarter | of course again you can just write your own GL code |
03:22:30 | FromGitter | <Varriount> Aren't you using some sort of shader abstraction layer? Or rather, a intermediate layer? |
03:22:44 | zachcarter | I’m using a sprite batch |
03:22:55 | zachcarter | oh I see what you’re asking |
03:23:04 | zachcarter | so for frag you write your shaders in a language that’s very similar to GLSL |
03:23:16 | zachcarter | and then you can compile the shader for whatever graphics API you want |
03:23:22 | zachcarter | so you can compile the shader for DX11 |
03:23:24 | zachcarter | DX9 |
03:23:26 | zachcarter | OpenGL |
03:23:30 | zachcarter | GLES |
03:23:31 | zachcarter | etc |
03:23:40 | zachcarter | depending on what you want to release your game on |
03:24:34 | zachcarter | I still have quite a bit to do on the shader side, like wrap more code around them to make them generic, right now the sprite batch doesn’t support custom shaders which I need to fix |
03:24:51 | zachcarter | I’ll probably do that after I finish this space invaders project or maybe before |
03:25:20 | zachcarter | currently I’m working on camera viewports |
03:26:02 | FromGitter | <Varriount> Is the language something specific to Frag, or part of a dependancy? |
03:26:36 | zachcarter | part of bgfx |
03:28:21 | * | ftsf quit (Quit: Leaving) |
03:29:00 | FromGitter | <Varriount> Neat |
03:29:50 | zachcarter | I think so too |
03:30:25 | FromGitter | <Varriount> Of course, the nice thing about Nim is that it makes it easy to include shaders in the binary itself (if you desire) |
03:30:43 | FromGitter | <Varriount> Though, having the shaders as files is good for testing/development |
03:32:22 | zachcarter | I’m doing that too :) |
03:32:44 | zachcarter | https://github.com/fragworks/frag/tree/master/src/frag/graphics/two_d/gl |
03:34:30 | FromGitter | <Varriount> "Build only what you need" <- But what if I want to build all the things? :P |
03:35:40 | zachcarter | ahaha |
03:35:55 | zachcarter | yeah I end up doing that anyway |
03:50:17 | * | def-pri-pub quit (Quit: leaving) |
04:38:36 | * | ftsf joined #nim |
04:50:25 | * | vlad1777d joined #nim |
05:14:07 | * | Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com) |
05:24:12 | * | cspar quit (Ping timeout: 260 seconds) |
05:46:07 | * | cspar joined #nim |
06:57:13 | * | rokups joined #nim |
07:07:08 | * | brson joined #nim |
07:07:32 | * | brson quit (Client Quit) |
07:12:20 | FromGitter | <mratsim> I’m impressed at you game devs, between graphics, inputs, IO, latency, network, sync, databases … I wouldn’t even know where to start. |
07:13:12 | FromGitter | <mratsim> oh, and IA, triggers, scenarios, modeling, cinematics |
07:13:25 | FromGitter | <mratsim> sounds, FX |
07:15:01 | dom96 | That's why games are typically written by a large team of developers :) |
07:17:28 | * | yglukhov joined #nim |
07:19:39 | ftsf | http://steamcommunity.com/sharedfiles/filedetails/?id=905664367 first nim game on greenlight? ;) |
07:20:32 | dom96 | ooooh |
07:21:13 | * | Vladar joined #nim |
07:21:45 | dom96 | ftsf: Nice job! :D |
07:21:58 | ftsf | :3 thanks |
07:23:07 | FromGitter | <mratsim> F-Zero, Micromachine like =) |
07:23:08 | dom96 | Is it ready to be Tweeted about? :) |
07:23:22 | FromGitter | <mratsim> that was fun with 4 players |
07:23:30 | ftsf | yep! |
07:23:45 | dom96 | This is funny, I saw the "first Rust game on greenlight" not too long ago. |
07:23:57 | ftsf | i should do a writeup of gamedev in nim |
07:24:28 | FromGitter | <mratsim> Rust and game is tough to search at the same time ... |
07:24:33 | * | bjz joined #nim |
07:24:49 | dom96 | mratsim: So true! |
07:24:55 | FromGitter | <mratsim> Nim and game too to be honest |
07:25:41 | ftsf | ahh yeah =( |
07:25:54 | dom96 | ftsf: definitely. I'm working on the new Nim website at the minute, so you'll be able to post your write up there if you'd like. |
07:26:01 | ftsf | sweet |
07:26:14 | dom96 | Also, I created a featured projects section, if you'd like I can put your game there :) |
07:26:58 | FromGitter | <mratsim> I’ll probably write a go playing bot in Nim at some point. I wrote one in Rust, but the borrow checker and lifetime >_>. And I had to hardcode all my array sizes because there is still no generic integer parameter in Rust. They hard code array property for arrays of up to 32 elements and then you’re on your own ... |
07:28:28 | ftsf | mratsim and a nim playing bot in go? |
07:28:48 | FromGitter | <mratsim> lol, no the other way, a go playing bot in nim ;) |
07:28:57 | ftsf | and a rust playing bot in nim. |
07:29:34 | FromGitter | <mratsim> a starcraft2 playing bot in Nim when Blizzard and Google DeepMind publishes the Starcraft2 AI API |
07:30:06 | FromGitter | <mratsim> hopefully that means that Starcraft2 works on Linux ... |
07:30:42 | ftsf | i doubt it =( blizzard doesn't care about linux |
07:33:54 | FromGitter | <mratsim> Except that for Deep Learning, Windows is meeh, Cuda is much more efficient on Linux, and Windows clusters of distributed GPUs? Mac just doesn’t have Nvidia cards. So if Blizzard/Deepmind really wants a Starcraft2 AI APIs to happen, they will have to: https://deepmind.com/blog/deepmind-and-blizzard-release-starcraft-ii-ai-research-environment/ (SC2), https://news.developer.nvidia.com/mastering-starcraft-with-ai/ (SC1) |
07:35:17 | FromGitter | <TiberiumPY> Wat? |
07:39:20 | * | yglukhov quit (Remote host closed the connection) |
07:39:45 | dom96 | Tweeted and upvoted :) |
07:53:12 | * | Trustable joined #nim |
07:55:22 | * | fastrom joined #nim |
07:55:59 | FromGitter | <TiberiumPY> Mac just doesn’t have Nvidia cards. |
07:56:06 | FromGitter | <TiberiumPY> It does lol |
07:56:18 | FromGitter | <TiberiumPY> @mratsim |
07:57:09 | FromGitter | <TiberiumPY> Oh wait |
07:57:12 | FromGitter | <mratsim> Old cards yes, the new Titan Xp will have mac drivers indeed, but for the last 4 years, there was nothing |
07:57:19 | FromGitter | <TiberiumPY> Ah, ok |
07:59:26 | * | yglukhov joined #nim |
08:28:26 | * | zachcarter quit (Quit: zachcarter) |
08:41:54 | * | Arrrr joined #nim |
08:41:54 | * | Arrrr quit (Changing host) |
08:41:54 | * | Arrrr joined #nim |
08:46:06 | ftsf | thanks dom96! =) |
08:53:27 | * | yglukhov quit (Remote host closed the connection) |
08:55:40 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:57:37 | * | yglukhov joined #nim |
09:01:18 | * | nsf joined #nim |
09:27:57 | * | yglukhov quit (Remote host closed the connection) |
09:42:04 | * | vlad1777d quit (Remote host closed the connection) |
09:55:28 | * | gokr joined #nim |
10:03:55 | * | Tiberium joined #nim |
10:09:54 | * | cspar quit (Ping timeout: 260 seconds) |
10:17:03 | shashlick | hello all, been trying to get the Bass audio library to work through Nim |
10:17:38 | shashlick | trying to record the mic but Nim is crashing and I get no stack trace or any clues as to what's the cause of crash |
10:19:55 | Tiberium | maybe you've compiled it with release mode? |
10:20:07 | shashlick | i wish :( |
10:20:15 | Tiberium | nim c -d:debug file.nim |
10:20:22 | Tiberium | (but it's by default) |
10:22:03 | shashlick | doesn't help |
10:36:40 | dom96 | tried to debug using gdb? |
10:42:47 | * | yglukhov joined #nim |
10:45:40 | shashlick | yes, but there's no detail in the stack trace |
10:45:51 | shashlick | I have --debuginfo --lineDir:on |
10:51:58 | dom96 | no detail? what does 'bt' output? |
10:52:39 | shashlick | 0x0000002b in ?? () |
10:52:39 | shashlick | (gdb) bt |
10:52:39 | shashlick | #0 0x0000002b in ?? () |
10:52:39 | shashlick | #1 0x00a77fe0 in ?? () |
10:52:40 | shashlick | Backtrace stopped: previous frame inner to this frame (corrupt stack?) |
10:59:41 | * | fastrom quit (Quit: Leaving.) |
11:02:58 | * | Snircle joined #nim |
11:07:29 | dom96 | "corrupt stack?" seems like the answer to that question is very possibly "yes" |
11:07:38 | dom96 | You must have wrapped a procedure incorrectly |
11:08:40 | ftsf | seems likely |
11:09:25 | * | Tiberium quit (Remote host closed the connection) |
11:10:28 | shashlick | i'm wrapping the bass.dll audio library |
11:10:47 | shashlick | using the callback to read data from the mic |
11:11:13 | shashlick | if i access anything within the callback, it crashes |
11:11:20 | ftsf | hmm could also be the GC |
11:11:28 | ftsf | does the callback run in a separate thread? |
11:11:29 | * | yglukhov quit (Remote host closed the connection) |
11:11:39 | ftsf | you might need to call setupForeignThreadGc() in the callback |
11:12:01 | ftsf | that's needed for SDL's audio callback for example |
11:15:22 | shashlick | oh okay |
11:28:42 | shashlick | okay at least i'm not crashing anymore and get a legitimate back trace |
11:39:10 | ftsf | \o/ |
12:02:19 | * | nsf quit (Quit: WeeChat 1.7) |
12:08:30 | federico3 | ftsf: very nice! What game lib did you use? |
12:13:10 | FromGitter | <couven92> Hmm... I thought I got my ANSI/Unicode macros working, but now I got problems when I define procs. https://gist.github.com/couven92/ddf95aefa6c41aca8404e916008921d7 ⏎ I get: ⏎ ⏎ > ansiwide.nim(41, 6) Error: type mismatch: got (NimNode) but expected 'cstring = CString' ⏎ ... [https://gitter.im/nim-lang/Nim?at=58f20e58f22385553d431ccb] |
12:30:09 | * | couven92 joined #nim |
12:56:27 | * | shashlick quit (Ping timeout: 260 seconds) |
12:57:30 | * | shashlick joined #nim |
13:00:01 | * | xmonader joined #nim |
13:07:18 | * | zachcarter joined #nim |
13:19:58 | * | filcuc joined #nim |
13:20:22 | filcuc | is there a built-in string slice type? |
13:20:32 | filcuc | something like a c++ stringview |
13:21:30 | filcuc | basically something that can be accepted by all string procedure without creating string copies |
13:23:45 | * | sz0 joined #nim |
13:23:47 | * | fastrom joined #nim |
13:25:08 | demi- | is there a reason to not have it make copies? |
13:25:58 | filcuc | demi-: eventually performance |
13:26:15 | demi- | how about you worry about that if/when it becomes necessary? |
13:27:09 | demi- | there should be stuff in system and the strutils modules to do what you are looking for |
13:27:26 | filcuc | demi-: because it's not premature optimization. I simply don't need to create copies so why should i create them? |
13:27:48 | filcuc | :) |
13:30:51 | demi- | because whenever people say something isn't premature optimization, it is |
13:31:35 | * | yglukhov joined #nim |
13:32:59 | * | yglukhov quit (Remote host closed the connection) |
13:35:39 | demi- | and it is pretty premature seeing that you don't even have code yet; so you could just ignore me or look at the two modules i suggested you look at ¯\_(ツ)_/¯ |
13:40:16 | filcuc | demi-: i simply try to write correct code, maybe it's not the same for you. But when i write a c++ function i don't write foo(string p) when i can simply use foo(const string& p) |
13:42:30 | filcuc | given that, thank you for the answer :) |
13:43:42 | demi- | filcuc: i get that, this isn't C++; treating it as inherently C++ is going to cause you more problems than not. in light of that, you might want to check the libraries i suggested before coming at me like i'm the one that is wrong here since you seem to haven't bothered to check the documentation first :| |
13:44:58 | filcuc | i checked the documentation and i didn't see a stringview alike type, so i asked |
13:46:16 | filcuc | demi-: relax.. i asked something and you answered 'you don't need it' without knowing really if i need it |
14:04:28 | * | fastrom quit (Quit: Leaving.) |
14:05:24 | dom96 | filcuc: this might help https://nim-lang.org/docs/nimc.html#optimizing-for-nim-optimizing-string-handling |
14:07:28 | filcuc | dom96: thank you |
14:07:35 | dom96 | np :) |
14:07:59 | * | zachcarter quit (Quit: zachcarter) |
14:13:07 | * | Tiberium joined #nim |
14:15:48 | * | fastrom joined #nim |
14:21:43 | * | fastrom quit (Ping timeout: 240 seconds) |
14:28:45 | FromGitter | <gogolxdong> hi,@dom96,a issue occurred to me when I compiling nakefile.nim and run nakefile, it is like `/tmp/ccDbBZ4I.s: Assembler messages: ⏎ /tmp/ccDbBZ4I.s:51: Error: invalid instruction suffix for push` |
14:31:12 | * | zachcarter joined #nim |
14:31:20 | dom96 | gogolxdong: Yeah, I saw your issue. I'm afraid I'm not sure what the problem could be, my best guess is that you need to install a different assembler. |
14:35:31 | pydsigner | zachcarter: https://github.com/pydsigner/nim_game |
14:35:47 | pydsigner | This is my exploratory precursor project |
14:35:52 | zachcarter | cool :) |
14:36:14 | pydsigner | I suspect my Nim is terrible but it does work |
14:36:25 | * | vlad1777d joined #nim |
14:36:41 | zachcarter | doesn’t look bad to me at first glance |
14:38:01 | FromGitter | <gogolxdong> After following the steps of building from source , there are i586-elf-ar,i586-elf-nm,i586-elf-gcc and others but i586-elf-as |
14:38:53 | dom96 | gogolxdong: it's based on this, maybe it can help you: http://wiki.osdev.org/Bare_Bones |
14:41:11 | FromGitter | <gogolxdong> Alternatively, you can use NASM as your assembler. |
14:48:51 | * | arnetheduck quit (Remote host closed the connection) |
14:52:51 | * | arnetheduck joined #nim |
15:24:27 | * | sz0 quit (Quit: Connection closed for inactivity) |
15:29:57 | * | Tiberium quit (Read error: Connection reset by peer) |
15:30:15 | * | Tiberium joined #nim |
15:31:25 | FromGitter | <Varriount> filcuc, there's a slice type, however it isn't attached to a string |
15:31:52 | * | Tiberium quit (Remote host closed the connection) |
15:32:06 | * | Tiberium joined #nim |
15:38:02 | * | bjz joined #nim |
15:48:02 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:48:23 | * | vlad1777d quit (Remote host closed the connection) |
15:50:42 | * | vlad1777d joined #nim |
16:01:57 | * | xmonader2 joined #nim |
16:03:12 | * | xmonader quit (Ping timeout: 240 seconds) |
16:06:58 | * | bjz joined #nim |
16:14:32 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
16:22:41 | * | qwertfisch is now known as osterfisch |
16:26:13 | * | filcuc quit (Ping timeout: 240 seconds) |
16:27:39 | zachcarter | apparently letterboxing is going to be quite the pita with bgfx |
16:28:55 | * | Sentreen quit (Ping timeout: 245 seconds) |
16:31:06 | FromGitter | <Varriount> Oh? Why? |
16:31:26 | zachcarter | creator is suggesting using multiple windows to handle it |
16:31:49 | FromGitter | <Varriount> Wait, like, multiple OS-level Windows? |
16:31:55 | zachcarter | yup |
16:32:01 | zachcarter | so he’s saying like nest one window inside another |
16:32:07 | zachcarter | I’m using sdl2 though I don’t even think I can do that with sdl2 |
16:32:11 | zachcarter | I know you can with glfw |
16:32:39 | zachcarter | https://wiki.libsdl.org/SDL_WindowFlags |
16:32:43 | zachcarter | https://wiki.libsdl.org/SDL_CreateWindow |
16:32:45 | zachcarter | whoops |
16:33:01 | FromGitter | <Varriount> Still, seems like a kludge |
16:33:47 | * | nightmared quit (Ping timeout: 255 seconds) |
16:36:01 | FromGitter | <Varriount> zachcarter: is the developers view posted anywhere? Google isn't turning up anything. |
16:37:17 | * | nightmared joined #nim |
16:37:18 | zachcarter | oh he just told me in gitter |
16:37:33 | zachcarter | Varriount: I think there’s another way to do it without what he’s suggesting |
16:38:02 | zachcarter | he’s also probably not taking into consideration the fact I’m doing simple 2d stuff |
16:38:06 | zachcarter | I think I just need another view |
16:41:52 | * | Sembei joined #nim |
16:41:56 | * | Sentreen joined #nim |
16:43:46 | * | Pisuke quit (Ping timeout: 260 seconds) |
16:53:56 | zachcarter | sweet! |
16:54:00 | zachcarter | got letterbox working |
16:55:20 | FromGitter | <Varriount> Is the method different than one you would use with 3d? |
16:58:06 | ftsf | federico3, just using SDL2 |
16:58:16 | zachcarter | I guess so, at least with bgfx |
16:59:28 | zachcarter | bgfx is a bit weird because of the submission based renderer and views |
16:59:41 | zachcarter | basically what I wasnt’ doing and needed to do was have another view that fills the entire window |
16:59:47 | zachcarter | then a view just for my game / letterbox view |
16:59:51 | zachcarter | I also have a third view for GUI elements |
17:01:30 | federico3 | ftsf: with Nim's native wrapper library? |
17:02:10 | ftsf | federico3, yep |
17:02:16 | federico3 | thanks |
17:02:18 | ftsf | just doing software drawing |
17:02:26 | ftsf | then using sdl to draw it to the screen |
17:04:55 | * | devted joined #nim |
17:18:17 | * | arnetheduck quit (Ping timeout: 260 seconds) |
17:28:20 | * | Nobabs27 joined #nim |
17:32:21 | * | cspar joined #nim |
17:37:12 | * | Tiberium quit (Remote host closed the connection) |
17:37:27 | * | Tiberium joined #nim |
17:42:19 | * | Tiberium quit (Remote host closed the connection) |
17:44:15 | * | Tiberium joined #nim |
17:51:32 | * | couven92 quit (Quit: Disconnecting) |
18:04:26 | FromGitter | <mratsim> I don’t see any “NotImplementedError”, is there any guidelines for case/if statements with a not implemented branch? ValueError I guess? |
18:06:36 | Arrrr | You can make your own exceptions, but jus use AssertionError. |
18:07:28 | * | fastrom joined #nim |
18:07:58 | * | fastrom1 joined #nim |
18:07:58 | * | fastrom quit (Read error: Connection reset by peer) |
18:09:20 | FromGitter | <Bennyelg> Why I have to do @[] |
18:09:26 | FromGitter | <Bennyelg> initialize? |
18:10:11 | * | fastrom1 quit (Read error: Connection reset by peer) |
18:10:17 | * | fastrom joined #nim |
18:11:26 | * | Jesin quit (Quit: Leaving) |
18:12:08 | Arrrr | is the equivalent of newSeq[type]() |
18:12:25 | FromGitter | <Bennyelg> Thanks. |
18:16:02 | * | kunev quit (Ping timeout: 240 seconds) |
18:18:33 | * | fastrom quit (Quit: Leaving.) |
18:18:38 | * | kunev joined #nim |
18:19:24 | * | dexterk_ joined #nim |
18:21:50 | FromGitter | <TiberiumPY> guys, is there any really working Nim REPL? |
18:21:53 | FromGitter | <TiberiumPY> https://replit.canny.io/languages-requests/p/nim |
18:21:54 | FromGitter | <TiberiumPY> this guy is asking |
18:22:12 | * | fastrom joined #nim |
18:22:26 | FromGitter | <TiberiumPY> (we're actually on the second place) |
18:22:32 | FromGitter | <TiberiumPY> after Julia |
18:24:38 | Arrrr | There is no repl, but you can run nim code here https://ideone.com/ |
18:25:59 | FromGitter | <TiberiumPY> no, I don't want to run it |
18:27:52 | * | fastrom quit (Read error: Connection reset by peer) |
18:28:03 | * | fastrom joined #nim |
18:34:57 | dom96 | there is 'nim secret' but it shouldn't be used |
18:35:02 | dom96 | so no, there isn't. |
18:35:44 | dom96 | also wow, 31 upvotes |
18:37:01 | federico3 | dom96: where? |
18:37:52 | federico3 | https://replit.canny.io/languages-requests/p/nim |
18:38:52 | Arrrr | Why isn't `connectAsync` public? https://github.com/nim-lang/Nim/blob/master/lib/pure/net.nim#L1520 |
18:41:53 | federico3 | that canny.io is quite pricey |
18:42:30 | FromGitter | <TiberiumPY> but repl.it probably has money from sponsors :) |
18:42:44 | FromGitter | <TiberiumPY> I don't understand why they can't use compilers for some languages :( |
18:42:52 | FromGitter | <TiberiumPY> ideone does it, and it works perfectly |
18:44:05 | dom96 | Tiberium: They support C and C++ |
18:44:13 | dom96 | There is no reason they can't support Nim |
18:44:22 | Tiberium | dom96, ah, this guy is not an official repl.it moderator or admin |
18:44:25 | Tiberium | just a user |
18:44:32 | dom96 | I see. |
18:45:18 | * | kunev quit (Quit: е те!) |
18:45:38 | Tiberium | then I hope they'll add Nim |
18:46:24 | demi- | hmmm, is there an unordered collection type that handles non-ordinals? |
18:46:59 | * | bjz joined #nim |
18:47:38 | FromGitter | <mratsim> I think there is a set |
18:47:49 | demi- | that doesn't handle non-ordinals |
18:48:03 | FromGitter | <mratsim> I you mean a non ordinal key |
18:48:06 | FromGitter | <mratsim> Ah* |
18:48:47 | Tiberium | ah, shame, there's still no post on nim forum about this replit poll |
18:49:03 | Tiberium | I must've done it earlier |
18:49:14 | * | kunev joined #nim |
18:50:59 | * | vendethiel joined #nim |
18:53:44 | * | couven92 joined #nim |
18:54:23 | Tiberium | dom96, ehm, really silly question, but how can I change my avatar on nim-lang.org? Does it require some number of posts? |
18:54:37 | dom96 | gravatar |
18:54:44 | dom96 | look it up :) |
18:55:52 | * | cspar quit (Quit: Leaving) |
18:57:11 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
18:58:36 | Tiberium | oh neat, I thought gravatar works by nicknames, but it seems that gravatar works by emails |
18:59:05 | Tiberium | yay |
18:59:19 | Tiberium | less than 1 minute |
19:32:16 | * | rokups quit (Quit: Connection closed for inactivity) |
19:33:32 | * | libman joined #nim |
19:47:08 | * | Vladar quit (Remote host closed the connection) |
19:51:52 | * | Arrrr quit (Quit: Leaving.) |
19:57:31 | * | filcuc joined #nim |
20:14:25 | Trustable | Hi all, did anyone try "gtk_main()" inside a "try" block and after an exception call "gtk_main()" again? I get a SIGSEGV. I guess Gtk is not prepared to be interupted by an exception. My workaround: catch exceptions in the signal callback proc. |
20:24:47 | * | devted quit (Quit: Sleeping.) |
20:40:58 | couven92 | how to I get a pointer from a ref? |
20:41:07 | couven92 | s/to/do |
20:41:34 | zachcarter | maybe casting? |
20:41:39 | zachcarter | I don’t know |
20:42:06 | zachcarter | not sure if you can go from a safe gc traced ref to a unsafe ptr |
20:42:29 | couven92 | to pass it on to an importc function |
20:43:03 | zachcarter | try |
20:43:23 | zachcarter | cast[ptr foo](ref) |
20:43:29 | zachcarter | see if it works |
20:44:13 | * | Ven joined #nim |
20:44:36 | * | Ven is now known as Guest55325 |
20:44:47 | couven92 | zachcarter, seemed to work... :) |
20:44:54 | zachcarter | :) |
20:46:42 | FromGitter | <Varriount> Only use cast if you have to. |
20:47:26 | FromGitter | <Varriount> Shouldn't you just use `addr foo`? |
20:50:20 | zachcarter | addr doesn’t work on refs does it Varriount? |
20:50:56 | couven92 | @Varriount, in my case I call a system function with a var argument. The system function sets the var argument to an array. And afterwards I have to free it. Thus I have to pass in the **value** of the variable as a pointer, not the storage location where the value is stored. Therefore cast instead of addr |
20:51:01 | couven92 | (I think) |
20:52:11 | couven92 | This comes from me interpreting `addr(x)` -> `&x`, whereas `cast[pointer](x)` -> `(void*)(x)` |
20:53:23 | FromGitter | <Varriount> I thought you were just getting a pointer to a function |
20:53:38 | couven92 | @Varriount, yeah sorry... :D |
20:53:54 | * | Guest55325 quit (Ping timeout: 240 seconds) |
20:55:29 | * | babs_ joined #nim |
20:56:49 | FromGitter | <Varriount> Couven92: mind showing us your code? |
20:57:04 | * | Ven_ joined #nim |
20:57:38 | * | Nobabs27 quit (Ping timeout: 240 seconds) |
20:59:05 | * | bjz joined #nim |
20:59:33 | couven92 | the cast as zachcarter worked, so I am happy and have moved on... But sure, for reference: https://pastebin.com/YjicC3PH |
21:07:52 | * | nsf joined #nim |
21:10:37 | * | devted joined #nim |
21:14:21 | dom96 | Trustable: I'm pretty sure GTK doesn't allow gtk_main to be called multiple times. |
21:23:27 | * | fastrom quit (Quit: Leaving.) |
21:34:01 | Trustable | dom96, I thought the same, tried it with "gtk_main_iteration()", same issue. |
21:42:48 | * | nsf quit (Quit: WeeChat 1.7) |
21:52:00 | * | babs__ joined #nim |
21:52:00 | * | babs__ quit (Client Quit) |
21:54:13 | * | babs_ quit (Ping timeout: 240 seconds) |
21:58:31 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:05:29 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:06:00 | couven92 | uhm, how do I check a pointer against a NULL value? isNil? |
22:11:09 | * | Tiberium quit (Remote host closed the connection) |
22:11:26 | * | Tiberium joined #nim |
22:25:19 | * | Trustable quit (Remote host closed the connection) |
22:41:21 | * | Tiberium quit (Remote host closed the connection) |
23:01:06 | * | libman quit (Quit: Connection closed for inactivity) |
23:14:38 | * | filcuc quit (Ping timeout: 240 seconds) |
23:15:39 | * | zachcarter quit (Read error: Connection reset by peer) |
23:15:59 | * | zachcarter joined #nim |
23:21:54 | FromGitter | <Varriount> couvin92: yes, or == |
23:32:32 | * | bjz joined #nim |
23:33:30 | * | bjz quit (Client Quit) |
23:43:11 | * | bjz joined #nim |
23:43:37 | * | bjz quit (Client Quit) |
23:47:37 | * | couven92 quit (Quit: Disconnecting) |