<< 16-10-2019 >>

00:20:17*krux02_ quit (Remote host closed the connection)
00:20:18*actuallybatman left #nim (#nim)
01:14:25*theelous3 joined #nim
01:23:27*gangstacat quit (Quit: ฤœis!)
01:25:33*gangstacat joined #nim
01:58:28*gangstacat quit (Quit: ฤœis!)
02:01:18*luis_ joined #nim
02:01:48*luis_ quit (Remote host closed the connection)
03:17:37*rockcavera quit (Remote host closed the connection)
03:59:11*lritter joined #nim
04:19:03*rayman22201 quit (Quit: Connection closed for inactivity)
04:28:52*dddddd quit (Remote host closed the connection)
04:38:14*Traviss__ joined #nim
04:40:07*nsf joined #nim
04:42:24*traviss quit (Ping timeout: 265 seconds)
04:46:11FromDiscord<Chiqqum_Ngbata> "error: stray โ€˜`โ€™ in program"
04:47:18FromDiscord<Chiqqum_Ngbata> More useful maybe: "result.funcs = (&funcs`gensym231051[(((NI) 0))- 0]);"
04:47:19FromDiscord<Chiqqum_Ngbata> Ideas?
04:55:33leorizeare there any contexts to this?
04:57:45AraqChiqqum_Ngbata: report it on github please
04:59:11*rayman22201 joined #nim
05:18:04*narimiran joined #nim
05:35:50*alexander92 joined #nim
05:39:18Araqrayman22201, are you around?
05:42:46rayman22201Getting ready to sleep, what's up?
05:47:05Araqnever mind then, you asked for my review on github
05:52:41rayman22201Oh yeah. I thought you were on vacation? Lol
05:53:56*solitudesf- joined #nim
05:54:18Araqvacation is over
05:54:31rayman22201My explanation was too complicated on GitHub, can you decipher it?
05:55:46rayman22201The windows / Linux split makes it so I have to duplicate the VirtualasyncEvent type definition. Can you see a way around it?
05:55:57Araqthe 'drain' stuff makes sense
05:56:15Araqthe type definition thing I haven't looked into yet but it's not unusual
05:56:57Araqwe long for incremental recompilations and once we have it, we can play with recursive modules
05:57:08rayman22201Ah. Ok that's good. I don't feel so crazy
05:57:18AraqI consider it too risky to do it without working IC
05:57:31Araqas it's hard to foresee all the consequences
05:58:16rayman22201I can see why. IC will have a big impact on how recursive module definitions have to be implemented
05:58:55rayman22201I just wanted your blessing for the PR lol. It sounds like I have it. ๐Ÿ˜
05:58:55AraqI don't know, in theory it's actually quite simple and depending on the algorithm doesn't require any extra logic
05:59:40Araqthe only trick is "assume no change" when you detect a recursive dependency
06:00:15Araqbut hey in theory many things are simple :P
06:00:35rayman22201Lol. Exactly. Famous last words ๐Ÿ˜‚
06:03:32rayman22201Ok. Off to sleep now. Thanks Araq!
06:04:51Araqbye bye
06:05:04rayman22201I'm trying to think of a better solution for the std lib warnings thing too. I don't have any good ideas yet. Maybe I'll dream up something good ๐Ÿ˜‰
06:13:33Araqhttps://thehackernews.com/2019/10/linux-sudo-run-as-root-flaw.html ha
06:13:43Araq"What's more interesting is that this flaw can be exploited by an attacker to run commands as root just by specifying the user ID "-1" or "4294967295."
06:13:43AraqThat's because the function which converts user id into its username incorrectly treats -1, or its unsigned equivalent 4294967295, as 0, which is always the user ID of root user."
06:13:57Araqalways remember, real hackerz use unsigned everywhere...
06:20:04*nc-x joined #nim
06:20:35nc-xwhat is the reasoning for not showing stdlib warnings though?
06:24:36nc-xalso regarding https://github.com/nim-lang/Nim/issues/12433, github is not the only code hosting provider, so why special case gh-pages or whatever in the compiler or nimble? people may use any other git hosting or svn or somehi
06:24:44nc-x*something else.
06:27:24nc-xIMO, it is not the compilers task to do this. It should be done by the package writers themselves. or nimble should support cargo like plugins and somebody should create a plugin for others to use.
06:29:00*nc-x quit (Remote host closed the connection)
06:30:52*PMunch joined #nim
06:31:35*theelous3 quit (Ping timeout: 276 seconds)
06:33:28Araqsure but github is the winner
06:40:55*filcuc joined #nim
07:00:00*gmpreussner_ quit (Quit: kthxbye)
07:01:37*krux02 joined #nim
07:04:41*gmpreussner joined #nim
07:18:28*laaron- joined #nim
07:26:33*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
07:29:17*laaron- joined #nim
07:31:10*laaron- quit (Client Quit)
07:31:36*laaron- joined #nim
07:34:28*laaron- quit (Remote host closed the connection)
07:34:53*laaron- joined #nim
07:43:09*Vladar joined #nim
07:46:10*solitudesf- quit (Ping timeout: 268 seconds)
07:52:07*ng0 joined #nim
07:54:08*laaron- quit (Ping timeout: 260 seconds)
08:01:20*laaron- joined #nim
08:03:25*gmpreussner_ joined #nim
08:04:55*gmpreussner quit (Ping timeout: 265 seconds)
08:12:29*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
08:14:31*laaron- joined #nim
08:15:49*laaron- quit (Client Quit)
08:16:34*laaron- joined #nim
08:18:54*laaron- quit (Client Quit)
08:19:03*rayman22201 quit (Quit: Connection closed for inactivity)
08:20:37superbiahow exactly can I see if I'm appending duplicates to A data structure; is it like exception or what?
08:20:55*laaron- joined #nim
08:21:39*laaron- quit (Client Quit)
08:22:12*laaron- joined #nim
08:22:27Araqseqs don't filter for duplicates
08:22:43Araqfor a set use containsOrIncl()
08:22:53superbiaso I first have to if check
08:22:57Araqwhich returns true if it already existed
08:23:05PMunchHi superbia :)
08:23:09superbiahi sir
08:23:13PMunchYeah, it depends on the data structure
08:23:16Araquse containsOrIncl, one of Nim's many innovations
08:23:23Araq;-)
08:23:54superbiaPMunch: the algorythm I'm implementing is dijkstra's shortest path
08:23:57superbiaAraq: thanks!
08:24:14PMunchOh cool, classic algorithm :)
08:24:37narimiransuperbia: so you're keeping the track of visited nodes? use sets
08:25:36superbianarimiran: I am firstly making sure my input data is valid... I will come to algorythm in a few hours, so don't spoil it
08:32:51*laaron- quit (Remote host closed the connection)
08:33:53*laaron- joined #nim
08:35:06*Traviss__ quit (Quit: Leaving)
08:35:26*laaron- quit (Client Quit)
08:36:34*laaron- joined #nim
08:37:12FromDiscord<Rika> Good luck
08:38:45*couven92 joined #nim
08:39:44*laaron- quit (Client Quit)
08:43:01*laaron- joined #nim
08:46:54*laaron- quit (Client Quit)
09:08:57*sealmove joined #nim
09:22:17*clyybber joined #nim
09:23:07*laaron- joined #nim
09:25:43*laaron- quit (Client Quit)
09:26:24*laaron- joined #nim
09:28:03*clyybber quit (Quit: WeeChat 2.6)
09:28:13*clyybber joined #nim
09:28:55*NimBot joined #nim
09:33:16*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
09:37:14*laaron- joined #nim
09:41:54*laaron- quit (Client Quit)
09:42:09leorizeAraq: anything blocking on https://github.com/nim-lang/Nim/pull/12421 ?
09:42:22leorizeci red because norm was broken that day
09:42:55*laaron- joined #nim
09:45:59*laaron- quit (Client Quit)
09:54:39*laaron- joined #nim
09:55:19leorizePMunch: what's the list of nimble packages on playground?
09:57:35Zevvleorize: https://play.nim-lang.org/#ix=1YPs
09:59:47*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
10:00:15leorizenice
10:00:21*laaron- joined #nim
10:00:26leorizePMunch: can we add nesm? it's a really cool macro
10:10:41*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
10:12:19*laaron- joined #nim
10:13:05*NimBot joined #nim
10:25:23*clyybber quit (Quit: WeeChat 2.6)
10:40:30*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
10:45:05*NimBot joined #nim
10:45:14*laaron- joined #nim
10:46:31*solitudesf- joined #nim
10:47:04*laaron- quit (Client Quit)
10:48:44*laaron- joined #nim
10:51:30*laaron- quit (Client Quit)
10:52:15*laaron- joined #nim
10:59:55*farribeiro joined #nim
11:00:03*farribeiro left #nim (#nim)
11:00:57*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
11:01:30*laaron- joined #nim
11:08:35*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
11:08:41Araqleorize, done
11:09:30*laaron- joined #nim
11:16:35*NimBot joined #nim
11:18:45*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
11:21:32*chemist69 joined #nim
11:37:25PMunch!eval import nesm; echo "All done leorize!"
11:37:28NimBotAll done leorize!
11:41:21FromDiscord<IJCSTAB> functions like 'pred()' and 'inc()' don't work on an unsigned int of any kind, and comparisions like '<' and '==' don't work on any specific unsigned int like 'uint32', only 'uint', is this intentional design?
11:43:08Araqcomparisons do work but you cannot mix unsigned types
11:43:15Araqfixed in 1.1
11:43:40narimiranIJCSTAB: it works :/ https://play.nim-lang.org/#ix=1YPT
11:43:57Araqdunno about 'pred' and 'inc'
11:44:18Araq!eval echo pred(1'u16)
11:44:21NimBot0
11:44:32Araq^ seems to work
11:47:02FromDiscord<IJCSTAB> is that on 1.0?
11:49:19*rockcavera joined #nim
11:49:59FromDiscord<IJCSTAB> i think the problem is specifically with uint8 actually
11:51:54narimiranuint8 also works: https://play.nim-lang.org/#ix=1YPX
11:52:46*dddddd joined #nim
11:53:50Araq!eval echo NimVersion
11:53:52NimBot1.0.0
11:54:04*solitudesf- quit (Ping timeout: 268 seconds)
12:02:21FromDiscord<IJCSTAB> it seems like i'm a bit of a fool, the compiler errors are still pretty new to me so i got lost, sorry about that; thanks though
12:15:49Zevvdisruptek: It parses Rod :) http://ix.io/1YQ6
12:23:13shashlickWow
12:23:53*oculuxe quit (Quit: blah)
12:24:47*oculux joined #nim
12:34:15FromDiscord<krab4t> Zevv: ` Error: attempting to call undeclared routine: 'multiReplace' ` nim compile -f -d:npegGraph --run what does it mean?
12:35:19Zevvbug - will fix. It's windows, not properly tested
12:36:53Zevvfixed in master - for some reason strutils came in automatically on posix but not on dindows
12:37:10Araqhuh?
12:37:53PMunchThat sounds like a bug..
12:38:42*stefantalpalaru joined #nim
12:40:29Zevvno it's just me - it's only called on the windows path and I was too fanatic cleaning up unused imports
12:41:19Araq:-)
12:41:54*asymptotically joined #nim
13:01:16*Hideki_ joined #nim
13:02:56*Hideki_ quit (Client Quit)
13:03:58shashlickNext make a peg for Nim
13:06:14*alexander92 quit (Read error: Connection reset by peer)
13:06:26*solitudesf- joined #nim
13:06:51Zevvnope
13:07:21Zevvrod is a nice proof of concept, and that's about as far as you should go with tools like this.
13:07:55ZevvBut I now have left recursion and operator precedence tackled, which makes me happy
13:09:34Araqworking on Nim's grammar would be nice though
13:09:49AraqNim's parser does some ugly stuff that it shouldn't
13:11:04ZevvIt's a lot of work and not sure what it would bring. Of course cool to create an AST tree of NimNodes, but then what
13:12:35shashlickThen we can get the vm at runtime
13:12:55Araqhttps://www.informatik.uni-marburg.de/~seba/publications/layout-parsing.pdf
13:13:38Araqand especially: https://michaeldadams.org/papers/layout_parsing/LayoutParsing.pdf
13:13:50Araqwhich uses Nim's idea, more or less
13:15:50*Romanson joined #nim
13:16:36*Hideki_ joined #nim
13:21:34ZevvI've been playing with that some time ago, I should be able to handle INDEND and DEDENT
13:25:56superbiahow to write `if !boolVar:` in nim?
13:26:11PMunch`if not boolVal:`
13:26:31superbiasweet
13:27:06PMunchHmm, I tried to install the dependencies for arraymancer on the playground and I get a line in the output just saying "Killed"
13:27:40sealmoveMurders happen, it's part of life.
13:27:51PMunchI've done a grep through both the playground code and all the nimble packages associated with arraymancer, but I couldn't find that word anywhere..
13:28:05PMunchsealmove, haha it's surely a code-assasin
13:29:05*nsf quit (Quit: WeeChat 2.6)
13:30:04ZevvHow is the fallout of the 1.0 release going btw, did Nim end up with more visitors, more downloads, etc, and not only the days after the release?
13:30:12stefantalpalaruCould be the kernel doing the killing. Check the output of "dmesg".
13:30:36*alexander92 joined #nim
13:30:52PMunchstefantalpalaru, hmm possibly
13:31:13PMunchThat's kinda hard to do though when the container is immediately destroyed after its run :P
13:32:14Zevvis it GC'ed as well then? I thought dead bodies do linger on docker unless explicitly dug up?
13:32:38PMunchWell I don't think the container was killed
13:32:56AraqZevv, good question... need to investigate :P
13:34:02narimiranZevv: re 1.0 stuff: i noticed way way more forum activity and new users
13:34:32PMunchYeah there are some new faces around here on IRC as well
13:34:38Zevvbut how much is 'way way more'? I do see some more newbies here as well
13:34:39Zevv^
13:35:08Zevveven over the last week or so, so something must still be spewing news about nim somewhere, not just the peak of R-day
13:35:13*fredrik92 joined #nim
13:35:43FromGitter<nixfreakz_twitter> Is it possible to do driver development with nim ?
13:35:46Zevvthis one maybe: http://www.chattanoogapulse.com/music/features/nim-nims-deliver-a-masterpiece/
13:36:00Zevvnixfreakz_twitter: In theory, yes. In practice, you need to do some plumbing
13:36:25Zevvsome hints are in https://github.com/zevv/nim-kernel-module, but it's not in proper working order
13:36:31FromDiscord<Rika> yay i made a dithering program based on `a dither`
13:36:34FromGitter<nixfreakz_twitter> Nim is crazy the amount of stuff you can do with it, its like drinking out of a hydrant
13:36:55sealmoveGuys, I need advice of how to split up modules... How do you usually do it? 1 module (say module A) with the types and many modules who import module A?
13:36:56Araqstrike!
13:37:08Araqgctest compiles!
13:37:18Araqnow it only needs to run...
13:37:20*Araq sighs
13:37:22Zevvfirst link!
13:37:41FromDiscord<Rika> sealmove i do it by small portions of the program, like for example the part that parses strings, the part that handles this datatype/concept
13:37:42FromDiscord<Rika> etc
13:37:43sealmovegctest compiles, what does it mean? :D
13:37:48*drewr quit (Quit: ERC (IRC client for Emacs 26.3))
13:38:18Araqsealmove, it means the stress testing test compiles with --gc:destructors
13:38:20sealmoveRika: But in my case all parts of the program use the same custom types
13:38:45FromGitter<nixfreakz_twitter> Also any examples how to write code to change code ? not entirely sure with the official meaning is
13:40:26Zevvnixfreakz: that's basically what macros do: https://nim-lang.github.io/Nim/tut3.html
13:40:33FromGitter<nixfreakz_twitter> self modifying code
13:40:34FromDiscord<Rika> nixfreakz_twitter do you mean macros
13:40:36FromDiscord<Rika> ah yes
13:41:02Zevvit's pretty advanced. The idea is that all code have a presentation in a tree datastructure, the abstract syntax tree (AST)
13:41:26ZevvA macro can get a piece of code passed, make any modifications to the AST and then pass it down to the compiler as if nothing happened
13:41:29FromDiscord<Rika> pretty advanced but i understood it pretty well, nim's macros are intuitive imo
13:41:55ZevvastGenRepr is your friend
13:42:29FromGitter<nixfreakz_twitter> so macros can do the same thing like in LISP , hot coding
13:44:19FromGitter<zetashift> with hot coding do you mean by chance hot code reloading?
13:44:55sealmoveBut Nim has "clear" (well not always) distinction between CTFE and normal execution. I think LISP doesn't.
13:44:58alexander92self modifying, like code that replaces itself
13:45:08FromDiscord<Kiloneie> It says in Nim Tutorial Part 1, that you can use "inc" "dec" on ordinal types e.g. enumerators, i've tried to do that but i got no clue...
13:45:11FromGitter<zetashift> ah okay
13:45:22FromGitter<zetashift> 1) inc or inc(12)
13:45:24FromGitter<nixfreakz_twitter> excuse of ignorance please , I mean where you can change code on the fly without stopping the current program
13:45:31FromGitter<nixfreakz_twitter> does that make sense ?
13:45:34alexander92hmm, so hot code reloading?
13:45:39alexander92zetashift is right
13:45:59FromGitter<nixfreakz_twitter> ok so thats called hot code reloading then?
13:46:09sealmoveyep
13:46:13FromDiscord<Rika> yeah
13:46:17sealmovethere is work on that, but it's different from macros
13:46:44sealmovehttps://github.com/nim-lang/Nim/issues/8927
13:47:05alexander92give
13:47:08alexander92us an example in lisp
13:51:06FromGitter<nixfreakz_twitter> sorry in meeting.. give me a moment
13:51:49*zahary joined #nim
13:51:52FromDiscord<krab4t> Zevv: 0 could be a valid value, so returning 0 in these cases its a bad idea ๐Ÿ˜›
13:53:16*fredrik92 quit (Read error: Connection reset by peer)
13:53:42*fredrik92 joined #nim
13:54:10*couven92 quit (Disconnected by services)
13:54:19*fredrik92 is now known as couven92
13:54:37*fredrik92 joined #nim
13:57:21*drewr joined #nim
13:59:43ZevvTrue - but now you have to check in advance, or try:
13:59:55Zevvwhich might be just fine as well
14:01:16FromDiscord<krab4t> npeg raises one same `NPegException` for everything?
14:01:41Zevvat this time, yes.
14:01:49Zevvwhich is kind of silly
14:02:50FromGitter<nixfreakz_twitter> its called late binding I guess https://en.wikipedia.org/wiki/Late_binding#Late_binding_in_Lisp
14:04:37FromGitter<nixfreakz_twitter> actually I'm pretty sure its because of the lisp REPL
14:05:01FromGitter<nixfreakz_twitter> cause you can load code and debug at compile the code all in the repl
14:05:37FromGitter<nixfreakz_twitter> anyway its really advanced and I like nim alot and i will just keep learning
14:07:25*PMunch quit (Remote host closed the connection)
14:09:39Zevvkrab4t: I'm open to all ideas there btw. I'm pretty confident about a lot of the design, all except the API in code blocks, which are a bit of a strange collection of ad-hoc things. There should be a well defined interface there, but I'm not sure what it should look like
14:10:35FromGitter<zetashift> @nixfreakz_twitter Nim has that option too, but it's quite untested
14:11:20AraqZevv, yeah that's the hard part :P
14:11:24FromGitter<nixfreakz_twitter> is the REPL in the dev version?
14:12:52FromGitter<zetashift> No someone still has to make that using the newly hot code reloading feature.
14:13:33ZevvAraq: true, true. But I've come a long way though :)
14:27:08*asymptotically quit (Remote host closed the connection)
14:28:58*kungtotte joined #nim
14:35:50*shashlick quit (Remote host closed the connection)
14:36:16*shashlick joined #nim
14:44:44*sealmove quit (Quit: WeeChat 2.6)
14:57:16FromDiscord<kodkuce> @Kiloneie for slices turtorial you should have added [^1] too
15:00:00FromGitter<zacharycarter> Hmm - I'm trying to avoid having to compile with the cpp backend for these steamworks bindings, but I don't see a way
15:00:17FromGitter<zacharycarter> I was wrapping some of the C++ steamworks library with a C library
15:00:27FromGitter<zacharycarter> and producing a DLL and binding to that with Nim
15:00:52FromGitter<zacharycarter> but I also want the C++ code to call a C function which in term would invoke a nim procedure
15:00:53disrupteki'm surprised that even worked.
15:01:06FromGitter<zacharycarter> but I don't think it's possible to do that
15:01:17FromGitter<zacharycarter> I mean it is - but I don't think I can make it work both ways
15:01:36FromGitter<zacharycarter> it will want the implementation for the function declaration at compile time when producing the dll
15:01:58disruptekyes, i dunno how you got that far without cpp'ing the wrapper.
15:02:04lqdev[m]is there a way of doing --dynlibOverride:SDL2` in code? NOT in nim.cfg, config.nims, or command line params.
15:02:13disrupteki guess because you weren't actually using the symbols.
15:02:25FromGitter<zacharycarter> this is what I was trying to do
15:03:08FromGitter<zacharycarter> https://gist.github.com/zacharycarter/62359bb95b15a539963cc5af03a6d62d
15:03:37lqdev[m]zacharycarter: `{.dllimport.}`
15:03:39lqdev[m]?
15:04:51FromGitter<zacharycarter> well I am doing - `__declspec(dllimport)`
15:05:01FromGitter<zacharycarter> for the function that I want to be implemented from Nim
15:05:18FromGitter<zacharycarter> but since it's not provided when I'm building the DLL it's not possible
15:05:47FromGitter<zacharycarter> at least as far as I can tell
15:06:33shashlickif you are using {.compile.}, i think it is smart enough to g++ cpp files
15:06:39shashlickthen you only need to modify the linker
15:07:16FromGitter<zacharycarter> I was compiling this with CMake
15:07:59FromGitter<zacharycarter> and producing a DLL and then using `importc` for the C wrapped types and functions
15:08:22FromGitter<zacharycarter> I could try with the compile pragma
15:09:05*Vladar quit (Quit: Leaving)
15:10:07shashlicknaah
15:10:18shashlicki prefer the cmake/configure method now with getHeader
15:10:40shashlicki'm done recreating a build system when several already exist
15:10:52FromGitter<awr1> you can use codegendecl
15:11:13FromGitter<awr1> or importc + dynlib but i assume you're linking to the static lib
15:11:35shashlickwhy would you have issues with a C header and a C++ dll if the exports are typed correctly
15:12:11lqdev[m]shashlick: any news on the enum issue I was having with nimterop?
15:12:36FromGitter<zacharycarter> the problem is that I need the C++ code which I'm building a DLL from, to also invoke a Nim function
15:12:45FromGitter<zacharycarter> basically a Nim callback
15:13:34FromGitter<awr1> `proc steam_on_lobby_match_list(pLobbyMatchList: ptr LobbyMatchList; bIOFailure: bool) {.codegenDecl: "__declspec(dllimport) $# $#$#".}`
15:13:35FromGitter<zacharycarter> and since I'm building the DLL separate from my Nim code I run into an unresolved external symbol error
15:13:54*superbia quit (Quit: WeeChat 2.4)
15:14:27shashlicklqdev - it is fixed in #head along with https://github.com/nimterop/nimterop/issues/57
15:14:34FromGitter<zacharycarter> hmm I'll try that @awr1 - thanks
15:14:43FromGitter<awr1> or ``proc steam_on_lobby_match_list(pLobbyMatchList: ptr LobbyMatchList; bIOFailure: bool) {.importc, dynlib: when defined(amd64): "steam_api64.dll" else: "steam_api.dll".}`
15:15:05*narimiran quit (Ping timeout: 265 seconds)
15:16:07lqdev[m]oh wow, toast building performance is fixed?
15:16:30shashlick@lqdev - still working some bugs that SDL raises but its much better now
15:16:45shashlickit should be very fast along with caching
15:17:27lqdev[m]indeed it is
15:17:31lqdev[m]much faster than it was before
15:18:00lqdev[m]I wonder if I could just cImport the only header files I need leaving the rest ignored?
15:18:05lqdev[m]eg. SDL2/SDL_audio.h
15:18:20shashlickwill make your life easier assuming it contains everything you need
15:18:24shashlickyou don't have to recurse
15:18:49lqdev[m]I only need a few things from SDL
15:19:03leorizeshouldn't the various sdl bindings out there work?
15:19:06lqdev[m]I don't need stuff like SDL_surface and whatnot
15:19:37lqdev[m]I don't want dynamic linking on Windows
15:19:53lqdev[m]they don't allow me to do that within my own engine, I have to tell the users to add --dynlibOverride:SDL2 which is annoying
15:19:55shashlick@lqdev - check the altNames piece - made changes for SDL
15:20:07leorize--dynlibOverrideAll is a thing
15:20:33lqdev[m]leorize: you didn't understand by problem.
15:20:52FromGitter<awr1> how do people use your engine? as a nimble package?
15:21:10leorizewell Nim's stance on this is that modules can't change how complination work afaict
15:21:28lqdev[m]shashlick: I already did, it fixed the dynamic linking problem with getHeader linking to libSDL-1.2 instead of libSDL-2.0
15:21:48FromGitter<zacharycarter> ugh - should have thought about that sooner, can just pass the callback in
15:21:52lqdev[m]@awr1 yes
15:21:53FromGitter<zacharycarter> I think this should work now
15:22:03FromGitter<awr1> i mean it's not a big deal to add `switch("dynlibOverride", "SDL2")` to people's .nims files
15:22:33FromGitter<awr1> you can *detect* if they dont have that option set and output an error.
15:22:52leorizeI think it should be up to the users to decide how they want things to work
15:23:24shashlick@lqdev - i suspect the is an issue with code going into comments - need to check what's going on
15:23:32shashlicklmk how it is working for you
15:23:38lqdev[m]leorize: yes, that's why I want a switch like `-d:dynlibSDL` in my engine
15:23:57leorizecan't you just follow Nim's default?
15:24:05FromDiscord<treeform> zacharycarter, have you seen my steamworks binding? Are you bindings some place?
15:24:15lqdev[m]leorize: I hate DLL hell.
15:24:24lqdev[m]I want SDL statically compiled under Windows.
15:24:44FromDiscord<treeform> zacharycarter, some one made steamworks c wrapper, but I could not get it to work.
15:24:46*couven92 quit (Read error: Connection reset by peer)
15:24:50FromGitter<awr1> you can do `when not compileOption("dynlibOverride", "SDL2"): {.error: "oops!".}`
15:24:55*asymptotically joined #nim
15:25:12*couven92 joined #nim
15:25:21*letto_ quit (Quit: Konversation terminated!)
15:25:52lqdev[m]@awr1 yes, I already do that with rapid/audio, but that part is an optional feature. rapid/gfx is used pretty much everywhere
15:25:55FromGitter<awr1> but i think you are going to run into issue when you tell people your engine should be used as an importable nimble project as opposed to a repo that you clone
15:26:08lqdev[m]you guys don't understand my pedantry :/
15:26:59FromGitter<awr1> because you design it the other way, you get to control all the build options
15:27:18FromGitter<awr1> most game engines base themselves on "individual game projects" that you make from their respective editors.
15:27:48FromGitter<awr1> well, the popular ones do, anyway.
15:28:13lqdev[m]shashlick: I'm getting this error: https://termbin.com/t8uvq
15:28:24lqdev[m]@awr1 well, I designed my game engine this way for a reason
15:28:47lqdev[m]I was annoyed by the amount of DLL files other frameworks and engines have
15:29:20lqdev[m]so I just wanted to link things statically to avoid that
15:29:32lqdev[m]1 file is enough. I don't need 200 more just to run the game.
15:29:35shashlick@lqdev - ya sometimes, parseStmt errors out and doesn't raise an exception that i can catch
15:29:45FromGitter<awr1> in general i don't think people care about having SDL2.dll in the same folder.
15:29:53FromGitter<awr1> but i know your issue
15:30:20lqdev[m]@awr1 people don't care, but I do care
15:30:24lqdev[m]shashlick: anything I can do about that?
15:30:45FromGitter<awr1> which is why i often just opted for not using SDL2 and built my own platform layer from win32+xcb+cocoa
15:31:05*solitudesf- quit (Remote host closed the connection)
15:31:25*solitudesf- joined #nim
15:31:31lqdev[m]I don't want to handle the windowing myself, because cross-platform support is hard
15:31:59lqdev[m]and cross-platform audio is even harder
15:32:05FromDiscord<Kiloneie> @kodkuce Yeah, but i didn't really understand that, it felt confusing idk, so i skipped it.
15:32:29shashlickfor now, I just cOverride type BlitMap
15:32:30FromGitter<awr1> someday i might reform it into an SDL2 like library. but not now. too busy w/ uni
15:32:36shashlickbut then you run into a bigger issue
15:32:54shashlickmaybe you won't cause you only want SDL_audio.h
15:33:17FromGitter<awr1> pulseaudio and directsound aren't bad
15:33:17*alexander92 quit (Read error: Connection reset by peer)
15:33:24FromGitter<awr1> i have never used ALSA
15:33:32leorizelqdev[m]: how are you handling static linking?
15:33:33lqdev[m]I want SDL_audio, SDL_event, SDL_video, and a few others
15:33:33lqdev[m]also SDL.h has all init stuff
15:33:58leorizeare you compiling .c files with your project, or do you requires that the dev has all of those deps installed?
15:34:02lqdev[m]leorize: I just compile most libraries I use using cCompile from nimterop
15:34:19lqdev[m]/I use/d
15:34:34shashlickBlitMap isn't even declared
15:35:01shashlicksee /usr/include/SDL2
15:35:07shashlickwhere is it even defined
15:35:31lqdev[m]probably something from X11
15:35:41lqdev[m]or Xlib, for that matter
15:35:46shashlickit is SDL_BlitMap
15:35:51shashlickprefix truncated
15:36:03lqdev[m]oh, right
15:36:16lqdev[m]well I don't see it here https://wiki.libsdl.org/CategoryAPI
15:36:35FromGitter<awr1> i don't really know what to tell you except A) nim has a limited set of ways you can modify compilation options, like `{.passC.}` but you can't really do what you want with those B) almost every SDL2 app links to SDL2.dll, one DLL is not that bad
15:36:37shashlickjust cOverride it
15:37:23FromGitter<awr1> unless there is a c define for SDL2 to statically link idk what to tell you
15:37:44lqdev[m]@awr1 gaah but it's annoying!!
15:38:21lqdev[m]it would be nice if I could place it under a lib folder or sth but windows is a piece of crap so it only loads DLLs from the current directory
15:38:23FromDiscord<kodkuce> @Kiloneie https://play.nim-lang.org/#ix=1YRs
15:38:33lqdev[m]and C:\Windows of course.
15:38:37leorizewell if it's for your usage only then feel free to do it in whatever way you'd like
15:38:44leorizelqdev[m]: windows load libs from PATH
15:38:58lqdev[m]right
15:38:59leorizeand some people (like Araq) considers this the "sane" way so :P
15:39:08FromGitter<awr1> "but windows is a piece of crap so it only loads DLLs from the current directory"
15:39:13FromGitter<awr1> honestly i prefer this behavior lol
15:39:16FromGitter<awr1> rpath is silly
15:39:17leorizeit's really depends on what you were exposed to early on
15:39:21FromDiscord<Kiloneie> @kodkuce okay okay, i will be doing some video reuploads in the following week, or weeks, i will fix that one as well.
15:39:28lqdev[m]I prefer my DLLs to be in a `lib` folder
15:39:43lqdev[m]just like Processing does with its export function
15:39:55lqdev[m]because that's what I used to learn programming lol
15:40:09lqdev[m]leorize is right here
15:40:21leorizeyou can't fight the platform :P
15:40:21*Trustable joined #nim
15:40:31leorizeyou're developing for it, not the other way around
15:40:34FromGitter<awr1> you can probably do that with manifest options or (for runtime dynamic linking) you also have this https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-adddlldirectory
15:41:09lqdev[m]leorize: but I can work around its flaws
15:41:27FromDiscord<treeform> awr1, I always ship my DLLs with my EXE in the same folder. No DLL hell for me.
15:41:35leorizelet's just hope you don't shoot yourself while doing so
15:42:04FromGitter<awr1> @treeform i agree, this is what you should do on windows
15:42:14leorizeI used to re-invent everything because it doesn't go the way I'd like it to
15:42:30FromGitter<awr1> and it is more sane than linux trying to use /usr/lib for everything unless you use rpath
15:42:31leorizeI ended up just wasting my time :P
15:45:16lqdev[m]@awr1 but on Linux you at least have a package manager, and libSDL-2.0.so is installed on pretty much every Linux system.
15:45:40FromGitter<awr1> does SDL2 by default strongly link to SDL2.dll? or does it do that with SDL init only
15:46:00leorizelqdev[m]: wait until you deal with cross-distribution hell :P
15:46:17FromGitter<awr1> also @lqdev[m] you are correct, but this gets to be a lot more annoying with engines that come with its own unique dependencies seperate from anything provided in a package manager
15:46:48leorizelibs like sdl knows their audience so they don't break api every two weeks or so
15:47:27FromGitter<awr1> also when you load games from steam i think they override libsdl somehow
15:47:48leorizeyea, they have their own pool of libraries
15:48:11leorizethey employs ld_library_path to make applications prefer those
15:48:26FromGitter<awr1> test to see if SDL2 does runtime linking on init. if it does you can do AddDllDirectory() before it.
15:48:52FromDiscord<kodkuce> @Kiloneie no pressure just saying ๐Ÿ™‚
15:49:02leorizedynamic linking on nim happens before the program is loaded
15:49:14FromGitter<awr1> nooo
15:49:18FromGitter<awr1> i mean SDL_init()
15:49:34FromGitter<awr1> not {.dynlib.} or whatever
15:52:36lqdev[m]shashlick: cSkipSymbol doesn't work? I tried doing `cSkipSymbol(@["BlitMap", "HapticDirection"])` and I still get an error that BlitMap is not defined
15:53:39*Hideki_ quit (Remote host closed the connection)
15:54:29shashlickyou don't want to skip, they are being referred to so you need to add them
15:54:33shashlickcOverride instead
15:54:44shashlickplus HapticDirection is a gcc issue I think
15:54:53shashlickcause going through the preprocessor, it comments out that code
15:54:57shashlickthe comments are a mess
15:57:21*Hideki_ joined #nim
15:57:43*nsf joined #nim
15:58:26lqdev[m]well, now I'm getting this: https://termbin.com/2eiy
16:01:11shashlickthat's cause you are passing the wrong dynlib value
16:01:15shashlickit should be SDLLPath
16:01:30shashlickpath to the dynlib found by getHeader
16:01:36lqdev[m]oh, right
16:01:36*Hideki_ quit (Ping timeout: 240 seconds)
16:04:07lqdev[m]oh my god I'm getting 15 MB of error messages
16:04:15lqdev[m]I don't know if termbin/ix can handle that
16:04:45lqdev[m]well, it was truncated https://termbin.com/artn
16:05:30lqdev[m]I don't think this is gonna get anywhere any time soon
16:06:21Araqlqdev[m], use .dirty templates
16:07:06lqdev[m]templates have nothing to do with my code, it's a bug in nimterop
16:07:39shashlickhold on
16:07:49shashlicki fixed the HapticDirection issue
16:08:04shashlicknext is SDL_RWops but it is a nested structure which isn't supported yet
16:08:50lqdev[m]oh. `proc GetTicks*(): Uint32 {.importc: "SDL_GetTicks", cdecl, dynlib: /usr/lib64/libSDL2-2.0.so.0.}`
16:08:56lqdev[m]nimterop doesn't quote the library path
16:09:04lqdev[m]which is obvious
16:09:12shashlickyou have to pass "SDLLPath" in quotes
16:10:02lqdev[m]don't you think it's a little annoying?
16:10:32lqdev[m]I kinda get it, buuut
16:10:35lqdev[m]._.
16:10:43lqdev[m]it's confusing at times
16:10:49shashlickwell, open to suggestions but ya
16:11:04shashlickyou are asking cImport to generate code
16:11:48lqdev[m]yeah, I get it
16:13:16*couven92 quit (Read error: Connection reset by peer)
16:13:20lqdev[m]at least RWops can be easily wrapped as a pointer
16:13:42shashlick@lqdev - https://github.com/nimterop/nimterop/blob/master/nimterop/getters.nim#L194
16:13:44*couven92 joined #nim
16:13:52shashlickchange static to ^static - will fix the Haptic... issue
16:14:35shashlickneed to recompile toast so `nimble bt` for nimterop
16:14:37lqdev[m]now it's stuck at an enum, https://wiki.libsdl.org/SDL_GameControllerAxis?highlight=%28%5CbCategoryGameController%5Cb%29%7C%28CategoryEnum%29
16:14:37lqdev[m]brb
16:18:52*Vladar joined #nim
16:32:00lqdev[m]shashlick: wait, so I need to `nimble install nimterop@#head` and `nimble bt` in its folder?
16:34:39*lritter quit (Ping timeout: 268 seconds)
16:35:26*Hideki_ joined #nim
16:39:40lqdev[m]shashlick: O
16:39:46lqdev[m]I'm still getting the same error
16:41:03*couven92 quit (Disconnected by services)
16:43:06*couven92 joined #nim
16:49:05*zahary quit (Quit: Leaving.)
16:50:17Zevvlqdev[m]: what is {.rule.} doing?
16:50:45lqdev[m]Zevv: just adds a few common parameters to reduce code repetition
16:51:08Zevvah ok
16:51:11lqdev[m]it's defined before all the grammar rules
16:51:23Zevvah sure
16:53:11FromDiscord<krab4t> Zevv: how to deal with ` MapTier <- "MapTier" * S * ?Operator * S * >+Digit: ` when ` ?Operator ` is optional, what about multiple optionals
16:53:39Zevvmove them into separate rules with code blocks
16:53:45Zevvif they match, your code runs
16:53:59FromDiscord<krab4t> ๐Ÿ˜ฎ
16:55:38FromDiscord<Kiloneie> How to indent unindent in VS Code ? Google and pdf for VS Code says Control + [], if i do control + f g which are the keys those brackets are under, nothing happens, in order to make square brackets i need to use alt, so control + alt +f / g makes square brackets... o.O !?
16:55:46lqdev[m]jeez, I think I'm done
16:56:03lqdev[m]that took a while
16:57:02lqdev[m]https://gist.github.com/liquid600pgm/978cf0094f6a08e2921c0617da7e71a4
16:57:59lqdev[m]@Kiloneie unindenting can be done with `shift + tab` or `ctrl + [`, indenting can be done with `ctrl + ]` afaik
16:58:06lqdev[m]at least on Linux, but keybindings vary depending on your OS
16:58:22FromDiscord<Kiloneie> thank you, shift tab works
17:05:43FromGitter<zacharycarter> hmm - now that I've added `#include <stdlib.h>` and am using `malloc` I get an error - `could not load: C:\Users\carte\projects\rts\csteamworks.dll`
17:05:57FromGitter<zacharycarter> does that have something to do with not linking c's standard library?
17:08:47*Trustable quit (Remote host closed the connection)
17:09:31FromGitter<zacharycarter> I am building a 64 bit dll and using a 64 bit version of Nim
17:10:56FromGitter<zacharycarter> sounds like I'm running into the same issue as - https://forum.nim-lang.org/t/1187
17:10:59FromGitter<zacharycarter> last reply
17:12:51*filcuc_ joined #nim
17:15:23lqdev[m]jeez, I'm so fed up fighting with nimterop I'm gonna play some OpenTTD to relax
17:15:24lqdev[m]so bbl
17:16:06disruptekwhat a great game that was.
17:16:30*filcuc quit (Ping timeout: 264 seconds)
17:21:33FromGitter<zacharycarter> bleh this error isn't very helpful
17:21:53FromGitter<zacharycarter> I wonder how Angluca figured out that issue
17:25:28*Romanson quit (Quit: Connection closed for inactivity)
17:31:57*filcuc joined #nim
17:33:39FromGitter<zacharycarter> bleh (โ•ฏยฐโ–กยฐ)โ•ฏ
17:34:29*filcuc_ quit (Ping timeout: 264 seconds)
17:38:42FromGitter<zacharycarter> I have no idea what the real problem is because the error message is beyond horrible
17:56:03*Hideki_ quit (Ping timeout: 268 seconds)
17:58:12FromDiscord<krab4t> Zevv: your operator rule was incorrect! ๐Ÿ˜›
17:58:27disruptekno!
17:58:34*filcuc quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
17:58:51*couven92 quit (Read error: Connection reset by peer)
17:59:08FromDiscord<juan_carlos> The Graveyard is Dead?. ๐Ÿฅบ
17:59:16*couven92 joined #nim
18:00:17*narimiran joined #nim
18:03:08FromGitter<zetashift> Seems so 404's for me
18:03:23FromGitter<zetashift> I never used it...
18:06:05Araqhttps://github.com/nim-lang/graveyard huh? narimiran, any idea?
18:07:56narimiranwhat happened there? i remember seeing it not that long ago
18:07:58FromDiscord<juan_carlos> Not like critical, but I was expecting it to be Archived at least.
18:09:49Araqwho deleted it?
18:10:49narimirani didn't. and whoever did, it couldn't have been by accident, as github requires you to confirm by typing repo's name
18:11:14FromDiscord<juan_carlos> What Is Dead May Never Die.
18:12:16*snooptek quit (Ping timeout: 240 seconds)
18:12:31narimirani have locally something, but it might be not the latest version that was on github
18:13:07Araqwhoever was it will have the access rights taken from him
18:13:20Araqit's not acceptable.
18:14:47*lasso[m] joined #nim
18:14:58narimirani'll push my version, even if it is not the latest, it is better than nonexisting repo
18:15:37FromDiscord<juan_carlos> I was wondering if List Comprehension is going to Graveyard.
18:17:18FromGitter<Vindaar> @narimiran: I have a version of the graveyard with the last commit from feb 9 2019 here. In case yours is even older
18:17:42narimiran@Vindaar thanks, my version is from May 2nd, and now is active at https://github.com/nim-lang/graveyard
18:17:50FromGitter<Vindaar> nice :)
18:18:07Araqwhy does github even allow removing stuff? it sucks
18:18:20narimiranit might be that nothing happened in the mean time. i don't remember putting anything to graveyard in last couple of months
18:18:28Araqgithub is a critical piece of infrastructure now...
18:19:29shashlick@lqdev - sorry, just catching up
18:19:47*couven92 quit (Read error: Connection reset by peer)
18:20:12*couven92 joined #nim
18:20:35FromGitter<zetashift> Is there a log of who removed the repo?
18:20:56FromDiscord<juan_carlos> Undead Graveyard ๐ŸŽ‰
18:21:16*couven92 quit (Read error: Connection reset by peer)
18:21:41*couven92 joined #nim
18:21:46narimiran@zetashift probably somewhere internally at github, but i doubt you could get that info publicly
18:22:26FromGitter<zetashift> But atleast for the members of the org right?
18:23:00narimiran"Once you delete a repository, there is no going back. Please be certain."
18:23:31narimiranand current graveyard is a new repo that "accidentally" has the same name as the old one
18:23:54shashlickwow so graveyard just disappeared?
18:24:07narimiran...and nobody noticed until now
18:24:07Araq@narimiran
18:24:07Araqnarimiran โ€“ repo.destroy
18:24:08AraqDeleted the repository nim-lang/graveyard
18:24:08AraqCroatia 14 days ago
18:24:17narimiranwtf
18:24:17FromGitter<zetashift> I know it's irreversible but if the account is an organization if a repo got deleted you'd expect it to be logged for the other people in the org to see no?
18:24:18Araq^ it was you!
18:24:30Araq:D
18:24:30narimirani don't remember doing that!!
18:24:38FromGitter<zetashift> busted
18:24:42FromGitter<Vindaar> haha :D
18:24:46narimiranand no, i wasn't drunk or anything like that
18:24:52narimiranwtf
18:25:06Araq2 weeks ago your dog became intelligent
18:25:20FromDiscord<Kiloneie> is there any limit of dimensions an array can have ?
18:25:32FromDiscord<Kiloneie> i keep typing them, and they keep working...
18:25:48narimirani'm so sorry, i have no idea how that happened
18:25:56*theelous3 joined #nim
18:26:03Araqnarimiran, virus?
18:26:20narimiranvirus that goes and removes graveyards?
18:26:24Araqyeah
18:27:14FromDiscord<ZeeQyu> In case there's something yet unexplained that removes repositories, have you iterated through all the repos in nim-lang and looked if they're all there?
18:27:55FromDiscord<ZeeQyu> I don't know which ones are supposed to be there, so I can't do it
18:28:10AraqI have way too many to check :-/
18:28:12narimiranyeah, Araq, please see for that day if anything else got deleted
18:28:22narimiran(14 days ago)
18:29:13FromGitter<zetashift> maybe you thought you were deleting it from your PC but instead you destroyed the repo??
18:29:13Araqonly this one
18:29:20Araqhttps://github.com/organizations/nim-lang/settings/audit-log?q=action%3Arepo.create+action%3Arepo.destroy+action%3Arepo.access+action%3Ateam.add_repository+action%3Ateam.remove_repository
18:29:22FromGitter<zetashift> weird stuff
18:29:37FromGitter<zetashift> 404's for me too but pretty sure that's intented
18:29:47narimiran404 for me too
18:30:14FromDiscord<ZeeQyu> Screenshot, perhaps? If you actually want to show the contents to everyone
18:30:15FromDiscord<juan_carlos> You use any GUI for Git?, maybe GUI bugged.
18:30:44narimiran@zetashift i guess i was cleaning my forks of various stuff, and by some mistake i deleted also the original repo, not only my fork. but still i cannot believe it.
18:30:47FromDiscord<ZeeQyu> Can you remove a git repository from github remotely? I thought you had to actively log into the website?
18:32:19FromGitter<zetashift> Still kinda funny how it was 14 days ago and noone would notice if juan_carlos didn't say anythhing about it
18:32:35narimiran@juan_carlos, you snitch!!!
18:33:45FromDiscord<juan_carlos> hahahaha, I seen List Comprehension is getting Deleted, and go to Graveyard, just to see the 404.
18:34:13FromGitter<zacharycarter> got it working - cool
18:34:37FromGitter<zacharycarter> now have async callbacks working with steamworks without having to use the cpp backend
18:34:48FromDiscord<ZeeQyu> I'm not sure yet, but it seems there's a possibility I have to reimplement nim's grammar for my jetbrains plugin, if I can't find a workaround to use nimsuggest. If that's the case, is there a complete formal grammar, like a bnf file, for nim? I know there's snippets in the manual, but is there something that makes sure I get everything?
18:35:09FromDiscord<ZeeQyu> As in, not miss anything?
18:38:39FromGitter<zacharycarter> tomorrow I get started on the multiplayer for the rts game :D
18:38:46FromGitter<zacharycarter> now that I can use steam's matchmaking
18:42:37AraqZeeQyu: doc/grammar.txt
18:42:47Araqbut read the manual to understand the used notation
18:43:54FromDiscord<treeform> Araq, hi, how is stuff? how is new GC going?
18:44:52FromDiscord<ZeeQyu> So the used notation won't be accepted by any existing (non-nim) tool?
18:44:52Araqtreeform: ask me again this weekend please
18:45:20FromGitter<Vindaar> treeform: good to see you, hehe. Could you take a look at https://github.com/treeform/ws/pull/7?
18:45:47AraqZeeQyu: yeah but it's mostly sugar and easy to work around
18:46:30FromDiscord<ZeeQyu> Right. Eh. We'll see if it's easy for me too, or just for you.
18:46:44FromDiscord<ZeeQyu> Thanks, I'll look into it
18:52:27*xmb joined #nim
18:52:29FromDiscord<juan_carlos> Nim programming live stream https://www.twitch.tv/tsoding
18:53:02*laaron- joined #nim
18:53:25leorizeevil emacs
18:57:08FromDiscord<treeform> Vindaar, oh did not see that. For some reason I was not watching my own repo odd..
18:58:40FromDiscord<treeform> Vindaar, merged thanks!
19:00:22FromDiscord<treeform> I joined a company with 1000s of repos and got flooded with all the notification traffic, so I changed all my github settings to no notifications. But I did not know it will effect my personal repos too as well.
19:01:01FromDiscord<treeform> I enabled all my notifications back, but I did not realize I have to go to each repo and enable it there as well.
19:02:31xmbHi, just getting started with nim. Is it possible to make the `--choosenimDir` and `--nimbleDir` options in choosenim persistent?
19:11:19leorizedom96: ^
19:11:31leorizexmb: a way is to make an `alias` for it if you're on *nix
19:12:58FromGitter<Vindaar> treeform: no worries! I can image that'd be annoying. But can I also remind you about that chroma PR, that's still open? :)
19:13:39*Vladar quit (Read error: Connection reset by peer)
19:13:53xmbtrue, i thought it might be built into choosenim or maybe there was some other nim mechanism for it
19:14:45FromDiscord<krab4t> Zevv: maybe just return `nil` if optional rules that not match and extra values in ranges, not sure if its possible
19:16:44Zevvnot possible, its a value not a ref
19:17:07AraqOption[T] exists
19:17:14Zevvbah
19:17:54Zevvkrab4t: throwing is not that bad: if your code cant handle the parser, your code is bad
19:17:56FromDiscord<krab4t> optional i mean `?P` not option xD
19:18:29*nsf quit (Quit: WeeChat 2.6)
19:18:59Zevvyeah but I cant make a gap in the captures thee
19:19:11Zevvwhat if you match a + or a *
19:19:15*alexander92 joined #nim
19:19:15Zevvthee/tree
19:19:55FromDiscord<krab4t> java here we go again, gonna wrap up everything in `try`
19:20:14Zevvyou can check capture.len
19:20:34Zevvbut you better reorganize your parser: if your optional does not match, make sure your code doesnt run
19:20:37Zevvmuch easier
19:25:07Zevvfor all your colors, make a single rule to capture a color. the rule captures r, g and b and checks if capture.len has 4 items so it knows it can capture alpha as well
19:25:13Zevvsimple as that
19:26:40shashlick@lqdev - just pushed the Haptic fix to nimterop head
19:27:12*xmb quit (Remote host closed the connection)
19:29:52*daddoo joined #nim
19:30:18FromDiscord<krab4t> Zevv: i did this already, and for `?P` its gonna be 2 different rules, from 140 loc to like 220
19:33:52alexander92guys
19:33:56alexander92good night
19:34:04Araqbyde
19:36:20FromDiscord<treeform> Vindaar, I merged your Chroma PR as well. Thanks!
19:36:32FromGitter<Vindaar> cool, thank you!
19:36:45FromDiscord<treeform> Vindaar, any thing else I might be missing?
19:36:53FromGitter<Vindaar> not as far as I'm aware
19:37:52FromGitter<Vindaar> maybe this? https://github.com/treeform/flippy/pulls
19:46:02FromDiscord<treeform> yeah closed that too
19:47:44*sealmove joined #nim
19:48:03*narimiran quit (Ping timeout: 240 seconds)
19:50:02Zevvkrab4t:reuse your rules where appropriate
19:51:34shashlick@lqdev - just got SDL to link - have to override BlitMap
19:51:49shashlickplus RWops and GameControllerButtonBind need overrides - ideally you don't need them
19:51:53shashlickthose are nested structs
19:52:03shashlickother than that, SDL wrapper now builds
19:57:30*xmb joined #nim
19:58:23shashlickhere's what the wrapper output looks like - http://ix.io/1YT6/nim
20:00:04*clyybber joined #nim
20:00:40lqdev[m]hm, SDL_gamecontroller.h could be useful at some point
20:01:06shashlickcould hand define that one struct then if possible
20:01:32lqdev[m]it's undocumented
20:01:39*Vladar joined #nim
20:01:47lqdev[m]hmm http://hg.libsdl.org/SDL/file/default/include/SDL_gamecontroller.h#l72
20:01:56lqdev[m]doesn't seem too large
20:02:07lqdev[m]just an enum and a few unions
20:02:16*daddoo left #nim ("Leaving")
20:02:30shashlickyep, but you will also have to cOverride SDL_GameControllerBindType
20:02:35shashlickwhich it depends on
20:03:07shashlickuntil https://github.com/nimterop/nimterop/issues/133 is fixed, cOverride isn't really effective
20:04:57*xmb quit (Remote host closed the connection)
20:09:19*xmb22 joined #nim
20:16:11*clyybber quit (Quit: WeeChat 2.6)
20:18:43disruptekhttps://play.nim-lang.org/#ix=1YTe
20:21:33*clyybber joined #nim
20:22:50disruptekis this really what we want? https://play.nim-lang.org/#ix=1YTg
20:23:06*clyybber quit (Client Quit)
20:23:09*laaron| joined #nim
20:23:31*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
20:32:48Araqyes
20:33:37Araqthe protection/setters are for private fields and used outside of the current module
20:37:53*rockcavera quit (Ping timeout: 250 seconds)
20:41:17*rayman22201 joined #nim
20:44:23FromDiscord<krab4t> well i will just use a bit of templates, this "magic" is insane
20:44:24*alexander92 quit (Read error: Connection reset by peer)
20:47:16Araqgah ... tests are green. finally...
20:47:26disruptekAraq: okay, so semantics will be different when these are exported?
20:47:32disruptekgctest?
20:48:15Araqhmmm nope, still red
20:48:16Araqbut better
20:52:06Araqdisruptek, well setters are designed with the module visibility rules in mind
20:52:29Araqthey are not "different when these exported" but then they begin to work :P
20:52:50Araqand yeah, I'm working on --gc:destructors, the one and only Nim "GC"
20:53:08disruptekright; it's just you can't see that behavior inside the module. i think it's working for me, i just need to rewrite a bunch of crap.
20:53:29disruptekso it's not named `araqsgc` anymore?
20:55:01*clyybber joined #nim
20:57:06lqdev[m]shashlick: I'm getting the following error on `nim check` https://termbin.com/2x9e5 `nim c` works fine
20:58:18Araqdisruptek, sure it is :P
20:59:16lqdev[m]Araq: what does --gc:destructors bring to the table?
21:01:23Araq--gc:destructors uses destructors for seqs and strings and 2 or 3 callbacks/hooks for the GC feature
21:01:36Araqand araqsgc uses the hooks to implement a shared memory GC
21:02:15Araqbut maybe I'll remove the hooks again cause they cost performance and if you don't like the default, use =destroy etc
21:03:33Araqanyway, only thavlak is failing and once that works I can continue on gctest and once that works I test some async program...
21:07:29*theelous3_ joined #nim
21:17:10shashlick@lqdev - wchar_t is covered by nimterop/types
21:17:53lqdev[m]oh, right
21:20:39*Vladar quit (Quit: Leaving)
21:22:19lqdev[m]shashlick: I added that import to the top of my wrapper, but it still errors
21:22:42lqdev[m]am I doing something wrong?
21:26:20*theelous3_ quit (Ping timeout: 268 seconds)
21:27:44*theelous3 quit (Ping timeout: 265 seconds)
21:28:29*krux02 quit (Remote host closed the connection)
21:32:33*clyybber quit (Quit: WeeChat 2.6)
21:35:15*solitudesf- quit (Ping timeout: 240 seconds)
21:36:46*couven92 quit (Read error: Connection reset by peer)
21:37:12*couven92 joined #nim
21:38:16*couven92 quit (Read error: Connection reset by peer)
21:38:42*couven92 joined #nim
21:41:17*couven92 quit (Read error: Connection reset by peer)
21:41:53*couven92 joined #nim
21:44:03*ng0 quit (Quit: Alexa, when is the end of world?)
21:45:23shashlickdo you have `import nimterop/types` and it still complains about wchar_t?
21:48:22*asymptotically quit (Quit: Leaving)
21:52:55*Hideki_ joined #nim
21:56:13lqdev[m]yes
21:56:34lqdev[m]I'm off to bed though for now, I'll look deeper into this tomorrow
21:57:42*Hideki_ quit (Ping timeout: 265 seconds)
22:12:29*laaron| quit (Quit: ZNC 1.7.4 - https://znc.in)
22:13:42*laaron- joined #nim
22:23:35*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
22:24:05*laaron- joined #nim
22:26:47FromGitter<awr1> names of getters and setters should not be the same as actual fields imo
22:27:25FromGitter<awr1> if you have a getter or setter called `x` underlying field it modifies should be named `xImpl` or something to that effect, and should be a private field
22:28:09disruptekof course.
22:28:54FromGitter<awr1> this reduces confusion in my eyes and prevents the "wait, can this recurse?" issue
22:29:01*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
22:29:07FromGitter<awr1> it shouldn't recurse i think but it makes things clearer
22:29:17FromGitter<awr1> https://play.nim-lang.org/#ix=1YTV
22:29:24*laaron- joined #nim
22:30:19*laaron- quit (Client Quit)
22:30:39*laaron- joined #nim
22:33:02*theelous3 joined #nim
22:33:29*theelous3_ joined #nim
22:38:27*theelous3 quit (Ping timeout: 240 seconds)
22:50:53FromDiscord<juan_carlos> Please review, sure some detail is wrong or missing (comment there) https://github.com/nim-lang/Nim/pull/12439/commits/6a7424bc21ca65d6b3784497c2910e8a9bd27936?short_path=31d3b3e#diff-31d3b3ebbd2f4f93dffbaebc05419928
23:01:07*stefantalpalaru quit (Quit: stefantalpalaru)
23:03:16*couven92 quit (Quit: Client Disconnecting)
23:04:01*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
23:04:18*laaron- joined #nim
23:08:13*laaron- quit (Client Quit)
23:08:36*laaron- joined #nim
23:10:38*nif quit (Quit: ...)
23:10:47*nif joined #nim
23:10:48FromGitter<zetashift> TIL about `--gc:go`
23:16:06*xmb22 quit (Remote host closed the connection)
23:37:53*sealmove quit (Quit: WeeChat 2.6)
23:45:51*Jjp137 quit (Read error: Connection reset by peer)
23:47:06*Jjp137 joined #nim
23:58:15*laaron- quit (Quit: ZNC 1.7.4 - https://znc.in)
23:58:35*laaron- joined #nim
23:59:27*laaron- quit (Client Quit)