<< 15-04-2017 >>

00:01:13pydsignerHmm seems like the stdlib random module could be a little better
00:01:45pydsignerHaving a nice Mersenne twister RNG is something I took for granted in Python
00:02:15FromGitter<RSDuck> isn't there a Mersenne twister module?
00:02:43FromGitter<RSDuck> https://nim-lang.org/docs/mersenne.html
00:03:54FromGitter<RSDuck> it lacks some functions like generating functions in a specific range or generating float point numbers
00:08:41pydsignerYeah that's my point
00:09:22pydsignerThe random module is more convenient but isn't self-seeding
00:24:21FromGitter<Varriount> pydsigner: Pull requests are welcome.
00:26:08FromGitter<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:42zachcartercan’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:01pydsignerWow I am embarrassingly exited to actually have text rendering on the screen finally
02:10:27zachcarterrendering with what?
02:11:48pydsignerSDL2
02:12:18zachcarterah
02:13:07pydsignerIt doesn't even look good
02:15:13zachcarterscreenshot?
02:17:05pydsignerhttp://i.imgur.com/q2Dkxvp.png
02:17:23pydsignerAnd that's after I switched to antialiasing
02:17:38pydsignerI'm gonna try a different font maybe
02:18:26zachcarterhrm
02:18:37pydsignerOh actually
02:18:43pydsignerI think I know what the problem is
02:18:59pydsignerI have scaling set to 2 in the engine
02:19:06zachcarterahhh
02:20:43pydsignerYeah that's better http://i.imgur.com/sSrpTBu.png
02:20:58zachcartermuch!
02:21:09zachcarterare you building a game?
02:21:23pydsignerThat's my goal
02:21:37pydsignerCurrently I'm making building blocks for a game
02:21:45zachcarterdid I tell you already about the project I’m working on?
02:21:58zachcarteryesterday or something?
02:22:00pydsignerPresumably something like space invaders?
02:22:14zachcarterit’s a bit larger than that in scope
02:22:20zachcarterhttp://fragworks.io
02:22:24pydsignerYesterday I was mostly knocked off of IRC so I wouldn't have seen it
02:22:28zachcarterah okay
02:22:43pydsignerYeah that's bigger
02:22:52zachcarter:P
02:23:07zachcarterit does a few things that sdl2 doesn't
02:23:14zachcarterbut it does use sdl
02:23:17zachcarter2
02:24:09pydsignerNice!
02:24:12zachcarterthanks
02:24:23pydsignerYou have a bunch of cool integrations for sure
02:24:57zachcarterit’s getting there slowly but surely
02:25:15pydsignerWho knows, maybe I'll switch
02:25:31zachcarterwell, no reason to anytime in the immediate future as I don’t think it’s really ready yet
02:25:34pydsignerCurrently I'm using ldlework's dadren thing
02:25:40zachcarterah cool!
02:25:48zachcarterthere’s also Nimgame2
02:25:53zachcarterwhich is sdl2 based
02:25:57pydsignerBut I'm getting minimal utility out of that because I'm not doing that sort of data driven
02:26:09zachcarteryeah I’d check out Nimgame2
02:26:29zachcarterhttps://github.com/Vladar4/nimgame2
02:26:39pydsignerAh Vladar4
02:27:03pydsignerI was super confused trying to use sdl2 and reading the sdl2_nim docs lol
02:27:15pydsignerHe has good docs on his stuff
02:27:22zachcarterdefinitely
02:27:34zachcarterit’s a nice project if you are okay with sdl2
02:27:37zachcarterfor rendering
02:27:46zachcarterI wasn’t which is why I made my own framework
02:27:57pydsignerI don't see performance being an issue with my project
02:27:58zachcarterbut for smalller projects the sdl2 renderer should hold up fine
02:28:18pydsignerI've done a game with SDL1.2 before via Pygame
02:28:30zachcarterwell I can explain some things about the SDL2 renderer if you’d like
02:28:32zachcarterand how it works
02:28:37pydsignerSoftware rendering will take you a long way until you hit a wall
02:28:40zachcarterit’s actually pretty interesting
02:28:45zachcarterah yeah
02:28:53zachcarterI guess if your’e already familiar with it
02:29:10zachcarterthe only real things to note are the hardware acellerated renderer doesn’t use draw call batching
02:29:16pydsignerI have to go right now but if there's anything I should know feel free to fill my backlog
02:29:21zachcarterand obviously no built in support for texture atlasing
02:29:52zachcarteralrighty, well have a good one! and good luck on the project!
02:47:27FromGitter<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:15zachcarterVarriount: that would be awesome, I am admittedly using stock images
02:48:28zachcarterslightly 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:56FromGitter<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:13zachcarterit seems narrow sighted to me not to have, but I guess they were trying to make a low level utility library
03:14:30zachcarterbut it makes their renderer basically useless for anything outside of a smaller project
03:15:01zachcarterand you end up having to write your own OpenGL code
03:15:59FromGitter<Varriount> Hm. https://gamedev.stackexchange.com/a/83847
03:16:21zachcarteryeah I’ve read that before I think he’s incorrect
03:16:53zachcarterhis second paragraph is correct
03:17:12zachcarterbut the backends don’t do draw call batching
03:17:57FromGitter<Varriount> I think he means that they "can", in the sense that it's possible for a backend to implement such functionality.
03:18:15zachcarterah yeah
03:18:53zachcarterbest way to do draw call batching with sdl2 : implement your own sprite batch using OpenGL
03:19:11zachcarterunfortunately not the easiest way
03:21:10zachcarteralso Varriount: another huge disadvantage to using just SDL2
03:21:19zachcarterno custom shaders :/
03:21:26FromGitter<Varriount> Eek
03:22:01zachcarterof course again you can just write your own GL code
03:22:30FromGitter<Varriount> Aren't you using some sort of shader abstraction layer? Or rather, a intermediate layer?
03:22:44zachcarterI’m using a sprite batch
03:22:55zachcarteroh I see what you’re asking
03:23:04zachcarterso for frag you write your shaders in a language that’s very similar to GLSL
03:23:16zachcarterand then you can compile the shader for whatever graphics API you want
03:23:22zachcarterso you can compile the shader for DX11
03:23:24zachcarterDX9
03:23:26zachcarterOpenGL
03:23:30zachcarterGLES
03:23:31zachcarteretc
03:23:40zachcarterdepending on what you want to release your game on
03:24:34zachcarterI 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:51zachcarterI’ll probably do that after I finish this space invaders project or maybe before
03:25:20zachcartercurrently I’m working on camera viewports
03:26:02FromGitter<Varriount> Is the language something specific to Frag, or part of a dependancy?
03:26:36zachcarterpart of bgfx
03:28:21*ftsf quit (Quit: Leaving)
03:29:00FromGitter<Varriount> Neat
03:29:50zachcarterI think so too
03:30:25FromGitter<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:43FromGitter<Varriount> Though, having the shaders as files is good for testing/development
03:32:22zachcarterI’m doing that too :)
03:32:44zachcarterhttps://github.com/fragworks/frag/tree/master/src/frag/graphics/two_d/gl
03:34:30FromGitter<Varriount> "Build only what you need" <- But what if I want to build all the things? :P
03:35:40zachcarterahaha
03:35:55zachcarteryeah 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:20FromGitter<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:12FromGitter<mratsim> oh, and IA, triggers, scenarios, modeling, cinematics
07:13:25FromGitter<mratsim> sounds, FX
07:15:01dom96That's why games are typically written by a large team of developers :)
07:17:28*yglukhov joined #nim
07:19:39ftsfhttp://steamcommunity.com/sharedfiles/filedetails/?id=905664367 first nim game on greenlight? ;)
07:20:32dom96ooooh
07:21:13*Vladar joined #nim
07:21:45dom96ftsf: Nice job! :D
07:21:58ftsf:3 thanks
07:23:07FromGitter<mratsim> F-Zero, Micromachine like =)
07:23:08dom96Is it ready to be Tweeted about? :)
07:23:22FromGitter<mratsim> that was fun with 4 players
07:23:30ftsfyep!
07:23:45dom96This is funny, I saw the "first Rust game on greenlight" not too long ago.
07:23:57ftsfi should do a writeup of gamedev in nim
07:24:28FromGitter<mratsim> Rust and game is tough to search at the same time ...
07:24:33*bjz joined #nim
07:24:49dom96mratsim: So true!
07:24:55FromGitter<mratsim> Nim and game too to be honest
07:25:41ftsfahh yeah =(
07:25:54dom96ftsf: 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:01ftsfsweet
07:26:14dom96Also, I created a featured projects section, if you'd like I can put your game there :)
07:26:58FromGitter<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:28ftsfmratsim and a nim playing bot in go?
07:28:48FromGitter<mratsim> lol, no the other way, a go playing bot in nim ;)
07:28:57ftsfand a rust playing bot in nim.
07:29:34FromGitter<mratsim> a starcraft2 playing bot in Nim when Blizzard and Google DeepMind publishes the Starcraft2 AI API
07:30:06FromGitter<mratsim> hopefully that means that Starcraft2 works on Linux ...
07:30:42ftsfi doubt it =( blizzard doesn't care about linux
07:33:54FromGitter<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:17FromGitter<TiberiumPY> Wat?
07:39:20*yglukhov quit (Remote host closed the connection)
07:39:45dom96Tweeted and upvoted :)
07:53:12*Trustable joined #nim
07:55:22*fastrom joined #nim
07:55:59FromGitter<TiberiumPY> Mac just doesn’t have Nvidia cards.
07:56:06FromGitter<TiberiumPY> It does lol
07:56:18FromGitter<TiberiumPY> @mratsim
07:57:09FromGitter<TiberiumPY> Oh wait
07:57:12FromGitter<mratsim> Old cards yes, the new Titan Xp will have mac drivers indeed, but for the last 4 years, there was nothing
07:57:19FromGitter<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:06ftsfthanks 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:03shashlickhello all, been trying to get the Bass audio library to work through Nim
10:17:38shashlicktrying 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:55Tiberiummaybe you've compiled it with release mode?
10:20:07shashlicki wish :(
10:20:15Tiberiumnim c -d:debug file.nim
10:20:22Tiberium(but it's by default)
10:22:03shashlickdoesn't help
10:36:40dom96tried to debug using gdb?
10:42:47*yglukhov joined #nim
10:45:40shashlickyes, but there's no detail in the stack trace
10:45:51shashlickI have --debuginfo --lineDir:on
10:51:58dom96no detail? what does 'bt' output?
10:52:39shashlick0x0000002b in ?? ()
10:52:39shashlick(gdb) bt
10:52:39shashlick#0 0x0000002b in ?? ()
10:52:39shashlick#1 0x00a77fe0 in ?? ()
10:52:40shashlickBacktrace stopped: previous frame inner to this frame (corrupt stack?)
10:59:41*fastrom quit (Quit: Leaving.)
11:02:58*Snircle joined #nim
11:07:29dom96"corrupt stack?" seems like the answer to that question is very possibly "yes"
11:07:38dom96You must have wrapped a procedure incorrectly
11:08:40ftsfseems likely
11:09:25*Tiberium quit (Remote host closed the connection)
11:10:28shashlicki'm wrapping the bass.dll audio library
11:10:47shashlickusing the callback to read data from the mic
11:11:13shashlickif i access anything within the callback, it crashes
11:11:20ftsfhmm could also be the GC
11:11:28ftsfdoes the callback run in a separate thread?
11:11:29*yglukhov quit (Remote host closed the connection)
11:11:39ftsfyou might need to call setupForeignThreadGc() in the callback
11:12:01ftsfthat's needed for SDL's audio callback for example
11:15:22shashlickoh okay
11:28:42shashlickokay at least i'm not crashing anymore and get a legitimate back trace
11:39:10ftsf\o/
12:02:19*nsf quit (Quit: WeeChat 1.7)
12:08:30federico3ftsf: very nice! What game lib did you use?
12:13:10FromGitter<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:22filcucis there a built-in string slice type?
13:20:32filcucsomething like a c++ stringview
13:21:30filcucbasically 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:08demi-is there a reason to not have it make copies?
13:25:58filcucdemi-: eventually performance
13:26:15demi-how about you worry about that if/when it becomes necessary?
13:27:09demi-there should be stuff in system and the strutils modules to do what you are looking for
13:27:26filcucdemi-: because it's not premature optimization. I simply don't need to create copies so why should i create them?
13:27:48filcuc:)
13:30:51demi-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:39demi-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:16filcucdemi-: 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:30filcucgiven that, thank you for the answer :)
13:43:42demi-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:58filcuci checked the documentation and i didn't see a stringview alike type, so i asked
13:46:16filcucdemi-: 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:24dom96filcuc: this might help https://nim-lang.org/docs/nimc.html#optimizing-for-nim-optimizing-string-handling
14:07:28filcucdom96: thank you
14:07:35dom96np :)
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:45FromGitter<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:20dom96gogolxdong: 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:31pydsignerzachcarter: https://github.com/pydsigner/nim_game
14:35:47pydsignerThis is my exploratory precursor project
14:35:52zachcartercool :)
14:36:14pydsignerI suspect my Nim is terrible but it does work
14:36:25*vlad1777d joined #nim
14:36:41zachcarterdoesn’t look bad to me at first glance
14:38:01FromGitter<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:53dom96gogolxdong: it's based on this, maybe it can help you: http://wiki.osdev.org/Bare_Bones
14:41:11FromGitter<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:25FromGitter<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:39zachcarterapparently letterboxing is going to be quite the pita with bgfx
16:28:55*Sentreen quit (Ping timeout: 245 seconds)
16:31:06FromGitter<Varriount> Oh? Why?
16:31:26zachcartercreator is suggesting using multiple windows to handle it
16:31:49FromGitter<Varriount> Wait, like, multiple OS-level Windows?
16:31:55zachcarteryup
16:32:01zachcarterso he’s saying like nest one window inside another
16:32:07zachcarterI’m using sdl2 though I don’t even think I can do that with sdl2
16:32:11zachcarterI know you can with glfw
16:32:39zachcarterhttps://wiki.libsdl.org/SDL_WindowFlags
16:32:43zachcarterhttps://wiki.libsdl.org/SDL_CreateWindow
16:32:45zachcarterwhoops
16:33:01FromGitter<Varriount> Still, seems like a kludge
16:33:47*nightmared quit (Ping timeout: 255 seconds)
16:36:01FromGitter<Varriount> zachcarter: is the developers view posted anywhere? Google isn't turning up anything.
16:37:17*nightmared joined #nim
16:37:18zachcarteroh he just told me in gitter
16:37:33zachcarterVarriount: I think there’s another way to do it without what he’s suggesting
16:38:02zachcarterhe’s also probably not taking into consideration the fact I’m doing simple 2d stuff
16:38:06zachcarterI 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:56zachcartersweet!
16:54:00zachcartergot letterbox working
16:55:20FromGitter<Varriount> Is the method different than one you would use with 3d?
16:58:06ftsffederico3, just using SDL2
16:58:16zachcarterI guess so, at least with bgfx
16:59:28zachcarterbgfx is a bit weird because of the submission based renderer and views
16:59:41zachcarterbasically what I wasnt’ doing and needed to do was have another view that fills the entire window
16:59:47zachcarterthen a view just for my game / letterbox view
16:59:51zachcarterI also have a third view for GUI elements
17:01:30federico3ftsf: with Nim's native wrapper library?
17:02:10ftsffederico3, yep
17:02:16federico3thanks
17:02:18ftsfjust doing software drawing
17:02:26ftsfthen 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:26FromGitter<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:36ArrrrYou 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:20FromGitter<Bennyelg> Why I have to do @[]
18:09:26FromGitter<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:08Arrrris the equivalent of newSeq[type]()
18:12:25FromGitter<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:50FromGitter<TiberiumPY> guys, is there any really working Nim REPL?
18:21:53FromGitter<TiberiumPY> https://replit.canny.io/languages-requests/p/nim
18:21:54FromGitter<TiberiumPY> this guy is asking
18:22:12*fastrom joined #nim
18:22:26FromGitter<TiberiumPY> (we're actually on the second place)
18:22:32FromGitter<TiberiumPY> after Julia
18:24:38ArrrrThere is no repl, but you can run nim code here https://ideone.com/
18:25:59FromGitter<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:57dom96there is 'nim secret' but it shouldn't be used
18:35:02dom96so no, there isn't.
18:35:44dom96also wow, 31 upvotes
18:37:01federico3dom96: where?
18:37:52federico3https://replit.canny.io/languages-requests/p/nim
18:38:52ArrrrWhy isn't `connectAsync` public? https://github.com/nim-lang/Nim/blob/master/lib/pure/net.nim#L1520
18:41:53federico3that canny.io is quite pricey
18:42:30FromGitter<TiberiumPY> but repl.it probably has money from sponsors :)
18:42:44FromGitter<TiberiumPY> I don't understand why they can't use compilers for some languages :(
18:42:52FromGitter<TiberiumPY> ideone does it, and it works perfectly
18:44:05dom96Tiberium: They support C and C++
18:44:13dom96There is no reason they can't support Nim
18:44:22Tiberiumdom96, ah, this guy is not an official repl.it moderator or admin
18:44:25Tiberiumjust a user
18:44:32dom96I see.
18:45:18*kunev quit (Quit: е те!)
18:45:38Tiberiumthen I hope they'll add Nim
18:46:24demi-hmmm, is there an unordered collection type that handles non-ordinals?
18:46:59*bjz joined #nim
18:47:38FromGitter<mratsim> I think there is a set
18:47:49demi-that doesn't handle non-ordinals
18:48:03FromGitter<mratsim> I you mean a non ordinal key
18:48:06FromGitter<mratsim> Ah*
18:48:47Tiberiumah, shame, there's still no post on nim forum about this replit poll
18:49:03TiberiumI 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:23Tiberiumdom96, ehm, really silly question, but how can I change my avatar on nim-lang.org? Does it require some number of posts?
18:54:37dom96gravatar
18:54:44dom96look 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:36Tiberiumoh neat, I thought gravatar works by nicknames, but it seems that gravatar works by emails
18:59:05Tiberiumyay
18:59:19Tiberiumless 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:25TrustableHi 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:58couven92how to I get a pointer from a ref?
20:41:07couven92s/to/do
20:41:34zachcartermaybe casting?
20:41:39zachcarterI don’t know
20:42:06zachcarternot sure if you can go from a safe gc traced ref to a unsafe ptr
20:42:29couven92to pass it on to an importc function
20:43:03zachcartertry
20:43:23zachcartercast[ptr foo](ref)
20:43:29zachcartersee if it works
20:44:13*Ven joined #nim
20:44:36*Ven is now known as Guest55325
20:44:47couven92zachcarter, seemed to work... :)
20:44:54zachcarter:)
20:46:42FromGitter<Varriount> Only use cast if you have to.
20:47:26FromGitter<Varriount> Shouldn't you just use `addr foo`?
20:50:20zachcarteraddr doesn’t work on refs does it Varriount?
20:50:56couven92@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:01couven92(I think)
20:52:11couven92This comes from me interpreting `addr(x)` -> `&x`, whereas `cast[pointer](x)` -> `(void*)(x)`
20:53:23FromGitter<Varriount> I thought you were just getting a pointer to a function
20:53:38couven92@Varriount, yeah sorry... :D
20:53:54*Guest55325 quit (Ping timeout: 240 seconds)
20:55:29*babs_ joined #nim
20:56:49FromGitter<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:33couven92the 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:21dom96Trustable: I'm pretty sure GTK doesn't allow gtk_main to be called multiple times.
21:23:27*fastrom quit (Quit: Leaving.)
21:34:01Trustabledom96, 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:00couven92uhm, 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:54FromGitter<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)