00:24:18 | * | wildlander quit (Quit: Konversation terminated!) |
00:36:35 | * | shashlick joined #nim |
00:37:05 | shashlick | lost a whole day on irc since matterbridge update no longer connects with slack legacy config - reverted back to v1.11.3 |
00:37:09 | shashlick | @zacharycarter: i don't see nimgl_gen code - just the generated output it seems |
00:38:23 | FromGitter | <zacharycarter> shashlick: what are you looking at? |
00:38:48 | FromGitter | <zacharycarter> I spoke with the author of nimgl_gen and we've moved the imgui bindings into their own repo - https://github.com/zacharycarter/nimgui |
00:39:00 | FromGitter | <zacharycarter> and added this repo to the nimble package repo |
00:49:22 | * | kapil____ quit (Quit: Connection closed for inactivity) |
00:58:01 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
01:45:03 | * | zachk quit (Quit: Leaving) |
03:06:14 | * | ftsf joined #nim |
03:06:55 | FromGitter | <seruum> I've been getting this error this weekend with some async routines that have been running flawlessly. Anyone know what may cause it or where I can find information on it? Error: unhandled exception: Resource temporarily unavailable (code: 11) [IOSelectorsException] |
03:07:42 | * | banc quit (Quit: ZNC - http://znc.in) |
03:25:24 | * | banc joined #nim |
03:29:11 | * | rlr quit (Remote host closed the connection) |
03:53:47 | * | shadowbane quit (Ping timeout: 240 seconds) |
04:12:31 | * | smitop quit (Quit: Connection closed for inactivity) |
04:29:24 | * | vlad1777d quit (Ping timeout: 246 seconds) |
04:56:21 | * | narimiran joined #nim |
05:06:06 | M379229[m] | AoC :)) |
05:16:57 | FromDiscord_ | <technicallyagd> Damn these people are fast. Some finished in less than 3 mins |
05:20:19 | FromDiscord_ | <technicallyagd> Wow @M379229 Congratz, you are still on the global leader board! |
05:27:52 | M379229[m] | Thanks! |
05:37:46 | FromGitter | <Vindaar> I should really read the instructions more closely tomorrow... I totally missed that I explicitly had to only check for letters that occur 2 and 3 times, but not more often :D |
05:44:25 | narimiran | heh, today my reading skills were fine |
05:44:38 | narimiran | but my coding skills, on the other hand.... :D :D |
05:44:54 | FromGitter | <Vindaar> yeah, those were lacking for me too :D |
05:45:06 | FromDiscord_ | <technicallyagd> I missed that you should only count once for each line XD |
05:45:28 | FromGitter | <Vindaar> that I missed at first too. So I hacked in a "fix" for that afterwards :D |
05:46:15 | narimiran | i was struggling with part2. i was declaring/resetting counter at the wrong place. gaaah |
05:47:19 | FromGitter | <Vindaar> it was fun nonetheless :) |
05:47:32 | FromDiscord_ | <technicallyagd> Fun but stressful lol |
05:47:36 | narimiran | you misspelled 'frustrating' |
05:47:50 | FromGitter | <Vindaar> haha |
05:47:55 | FromDiscord_ | <technicallyagd> haha |
05:47:57 | narimiran | (joking aside, yes it was fun) |
05:49:01 | FromDiscord_ | <technicallyagd> oh hey, @narimiran, is your solution for aoc2017 on github the first attempt? or the refined solution? |
05:49:32 | FromDiscord_ | <technicallyagd> They seem really elegant |
05:50:39 | narimiran | @technicallyagd: thank you! my first attempts in 2017 were written in python, then rewritten in nim, and then i refined them |
05:51:10 | narimiran | when you aim for solving speed, code gets really ugly/hacky |
05:53:27 | narimiran | but at the end, the code you can see currently is probably not as elegant as it could be, because in the end, i was trying to minimize total running time |
05:53:41 | FromDiscord_ | <technicallyagd> LOL that's what I feel as well |
05:54:44 | FromDiscord_ | <technicallyagd> Ah I see, so they are probably the best approach for actually winning AOC |
05:54:52 | FromDiscord_ | <technicallyagd> Ah I see, so they are probably not the best approach for actually winning AOC |
05:55:51 | FromDiscord_ | <technicallyagd> I think python excel at tasks like these |
05:56:23 | FromDiscord_ | <technicallyagd> since you don't really need performance, and it has tons of utility libraries |
05:57:37 | narimiran | yes, i also think python is the way to go. but this year, only nim for me |
05:58:43 | FromDiscord_ | <technicallyagd> Yeah, nim actually has the potential to beat python in this kind of task. |
06:01:52 | FromDiscord_ | <technicallyagd> Maybe we could make a dedicated library for AoC. I am working through 2017 tasks, and there are some functions I kept using that are missing in nim |
06:02:23 | FromDiscord_ | <technicallyagd> like argsort and inc/dec that wraps around |
06:02:40 | narimiran | well, make it generally useful and release it as nimble package ;) |
06:03:43 | FromDiscord_ | <technicallyagd> we'll see :p |
06:10:57 | M379229[m] | For pure contest coding, yeah. Python is probably quicker to spit out a puzzle solution (fewer keystrokes, and you don't have to think about types as much). But it's more fun in nim. |
06:11:23 | narimiran | +1 |
06:11:46 | M379229[m] | I care most about making readable, maintainable code that I can still understand a month later. And Python seems to get messy sometimes with longer programs, even with type annotations. |
06:13:08 | FromGitter | <kdheepak> I'm having fun doing advent of code for the first time! Using it as an excuse to explore Nim. Gotta say, my python / nim solutions are looking very very similar. |
06:13:21 | FromGitter | <kdheepak> Not sure if that's a good thing though. |
06:13:47 | narimiran | it is reasonable for these early tasks. later they will probably start to differ more |
06:14:14 | FromGitter | <kdheepak> Are others pushing their solutions to github? |
06:14:43 | FromDiscord_ | <technicallyagd> I think there are quite a few |
06:15:04 | FromDiscord_ | <technicallyagd> I saw them on the forum yesterday |
06:15:38 | M379229[m] | narimiran (and anyone else): could you suggest which AoC puzzles I should try first? So far I've only done 2018 and the first few from 2015. Do you think one year is noticably better/more useful/more fun than another? |
06:15:54 | narimiran | yes, you can find links on the forum. i usually wait couple of hours before publishing |
06:15:58 | FromGitter | <kdheepak> @narimiran I see you haven't pushed yours yet. It'd be nice to see other people's more idiomatic solutions, and how I can improve my embarrassingly low level code to perform the same |
06:16:08 | * | anamok joined #nim |
06:16:12 | anamok | morning |
06:16:24 | FromDiscord_ | <technicallyagd> morning |
06:16:58 | narimiran | M379229[m]: i feel like every year has some "theme" to it. for 2016 you need to know graphs (DFS, BFS, etc), for 2017 it was all about modular arithmetic :) |
06:17:14 | FromGitter | <kdheepak> Interesting. |
06:17:26 | narimiran | M379229[m]: if you want some tough tasks, i can name a few |
06:17:27 | FromGitter | <kdheepak> I'm working through 2017 right now, finding it fun. |
06:18:13 | M379229[m] | narimiran: you can name them, but only so that I'll avoid them and save them for later :) |
06:18:18 | FromDiscord_ | <technicallyagd> me too, and these tasks made me realize how little I know nim |
06:19:19 | narimiran | M379229[m]: haha ok. easy tasks are usually in the first week (minus some tasks that fell on weekends, e.g. 2017 day 3), so you can solve those first |
06:19:20 | FromDiscord_ | <technicallyagd> do we have a parser generator that compiles BNF-like grammar into parsers? |
06:19:47 | FromDiscord_ | <technicallyagd> like nearley |
06:19:50 | FromDiscord_ | <technicallyagd> in javascript |
06:22:29 | anamok | The exercise today was also fun. |
06:23:54 | anamok | narimiran, Will you push your solution to GitHub? |
06:24:37 | narimiran | anamok: i will, but first i need to walk my dog, have a breakfast, and then make it less ugly/hacky. so in couple of hours :) |
06:25:28 | anamok | narimiran, OK. I'm curious to see another solution. |
06:27:45 | M379229[m] | narimiran: Thanks. I'll do each one in Nim, then probably read and compare with Norvig's python solutions. But he doesn't have a writeup for 2015, so at least that narrows it down to 2016 or 2017. |
06:38:11 | * | nsf joined #nim |
06:38:40 | * | anamok quit (Ping timeout: 250 seconds) |
06:40:18 | * | fredrik92 quit (Read error: Connection reset by peer) |
06:40:44 | * | fredrik92 joined #nim |
06:41:56 | narimiran | M379229[m]: i've read Norvig's solutions for 2016. i really liked his style |
06:44:24 | * | sz0 quit (Quit: Connection closed for inactivity) |
06:51:31 | M379229[m] | Yeah, seems like it should be good. Know anything else that's worth reading? |
06:51:43 | M379229[m] | Apart from your own nim solutions :) |
06:51:52 | narimiran | :D |
07:08:41 | * | nsf quit (Quit: WeeChat 2.3) |
07:09:10 | * | nsf joined #nim |
07:13:38 | * | vlad1777d joined #nim |
07:57:48 | * | Vladar joined #nim |
07:58:17 | FromGitter | <kdheepak> I'm pushing my solutions online |
07:58:23 | FromGitter | <kdheepak> I'd love feedback from others. |
07:58:43 | FromGitter | <kdheepak> https://github.com/kdheepak/adventofcode |
08:02:19 | narimiran | @kdheepak why don't you split your input just once at the beginning? |
08:16:13 | narimiran | @kdheepak: also `let s = abs(ord(c1) - ord(c2))` and line after that can be replaced by `if c1 != c2` |
08:19:34 | * | kapil____ joined #nim |
08:35:03 | narimiran | having this https://github.com/nim-lang/Nim/issues/7486 would make my/our AoC code really nicer.... |
08:55:54 | * | anamok joined #nim |
08:58:52 | anamok | Say I have a func that returns a `Table[char, int]`. What is the implicit `result` variable in this case? A Table reference or a Table object? |
08:59:18 | anamok | I mean, is it a reference on a Table? |
09:02:12 | anamok | I couldn't use this table right away, I had to add the line `result = initTable[char, int]()` . So I guess `result` is just a reference. Am I correct? |
09:12:11 | leorize | anamok: the type `Table[T, U]` is an object |
09:12:18 | leorize | only `TableRef[T, U]` is not |
09:12:49 | leorize | an object by default is uninitialized. Nim does not have constructors |
09:13:17 | leorize | correction: the `result` is initalized to 0 |
09:13:45 | leorize | you can simulate the same with `var uninitTable: Table[char, int]` |
09:14:04 | leorize | you'd still have to use initTable to initialize the internal state of the Table object |
09:15:08 | anamok | leorize, thanks |
09:20:01 | * | stefanos82 joined #nim |
09:25:56 | * | vlad1777d quit (Ping timeout: 250 seconds) |
09:36:43 | * | anamok quit (Ping timeout: 245 seconds) |
09:43:43 | * | wildlander joined #nim |
09:45:50 | * | anamok joined #nim |
09:55:19 | * | anamok quit (Remote host closed the connection) |
09:59:14 | * | nsf quit (Quit: WeeChat 2.3) |
10:38:44 | * | ftsf quit (Ping timeout: 250 seconds) |
11:01:43 | * | narimiran quit (Ping timeout: 245 seconds) |
11:06:33 | * | smitop joined #nim |
11:22:19 | * | ng0 joined #nim |
11:43:02 | * | Amun_Ra quit (Ping timeout: 244 seconds) |
11:49:26 | * | Amun_Ra joined #nim |
12:05:17 | * | nsf joined #nim |
12:24:46 | * | ftsf joined #nim |
12:25:07 | * | gogolxdong joined #nim |
12:26:48 | ftsf | anyone have a workaround for deepCopy on js backend? |
12:51:12 | * | Shoozza joined #nim |
12:53:54 | federico3 | https://lobste.rs/s/vtgnuu/d_vs_nim |
12:58:06 | smitop | So I initialise an ordered table with `let cookieJar = initOrderedTable[string, string]()`, and then later do `cookieJar[lvalue] = rvalue` (lvalue and rvalue are both strings). |
12:58:27 | smitop | But I get `Error: type mismatch: got <OrderedTable[system.string, system.string], string, string> |
12:58:28 | smitop | but expected one of:` |
13:00:00 | smitop | But doesn't that fit the `proc `[]=`[A, B](t: var OrderedTable[A, B]; key: A; val: B)` proc? |
13:00:04 | smitop | proc `[]=`[A, B](t: var OrderedTable[A, B]; key: A; val: B) |
13:11:37 | * | Shoozza quit (Changing host) |
13:11:37 | * | Shoozza joined #nim |
13:12:37 | * | Shoozza quit (Quit: Bye) |
13:12:44 | * | Shoozza joined #nim |
13:14:01 | * | Shoozza quit (Client Quit) |
13:15:15 | FromGitter | <Vindaar> @smitop: the issue is that your `OrderedTable` is declared as `let`. But the `[]=` proc requires a `var OrderedTable`, which cannot be satisfied in that case. If you write `var cookieJar` it should work |
13:15:44 | * | Shoozza joined #nim |
13:15:56 | * | Shoozza quit (Changing host) |
13:15:56 | * | Shoozza joined #nim |
14:07:15 | * | narimiran joined #nim |
14:24:49 | FromGitter | <zacharycarter> cavariux: FYI - I got the imgui bindings integrated into my project - going to build a small example this morning to test |
14:25:22 | cavariux | nice, let me know if I can help you with anything |
14:28:32 | FromGitter | <zacharycarter> will do - thanks - going to start with BGFX as a backend (because that's what I'm using - can then do opengl and sdl2) |
14:32:52 | * | jken quit (Ping timeout: 252 seconds) |
14:33:12 | * | Vladar quit (Remote host closed the connection) |
14:37:16 | * | AlexMax quit (Ping timeout: 252 seconds) |
14:37:50 | * | AlexMax joined #nim |
14:38:38 | * | jken joined #nim |
14:40:38 | FromGitter | <zacharycarter> I'm just looking at some Gtk code vs some Imgui code |
14:40:46 | FromGitter | <zacharycarter> the gtk code looks way cleaner |
14:40:56 | FromGitter | <zacharycarter> and potentially smaller |
14:41:07 | FromGitter | <zacharycarter> but - I don't know if I want to add gtk as a dependency to my project... |
14:41:22 | FromGitter | <zacharycarter> andddd I don't know if gintro is where I'll need it to be - i assume it is - but I'm not 100% sure |
14:44:53 | FromGitter | <zacharycarter> https://github.com/zserge/webview - would be cool - not sure it's going to be able a opengl / vulkan / metal / dx11|12 context though |
14:45:25 | leorize | have you compared imgui lib size vs gtk lib size? |
14:45:33 | leorize | and gtk looks terrible on windows |
14:45:54 | serialdev[m] | libui is decent too |
14:46:49 | leorize | the Nim wrapper for it is quite out of date though, but it probably has the best programming experience |
14:47:53 | Calinou | imgui doesn't look native, so making it look good is up to you |
14:48:05 | Calinou | you also need to ensure it doesn't redraw at 1,000 FPS when it doesn't need to to avoid burning laptops :) |
14:48:42 | Calinou | good hiDPI support may also prove difficult |
14:58:15 | FromGitter | <zacharycarter> hmm |
14:59:27 | FromGitter | <zacharycarter> gtk I'm assuming is MUCH larger - and I'd still need imgui regardless |
14:59:37 | FromGitter | <zacharycarter> libui does look nice - that might be worth exploring further |
15:00:12 | FromGitter | <zacharycarter> imgui - yeah, I'm familiar with some of the challenges I'll face there |
15:00:30 | FromGitter | <zacharycarter> I really wish webview had a way to integrate with sdl2 - but I'm not seeing one |
15:01:57 | FromGitter | <zacharycarter> maybe CEF? |
15:02:04 | FromGitter | <zacharycarter> although that's probably another huge dependency |
15:02:10 | FromGitter | <zacharycarter> leaving me better off just using imgui |
15:05:34 | FromGitter | <zacharycarter> I'm going to look at webview's source and see if this is feasible |
15:06:03 | * | gogolxdong quit (Ping timeout: 256 seconds) |
15:06:43 | Calinou | libui looks interesting but I have yet to see a real-world usage :( |
15:06:56 | Calinou | it also currently lacks some major features you'd expect from a modern GUI library |
15:07:09 | Calinou | it could work for small utilities, but probably not for a full-blown GUI tool yet |
15:07:42 | Calinou | also, WebViews are not ideal when you want high performance/low latency, so that's a compromise |
15:07:56 | FromGitter | <zacharycarter> well I'd just use it in the editor for GUI purposes |
15:08:21 | FromGitter | <zacharycarter> don't really need high performance there - latency if everything is running locally - again shouldn't be too huge of an issue |
15:08:33 | Calinou | we've come a long way (see VS Code) but a Qt app will almost always feel more reactive |
15:08:44 | FromGitter | <zacharycarter> sure |
15:08:48 | Calinou | as for latency, I'm speaking in terms of local latency incurred by the whole stack: https://danluu.com/input-lag/ |
15:09:28 | FromGitter | <zacharycarter> yeah - it's definitely not going to feel as reactive if I go that route |
15:09:31 | Calinou | I really wish there was a complete general-purpose editor like VS Code, but using native technologies |
15:09:32 | FromGitter | <zacharycarter> or responsiv erather |
15:09:40 | Calinou | the investment would be worth it, judging how many people use an editor daily |
15:09:59 | FromGitter | <zacharycarter> emacs? "P |
15:10:01 | Calinou | heh |
15:10:26 | FromGitter | <zacharycarter> requires knowing Lisp though to really use it |
15:10:39 | FromGitter | <zacharycarter> and then structuring your life around it |
15:11:00 | FromGitter | <sotrhRaven> Vscode is pretty fine tuned. They work hard to keep it responsive. |
15:11:15 | * | wildlander_ joined #nim |
15:11:18 | * | wildlander quit (Ping timeout: 250 seconds) |
15:11:20 | FromGitter | <zacharycarter> VSCode runs on electron |
15:11:28 | FromGitter | <sotrhRaven> Yes |
15:11:39 | FromGitter | <zacharycarter> they're never going to beat an editor written with a native gui lib |
15:11:40 | FromGitter | <zacharycarter> like Qt |
15:11:55 | FromGitter | <zacharycarter> or Sublime |
15:12:03 | FromGitter | <zacharycarter> if you want an actual editor to compare it to |
15:12:10 | FromGitter | <zacharycarter> rather than a GUI lib |
15:12:24 | FromGitter | <sotrhRaven> True, but not many electron apps come close to be |
15:12:34 | FromGitter | <sotrhRaven> Vscode |
15:12:42 | FromGitter | <zacharycarter> that's true |
15:13:08 | FromGitter | <zacharycarter> I just feel it's a huge concession we're all making :P |
15:13:48 | FromGitter | <sotrhRaven> I agree that native would be much better. Just pointing out that making a good electron app is difficult. |
15:13:54 | FromGitter | <zacharycarter> for sure |
15:13:59 | FromGitter | <zacharycarter> I'm not even considering electron for this project |
15:14:28 | FromGitter | <zacharycarter> webview would be tolerable though I think - it's much lighter weight than electron |
15:14:40 | FromGitter | <zacharycarter> problem is - all the native window stuff is not exposed |
15:14:43 | FromGitter | <zacharycarter> so Imgui it is for now |
15:16:41 | FromGitter | <sotrhRaven> I have just been porting toy projects to nim from python. Going to be using pyside2 with python for gui stuff at first. Not sure where I will end up in nim. |
15:17:41 | * | vlad1777d joined #nim |
15:18:47 | * | ftsf quit (Ping timeout: 268 seconds) |
15:20:52 | FromGitter | <zacharycarter> good way to start out - and yeah I think the whole x-platform GUI perplexes most of us |
15:21:03 | FromGitter | <zacharycarter> if your needs are simple - webview is probably a good starting point |
15:21:42 | FromGitter | <zacharycarter> I need to marry this GUI with a OpenGL|Vulkan/Metal|2/DX11|12 context |
15:23:13 | FromGitter | <kdheepak> > *<narimiran>* having this https://github.com/nim-lang/Nim/issues/7486 would make my/our AoC code really nicer.... ⏎ ⏎ +1 |
15:23:38 | narimiran | well, maybe one day.... |
15:28:45 | FromGitter | <zacharycarter> https://github.com/jdryg/vg-renderer - might be an option |
15:32:09 | FromGitter | <zacharycarter> that actually might be the best option - although I'd have to write my own GUI library on top of that :/ |
15:33:21 | FromGitter | <zacharycarter> not willing to sign up for that |
15:33:39 | * | nsf quit (Quit: WeeChat 2.3) |
15:48:29 | * | Vladar joined #nim |
15:50:15 | * | wildlander_ quit (Quit: Konversation terminated!) |
15:52:24 | * | wildlander joined #nim |
16:33:28 | FromGitter | <zacharycarter> anyone know how to take a Duration and convert it to a float in the format - seconds.nanoseconds |
16:33:39 | FromGitter | <zacharycarter> and by Duration - I'm speaking to the times module |
16:38:38 | narimiran | manually write a converter to a string, and then parseFloat? |
16:39:10 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c040aae464b6c0fd67d6a66] |
16:39:15 | FromGitter | <zacharycarter> similar to that? |
16:39:43 | FromGitter | <zacharycarter> although maybe I need to create another intToStr that works with int64s |
16:41:12 | narimiran | something like that, yeah |
16:41:20 | FromGitter | <zacharycarter> thanks narimiran |
16:41:38 | narimiran | well, you did most of the work anyway :) |
16:41:46 | FromGitter | <zacharycarter> sanity checks always help :) |
16:42:19 | * | fthe joined #nim |
16:42:24 | narimiran | maybe there is an easier/idiomatic way, but my experience with `times` is limited |
16:43:05 | FromGitter | <zacharycarter> yeah - I've used it here and there - I'm more comfortable with the posix api |
16:43:11 | FromGitter | <zacharycarter> but I'm not finding a "better way" at this point |
16:46:57 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c040c811c439034af08d658] |
16:46:59 | FromGitter | <zacharycarter> seems to work fine |
16:47:37 | FromGitter | <zacharycarter> and I just tested it all in my game loop and it's returning a float with seconds and nanoseconds - so yay |
16:47:57 | fthe | Hi, I'm wondering how, in the strutils module, the `splitLines` proc and the `splitLines` iterator are disambiguated, seeing as they have the same signature? |
16:48:33 | narimiran | fthe: depending if you're using it in a for loop or on right hand side of `=` :) |
16:48:46 | fthe | oh, that simple :) |
16:49:42 | fthe | so, can iterators be bound to a name in the general case (no ambiguous proc)? Or only used in a for loop? |
16:50:43 | narimiran | fthe: https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-first-class-iterators |
16:52:11 | fthe | thank you! |
17:10:49 | * | nsf joined #nim |
17:26:47 | shashlick | what's the best template engine in Nim - i've seen nim-templates and moustachu so far |
17:40:23 | * | fthe quit (Remote host closed the connection) |
17:40:51 | * | fthe joined #nim |
17:46:21 | * | fthe quit (Ping timeout: 246 seconds) |
17:57:52 | * | fthe joined #nim |
18:04:11 | FromGitter | <zacharycarter> shashlick: for HTML templating? |
18:05:23 | * | Vladar quit (Remote host closed the connection) |
18:13:40 | shashlick | well general templating |
18:13:51 | shashlick | not html specific |
18:33:57 | * | so quit (Ping timeout: 246 seconds) |
18:35:07 | * | ng0 quit (Remote host closed the connection) |
18:36:25 | * | ng0 joined #nim |
18:38:39 | * | so joined #nim |
19:02:29 | * | wildlander quit (Quit: Konversation terminated!) |
19:04:32 | * | smitop quit (Quit: Connection closed for inactivity) |
19:27:46 | * | tdc quit (Quit: Leaving) |
19:37:49 | * | Pisuke joined #nim |
19:38:50 | * | MyMind quit (Ping timeout: 272 seconds) |
19:40:41 | * | tdc joined #nim |
19:43:57 | deepend | why do I always end up with an empty line at the end when using strutils splitLines? |
19:43:58 | deepend | for example: const data = readFile("input.txt").splitLines() |
19:47:39 | * | rockcavera joined #nim |
19:52:09 | dom96 | because that's a Unix convention |
19:52:14 | dom96 | to have a trailing newlines |
19:52:18 | FromGitter | <yyyc514> Why does CountTable now have an mgetOrPut? |
19:54:15 | deepend | so "asdf\n".splitLines() intended result would be something like: ["asdf", ""] ? |
19:59:19 | FromGitter | <SolitudeSF> yes, just `strip` the input before splitting |
20:00:52 | deepend | ahh, that is a very useful tip. thanks SolitudeSF |
20:01:20 | * | Vladar joined #nim |
20:18:03 | * | nsf quit (Quit: WeeChat 2.3) |
20:18:26 | * | kapil____ quit (Quit: Connection closed for inactivity) |
20:25:26 | * | kungtotte joined #nim |
20:26:05 | * | stefanos82 quit (Remote host closed the connection) |
20:33:06 | FromGitter | <zacharycarter> does Nim have something like pylint? |
20:33:11 | FromGitter | <zacharycarter> is that nimpretty? |
20:35:47 | narimiran | nimpretty is something like python's black (which enforces what pylint would just suggest) |
20:37:34 | FromGitter | <zacharycarter> gotcha |
20:37:54 | FromGitter | <zacharycarter> I was thinking - it'd be neat if Nim had support for - https://www.codacy.com/ |
20:38:00 | FromGitter | <zacharycarter> but we'd need a linter I think |
20:38:14 | narimiran | give nimpretty a try |
20:38:33 | FromGitter | <zacharycarter> well - I'll put it on the list of projects that'd be nice to have |
20:39:03 | FromGitter | <zacharycarter> if I get time - I'll play around with it - it involves extending a scala project it looks like |
20:43:45 | FromGitter | <zacharycarter> https://github.com/nim-lang/needed-libraries/issues/87 |
20:46:30 | FromGitter | <zacharycarter> I'm guessing most C/C++ static analysis tools won't work with Nim |
20:46:41 | FromGitter | <zacharycarter> maybe the more apt-need is - a static analysis tool for Nim |
20:52:43 | * | poyus joined #nim |
20:58:18 | * | kungtotte quit (Remote host closed the connection) |
21:05:34 | * | kungtotte joined #nim |
21:06:07 | * | poyus quit (Remote host closed the connection) |
21:14:03 | FromGitter | <Vindaar> @narimiran: really got no clue what's going on with my code snippets on reddit :S |
21:15:39 | * | kapil____ joined #nim |
21:24:39 | narimiran | @Vindaar you're using markdown formating with triple backticks, which doesn't work on reddit. the code needs to be indented with 4 spaces |
21:25:35 | * | narimiran quit (Remote host closed the connection) |
21:25:35 | FromGitter | <Vindaar> But there's a button on the comment window saying "switch to markdown editing". And see here: https://imgur.com/a/Lp2DAB3 it looks just fine for me! |
21:26:06 | FromGitter | <Vindaar> I tried 4 spaces yesterday at first and that didn't work for me anymore. Text was just normal text that way |
21:46:04 | FromGitter | <zacharycarter> you have to indent every line by 4 spaces I think |
21:46:20 | FromGitter | <zacharycarter> the whole triple back quotes is a github-specific thing |
21:47:48 | FromGitter | <Vindaar> that's what I meant. Tried indenting every line by 4 spaces. And I know that worked fine in the past. Didn't work yesterday for me. ⏎ But that image there is taken with the triple back quotes. So on the other hand that works fine on my end now. |
21:48:42 | FromGitter | <zacharycarter> I just link to gists these days |
21:48:43 | FromGitter | <zacharycarter> or whatever |
21:48:52 | FromGitter | <zacharycarter> that way I can be sure it's formatted properly for whoever is viewing it |
21:48:57 | FromGitter | <zacharycarter> on whatever platform |
21:53:44 | FromGitter | <Vindaar> yeah, in general I try to do the same |
22:01:41 | * | Vladar quit (Remote host closed the connection) |
22:08:13 | * | jakob_ joined #nim |
22:10:08 | * | lritter joined #nim |
22:11:00 | lritter | *rides on horseback in full knights armor through castle gates and comes to a stop in the middle of the empty market* |
22:11:13 | lritter | ZAC ATTACK! I CALL UPON THEE. COME DOWN AND FACE ME |
22:12:46 | lritter | *turns horse in circles, looking to the windows above for a sign of life as the wind howls gently* |
22:13:00 | lritter | ZAC ATTACK! SHOW YOURSELF |
22:14:06 | lritter | (muttering to himself) no sign of him |
22:15:15 | lritter | *chases out of the gate* |
22:15:20 | * | lritter left #nim ("Leaving") |
22:15:38 | * | smitop joined #nim |
22:17:42 | FromGitter | <zacharycarter> lol |
22:17:58 | FromGitter | <zacharycarter> hi lritter ! |
22:25:35 | * | rockcavera quit (Remote host closed the connection) |
22:31:50 | * | jakob_ quit (Quit: Leaving) |
22:31:57 | * | jakob_ joined #nim |
22:33:10 | * | jakob_ quit (Client Quit) |
22:35:52 | * | jakob0094 joined #nim |
22:40:25 | jakob0094 | Hi people! I think I found a problem regarding AST generation: https://hastebin.com/baqufewega.php |
22:40:39 | jakob0094 | in the AST the variable "i" is declared twice |
22:44:32 | * | lritter joined #nim |
22:44:43 | jakob0094 | it seems like the additional loop variable generated by the compiler is always called "i", regardless of other variables with the same name existing already |
22:44:43 | lritter | zacharycarter[m], HAH! |
22:44:53 | lritter | through no work but my own, i finally found you |
22:46:15 | FromGitter | <zacharycarter> :D |
22:46:37 | FromGitter | <zacharycarter> lritter: this is a mishmash of irc, discord, matrix and gitter |
22:46:54 | * | MightyJoe joined #nim |
22:47:01 | FromGitter | <zacharycarter> for folks on gitter - myself included - the best way to ping us is with an `@` so - `@zacharycarter` |
22:47:24 | FromGitter | <zacharycarter> jakob0094: yes - this looks weird |
22:47:35 | FromGitter | <yyyc514> no way to pass a "typeof" as an argumen tto a function and then track it anywhere? |
22:47:50 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c0461169f38cc0fd5958b2f] |
22:48:16 | FromGitter | <zacharycarter> jakob0094: I can't guarantee it's an issue - and not some work around |
22:48:41 | FromGitter | <zacharycarter> I don't have that much compiler knowledge - but if you can, filing an issue would be most welcome I think |
22:48:51 | FromGitter | <zacharycarter> and if it turns out to be expected behavior - it can just be closed |
22:49:33 | jakob0094 | alright, i'll do that then |
22:49:58 | FromGitter | <zacharycarter> thank you jakob0094 |
22:50:12 | lritter | FromGitter, thx |
22:50:12 | FromGitter | lritter, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
22:50:28 | lritter | got it |
22:50:40 | FromGitter | <zacharycarter> haha yeah - it's a show in here with all of the chat clients |
22:50:42 | lritter | so i'm not looking at a replay, i'm looking at something that happens right now, LIVE |
22:50:54 | FromGitter | <zacharycarter> exactly - there's a bot that syncs all this stuff |
22:51:22 | lritter | splendid, splendid |
22:51:24 | FromGitter | <zacharycarter> https://github.com/oprypin/critter |
22:51:46 | FromGitter | <zacharycarter> and then people have taken the same concept and applied to to discord and matrix |
22:52:08 | FromGitter | <zacharycarter> so we have a cacophony of chat going on - but somehow it sort of works :P |
22:52:28 | lritter | how very babylonian |
22:52:34 | FromGitter | <zacharycarter> :) |
22:52:59 | FromGitter | <zacharycarter> welcome btw! |
22:53:02 | lritter | thx |
22:53:26 | FromGitter | <zacharycarter> I've shared scopes a few times in here, and ears have always perked up |
22:53:59 | FromGitter | <zacharycarter> so I know there is similar domain interest between the languages |
22:54:26 | FromGitter | <zacharycarter> and I know cross-pollination of ideas is never a bad thing :) |
22:54:31 | lritter | right, i should quickly introduce myself, i'm not a nim user but am writing my own compiler, and am looking to poach the nim userbase for gullible souls ahem i mean critical thinkers who would -- no actually, i just want to see what y'all are up to. |
22:55:00 | FromGitter | <zacharycarter> I think there are core Nim devs that lurk rust and pony irc etc |
22:55:06 | FromGitter | <zacharycarter> so I wouldn't worry too much :P |
22:55:29 | FromGitter | <zacharycarter> but I'm sure there's a lot to teach and learn on both ends - which is always exciting |
22:55:29 | lritter | i'm on rust myself occasionally, i needed to understand their infernal borrow checker |
22:55:56 | FromGitter | <zacharycarter> Nim's working on destructors and ownership semantics right now |
22:56:13 | FromGitter | <zacharycarter> also on hot code reloading - which I'm particularly excited about |
22:56:17 | FromGitter | <zacharycarter> for the C target even |
22:58:27 | * | Snircle joined #nim |
23:01:33 | lritter | nice. i'm currently struggling with cleaning up the handling and forwarding of multiple arguments so that it's easier to do borrowing on them |
23:02:01 | lritter | i keep deleting and rewriting code, i hope this time it sticks. |
23:07:07 | FromGitter | <zacharycarter> sounds complicated :P then again - this is why I don't author programming languages - although eventually I'd like to take a stab at it, in some form |
23:07:45 | FromGitter | <zacharycarter> not sure what the best place to start is - I've thought about writing a forth interpreter but I'm not sure if that's even the best starting point |
23:08:58 | lritter | i would like to do nothing better than not work on a compiler right now :) |
23:09:05 | lritter | but as it appears, i'm cursed. |
23:10:27 | * | rockcavera joined #nim |
23:10:40 | FromGitter | <zacharycarter> :) |
23:10:53 | FromGitter | <zacharycarter> I'm excited for your compiler - if that's any motivation |
23:11:10 | FromGitter | <zacharycarter> or consolation |
23:13:06 | FromGitter | <zacharycarter> cavariux: I see you have a logo stored as a series of uint8's - https://github.com/lmariscal/nimgl/blob/master/src/nimgl/private/logo.nim |
23:13:16 | FromGitter | <zacharycarter> I've seen a similar thing in bgfx - I'm wondering what program you used to produce this? |
23:13:34 | FromGitter | <zacharycarter> the author of bgfx told me of a dos program once - and I used it and installed it, but now I can't remember the name of it |
23:14:06 | FromGitter | <zacharycarter> I was also terrible at using it - but I hobbled together a POS logo and made it work :P |
23:28:05 | FromGitter | <yyyc514> `var y = new(type(x))` is this doomed to fail with subtypes |
23:28:20 | FromGitter | <yyyc514> a sequence seems to remember the type when i stuff things but can i not then query the type form the sequence? |
23:38:27 | FromGitter | <Varriount> @yyyc514 A sequence is a homogenous list. |
23:39:05 | FromGitter | <Varriount> And procedures are statically determined at compile time. |
23:39:09 | FromGitter | <yyyc514> right but it obviously knows the type of each item because it can do dynamic method dispatch |
23:39:28 | * | dddddd quit (Read error: Connection reset by peer) |
23:39:49 | FromGitter | <yyyc514> so there is no way to use that info to create new items of matching type? |
23:40:43 | * | Sembei joined #nim |
23:41:20 | * | Pisuke quit (Ping timeout: 250 seconds) |
23:42:31 | FromGitter | <yyyc514> these are all references |