00:00:17 | * | yingjun quit (Ping timeout: 260 seconds) |
00:05:51 | FromGitter | <zacharycarter> def-pri-pub new branch up |
00:09:19 | def-pri-pub | zacharycarter: okay, I see it |
00:09:23 | def-pri-pub | Thanks for that. |
00:09:37 | FromGitter | <zacharycarter> np |
00:09:43 | def-pri-pub | I did notice that the user isn't placed right in front of the sprite. |
00:09:48 | def-pri-pub | In fact, they're behind it |
00:09:50 | FromGitter | <zacharycarter> yeah |
00:09:53 | def-pri-pub | And culling is on, so they can't see it. |
00:10:13 | def-pri-pub | Eh, I wouldn't worry about that for the moment. |
00:10:33 | FromGitter | <zacharycarter> I need to implement rotating the sprite around (for billboarding) to fix that |
00:10:49 | FromGitter | <zacharycarter> we should support billboarding anyway so I'll work on that here shortly |
00:11:02 | FromGitter | <zacharycarter> currently I'm trying to convert this stupid python class to Nim and failing hard |
00:16:47 | d10n | I 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:15 | d10n | Also, 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:27 | subsetpark | Ok, I'm stupid, but... I don't know what to do with this libbearlibterminal.so file :/ |
00:31:45 | FromGitter | <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:26 | subsetpark | hm - nope |
00:35:32 | FromGitter | <zacharycarter> are you getting any errors? |
00:36:09 | subsetpark | could not load: libbearlibterminal.so |
00:37:25 | subsetpark | i 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:42 | FromGitter | <zacharycarter> what os are you on? |
00:37:54 | FromGitter | <zacharycarter> I probably should have asked that first |
00:37:56 | subsetpark | Arch Linux |
00:38:06 | FromGitter | <zacharycarter> alright let me spin up my vm and see if I can get it working |
00:38:30 | FromGitter | <zacharycarter> shit I don't have an arch distro handy ugh I'll try with ubuntu |
00:38:33 | FromGitter | <zacharycarter> hoepfully that's close enough |
00:39:53 | subsetpark | i'll try moving to /usr/lib... |
00:40:19 | subsetpark | ah, that does something! |
00:41:54 | subsetpark | strange that passL didn't do the trick |
00:42:36 | FromGitter | <zacharycarter> nice :D |
01:06:21 | FromGitter | <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:37 | subsetpark | zacharycarter: http://chiselapp.com/user/subsetpark/repository/nogue/timeline?n=100&r=btl |
01:38:30 | FromGitter | <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:08 | FromGitter | <adamrezich> if I instantiate a "global" instance of an object, and mark it for export with * ...can other modules access its contents? |
02:45:30 | FromGitter | <zacharycarter> yes |
02:46:23 | FromGitter | <adamrezich> really? then I must be doing something wrong, because it's not working :| |
02:49:00 | subsetpark | You mean really global, right? Not local, but with the global pragma? |
02:49:19 | FromGitter | <adamrezich> oh, that's a thing? :O |
02:50:01 | FromGitter | <zacharycarter> shouldn't matter you should be able to do this |
02:50:45 | FromGitter | <zacharycarter> ```import fileA ⏎ ⏎ echo repr foo``` [https://gitter.im/nim-lang/Nim?at=59b74b85c101bc4e3ab6588f] |
02:52:15 | FromGitter | <zacharycarter> http://imgur.com/a/WXjZf |
02:54:51 | FromGitter | <zacharycarter> the global pragma is for declaring statics inside of a proc |
02:54:54 | FromGitter | <zacharycarter> so for instance |
02:56:09 | FromGitter | <zacharycarter> meh I'll just link docs - https://nim-lang.org/docs/manual.html#pragmas-global-pragma |
02:57:43 | FromGitter | <adamrezich> I see |
02:57:53 | FromGitter | <adamrezich> I think my problem was my module layout, I think I've now fixed it |
02:58:00 | FromGitter | <zacharycarter> :shipit: |
03:02:08 | FromGitter | <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:34 | FromGitter | <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:52 | FromGitter | <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:32 | FromGitter | <adamrezich> alternate syntax: ⏎ ⏎ ```elem.attachTickEvent(TickEvent = ⏎ # ... ⏎ )``` [https://gitter.im/nim-lang/Nim?at=59b76c48cfeed2eb65fab32d] |
05:11:04 | * | vivus joined #nim |
05:12:55 | FromGitter | <adamrezich> s/TickEvent/OnTick/ or vice-versa |
05:16:07 | FromGitter | <adamrezich> https://forum.nim-lang.org/t/2050 |
05:37:30 | FromGitter | <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:45 | FromGitter | <zacharycarter> I've never seen C code like this - https://github.com/mpatraw/butterfly/blob/master/examples/plain/ex0.c#L43-L49 |
05:50:49 | FromGitter | <zacharycarter> and apparently c2nim throws up on it |
05:52:03 | * | vlad1777d joined #nim |
05:55:13 | * | spica joined #nim |
05:57:32 | spica | hey guys. Could somebody clear things up for me? this is inconsistent: https://pastebin.com/hLGirfBJ |
06:03:41 | spica | even worse: https://pastebin.com/ki8nAYQD :) |
06:05:59 | * | yglukhov joined #nim |
06:07:03 | * | PMunch joined #nim |
06:08:18 | FromGitter | <zacharycarter> I don't see the inconsistency |
06:08:18 | FromGitter | <zacharycarter> the rest of the array picks up the type of the first member |
06:08:19 | FromGitter | <zacharycarter> or set rather |
06:08:19 | FromGitter | <zacharycarter> everywhere else you're specifying int64 which is the default integer type |
06:08:20 | FromGitter | <zacharycarter> so the compilation failures make sense |
06:10:42 | * | yglukhov quit (Ping timeout: 260 seconds) |
06:12:18 | spica | thanks for clearing that up, I thought it's a bug |
06:12:52 | FromGitter | <zacharycarter> np |
06:15:00 | spica | but wait. The last line works fine |
06:15:11 | spica | no 'i8 is specified |
06:15:27 | FromGitter | <zacharycarter> that's because you're explicitly declaring the variable as a 8 bit int |
06:15:47 | FromGitter | <zacharycarter> if you remove the : int8 you'll end up with a 64 bit int |
06:16:11 | spica | yes, but the set is set[int8], so how is it any different? |
06:16:49 | FromGitter | <zacharycarter> it's not - you're still ending with a set that's meant to contain 8 bit ints |
06:17:01 | FromGitter | <zacharycarter> but the compiler catches the fact you're trying to assign non 8 bit ints to the set |
06:17:59 | FromGitter | <zacharycarter> here's naother example |
06:18:58 | * | Vladar joined #nim |
06:21:33 | FromGitter | <zacharycarter> https://play.nim-lang.org/?gist=b336cbf48dd481bb8507e05327c00d9d |
06:22:35 | spica | got it, thanks |
06:22:45 | FromGitter | <zacharycarter> np |
06:23:07 | spica | so I guess set is defined like this> https://nim-by-example.github.io/types/distinct/? |
06:24:28 | FromGitter | <zacharycarter> set is compiler magic |
06:24:48 | FromGitter | <zacharycarter> https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L244 |
06:25:32 | spica | more magic, great. Ty |
06:25:49 | FromGitter | <zacharycarter> sure thing |
06:26:02 | FromGitter | <zacharycarter> you can discover how these things are implemented if you really want |
06:26:06 | FromGitter | <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:24 | spica | if you happen to know, when comparing 2 arrays via ==, does it compare all their values or some kind of reference? |
06:37:37 | FromGitter | <zacharycarter> pretty sur eit does a deep equal |
06:37:39 | FromGitter | <zacharycarter> https://play.nim-lang.org/?gist=9ea5ffb19940d7c748c18dcb073b42e6 |
06:40:41 | spica | okay. Is this supposed to be valid? var ss : array[1, seq[string]] : [@["big booty"]] -> fails to compile |
06:41:28 | FromGitter | <zacharycarter> var ss : array[1, seq[string]] = [@["big booty"]] |
06:41:54 | spica | https://play.nim-lang.org/?gist=16307b01f6adc03eb5e78dd700e5f023 |
06:42:20 | FromGitter | <zacharycarter> https://play.nim-lang.org/?gist=a4e673a2187336d59525c4d211460f65 |
06:42:30 | FromGitter | <zacharycarter> assignment vs declaration |
06:42:34 | FromGitter | <zacharycarter> look for the = |
06:42:46 | spica | oh crap |
06:42:47 | spica | my bad |
06:42:49 | spica | thanls |
06:42:52 | FromGitter | <zacharycarter> np! |
06:45:42 | spica | interesting: https://play.nim-lang.org/?gist=ed31165aa59d4838631f86bc76dd2fc9 so absolutely everything is copied over when assigning an existing array |
06:47:21 | FromGitter | <zacharycarter> yup arrays are copy on assignment I believe |
06:48:00 | spica | so 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:28 | FromGitter | <zacharycarter> probably a good question for araq |
06:51:03 | FromGitter | <mratsim> if you want arrays on the heap use seq or ref array |
06:51:15 | FromGitter | <mratsim> in C and Rust, arrays are on the stack by default too |
06:52:17 | spica | ok |
06:52:18 | spica | ty |
06:53:19 | PMunch | The game I created in Nim over the weekend: https://github.com/PMunch/TromsoGameJam2017 |
06:53:41 | PMunch | I must say it worked really well, and people definitely started asking questions about Nim. |
06:54:08 | FromGitter | <zacharycarter> nice! |
06:54:10 | PMunch | One guy even kept commenting on how fast I was able to add new features or change existing ones. |
06:54:29 | PMunch | Most of the actual game is implemented in src/sgtest.nim by the way |
06:54:53 | FromGitter | <mratsim> so I just git clone and nim c main? |
06:55:05 | PMunch | nim c --noMain main |
06:55:30 | PMunch | You need to have Nim installed though |
06:55:39 | FromGitter | <mratsim> lol |
06:55:40 | PMunch | s/Nim/SDL |
06:55:44 | PMunch | -_- |
06:55:46 | FromGitter | <mratsim> oh ok |
06:56:03 | PMunch | And SDL_Mixer and SDL_TTF I believe |
06:56:16 | FromGitter | <mratsim> what languages/framework were the other using? |
06:56:52 | PMunch | Most 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:01 | FromGitter | <zacharycarter> superpowers? |
07:45:41 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:46:44 | PMunch | None that I could see |
07:47:09 | PMunch | I'm assuming that was a question about the editor zacharycarter? :P |
07:47:24 | FromGitter | <zacharycarter> yeah haha |
07:47:31 | FromGitter | <zacharycarter> http://superpowers-html5.com/index.en.html |
07:50:18 | PMunch | Hmm, 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:03 | FromGitter | <zacharycarter> no clue |
07:51:07 | FromGitter | <zacharycarter> sorry |
07:51:28 | PMunch | I should create something in Nim for them :P |
07:56:28 | FromGitter | <Grabli66> PMunch, http://www.godotengine.org/ |
07:56:55 | PMunch | Yeah I found that as well, but it's not drag and drop |
07:58:10 | PMunch | These 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:29 | FromGitter | <Grabli66> www.stencyl.com, https://www.scirra.com/construct2 |
07:59:47 | FromGitter | <Grabli66> But they are not free :) |
08:01:21 | * | Yardanico joined #nim |
08:02:09 | FromGitter | <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:33 | PMunch | Hmm, didn't know it had visual scripts.. |
08:04:36 | PMunch | I'll look into it |
08:06:59 | * | yglukhov joined #nim |
08:09:05 | * | couven92 joined #nim |
08:12:22 | chemist69 | PMunch: https://scratch.mit.edu/ |
08:13:38 | * | claudiuinberlin joined #nim |
08:17:47 | PMunch | Yeah, they're using that for the novice course. But we wanted to advance a bit from that |
08:19:40 | chemist69 | ah, ok. |
08:30:15 | spica | guys, how hard is it to take a screenshot via nim? |
08:30:24 | spica | of the whole screen* |
08:30:36 | PMunch | In a platform independent way? |
08:30:45 | spica | yeah, if possible |
08:31:13 | couven92 | not possible in OS independent way... you'll need an OS importc API for that |
08:31:18 | PMunch | https://github.com/Senketsu/nsu |
08:31:27 | PMunch | That should get you Linux and Windows at least |
08:31:41 | spica | dayum |
08:31:52 | PMunch | Not 100% sure about OSX though |
08:31:57 | spica | a lot of code for taking a SS:) |
08:32:11 | PMunch | It's technically a *nix so it might work, but I'm not sure if it has X11 |
08:32:54 | PMunch | Well, from your code it would only be one line :P |
08:33:09 | PMunch | nsu_full_ss(fileName,savePath: string = "",delay: int = 0) |
08:34:17 | spica | yeah, but it adds to the size of the executable... It's alright though. Thanks |
08:36:32 | PMunch | Well 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:26 | FromGitter | <dandevelop> Does nimble on Windows need OpenSSL to be installed? I get this when running it: could not load: libeay64.dll |
10:01:58 | PMunch | https://github.com/nim-lang/nimble/issues/257 |
10:02:00 | PMunch | Related? |
10:03:13 | FromGitter | <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:08 | FromGitter | <dandevelop> Oh, just found my answer here: https://nim-lang.org/install_windows.html |
10:08:15 | FromGitter | <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:43 | Araq_ | the windows .zip ships with these and with nimble.exe, why not use that? |
10:15:04 | FromGitter | <dandevelop> @Araq_ just wanted a nightly build |
10:16:59 | FromGitter | <dandevelop> @Araq_ would linking statically with openssl or libressl be a way to remove this dependency? |
10:17:32 | Araq_ | if you manage to do that, yes |
10:17:39 | FromGitter | <dandevelop> @Araw |
10:18:22 | FromGitter | <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:00 | Araq_ | ok, feel free to give it a shot |
10:19:59 | FromGitter | <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:47 | Araq_ | 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:16 | PMunch | Hmm, 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:27 | Araq_ | setupForeignThreadGC() call missing |
11:03:06 | PMunch | Hmm |
11:04:40 | PMunch | That seems likely :P |
11:05:38 | PMunch | It's strange cause it seems to work for a while before crashing |
11:12:35 | PMunch | That seemed to fix the issue though |
11:12:39 | PMunch | Thanks :) |
11:17:09 | * | haha_ joined #nim |
11:21:07 | * | arnetheduck joined #nim |
11:26:43 | FromGitter | <Grabli66> Is there performance profiler for Nim? |
11:29:09 | Araq_ | use the standard tools for C/C++ for that, Nim's profiler is a bit messy |
11:29:27 | FromGitter | <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:14 | FromGitter | <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:10 | Yardanico | float is an alias for either float32 or float64 depending on target architecture |
11:54:29 | Yardanico | AFAIK |
11:55:14 | Yardanico | ah no |
11:55:15 | Yardanico | actually |
11:55:16 | Yardanico | # '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:15 | skrylar | you should probably specify regardless |
12:13:20 | skrylar | unless its a situation where you don't care anyway |
12:13:27 | * | Arrrr joined #nim |
12:13:56 | skrylar | ex. you can get in to some bother just using 'float' with opengl because they tend to use 32-bit over there |
12:14:08 | skrylar | except 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:32 | vivus | Does nim have a nim-friendly HTML lib? I would like to write some code to generate HTML |
12:42:13 | Yardanico | vivus, maybe this can help you? https://nim-lang.org/docs/htmlgen.html |
12:42:24 | vivus | thank you Yardanico |
12:42:33 | Yardanico | you want to declare HTML for Nim? |
12:42:36 | Yardanico | *from |
12:45:53 | vivus | I want to have a CLI app that generates HTML output |
12:46:11 | Yardanico | you can also use this |
12:46:22 | Yardanico | https://nim-lang.org/docs/filters.html#available-filters-stdtmpl-filter |
12:50:30 | Araq_ | the best thing is to port karax's DSL to Nim native |
12:50:50 | Araq_ | htmlgen and source code filters are old, karax's is much better |
12:51:40 | Araq_ | in fact, karax's is so good I thought about adopting it for Nim syntax tree generation |
12:52:13 | Yardanico | Araq_, does nim inline iterators by itself? |
12:52:18 | Araq_ | yes |
12:52:33 | Yardanico | ok, thanks |
12:54:23 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:03:18 | * | claudiuinberlin joined #nim |
13:03:47 | FromGitter | <Varriount> Araq: Source code filters are still really useful in other ways |
13:11:29 | PMunch | :q |
13:11:35 | PMunch | Woops, wrong window |
13:22:41 | * | haha_ quit (Quit: haha_) |
13:32:53 | * | haha_ joined #nim |
13:34:37 | FromGitter | <Grabli66> Araq_, can i create iterator that iterates other iterator? :) |
13:35:13 | Yardanico | yes |
13:35:20 | Yardanico | just use "for" |
13:35:53 | FromGitter | <Grabli66> for and yield ? |
13:36:06 | Yardanico | yes |
13:36:18 | FromGitter | <Grabli66> Good |
13:36:18 | Yardanico | for item in youriter(): yield item |
13:36:32 | FromGitter | <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:52 | skrylar | meh. color stuff done for now |
14:41:04 | skrylar | cmyk isn't going to be fun |
14:42:38 | skrylar | I 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:14 | TjYoco | This 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:16 | TjYoco | I 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:57 | Yardanico | TjYoco, use include instead of import? |
15:55:03 | TjYoco | That causes illegal recursion |
15:56:36 | Yardanico | TjYoco, can you post a code snippet? on gist for example |
15:57:33 | * | endragor joined #nim |
15:59:30 | TjYoco | Yardanico, https://gist.github.com/Tyler-Yocolano/e62e25f2253c8bdf553103150911d92d |
15:59:44 | TjYoco | I think that should cover the issue |
15:59:48 | Yardanico | ah |
16:00:02 | Yardanico | you probably should mark some of your types acyclic |
16:00:20 | Yardanico | ah, no |
16:00:25 | TjYoco | like {. acyclic .} one of those? |
16:00:30 | TjYoco | ok |
16:06:28 | * | relax quit (Ping timeout: 240 seconds) |
16:08:54 | TjYoco | Does 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:01 | LyndsySimon | TjYoco: I can't think of a reason you're want interfaces (a'la Java) when you have Nim's type system. |
16:10:09 | LyndsySimon | s/you're/you'd/ |
16:10:52 | TjYoco | I come from mostly C# so I guess I don't fully grasp Nim's way of doing this yet |
16:13:00 | TjYoco | LyndsySimon, I thought interfaces were how to handle circular dependency. I'm just a hobbyist programmer though, so forgive my misuse of terms |
16:15:03 | LyndsySimon | TjYoco: 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:51 | LyndsySimon | Check 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:55 | TjYoco | I 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:30 | LyndsySimon | I'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:54 | LyndsySimon | Back. 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:32 | LyndsySimon | The 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:49 | Arrrr | I thought one could use slices with case |
16:35:24 | LyndsySimon | TjYoco: See above, I forgot to name you. |
16:36:14 | TjYoco | LyndsySimon, I may be overcomplicating my own problem but, see this: https://gist.github.com/Tyler-Yocolano/e62e25f2253c8bdf553103150911d92d |
16:37:27 | TjYoco | there'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:01 | LyndsySimon | "nbresource.nim(4, 9) Error: cannot open 'resourcetypes'" |
16:40:18 | TjYoco | whoops, refresh the page. Its just a huge enum list. |
16:42:21 | LyndsySimon | Ahh, 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:33 | FromGitter | <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:27 | LyndsySimon | TjYoco: 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:54 | LyndsySimon | mratsim: The issue seems to be one of recursive module dependencies, not recursive types. |
16:47:45 | TjYoco | LyndsySimon, nice find, thank you! |
16:48:21 | LyndsySimon | TjYoco: 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:00 | FromGitter | <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:12 | TjYoco | Grabli66, haven't tried it but it looks like instead of using filters you just use the templates that emerald provides |
16:59:19 | FromGitter | <Grabli66> I dont know how to render emerald template to jester response |
17:04:24 | FromGitter | <Grabli66> Ohhh. I found :) |
17:09:21 | * | mahtob quit (Ping timeout: 248 seconds) |
17:16:39 | FromGitter | <mratsim> Btw, it might be useful to compare Nim ASM vs other language: https://godbolt.org/ |
17:29:48 | * | claudiuinberlin joined #nim |
17:41:08 | FromGitter | <Grabli66> Can nimble watch changes and recompile? |
17:41:34 | FromGitter | <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:40 | Araq_ | varriount: what example do you mean? |
18:15:57 | Araq_ | 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:30 | FromGitter | <Yardanico> @mratsim yeah, somehow we should add nim here |
18:52:01 | FromGitter | <Yardanico> ah, https://github.com/mattgodbolt/compiler-explorer |
19:03:57 | * | claudiuinberlin joined #nim |
19:06:30 | * | claudiuinberlin quit (Client Quit) |
19:07:43 | Trustable | I 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:54 | LyndsySimon | FWIW, 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:04 | FromGitter | <Bennyelg> Anyone can compile this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59b837d8210ac2692022d887] |
19:39:07 | FromGitter | <Bennyelg> I fail |
19:39:14 | FromGitter | <Bennyelg> Error: unhandled exception: input(1, 5) Error: { expected [JsonParsingError] |
19:40:32 | SusWombat | add import json? |
19:40:41 | FromGitter | <superfunc> Yeah, Hello Hello isnt a valid string |
19:40:45 | FromGitter | <Bennyelg> of course |
19:40:49 | FromGitter | <Bennyelg> why is that? |
19:40:57 | FromGitter | <superfunc> Needs to be quoted, `"\"Hello Hello\""` |
19:41:17 | FromGitter | <Bennyelg> this is also not valid ? """Hello Hello""" |
19:41:48 | FromGitter | <superfunc> No it needs to be quoted |
19:41:56 | * | haha_ quit (Quit: haha_) |
19:42:12 | FromGitter | <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:17 | FromGitter | <superfunc> Feel free to read the JSON spec to understand further: http://json.org/ |
19:42:21 | FromGitter | <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:21 | FromGitter | <abijahm> ```var js = parseJson(""""hello hello"""") ⏎ echo js.kind == Jstring``` ⏎ ⏎ works [https://gitter.im/nim-lang/Nim?at=59b839c9bc4647297426755d] |
19:47:37 | FromGitter | <superfunc> Yeah, because you quoted it |
19:47:55 | FromGitter | <superfunc> `"""` creates a literal, so everything inside is taken verbatim |
19:48:21 | FromGitter | <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:07 | FromGitter | <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:18 | FromGitter | <superfunc> I can throw together a PR for that if you agree. |
21:37:01 | * | solitudesf quit (Ping timeout: 240 seconds) |
21:37:29 | FromGitter | <superfunc> Err, maybe asynchttpserver should be catching those earlier. |
22:12:32 | FromGitter | <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:56 | SusWombat | lol |
23:55:18 | SusWombat | the deiscord bot marv uses nimrod syntax highlighting for displaying the playqueue |
23:55:24 | SusWombat | its a music bot |
23:56:40 | SusWombat | discord* |