<< 12-09-2017 >>

00:00:17*yingjun quit (Ping timeout: 260 seconds)
00:05:51FromGitter<zacharycarter> def-pri-pub new branch up
00:09:19def-pri-pubzacharycarter: okay, I see it
00:09:23def-pri-pubThanks for that.
00:09:37FromGitter<zacharycarter> np
00:09:43def-pri-pubI did notice that the user isn't placed right in front of the sprite.
00:09:48def-pri-pubIn fact, they're behind it
00:09:50FromGitter<zacharycarter> yeah
00:09:53def-pri-pubAnd culling is on, so they can't see it.
00:10:13def-pri-pubEh, I wouldn't worry about that for the moment.
00:10:33FromGitter<zacharycarter> I need to implement rotating the sprite around (for billboarding) to fix that
00:10:49FromGitter<zacharycarter> we should support billboarding anyway so I'll work on that here shortly
00:11:02FromGitter<zacharycarter> currently I'm trying to convert this stupid python class to Nim and failing hard
00:16:47d10nI want to statically link my program which uses docopt, which uses nre, which uses pcre. Everything works as epxected when only passing --passL:-static, but the binary is large so I thought I'd like to try using musl. When using --gcc.exe-musl-gcc --gcc.linkerexe=musl-gcc , I get "could not load: libpcre.so(.3|.1|)". Any ideas on what I'm missing?
00:17:04*d10n-work quit (Quit: Connection closed for inactivity)
00:24:15d10nAlso, I want to have a c_read proc like the c_fread and readBuffer procs in sysio.nim, but there must be a reason it's not already there. Adding it to my program is ugly because I want to follow the pattern in sysio.nim, but in order to do so I have to copy-paste a bunch of other procs. If I try to "include system" or "include system/sysio" instead of copy-pasting, I get compilation errors. Any suggestions?
00:25:32*flyx|znc joined #nim
00:26:57*flyx quit (Excess Flood)
00:26:57*flyx|znc is now known as flyx
00:29:27subsetparkOk, I'm stupid, but... I don't know what to do with this libbearlibterminal.so file :/
00:31:45FromGitter<zacharycarter> if you put it in /usr/local/lib or pass it via a --passL flag to the Nim compiler, you should be able to run the examples
00:32:30*chemist69 joined #nim
00:35:26subsetparkhm - nope
00:35:32FromGitter<zacharycarter> are you getting any errors?
00:36:09subsetparkcould not load: libbearlibterminal.so
00:37:25subsetparki get that if i use passL or if i copy the file to /usr/local/lib - i now have it copied both in lower case and camel case
00:37:42FromGitter<zacharycarter> what os are you on?
00:37:54FromGitter<zacharycarter> I probably should have asked that first
00:37:56subsetparkArch Linux
00:38:06FromGitter<zacharycarter> alright let me spin up my vm and see if I can get it working
00:38:30FromGitter<zacharycarter> shit I don't have an arch distro handy ugh I'll try with ubuntu
00:38:33FromGitter<zacharycarter> hoepfully that's close enough
00:39:53subsetparki'll try moving to /usr/lib...
00:40:19subsetparkah, that does something!
00:41:54subsetparkstrange that passL didn't do the trick
00:42:36FromGitter<zacharycarter> nice :D
01:06:21FromGitter<zetashift> I also had found it funny(and a tiny bit frustrating at the beginning 'cause of a error) that it's called libbearlibterminal
01:17:37*chemist69 quit (Disconnected by services)
01:17:42*chemist69_ joined #nim
01:20:47*def-pri-pub quit (Ping timeout: 260 seconds)
01:37:37subsetparkzacharycarter: http://chiselapp.com/user/subsetpark/repository/nogue/timeline?n=100&r=btl
01:38:30FromGitter<zacharycarter> nice
02:02:08*yingjun joined #nim
02:07:16*def-pri-pub joined #nim
02:07:27*def-pri-pub quit (Client Quit)
02:16:01*dddddd quit (Remote host closed the connection)
02:21:42*yingjun quit ()
02:45:08FromGitter<adamrezich> if I instantiate a "global" instance of an object, and mark it for export with * ...can other modules access its contents?
02:45:30FromGitter<zacharycarter> yes
02:46:23FromGitter<adamrezich> really? then I must be doing something wrong, because it's not working :|
02:49:00subsetparkYou mean really global, right? Not local, but with the global pragma?
02:49:19FromGitter<adamrezich> oh, that's a thing? :O
02:50:01FromGitter<zacharycarter> shouldn't matter you should be able to do this
02:50:45FromGitter<zacharycarter> ```import fileA ⏎ ⏎ echo repr foo``` [https://gitter.im/nim-lang/Nim?at=59b74b85c101bc4e3ab6588f]
02:52:15FromGitter<zacharycarter> http://imgur.com/a/WXjZf
02:54:51FromGitter<zacharycarter> the global pragma is for declaring statics inside of a proc
02:54:54FromGitter<zacharycarter> so for instance
02:56:09FromGitter<zacharycarter> meh I'll just link docs - https://nim-lang.org/docs/manual.html#pragmas-global-pragma
02:57:43FromGitter<adamrezich> I see
02:57:53FromGitter<adamrezich> I think my problem was my module layout, I think I've now fixed it
02:58:00FromGitter<zacharycarter> :shipit:
03:02:08FromGitter<zacharycarter> omg I don't get this disjoint set bullshit python implementation AT ALL
03:52:31*Sembei joined #nim
03:54:12*Pisuke quit (Ping timeout: 260 seconds)
03:58:11*chemist69_ quit (Ping timeout: 255 seconds)
04:00:51*Nobabs27 joined #nim
04:03:01*yglukhov joined #nim
04:07:27*yglukhov quit (Ping timeout: 248 seconds)
04:08:51*mahmudov joined #nim
04:16:24*Nobabs27 quit (Quit: Leaving)
04:20:22*Yardanico joined #nim
04:26:19*Yardanico quit (Quit: Quit)
04:47:28*chemist69 joined #nim
04:52:34FromGitter<adamrezich> so I just found out you can use type sections to simplify procedural type b.s., which is awesome... but is it not possible to instantiate an anonymous proc from that?
05:01:31*pilne quit (Quit: Quitting!)
05:02:21*mahmudov quit (Ping timeout: 240 seconds)
05:09:52FromGitter<adamrezich> I wish I could just use it directly, i.e.: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ but I'm guessing this isn't in place because the names of the procedural type parameters aren't actually saved? [https://gitter.im/nim-lang/Nim?at=59b76c1f614889d475e8887b]
05:10:32FromGitter<adamrezich> alternate syntax: ⏎ ⏎ ```elem.attachTickEvent(TickEvent = ⏎ # ... ⏎ )``` [https://gitter.im/nim-lang/Nim?at=59b76c48cfeed2eb65fab32d]
05:11:04*vivus joined #nim
05:12:55FromGitter<adamrezich> s/TickEvent/OnTick/ or vice-versa
05:16:07FromGitter<adamrezich> https://forum.nim-lang.org/t/2050
05:37:30FromGitter<barcharcraz> You could probably tag the type and use a term rewriting macro
05:40:10*quarternion joined #nim
05:42:39*quarternion quit (Client Quit)
05:50:45FromGitter<zacharycarter> I've never seen C code like this - https://github.com/mpatraw/butterfly/blob/master/examples/plain/ex0.c#L43-L49
05:50:49FromGitter<zacharycarter> and apparently c2nim throws up on it
05:52:03*vlad1777d joined #nim
05:55:13*spica joined #nim
05:57:32spicahey guys. Could somebody clear things up for me? this is inconsistent: https://pastebin.com/hLGirfBJ
06:03:41spicaeven worse: https://pastebin.com/ki8nAYQD :)
06:05:59*yglukhov joined #nim
06:07:03*PMunch joined #nim
06:08:18FromGitter<zacharycarter> I don't see the inconsistency
06:08:18FromGitter<zacharycarter> the rest of the array picks up the type of the first member
06:08:19FromGitter<zacharycarter> or set rather
06:08:19FromGitter<zacharycarter> everywhere else you're specifying int64 which is the default integer type
06:08:20FromGitter<zacharycarter> so the compilation failures make sense
06:10:42*yglukhov quit (Ping timeout: 260 seconds)
06:12:18spicathanks for clearing that up, I thought it's a bug
06:12:52FromGitter<zacharycarter> np
06:15:00spicabut wait. The last line works fine
06:15:11spicano 'i8 is specified
06:15:27FromGitter<zacharycarter> that's because you're explicitly declaring the variable as a 8 bit int
06:15:47FromGitter<zacharycarter> if you remove the : int8 you'll end up with a 64 bit int
06:16:11spicayes, but the set is set[int8], so how is it any different?
06:16:49FromGitter<zacharycarter> it's not - you're still ending with a set that's meant to contain 8 bit ints
06:17:01FromGitter<zacharycarter> but the compiler catches the fact you're trying to assign non 8 bit ints to the set
06:17:59FromGitter<zacharycarter> here's naother example
06:18:58*Vladar joined #nim
06:21:33FromGitter<zacharycarter> https://play.nim-lang.org/?gist=b336cbf48dd481bb8507e05327c00d9d
06:22:35spicagot it, thanks
06:22:45FromGitter<zacharycarter> np
06:23:07spicaso I guess set is defined like this> https://nim-by-example.github.io/types/distinct/?
06:24:28FromGitter<zacharycarter> set is compiler magic
06:24:48FromGitter<zacharycarter> https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L244
06:25:32spicamore magic, great. Ty
06:25:49FromGitter<zacharycarter> sure thing
06:26:02FromGitter<zacharycarter> you can discover how these things are implemented if you really want
06:26:06FromGitter<zacharycarter> but it means digging into the compiler
06:30:35*xet7 quit (Remote host closed the connection)
06:30:57*nsf joined #nim
06:35:24spicaif you happen to know, when comparing 2 arrays via ==, does it compare all their values or some kind of reference?
06:37:37FromGitter<zacharycarter> pretty sur eit does a deep equal
06:37:39FromGitter<zacharycarter> https://play.nim-lang.org/?gist=9ea5ffb19940d7c748c18dcb073b42e6
06:40:41spicaokay. Is this supposed to be valid? var ss : array[1, seq[string]] : [@["big booty"]] -> fails to compile
06:41:28FromGitter<zacharycarter> var ss : array[1, seq[string]] = [@["big booty"]]
06:41:54spicahttps://play.nim-lang.org/?gist=16307b01f6adc03eb5e78dd700e5f023
06:42:20FromGitter<zacharycarter> https://play.nim-lang.org/?gist=a4e673a2187336d59525c4d211460f65
06:42:30FromGitter<zacharycarter> assignment vs declaration
06:42:34FromGitter<zacharycarter> look for the =
06:42:46spicaoh crap
06:42:47spicamy bad
06:42:49spicathanls
06:42:52FromGitter<zacharycarter> np!
06:45:42spicainteresting: https://play.nim-lang.org/?gist=ed31165aa59d4838631f86bc76dd2fc9 so absolutely everything is copied over when assigning an existing array
06:47:21FromGitter<zacharycarter> yup arrays are copy on assignment I believe
06:48:00spicaso I've read.. it's weird that they are not on the heap. What happens when they get really huge? afaik stack space is very limited
06:48:28FromGitter<zacharycarter> probably a good question for araq
06:51:03FromGitter<mratsim> if you want arrays on the heap use seq or ref array
06:51:15FromGitter<mratsim> in C and Rust, arrays are on the stack by default too
06:52:17spicaok
06:52:18spicaty
06:53:19PMunchThe game I created in Nim over the weekend: https://github.com/PMunch/TromsoGameJam2017
06:53:41PMunchI must say it worked really well, and people definitely started asking questions about Nim.
06:54:08FromGitter<zacharycarter> nice!
06:54:10PMunchOne guy even kept commenting on how fast I was able to add new features or change existing ones.
06:54:29PMunchMost of the actual game is implemented in src/sgtest.nim by the way
06:54:53FromGitter<mratsim> so I just git clone and nim c main?
06:55:05PMunchnim c --noMain main
06:55:30PMunchYou need to have Nim installed though
06:55:39FromGitter<mratsim> lol
06:55:40PMunchs/Nim/SDL
06:55:44PMunch-_-
06:55:46FromGitter<mratsim> oh ok
06:56:03PMunchAnd SDL_Mixer and SDL_TTF I believe
06:56:16FromGitter<mratsim> what languages/framework were the other using?
06:56:52PMunchMost I think was using Unity, some guys were using GameMaker, and another was coding in some weird JS framework
07:08:27*mahmudov joined #nim
07:11:32*HTTP_____GK1wmSU joined #nim
07:11:39*HTTP_____GK1wmSU left #nim (#nim)
07:21:09*claudiuinberlin joined #nim
07:21:36*def- quit (Quit: -)
07:28:00*HTTP_____GK1wmSU joined #nim
07:29:14*HTTP_____GK1wmSU left #nim (#nim)
07:32:19*def- joined #nim
07:35:38*mahtob joined #nim
07:38:44*mahmudov quit (Ping timeout: 246 seconds)
07:38:49*yglukhov joined #nim
07:43:01*yglukhov quit (Ping timeout: 240 seconds)
07:43:01FromGitter<zacharycarter> superpowers?
07:45:41*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:46:44PMunchNone that I could see
07:47:09PMunchI'm assuming that was a question about the editor zacharycarter? :P
07:47:24FromGitter<zacharycarter> yeah haha
07:47:31FromGitter<zacharycarter> http://superpowers-html5.com/index.en.html
07:50:18PMunchHmm, I'm teaching a bunch of kids later today some programming (or rather some of the same logic behind programming). I was planning to use GameMaker 8 (old version, but you can still use the trial version), but I don't like to teach them something that would lock them into such an expensive program. You don't know any alternatives to GameMaker do you? With a drag-and-drop design so we don't have to muck about as much with syntax.
07:51:03FromGitter<zacharycarter> no clue
07:51:07FromGitter<zacharycarter> sorry
07:51:28PMunchI should create something in Nim for them :P
07:56:28FromGitter<Grabli66> PMunch, http://www.godotengine.org/
07:56:55PMunchYeah I found that as well, but it's not drag and drop
07:58:10PMunchThese kids are like 9 years old and don't speak english, so I'm not going to start them off with writing code..
07:58:19*claudiuinberlin joined #nim
07:59:29FromGitter<Grabli66> www.stencyl.com, https://www.scirra.com/construct2
07:59:47FromGitter<Grabli66> But they are not free :)
08:01:21*Yardanico joined #nim
08:02:09FromGitter<Grabli66> Godot, has visual script. No need to code
08:03:17*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:04:19*Matthias247 joined #nim
08:04:33PMunchHmm, didn't know it had visual scripts..
08:04:36PMunchI'll look into it
08:06:59*yglukhov joined #nim
08:09:05*couven92 joined #nim
08:12:22chemist69PMunch: https://scratch.mit.edu/
08:13:38*claudiuinberlin joined #nim
08:17:47PMunchYeah, they're using that for the novice course. But we wanted to advance a bit from that
08:19:40chemist69ah, ok.
08:30:15spicaguys, how hard is it to take a screenshot via nim?
08:30:24spicaof the whole screen*
08:30:36PMunchIn a platform independent way?
08:30:45spicayeah, if possible
08:31:13couven92not possible in OS independent way... you'll need an OS importc API for that
08:31:18PMunchhttps://github.com/Senketsu/nsu
08:31:27PMunchThat should get you Linux and Windows at least
08:31:41spicadayum
08:31:52PMunchNot 100% sure about OSX though
08:31:57spicaa lot of code for taking a SS:)
08:32:11PMunchIt's technically a *nix so it might work, but I'm not sure if it has X11
08:32:54PMunchWell, from your code it would only be one line :P
08:33:09PMunchnsu_full_ss(fileName,savePath: string = "",delay: int = 0)
08:34:17spicayeah, but it adds to the size of the executable... It's alright though. Thanks
08:36:32PMunchWell with -d:release and -d:deadCodeElim it shouldn't be too bad
09:01:59*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:05:05*claudiuinberlin joined #nim
09:25:20*xet7 joined #nim
09:29:10*Yardanico quit (Remote host closed the connection)
09:32:26*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:45:38*claudiuinberlin joined #nim
09:47:28*Matthias247 quit (Quit: Matthias247)
09:51:50*couven92 is now known as couven92_isaway
09:59:05*Arrrr joined #nim
10:00:26FromGitter<dandevelop> Does nimble on Windows need OpenSSL to be installed? I get this when running it: could not load: libeay64.dll
10:01:58PMunchhttps://github.com/nim-lang/nimble/issues/257
10:02:00PMunchRelated?
10:03:13FromGitter<dandevelop> Yep, looked up on that before asking here. Not sure if this got fixed or not in any way
10:05:12*enthus1ast- quit (Ping timeout: 260 seconds)
10:08:08FromGitter<dandevelop> Oh, just found my answer here: https://nim-lang.org/install_windows.html
10:08:15FromGitter<dandevelop> There are a number of other dependencies that you may need to install in order to use Nim. They include: ⏎ ⏎ PCRE ⏎ OpenSSL [https://gitter.im/nim-lang/Nim?at=59b7b20f177fb9fe7eae81bd]
10:14:43Araq_the windows .zip ships with these and with nimble.exe, why not use that?
10:15:04FromGitter<dandevelop> @Araq_ just wanted a nightly build
10:16:59FromGitter<dandevelop> @Araq_ would linking statically with openssl or libressl be a way to remove this dependency?
10:17:32Araq_if you manage to do that, yes
10:17:39FromGitter<dandevelop> @Araw
10:18:22FromGitter<dandevelop> @Araq_ I would like to try that one day. I think it would benefit Nim a lot. I remember how easy it was with Delphi to get an executable that can work with https without having to ship additional DLLs
10:19:00Araq_ok, feel free to give it a shot
10:19:59FromGitter<dandevelop> @Araq_ I plan on doing that. Just wanted to hear your opinion on it. If you think this could work (in theory).
10:22:47Araq_yup, should work
10:26:12*ShalokShalom_ joined #nim
10:28:19*MyMind joined #nim
10:28:22*endragor joined #nim
10:29:52*ShalokShalom quit (Ping timeout: 248 seconds)
10:29:58*Sembei quit (Ping timeout: 240 seconds)
10:30:56*ShalokShalom_ is now known as ShalokShalom
10:31:01*dddddd joined #nim
10:34:46*spica_ joined #nim
10:37:52*spica quit (Ping timeout: 255 seconds)
10:50:38*spica__ joined #nim
10:53:28*spica_ quit (Ping timeout: 240 seconds)
11:01:16PMunchHmm, I'm getting a strange error from the game I created in Nim with SDL2. This is from GDB: http://ix.io/zMH
11:02:27Araq_setupForeignThreadGC() call missing
11:03:06PMunchHmm
11:04:40PMunchThat seems likely :P
11:05:38PMunchIt's strange cause it seems to work for a while before crashing
11:12:35PMunchThat seemed to fix the issue though
11:12:39PMunchThanks :)
11:17:09*haha_ joined #nim
11:21:07*arnetheduck joined #nim
11:26:43FromGitter<Grabli66> Is there performance profiler for Nim?
11:29:09Araq_use the standard tools for C/C++ for that, Nim's profiler is a bit messy
11:29:27FromGitter<Grabli66> Ok
11:33:20*skrylar joined #nim
11:39:36*sz0 joined #nim
11:49:59*gangstacat quit (Quit: Ĝis!)
11:51:34*Yardanico joined #nim
11:53:14FromGitter<mratsim> `proc random(max: float): float` from random module accepts 1’f32 as input but returns a float. ⏎ ⏎ Is that normal that it compiles? converter?
11:54:10Yardanicofloat is an alias for either float32 or float64 depending on target architecture
11:54:29YardanicoAFAIK
11:55:14Yardanicoah no
11:55:15Yardanicoactually
11:55:16Yardanico# 'float64' is now an alias to 'float'; this solves many problems
11:58:44*gangstacat joined #nim
12:01:05*Arrrr quit (Ping timeout: 248 seconds)
12:02:40*couven92_isaway is now known as couven92
12:03:31*Matthias247 joined #nim
12:07:32*arnetheduck quit (Remote host closed the connection)
12:09:16*arnetheduck joined #nim
12:13:15skrylaryou should probably specify regardless
12:13:20skrylarunless its a situation where you don't care anyway
12:13:27*Arrrr joined #nim
12:13:56skrylarex. you can get in to some bother just using 'float' with opengl because they tend to use 32-bit over there
12:14:08skrylarexcept for index buffers which are 16
12:14:17*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:15:25*Vladar quit (Remote host closed the connection)
12:21:30*claudiuinberlin joined #nim
12:22:47*claudiuinberlin quit (Client Quit)
12:23:38*claudiuinberlin joined #nim
12:29:55*spica__ quit (Ping timeout: 255 seconds)
12:35:53*spica joined #nim
12:36:34*spica quit (Client Quit)
12:41:32vivusDoes nim have a nim-friendly HTML lib? I would like to write some code to generate HTML
12:42:13Yardanicovivus, maybe this can help you? https://nim-lang.org/docs/htmlgen.html
12:42:24vivusthank you Yardanico
12:42:33Yardanicoyou want to declare HTML for Nim?
12:42:36Yardanico*from
12:45:53vivusI want to have a CLI app that generates HTML output
12:46:11Yardanicoyou can also use this
12:46:22Yardanicohttps://nim-lang.org/docs/filters.html#available-filters-stdtmpl-filter
12:50:30Araq_the best thing is to port karax's DSL to Nim native
12:50:50Araq_htmlgen and source code filters are old, karax's is much better
12:51:40Araq_in fact, karax's is so good I thought about adopting it for Nim syntax tree generation
12:52:13YardanicoAraq_, does nim inline iterators by itself?
12:52:18Araq_yes
12:52:33Yardanicook, thanks
12:54:23*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:03:18*claudiuinberlin joined #nim
13:03:47FromGitter<Varriount> Araq: Source code filters are still really useful in other ways
13:11:29PMunch:q
13:11:35PMunchWoops, wrong window
13:22:41*haha_ quit (Quit: haha_)
13:32:53*haha_ joined #nim
13:34:37FromGitter<Grabli66> Araq_, can i create iterator that iterates other iterator? :)
13:35:13Yardanicoyes
13:35:20Yardanicojust use "for"
13:35:53FromGitter<Grabli66> for and yield ?
13:36:06Yardanicoyes
13:36:18FromGitter<Grabli66> Good
13:36:18Yardanicofor item in youriter(): yield item
13:36:32FromGitter<Grabli66> Cool
13:37:00*relax joined #nim
13:48:13*xet7 quit (Quit: Leaving)
13:49:13*sz0 quit (Quit: Connection closed for inactivity)
13:57:43*endragor quit (Remote host closed the connection)
13:59:02*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:00:37*endragor_ joined #nim
14:02:12*claudiuinberlin joined #nim
14:04:41*endragor_ quit (Ping timeout: 240 seconds)
14:07:24*PMunch quit (Quit: Leaving)
14:12:26*endragor joined #nim
14:13:23*Vladar joined #nim
14:14:12*Matthias247 quit (Read error: Connection reset by peer)
14:14:46*couven92 quit (Quit: Client disconnecting)
14:17:03*endragor quit (Ping timeout: 248 seconds)
14:20:42*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:22:37*claudiuinberlin joined #nim
14:22:54*Matthias247 joined #nim
14:40:52skrylarmeh. color stuff done for now
14:41:04skrylarcmyk isn't going to be fun
14:42:38skrylarI don't think cmyk has alpha channels to think of, it's already subtractive
14:59:12*thomasross quit (Read error: Connection reset by peer)
14:59:25*thomasross joined #nim
15:01:34*TjYoco joined #nim
15:01:37*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:02:03*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
15:06:22*Snircle joined #nim
15:15:50*claudiuinberlin joined #nim
15:29:26*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:30:20*yglukhov quit (Remote host closed the connection)
15:31:35*Trustable joined #nim
15:32:45*yglukhov joined #nim
15:37:18*yglukhov quit (Ping timeout: 252 seconds)
15:45:27*endragor joined #nim
15:47:06*claudiuinberlin joined #nim
15:48:17*Pisuke joined #nim
15:50:24*MyMind quit (Ping timeout: 248 seconds)
15:52:14TjYocoThis isn't specifically Nim related, but how do I get rid of recursive model dependency? I'm trying to make a wrapper for this: https://www.giantbomb.com/api/documentation and Resources contain fields, but those fields can also be resources..
15:52:30*endragor_ joined #nim
15:53:04*endragor_ quit (Remote host closed the connection)
15:53:16TjYocoI have one file where I define fields and everything they can be, and another for resources. I know you can define them in the same type block but it looks really messy and the file gets huge and jumbled.
15:53:35*endragor quit (Ping timeout: 248 seconds)
15:53:57YardanicoTjYoco, use include instead of import?
15:55:03TjYocoThat causes illegal recursion
15:56:36YardanicoTjYoco, can you post a code snippet? on gist for example
15:57:33*endragor joined #nim
15:59:30TjYocoYardanico, https://gist.github.com/Tyler-Yocolano/e62e25f2253c8bdf553103150911d92d
15:59:44TjYocoI think that should cover the issue
15:59:48Yardanicoah
16:00:02Yardanicoyou probably should mark some of your types acyclic
16:00:20Yardanicoah, no
16:00:25TjYocolike {. acyclic .} one of those?
16:00:30TjYocook
16:06:28*relax quit (Ping timeout: 240 seconds)
16:08:54TjYocoDoes nim easily allow for interfaces? So that I could make a "Content" obj defined with the field, then make Resource a type of Content?
16:10:01LyndsySimonTjYoco: I can't think of a reason you're want interfaces (a'la Java) when you have Nim's type system.
16:10:09LyndsySimons/you're/you'd/
16:10:52TjYocoI come from mostly C# so I guess I don't fully grasp Nim's way of doing this yet
16:13:00TjYocoLyndsySimon, I thought interfaces were how to handle circular dependency. I'm just a hobbyist programmer though, so forgive my misuse of terms
16:15:03LyndsySimonTjYoco: I'm AFK a bit, and honestly not the right person to ask - I'm not yet fluent in Nim, my background is in Python mostly.
16:15:51LyndsySimonCheck out dom96's book, Nim in Action. I think what you're looking for is in there, but don't have it in front of me to say for sure.
16:16:35*endragor quit (Remote host closed the connection)
16:16:55TjYocoI read through it last week, maybe time to go through again lol
16:17:07*endragor joined #nim
16:21:51*endragor quit (Ping timeout: 248 seconds)
16:26:05*Yardanico quit (Remote host closed the connection)
16:27:30LyndsySimonI'll be back at a laptop in a bit I'll see if I can find it.
16:27:37*yglukhov joined #nim
16:32:10*yglukhov quit (Ping timeout: 264 seconds)
16:33:04*miran joined #nim
16:33:54LyndsySimonBack. Check out listing 9.1 - it's on page 284 of my PDF copy, but that might have changed with subsequent revisions
16:33:58*relax joined #nim
16:34:32LyndsySimonThe object Node is defined in terms of itself. My understanding of "circular dependency" leads me to believe that this would qualify. Thoughts?
16:34:37*yglukhov joined #nim
16:34:49ArrrrI thought one could use slices with case
16:35:24LyndsySimonTjYoco: See above, I forgot to name you.
16:36:14TjYocoLyndsySimon, I may be overcomplicating my own problem but, see this: https://gist.github.com/Tyler-Yocolano/e62e25f2253c8bdf553103150911d92d
16:37:27TjYocothere's much more to each script but that's the source of the issue. FieldObj have ResourceObj as fields and ResourceObj have FieldObj as fields.
16:37:47*arnetheduck quit (Ping timeout: 260 seconds)
16:39:01LyndsySimon"nbresource.nim(4, 9) Error: cannot open 'resourcetypes'"
16:40:18TjYocowhoops, refresh the page. Its just a huge enum list.
16:42:21LyndsySimonAhh, gotchya. First of all, let me reiterate - I'm not the best person to help :) That said, this looks to me like an import system problem, not a type issue. I don't know the solution off the top of my head, but I'll see what I can figure out. One sec.
16:44:33FromGitter<mratsim> Nim allows recursive types, see the “Tree” example with Nodes that can contains Nodes. I think nbresources package doesn’t have a nbresources.nim file, so you have to directly import the module with import nbresources/nim_module
16:45:27LyndsySimonTjYoco: This looks like the answer you seek, though notice that it's from 2015: https://stackoverflow.com/questions/30235080/cannonical-way-to-do-circular-dependency-in-nim
16:45:54LyndsySimonmratsim: The issue seems to be one of recursive module dependencies, not recursive types.
16:47:45TjYocoLyndsySimon, nice find, thank you!
16:48:21LyndsySimonTjYoco: Not a problem :) Feel free to mention me if you'd like another Nim newbie to review your code, I'm always online.
16:50:00FromGitter<Grabli66> dom96, You are here? :) How i can use emerald with jester?
16:53:46*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
16:56:12TjYocoGrabli66, haven't tried it but it looks like instead of using filters you just use the templates that emerald provides
16:59:19FromGitter<Grabli66> I dont know how to render emerald template to jester response
17:04:24FromGitter<Grabli66> Ohhh. I found :)
17:09:21*mahtob quit (Ping timeout: 248 seconds)
17:16:39FromGitter<mratsim> Btw, it might be useful to compare Nim ASM vs other language: https://godbolt.org/
17:29:48*claudiuinberlin joined #nim
17:41:08FromGitter<Grabli66> Can nimble watch changes and recompile?
17:41:34FromGitter<Varriount> Araq: Any chance you could you be less brusque on the forum? People get frustrated when they ate told that they are wrong and don't receive an explanation.
18:00:23*Vladar quit (Quit: Leaving)
18:04:54*haha_ quit (Quit: haha_)
18:14:40Araq_varriount: what example do you mean?
18:15:57Araq_oh it's about Udiknedormin, *shrug*
18:29:58*vlad1777d quit (Ping timeout: 240 seconds)
18:43:47*vivus quit (Quit: Leaving)
18:48:05*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:48:30FromGitter<Yardanico> @mratsim yeah, somehow we should add nim here
18:52:01FromGitter<Yardanico> ah, https://github.com/mattgodbolt/compiler-explorer
19:03:57*claudiuinberlin joined #nim
19:06:30*claudiuinberlin quit (Client Quit)
19:07:43TrustableI just submitted a bugfix for strutils countLines() (The bug was introduced by me, sorry)
19:07:59*mahtob joined #nim
19:08:07*Sembei joined #nim
19:08:28*claudiuinberlin joined #nim
19:09:56*haha_ joined #nim
19:10:02*Pisuke quit (Ping timeout: 260 seconds)
19:10:54LyndsySimonFWIW, I just checked out that forum thread - I have no problem with the way it was handled.
19:10:58*haha_ quit (Client Quit)
19:12:18*haha_ joined #nim
19:17:35*Jesin quit (Quit: rebooting)
19:18:12*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:23:37*Jesin joined #nim
19:32:21*claudiuinberlin joined #nim
19:39:04FromGitter<Bennyelg> Anyone can compile this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59b837d8210ac2692022d887]
19:39:07FromGitter<Bennyelg> I fail
19:39:14FromGitter<Bennyelg> Error: unhandled exception: input(1, 5) Error: { expected [JsonParsingError]
19:40:32SusWombatadd import json?
19:40:41FromGitter<superfunc> Yeah, Hello Hello isnt a valid string
19:40:45FromGitter<Bennyelg> of course
19:40:49FromGitter<Bennyelg> why is that?
19:40:57FromGitter<superfunc> Needs to be quoted, `"\"Hello Hello\""`
19:41:17FromGitter<Bennyelg> this is also not valid ? """Hello Hello"""
19:41:48FromGitter<superfunc> No it needs to be quoted
19:41:56*haha_ quit (Quit: haha_)
19:42:12FromGitter<Bennyelg> you are right now it's pass the compilation, but I think it's stupid since the quoted thing should be avoided
19:42:17FromGitter<superfunc> Feel free to read the JSON spec to understand further: http://json.org/
19:42:21FromGitter<superfunc> No, its part of the json spec
19:42:25*relax quit (Ping timeout: 248 seconds)
19:46:43*Trustable quit (Quit: Leaving)
19:47:21FromGitter<abijahm> ```var js = parseJson(""""hello hello"""") ⏎ echo js.kind == Jstring``` ⏎ ⏎ works [https://gitter.im/nim-lang/Nim?at=59b839c9bc4647297426755d]
19:47:37FromGitter<superfunc> Yeah, because you quoted it
19:47:55FromGitter<superfunc> `"""` creates a literal, so everything inside is taken verbatim
19:48:21FromGitter<superfunc> `""""Hello Hello"""" == "\"Hello Hello\""`
19:57:29*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:03:26*nsf quit (Quit: WeeChat 1.9)
20:12:30*Arrrr quit (Read error: Connection reset by peer)
20:13:13*claudiuinberlin joined #nim
20:21:08*skrylar quit (Remote host closed the connection)
20:23:28*miran quit (Ping timeout: 240 seconds)
20:26:58*relax joined #nim
20:36:11*miran joined #nim
20:52:08*ipjk joined #nim
20:56:01*relax quit (Ping timeout: 248 seconds)
20:56:42*solitudesf joined #nim
21:00:17*miran quit (Ping timeout: 260 seconds)
21:09:35*relax joined #nim
21:22:29*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:23:59*nsf joined #nim
21:28:56*relax quit (Ping timeout: 246 seconds)
21:32:22*TjYoco quit (Quit: Leaving)
21:34:07FromGitter<superfunc> Hey @dom96 , wrt issue 6358, it seems like uri is doing the right thing based on the uri spec, but the example should be updated to catch exceptions at the waitFor portion.
21:34:18FromGitter<superfunc> I can throw together a PR for that if you agree.
21:37:01*solitudesf quit (Ping timeout: 240 seconds)
21:37:29FromGitter<superfunc> Err, maybe asynchttpserver should be catching those earlier.
22:12:32FromGitter<superfunc> Yeah that seems better, opened a PR which handles it in the server code
22:24:13*relax joined #nim
22:51:12*libman joined #nim
22:55:52*Matthias247 quit (Quit: Matthias247)
22:58:50*Nobabs27 joined #nim
23:00:26*Nobabs27 quit (Client Quit)
23:12:31*relax quit (Ping timeout: 248 seconds)
23:42:16*arnetheduck joined #nim
23:48:29*heinrich5991_ joined #nim
23:48:54*heinrich5991 quit (Ping timeout: 240 seconds)
23:48:54*mwbrown quit (Ping timeout: 240 seconds)
23:48:54*Sembei quit (Ping timeout: 240 seconds)
23:48:54*byte512 quit (Ping timeout: 240 seconds)
23:49:33*Sembei joined #nim
23:49:48*mwbrown joined #nim
23:49:57*byte512 joined #nim
23:50:05*nsf quit (Quit: WeeChat 1.9)
23:50:29*heinrich5991_ is now known as heinrich5991
23:54:56SusWombatlol
23:55:18SusWombatthe deiscord bot marv uses nimrod syntax highlighting for displaying the playqueue
23:55:24SusWombatits a music bot
23:56:40SusWombatdiscord*