00:08:29 | Araq | what is a 'trySend' ? |
00:08:38 | Araq | it's called tryRecv |
00:09:10 | Araq | I said "send" does not block, depending on your definition of block. |
00:13:57 | * | CodeVance quit (Quit: Leaving) |
00:14:10 | * | CodeVance joined #nim |
00:19:33 | * | CodeVance is now known as CodeVance_ |
00:20:33 | * | CodeVance_ is now known as CodeVance |
00:23:39 | * | CodeVance quit (Quit: Leaving) |
00:23:51 | * | CodeVance joined #nim |
00:25:50 | * | xkapastel quit (Quit: Connection closed for inactivity) |
00:39:18 | * | smt quit (Read error: Connection reset by peer) |
00:39:33 | * | smt joined #nim |
01:10:17 | * | CodeVance quit (Read error: Connection reset by peer) |
01:17:55 | * | skrylar joined #nim |
01:18:46 | * | skrylar appears inside a crate of old fruit |
01:22:17 | * | vivus joined #nim |
01:34:27 | * | salewski_ joined #nim |
01:37:21 | * | salewski quit (Ping timeout: 240 seconds) |
01:43:20 | * | skrylar quit (Remote host closed the connection) |
01:43:33 | * | Lord_Nightmare quit (Ping timeout: 264 seconds) |
01:46:29 | * | Lord_Nightmare joined #nim |
01:46:56 | * | onionhammer1 quit (Quit: WeeChat 1.9.1) |
01:47:18 | * | onionhammer joined #nim |
02:02:44 | * | vivus quit (Quit: Leaving) |
02:04:15 | * | dddddd quit (Remote host closed the connection) |
02:22:36 | * | arecaceae quit (Read error: Connection reset by peer) |
02:23:00 | * | arecaceae joined #nim |
02:42:11 | * | rockcavera joined #nim |
03:45:53 | * | darithorn joined #nim |
03:58:16 | * | endragor joined #nim |
04:10:10 | * | Lord_Nightmare2 joined #nim |
04:11:45 | * | Lord_Nightmare quit (Ping timeout: 263 seconds) |
04:11:45 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
04:12:11 | * | darithorn quit (Quit: Leaving) |
04:16:39 | * | endragor quit (Remote host closed the connection) |
05:30:28 | * | nsf joined #nim |
05:38:24 | * | skrylar joined #nim |
05:52:21 | * | miran joined #nim |
06:05:55 | * | xkapastel joined #nim |
06:09:49 | * | yglukhov quit (Ping timeout: 260 seconds) |
06:37:21 | * | skrylar quit (Remote host closed the connection) |
06:37:42 | * | skrylar joined #nim |
06:50:14 | * | salewski_ quit (Quit: WeeChat 2.0.1) |
07:16:41 | * | yglukhov joined #nim |
07:19:34 | * | skrylar quit (Quit: Leaving) |
07:28:33 | * | yglukhov quit (Read error: Connection reset by peer) |
07:29:09 | * | yglukhov joined #nim |
07:31:05 | * | yglukhov quit (Remote host closed the connection) |
07:47:51 | * | nsf quit (Quit: WeeChat 2.0.1) |
07:57:36 | * | yglukhov joined #nim |
07:59:06 | * | yglukhov quit (Read error: Connection reset by peer) |
07:59:42 | * | yglukhov joined #nim |
08:04:21 | * | sendell joined #nim |
08:12:33 | * | Lord_Nightmare2 joined #nim |
08:14:07 | * | Lord_Nightmare quit (Ping timeout: 265 seconds) |
08:14:08 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
08:15:21 | * | xkapastel quit (Quit: Connection closed for inactivity) |
08:17:17 | FromGitter | <alehander42> there is no way to `setType` of a nnkSym, right :D |
08:23:23 | FromGitter | <alehander42> there is no way to even check if it hasType without a stack trace right |
08:28:37 | * | Lord_Nightmare quit (Ping timeout: 265 seconds) |
08:30:29 | * | Lord_Nightmare joined #nim |
08:34:07 | * | floppydh joined #nim |
08:37:57 | * | yglukhov quit (Read error: Connection reset by peer) |
08:38:34 | * | yglukhov joined #nim |
08:40:21 | * | xet7 joined #nim |
08:47:51 | * | Vladar joined #nim |
09:08:15 | * | miran quit (Ping timeout: 265 seconds) |
09:10:07 | * | Vladar quit (Remote host closed the connection) |
09:11:42 | FromGitter | <mratsim> here is your new home @alehander42 ;) https://github.com/nim-lang/Nim/issues/7719 |
09:12:23 | FromGitter | <mratsim> otherwise I use that to check types during macro time: https://github.com/mratsim/Arraymancer/blob/master/src/private/ast_utils.nim#L20 |
09:21:50 | * | xet7 quit (Read error: Connection timed out) |
09:22:31 | * | xet7 joined #nim |
09:42:55 | FromGitter | <alehander42> yeah , the things I did.. ugly things |
09:43:11 | FromGitter | <alehander42> I also had a very weird problem : I couldn't `getType` of NimNode itself |
09:43:29 | FromGitter | <alehander42> somehow I only got ref NimNodeObj and this resolved to empty object |
09:45:50 | FromGitter | <alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ae6e5ce1388b2df211295ad] |
09:45:56 | FromGitter | <alehander42> @Araq do you know why this happens ^ |
09:46:44 | FromGitter | <alehander42> it runs ⏎ ⏎ ```ref[NimNodeObj] ⏎ object``` [https://gitter.im/nim-lang/Nim?at=5ae6e60415c9b031144e6c70] |
09:48:46 | Araq | macro call within macro |
09:48:52 | Araq | it's the correct behaviour |
09:49:10 | Araq | ident"e" is a NimNode |
09:49:18 | FromGitter | <alehander42> yes this is exactly what I wanted |
09:49:21 | FromGitter | <alehander42> what I mean is |
09:49:31 | FromGitter | <alehander42> why couldn't I get the fields of NimNodeObj but I saw |
09:49:38 | FromGitter | <alehander42> `NimNode* {.magic: "PNimrodNode".} = ref NimNodeObj` |
09:49:42 | FromGitter | <alehander42> in system.nim |
09:50:06 | Araq | well it has no fields? |
09:51:16 | FromGitter | <alehander42> yeah I was assuming it has, but then I saw it's all getters |
09:55:16 | FromGitter | <alehander42> so is there a good way to directly somehow getType of `symbol` . `property` in a macro? |
09:55:43 | * | PMunch joined #nim |
09:55:47 | FromGitter | <alehander42> (without generating an invocation of a next macro with typed ) |
09:56:15 | FromGitter | <mratsim> none :/ or I didn’t find it. |
09:57:03 | FromGitter | <mratsim> I think this needs a dedicated section in the macros module |
09:59:17 | * | yglukhov quit (Remote host closed the connection) |
09:59:54 | * | yglukhov joined #nim |
10:04:15 | * | yglukhov quit (Ping timeout: 255 seconds) |
10:05:34 | * | dddddd joined #nim |
10:17:58 | * | Vladar joined #nim |
10:24:50 | * | Vladar quit (Quit: Leaving) |
10:24:51 | * | nsf joined #nim |
10:26:05 | * | SenasOzys quit (Ping timeout: 240 seconds) |
10:56:54 | * | xet7 quit (Read error: Connection timed out) |
10:57:31 | * | xet7 joined #nim |
11:03:16 | * | miran joined #nim |
11:06:46 | * | yglukhov joined #nim |
11:09:44 | * | yglukhov quit (Remote host closed the connection) |
11:10:14 | * | yglukhov joined #nim |
11:11:34 | * | Ven`` joined #nim |
11:13:25 | * | shashlick quit (Ping timeout: 256 seconds) |
11:15:14 | * | shashlick joined #nim |
11:20:02 | * | yglukhov quit (Ping timeout: 276 seconds) |
11:21:28 | * | yglukhov joined #nim |
11:22:14 | * | SenasOzys joined #nim |
11:24:24 | * | SenasOzys quit (Read error: Connection reset by peer) |
11:26:52 | * | yglukhov quit (Remote host closed the connection) |
11:28:48 | * | yglukhov joined #nim |
11:29:40 | * | BitPuffin joined #nim |
11:34:18 | * | SenasOzys joined #nim |
11:42:09 | * | yglukhov quit (Remote host closed the connection) |
11:49:06 | FromDiscord | <goeo_> https://getdownon.it/two.png uh oh |
12:08:08 | dom96 | hrm? |
12:09:21 | * | CodeVance joined #nim |
12:09:39 | * | CodeVance quit (Client Quit) |
12:10:12 | * | CodeVance joined #nim |
12:27:43 | * | athenot joined #nim |
12:34:17 | * | yglukhov joined #nim |
13:00:23 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:04:35 | * | athenot joined #nim |
13:09:34 | PMunch | Is ziotom78 from GitHub ever around? |
13:09:45 | PMunch | The guy behind this: https://github.com/ziotom78/parsetoml |
13:11:32 | PMunch | Yardanico, you and sporto also committed to the repository |
13:17:10 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:24:44 | * | SenasOzys quit (Remote host closed the connection) |
13:28:41 | * | SenasOzys joined #nim |
13:34:12 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:35:40 | * | athenot joined #nim |
13:37:45 | dom96 | Might be on Gitter |
13:39:26 | PMunch | Aren't we linked to Gitter from here? |
13:40:14 | livcd | i am do not really have a strong opinions when websites change design but the new reddit looks atrocious |
13:40:37 | PMunch | The new reddit? |
13:44:16 | livcd | the new design |
13:45:29 | PMunch | What new design? Looks about the same to me.. |
13:46:12 | miran | it has not rolled out for everybody yet |
13:46:16 | livcd | dont worry it will change |
13:46:33 | miran | i'm still on the old one, but from the comments, it looks something like twitter |
13:46:50 | PMunch | Noooo |
13:47:09 | miran | easier to incorporate ads into legitimate content |
13:47:15 | PMunch | Reddit has such a simple design.. |
13:47:36 | PMunch | miran, how? There are already ads injected in the Reddit feed isn't there? |
13:48:09 | miran | don't know how, i have just read about it somewhere |
13:49:02 | PMunch | https://cdn.vox-cdn.com/thumbor/BBCPnU3BwLFffELeZCsRHsz68GI=/0x0:2560x1996/920x0/filters:focal(0x0:2560x1996):format(webp)/cdn.vox-cdn.com/uploads/chorus_asset/file/10574197/W93a53ceOYUq3f28nx0mSPdmmj3FMkshDUU8QtIrzbM.png |
13:49:09 | PMunch | Eh, it's not as bad as I feared |
13:49:35 | PMunch | At least it still appears to be full width |
13:49:58 | PMunch | TBH it just looks like someone applied a material theme to it |
13:51:59 | miran | i've seen different design.... |
13:53:04 | livcd | internet is such an irrational platform for business. You either make it big that you are a subject to monopoly regulations or you struggle and then resort to all sorts of intrusive and aggressive monetization |
13:58:48 | * | Ven`` joined #nim |
14:00:46 | PMunch | I think that's a problem in any business |
14:01:25 | PMunch | A business with stocks only serves to make money for it's shareholders, so by definition it must try to either grow large, or make money otherwise |
14:01:44 | PMunch | No such business is happy just making the wheels go round |
14:02:45 | * | shashlick quit (Ping timeout: 264 seconds) |
14:03:20 | * | yglukhov quit (Remote host closed the connection) |
14:03:42 | livcd | Well I have the feeling that the "real world" is more balanced. It takes much more for a bakery chain to crush its competitors |
14:04:31 | federico3 | livcd: #nim-offtopic :) |
14:04:35 | * | shashlick joined #nim |
14:04:56 | livcd | sorry |
14:06:40 | * | yglukhov joined #nim |
14:07:56 | * | Vladar joined #nim |
14:11:38 | dom96 | livcd: Indeed the new reddit design sucks. But AFAIK you can always return to the old design. |
14:12:52 | shashlick | I don't see anything new on reddit.com |
14:14:26 | * | yglukhov quit (Remote host closed the connection) |
14:15:23 | shashlick | Ok not rolled out yet |
14:22:15 | FromGitter | <data-man> https://www.reddit.com/r/nim/comments/8fwu36/what_needs_nim_to_grow_up_more_the_community/ |
14:23:29 | miran | not mentioned there: we need 0.18.2 / 0.19, to introduce new notNil behaviour of seqs and strings to the stable branch |
14:28:35 | * | yglukhov joined #nim |
14:30:57 | * | yglukhov quit (Remote host closed the connection) |
14:35:13 | FromGitter | <data-man> It would be great if the Nim developers worked more consolidated. E.g. create more Nim-organizations: NimSystem, NimGraphics, NimDB, NimMath, etc. |
14:35:38 | miran | good idea, write it there to have all ideas in one place.... |
14:36:31 | * | yglukhov joined #nim |
14:37:30 | federico3 | data-man: are you talking about splitting the sdlib repo? |
14:39:20 | FromGitter | <data-man> @miran: Please, do it! I'm ashamed of my English. :) ⏎ @federico3: No. Combine existing projects in the organizations. |
14:39:33 | shashlick | so there's been 3 attempts to my knowledge for a nim installer - niminst, finish and choosenim |
14:39:43 | miran | data-man: your english is as good as mine ;) |
14:40:41 | federico3 | data-man: you mean to encourage collaborative maintenance? |
14:40:49 | * | yglukhov quit (Remote host closed the connection) |
14:41:01 | * | yglukhov joined #nim |
14:41:10 | miran | federico3: i would say - more focused development (as i just mentioned in my reddit comment) - divide people into groups, so they can focus on one part of nim language and work on it |
14:42:21 | miran | currently it feels to me the development is like a bit of this, a bit of that, a bit of long term goals, a bit of something urgent, a bit of something else, etc |
14:43:40 | federico3 | miran: if you are referring to core stuff (compiler, stdib, tooling) than yes, having roles/owners/teams could really help |
14:45:15 | miran | i'm trying to expand on what data-man has mentioned |
14:46:33 | miran | this can be, of course, postponed after v1.0 is out. having said that - we probably need at some point 'feature freeze' - no more new features for 1.0, and work only on bugfixes |
14:46:54 | FromGitter | <data-man> @federico3: Yes, to encourage collaborative maintenance. |
14:48:08 | CodeVance | Good idea |
14:49:24 | * | noonien joined #nim |
14:50:07 | FromGitter | <data-man> Hurray, now Nim in https://github.com/topics/ ! I just noticed. :-D |
14:55:04 | * | sendell quit (Remote host closed the connection) |
14:56:09 | * | CodeVance claps |
14:56:59 | FromGitter | <data-man> It is a bit prehistory: https://github.com/github/explore/pull/129 |
15:00:54 | * | yglukhov quit (Remote host closed the connection) |
15:02:07 | shashlick | data-man: how come nimgen isn't on the list? 27 stars... how does it detect nim projects? |
15:02:39 | PMunch | Does Windows have a stderr? If not where does stuff written to it in Nim go? |
15:05:23 | FromGitter | <data-man> @shashlick: You can do it yourself for your projects and it's preferable. |
15:05:42 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:06:18 | * | SenasOzys quit (Remote host closed the connection) |
15:06:42 | * | SenasOzys joined #nim |
15:09:17 | FromGitter | <data-man> @PMunch: Yes, Windows have a stderr. |
15:09:39 | PMunch | Ah okay, nice |
15:10:54 | * | yglukhov joined #nim |
15:11:54 | shashlick | data-main: what do I need to do? |
15:12:43 | FromGitter | <zetashift> Aw yiss uni exams done time to get to programming |
15:12:54 | PMunch | Nice zetashift! |
15:13:22 | PMunch | Here we have the day off tomorrow, so I took today off as well to have a super long weekend :) |
15:13:25 | FromGitter | <zetashift> Thanks, I'll probably jump into Nim in Actions metaprogramming chapter one of these days |
15:13:58 | miran | i'm also on a 4-day weekend :) feels really good |
15:14:02 | FromGitter | <zetashift> We have the day off tomorrow too so I'll be staring at my screen a long ass time this night and tomorrow |
15:14:03 | PMunch | If you haven't read it this is a super good read: https://hookrace.net/blog/introduction-to-metaprogramming-in-nim/ |
15:14:23 | PMunch | How I got started with metaprogramming |
15:14:40 | PMunch | Nim in Action wasn't out yet then though, so that might be even better :P |
15:15:05 | FromGitter | <data-man> @shashlick: Where is "Add topics" and "Manage topics" links in your repos (below a Project description). |
15:15:09 | livcd | does anyone here use Nim with emacs here ? |
15:15:25 | FromGitter | <zetashift> I used it a while with spacemacs, had no big issues |
15:15:35 | * | yglukhov quit (Ping timeout: 265 seconds) |
15:15:43 | livcd | ah ok |
15:15:59 | FromGitter | <zetashift> at the start it worked actually better than the vscode one |
15:16:49 | * | floppydh quit (Quit: WeeChat 2.1) |
15:20:21 | * | xkapastel joined #nim |
15:20:26 | FromGitter | <zetashift> I think @krux02 used it a lot more than I did |
15:20:32 | shashlick | data-man: cool thanks :) |
15:20:51 | livcd | deep fakes in Nim :3 |
15:23:07 | * | Trustable joined #nim |
15:26:03 | * | smt` joined #nim |
15:26:42 | PMunch | Hmm, is it possible to quit a Nim program with something else than 0 or 1? |
15:29:26 | shashlick | quit(91) |
15:29:28 | FromGitter | <mratsim> quit “foo”, 3 ? |
15:29:37 | * | smt quit (Ping timeout: 248 seconds) |
15:30:39 | dom96 | quit(QuitFailure) |
15:32:41 | shashlick | Nim windows installer related: https://gist.github.com/genotrance/534e3a49138eec2894299881f5e60105 <== feedback appreciated, cc @dom96 @araq |
15:33:37 | PMunch | shashlick, I tried quit(100) but it quits with error code 1 |
15:33:43 | PMunch | No matter what number I put |
15:34:24 | PMunch | Same if I try to use an error message |
15:35:14 | shashlick | ideally choosenim can be enhanced to do most of the heavy lifting and GUI is just a front-end to choosenim, also leverage code from finish and niminst where appropriate |
15:36:13 | livcd | shashlick: that's nice and all but..not long ago people had been advised to stick to Nim devel |
15:36:18 | livcd | because of whatever bugs |
15:36:52 | miran | one more reason to do more frequent stable versions! |
15:37:00 | shashlick | well, we need to move away from that based on https://github.com/nim-lang/Nim/issues/7527 |
15:37:46 | shashlick | a release is a release that people should stick to for a project and only upgrade if something blocks them |
15:38:31 | livcd | well users that just want to poke around want "use whatever works not atm / use whatever everyone uses atm" |
15:38:40 | livcd | works* |
15:39:04 | * | rauss quit (Quit: WeeChat 2.1) |
15:39:14 | shashlick | that's why I have added the ability to live on devel |
15:39:26 | shashlick | in fact, it should allow single click updates as well |
15:39:36 | dom96 | shashlick: yes, all we need is a thin GUI wizard on top of choosenim IMO |
15:40:03 | dom96 | I've thought about generalizing that to all CLI programs and creating a project that allows to easily create an installer for CLIs |
15:40:34 | * | rauss joined #nim |
15:41:01 | FromGitter | <data-man> @PMunch: I assume, that a mistake on your side because the quit is heavily used in tests. |
15:42:01 | shashlick | dom96: well, choosenim still needs to allow binary install, git pull capable devel install, arch detection, etc to pull this off |
15:42:17 | shashlick | but I agree it is the right base |
15:42:21 | * | xet7 quit (Read error: Connection timed out) |
15:43:01 | * | xet7 joined #nim |
15:43:05 | dom96 | shashlick: yep |
15:46:53 | shashlick | livcd: made some updates to handle devel + upgrade better |
15:47:25 | * | Ven`` joined #nim |
15:48:05 | shashlick | dom96: I'm not sure a generalized GUI will work for this |
15:48:18 | shashlick | especially installing compilers, git, etc. seamlessly |
15:48:31 | dom96 | why? |
15:49:10 | dom96 | There might need to be some hooks to specify progress or check boxes for options |
15:50:00 | shashlick | well, for example, assuming we add code to choosenim to detect installer presence, it needs to inform the GUI on the results |
15:50:13 | shashlick | for that the CLI => GUI will need to scrape the output kind of stuff |
15:50:22 | shashlick | or CLIs will need to adhere to some scheme |
15:50:30 | shashlick | which means the CLIs need to change to work with the GUI |
15:50:50 | FromGitter | <data-man> For Windows users we should recommend to use MSYS2 :) |
15:50:50 | shashlick | it's a conversation in my mind, not just calling the CLI with a bunch of predetermined flags |
15:51:31 | shashlick | data-man: i'm saying allow install of vc++ or clang as well so user has choice |
15:51:41 | dom96 | Sure, CLI will need to adhere to a certain scheme. Most CLIs already do. |
15:52:06 | dom96 | Like I said, there will need to be some customisability. But that can be done using simple checkboxes (for a first version at least) |
15:52:13 | dom96 | I'm just curious how far this concept can go |
15:52:23 | dom96 | If you don't want to try it then no worries |
15:52:51 | shashlick | well, i'm always open to generic methods |
15:53:12 | shashlick | but do you think we can handle the "Figure out C/C++ compiler" section with this method? |
15:54:51 | dom96 | We can also support dropdowns |
15:55:05 | dom96 | The idea is to map UI elements to simple CLI flags |
15:55:20 | shashlick | PMunch: I just tried on Windows / devel and quit(5) => ERRORLEVEL = 5 |
15:55:25 | dom96 | so you can run `choosenim --cc:clang stable` |
15:55:39 | livcd | why not to have the ...by default support for mingw and the resp optional where the user points the installer to the right paths for other compilers ? |
15:55:45 | dom96 | or rather so that the installer can run this |
15:56:14 | shashlick | livcd: ya we can go step by step, not have to support everything in one shot |
15:56:15 | dom96 | yeah, to be honest supporting installation of other compilers is something that's a far off goal for choosenim IMO |
15:56:31 | shashlick | but this is purely aspirational at this point |
15:56:33 | dom96 | It probably pays to have as few variables as possible too |
15:57:23 | * | jrbrt joined #nim |
15:57:27 | * | yglukhov joined #nim |
15:58:36 | shashlick | dom96: so if clang is already installed then the GUI shouldn't show that option at all - so we'd need some way for GUI <=> CLI to have a conversation and intelligently show the right things on the GUI |
15:59:17 | shashlick | so CLI would need to have a --detect flag or something that gives the GUI all the state info it needs to show the right info |
15:59:36 | shashlick | plus any dependency info where if A is selected, then B is greyed out and things like that |
15:59:58 | dom96 | Meh, I think the abstraction breaks a bit for that case. |
15:59:59 | shashlick | without this, it won't have a refined experience typical of installers |
16:00:05 | dom96 | But my idea is to keep things simple |
16:01:45 | shashlick | ok considering the base is choosenim, what features do we need in it to meet this requirement list? I added some stuff to the gist, please see if it is complete |
16:02:03 | * | yglukhov quit (Ping timeout: 256 seconds) |
16:03:17 | dom96 | choosenim is missing many things from your list |
16:03:23 | dom96 | sorry, I don't have time to go through it all now |
16:03:58 | shashlick | what's one good choosenim feature you'd like to see soon? I could take a look |
16:04:18 | FromGitter | <Bennyelg> Hey guys, ⏎ I have something like that: ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5ae73e82c3072ad76f1ddf15] |
16:04:47 | livcd | shashlick: imho try to do the basic gui wrapper :) |
16:06:46 | shashlick | livcd: simpler is definitely better and achievable but I think it's worthwhile to have a nice installer so that first impressions are good |
16:07:23 | * | yglukhov joined #nim |
16:11:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
16:11:48 | * | xet7 quit (Read error: Connection timed out) |
16:12:30 | * | couven92 joined #nim |
16:12:31 | * | xet7 joined #nim |
16:15:38 | shashlick | does nim work with cygwin gcc? |
16:17:52 | FromGitter | <data-man> @Bennyelg: Don't use fmt with SqlQuery. format proc for DateTime has two parameters. I guess that's the point. :) |
16:23:05 | FromGitter | <Bennyelg> I got it, but why `Don't use fmt with SqlQuery` |
16:23:47 | FromGitter | <nigredo-tori> @Bennyelg , have you ever heard the tale of Bobby Tables? |
16:24:21 | FromGitter | <Bennyelg> what is the point of sqlquery if not preventing sql injection? |
16:26:49 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:28:01 | FromGitter | <nigredo-tori> @Bennyelg , `SqlQuery` is a thin wrapper over `string` for better typing. AFAIK, Nim does not have a proper SQL interpolation primitive. |
16:28:58 | FromGitter | <nigredo-tori> And even if `SqlQuery` did something like that, any interpolation in your example would have been done by `fmt`, which knows nothing about SQL. |
16:29:21 | FromGitter | <Bennyelg> got it Thanks :) |
16:30:12 | FromGitter | <data-man> @Bennyelg: ```Try fmt"{student.registrationDate:someDateFormat}"``` |
16:32:54 | PMunch | data-man, shashlick, I have a file with only "quit 2" in it. And it quits with error code 1 |
16:33:23 | shashlick | can you try quit(2) and see if it works? which OS/compiler? |
16:33:40 | shashlick | and nim -v of course |
16:34:00 | CodeVance | It quit with not zero |
16:34:15 | PMunch | Oh wait |
16:34:16 | FromGitter | <Bennyelg> @data-man working like charm. |
16:34:24 | PMunch | "nim c -r" quits with 1 |
16:34:31 | PMunch | Just running the program quits with 2 |
16:34:32 | PMunch | .. |
16:34:55 | * | leorize joined #nim |
16:35:26 | CodeVance | Kek |
16:36:03 | * | jrbrt quit (Quit: jrbrt) |
16:36:51 | * | vivus joined #nim |
16:41:00 | FromGitter | <data-man> @PMunch: ```"nim c -r" quits with 1``` - it's nim's exit code :) |
16:41:32 | shashlick | https://github.com/nim-lang/Nim/blob/devel/compiler/nim.nim#L102 <= it doesn't forward the child's error code |
16:42:18 | * | gangstacat joined #nim |
16:44:43 | * | Ven`` joined #nim |
16:45:47 | PMunch | data-man, yeah I know |
16:46:01 | PMunch | It was a silly mistake on my end |
17:08:08 | * | SenasOzys quit (Remote host closed the connection) |
17:11:04 | * | SenasOzys joined #nim |
17:18:29 | PMunch | Hmm, why doesn't all the pages on nimble.directory have hosted documentation? |
17:18:37 | PMunch | Even if the module contains documentation |
17:21:33 | * | Vladar quit (Remote host closed the connection) |
17:22:06 | CodeVance | Nopa |
17:23:41 | * | jrbrt joined #nim |
17:30:49 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:32:42 | * | PMunch quit (Quit: leaving) |
18:05:35 | * | Ven`` joined #nim |
18:06:59 | * | yglukhov joined #nim |
18:07:21 | * | SenasOzys quit (Ping timeout: 240 seconds) |
18:07:30 | * | natrys joined #nim |
18:11:21 | * | yglukhov quit (Ping timeout: 240 seconds) |
18:14:42 | * | SenasOzys joined #nim |
18:15:47 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:19:07 | * | CodeVance2 joined #nim |
18:20:09 | * | CodeVance2 is now known as CodeVance_ |
18:21:03 | * | CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
18:21:16 | * | CodeVance_ is now known as CodeVance |
18:21:48 | * | yglukhov joined #nim |
18:31:09 | * | brainpro1 quit (Read error: Connection reset by peer) |
18:32:06 | * | brainpro1 joined #nim |
18:33:47 | * | Ven`` joined #nim |
19:09:18 | * | Trustable_2 joined #nim |
19:10:30 | * | Trustable quit (Ping timeout: 268 seconds) |
19:12:43 | * | xet7 quit (Read error: Connection timed out) |
19:13:32 | * | xet7 joined #nim |
19:14:54 | * | smt` quit (Read error: Connection reset by peer) |
19:15:21 | * | smt` joined #nim |
19:21:40 | * | Zevv left #nim (#nim) |
19:23:53 | * | sz0 joined #nim |
19:26:38 | FromGitter | <mratsim> Someone has a clever workaround for this? It’s blocking me to port loopfusion to arraymancer :/ and other custom types: https://github.com/nim-lang/Nim/issues/7737 |
19:39:42 | FromGitter | <mratsim> Wooow this is awesome @brentp : https://academic.oup.com/bioinformatics/advance-article-abstract/doi/10.1093/bioinformatics/bty358/4990493?redirectedFrom=fulltext 👏 |
19:41:52 | * | yglukhov_ joined #nim |
19:43:52 | * | yglukhov quit (Ping timeout: 256 seconds) |
19:57:37 | * | nixfreak joined #nim |
19:57:50 | nixfreak | hello going through this document http://nim-by-example.github.io/case/ |
19:58:09 | CodeVance | what about it? |
19:58:23 | nixfreak | I am on the case statement without an else statement at the end but i get a compile error |
19:58:35 | nixfreak | I am using 0.18 version of nim |
19:59:29 | CodeVance | the last example? |
19:59:36 | CodeVance | let x = 2 |
19:59:36 | CodeVance | case (x and 0b11) + 7: |
19:59:37 | CodeVance | of 7: echo "A" |
19:59:37 | CodeVance | of 8: echo "B" |
19:59:37 | CodeVance | of 9: echo "C" |
19:59:37 | CodeVance | of 10: echo "D" |
19:59:46 | * | nsf quit (Quit: WeeChat 2.0.1) |
20:00:43 | CodeVance | I guess we'll have to fix that... I'll make a PR |
20:03:19 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:03:39 | nixfreak | CodeVance yes |
20:03:41 | nixfreak | thank you |
20:04:05 | CodeVance | I don't think thats the right definition of narrowed |
20:04:21 | nixfreak | also does yield work like it does in python? |
20:05:41 | CodeVance | https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implict-items-pairs-invocations |
20:06:04 | CodeVance | I don't know. internally it doesn't |
20:06:24 | CodeVance | python uses exception throwing black magic nim doesn't |
20:07:54 | CodeVance | But from the use point its almost the same |
20:10:03 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:12:10 | nixfreak | so is this referring to a pointer items* ? |
20:12:29 | nixfreak | sorry is items* referring to a pointer ? |
20:12:52 | * | Sembei joined #nim |
20:16:06 | Araq | nixfreak, no the star is an export marker |
20:19:02 | nixfreak | does nim have build in help yet ? |
20:22:13 | Araq | nah you need to print the PDFs or read the website or buy the book |
20:22:30 | nixfreak | ok |
20:29:35 | CodeVance | no |
20:29:50 | CodeVance | the * is for export from the module |
20:30:20 | CodeVance | meaning you want others that import the module to be able to use that thing |
20:31:11 | * | jrbrt quit (Quit: jrbrt) |
20:31:14 | Araq | wohoo travis is green |
20:31:22 | Araq | that was hard lol |
20:31:24 | CodeVance | pointers (and more usually refrences) are done with ptr and ref (use ref for normal nim (with Garbage Collection) and ptr is used for C/C++ interoperability) |
20:31:53 | CodeVance | nixfreak, there's the docs/html folder |
20:32:04 | CodeVance | Good job Araq |
20:37:14 | CodeVance | nim needs a mascot |
20:37:32 | miran | why? |
20:38:56 | Araq | why doesn't the crown count as a mascot? |
20:38:57 | CodeVance | what is "simple and adaptive" |
20:39:31 | CodeVance | Araq, because its not cute And you can't make a plushy from it :| |
20:39:50 | Araq | well you can try. |
20:39:54 | CodeVance | a crown is a symbol |
20:40:09 | CodeVance | And it doesn't have eyes |
20:40:13 | dom96 | IMO Lion is still the best mascot for Nim |
20:40:25 | CodeVance | How can it act cute if it doesn't have eyes. |
20:40:33 | dom96 | Because lions are the kings of the jungle :) |
20:40:35 | CodeVance | dom96, I wanted to suggest that as well |
20:41:15 | dom96 | Great, so we're in agreement. Lion confirmed :P |
20:41:51 | CodeVance | I was looking at the /r/nim/ and it looked loney. no mascot in sight |
20:41:58 | * | salewski joined #nim |
20:42:18 | * | jrbrt joined #nim |
20:43:25 | * | jrbrt quit (Client Quit) |
20:43:46 | CodeVance | We need an alien or something |
20:43:52 | FromDiscord | <Generic> dom96: Lions don't live in the jungle |
20:43:56 | FromDiscord | <Generic> Tigers do |
20:44:22 | CodeVance | A dragon then |
20:44:23 | dom96 | Yeah, but the saying is "Lions are the kings of the jungle" |
20:44:38 | CodeVance | Trounce all other langs |
20:45:12 | dom96 | And Disney trumps all ;) |
20:45:32 | dom96 | Crowns and lions go well together too |
20:46:02 | FromGitter | <brentp> @mratsim thanks! |
20:48:17 | dom96 | We should probably do a poll for this at some point, the forum needs poll support :) |
20:48:26 | FromDiscord | <Generic> https://en.wikipedia.org/wiki/List_of_computing_mascots |
20:48:33 | * | jrbrt joined #nim |
20:49:01 | salewski | Araq, we have getType and getTypeInst from module macros, which I used same time ago to get a type name as a string. |
20:49:04 | salewski | Is it possible to get not only the type name, but also its module name? Something like "Tables.CountTable" when we pass a counttable instance to a macro? |
20:49:29 | dom96 | Better yet: https://strawpoll.zendesk.com/hc/en-us/articles/219494768-How-to-embed-a-poll :D |
20:49:37 | dom96 | Yep, that's going on my todo list for the forum |
20:51:22 | * | jrbrt quit (Client Quit) |
20:51:58 | * | jrbrt joined #nim |
20:52:46 | Araq | salewski, dunno |
20:53:10 | dom96 | Generic: That's a great list, thanks for the link :) |
20:54:08 | dom96 | And apparently a lion isn't used anywhere else |
20:54:23 | salewski | I would need module names for GTK builder: https://developer.gnome.org/gtk3/stable/ch01s03.html |
20:54:56 | salewski | to make gtk_builder_get_object () type safe. |
20:56:18 | salewski | It returns a plain GObject, and I had to verify the type of returned object. |
20:57:05 | FromGitter | <data-man> Combined variant - Sphinx. "In Greek mythology, a sphinx is represented as a monster with a head of a woman, the body of a lioness, the wings of an eagle, and a serpent-headed tail." :-D |
20:57:34 | salewski | (I do not intent to use GTK Builder myself, but some months ago someone asked about it.) |
20:58:16 | miran | my idea for nim mascot: https://en.wikipedia.org/wiki/Sisyphus |
20:58:49 | miran | guy trying to push a rock on which it says v1.0 |
21:00:16 | * | jrbrt quit (Quit: jrbrt) |
21:02:13 | * | Trustable_2 quit (Remote host closed the connection) |
21:03:07 | yglukhov_ | Araq: i want to create a const array of int16, and call a compilerProc with it. how would i do that at transformation phase, when sem is done already... |
21:03:33 | shashlick | need some macro help |
21:03:52 | shashlick | i'm working on adding test cases for math package for nimscript |
21:03:55 | shashlick | https://gist.github.com/genotrance/97aa4f2417165caa35779a9653b27111 |
21:04:13 | shashlick | i've written mecho.nim which generates test cases - was wondering if there were a better way of doing this |
21:04:30 | dom96 | data-man: oooh, that would be cool but it clashes with Python's doc gen: http://www.sphinx-doc.org/en/master/ |
21:04:39 | shashlick | mecho.txt is the input - basically the output of grep proc math.nim |
21:04:45 | dom96 | also there is no way you could make that look cute lol |
21:05:14 | Araq | yglukhov_, just create the AST but ensure every node has type |
21:05:25 | shashlick | output I get from mecho.nim is test.nims - i've commented out the procs that aren't yet present in nimscript and so don't work |
21:06:05 | dom96 | shashlick: What do you need help with? Just cleanup? |
21:06:25 | yglukhov_ | Araq: how do i create a proper array type? |
21:06:32 | dom96 | shashlick: I guess you want to parse those proc types? |
21:06:47 | yglukhov_ | array[N, int16] |
21:06:50 | shashlick | ya a cleaner way to do this - i wanted to have mechoall() call another macro mecho() with pname as a param but not able to pass it in as a string |
21:06:58 | dom96 | Why not just use parseExpr() on each line? |
21:07:06 | dom96 | You might need to prefix those with 'proc' for that to work |
21:07:11 | dom96 | well, or parseStmt |
21:07:31 | Araq | yglukhov_, will probably be messy... check the helpers in semdata.nim |
21:07:38 | shashlick | I'm using parseStmt() but if I get pname from the file in mechoall(), I cannot pass it into another macro since it won't be known at compile time as a string |
21:07:46 | shashlick | so having to do all of it in one macro |
21:07:48 | * | xet7 quit (Read error: Connection timed out) |
21:08:02 | shashlick | just curious if it is even possible to pass pname (string) to another macro and use it there |
21:08:09 | dom96 | I'm talking about replacing your parsing code in case it's not clear |
21:08:18 | * | xet7 joined #nim |
21:09:03 | * | dom96 isn't really sure why pname couldn't be passed to another macro |
21:09:20 | shashlick | ok, no I'm just reading the proc names from the files, don't care for parsing it as proper nim |
21:09:49 | shashlick | dom96: what would `macro mecho(pname: ???)` be so that I can use pname in mecho? |
21:09:58 | dom96 | string? |
21:10:29 | * | jrbrt joined #nim |
21:11:06 | FromGitter | <data-man> @dom96: I invented a new unique fictional creature: Nimphus |
21:11:51 | shashlick | ok let me put that together and share |
21:12:36 | * | miran quit (Ping timeout: 268 seconds) |
21:12:51 | * | jrbrt quit (Client Quit) |
21:13:30 | shashlick | dom96: so if I have `macro mecho(pname, lval, hval: string): untyped =` then inside mecho, pname, lval and hval are treated as NimNodes |
21:14:01 | shashlick | Error: type mismatch: got <string, array[0..2, NimNode]> when I try "$# $# $#" % [pname, lval, hval] |
21:16:12 | dom96 | yeah, but they are string literal nodes, so you can get the string via strVal IIRC |
21:16:21 | dom96 | This definitely needs better documentation |
21:16:35 | dom96 | Alternatively you can also create a {.compileTime.} proc |
21:16:36 | Araq | these words have lost all meaning by now |
21:16:37 | shashlick | if I use pname.strVal(), echo pname gives you "pname" |
21:17:22 | yglukhov_ | which code is more efficient? "x == -1" or "x < 0"? :) |
21:17:50 | Araq | so what's the compiler developer gonna do? special case every error message into thousands of what-ifs, trying to guess what the developer meant? it's Nim, it has a macro system, you need to read how it works. |
21:18:09 | Araq | a NimNode is not a string. |
21:18:25 | Araq | how much more information do you think the compiler can give you? |
21:18:53 | shashlick | well I understand that the contents of the file are not known at compile time |
21:19:06 | shashlick | so using parseStmt, I could use it in the macro |
21:19:36 | shashlick | but I just want to understand if it is possible to pass the string to another macro and have it known |
21:22:21 | Araq | sure, pass it. |
21:26:21 | * | jjido joined #nim |
21:27:42 | shashlick | It is a Nim node in the macro, how do I get the value |
21:28:21 | dom96 | Araq: I'm simply saying the macro documentation needs to explain this |
21:28:30 | dom96 | We also need a tutorial for macros |
21:28:49 | * | jjido quit (Client Quit) |
21:28:51 | dom96 | shashlick: pname.strVal() gives you "pname"? |
21:31:03 | FromGitter | <mratsim> @yglukhov compare to 0 |
21:32:09 | FromGitter | <mratsim> comparing to zero is more efficient than anything else you can summon because you don’t need to LEA or MOV the value in the register |
21:32:45 | shashlick | Yes it gives the name of the variable in the parent macro |
21:33:03 | FromGitter | <mratsim> but unless you call that 10 millions times per second I don’t think you will have any perf issue |
21:34:27 | FromGitter | <mratsim> also, this is always useful: http://www.agner.org/optimize/instruction_tables.pdf |
21:38:00 | yglukhov_ | mratsim: thanks! |
21:39:57 | dom96 | shashlick: then maybe you could use a compileTime proc instead? |
21:42:32 | * | Snircle joined #nim |
21:43:50 | shashlick | dom96: here's the update with the error message: https://gist.github.com/genotrance/97aa4f2417165caa35779a9653b27111#file-mecho2-nim |
21:46:35 | shashlick | https://pastebin.com/05ywye2h <= that's the simplest example of what I'm saying - it prints hello twice instead of hello and then world |
21:50:32 | * | jrbrt joined #nim |
21:52:54 | * | jrbrt quit (Client Quit) |
21:53:37 | * | jrbrt joined #nim |
21:55:42 | * | jrbrt quit (Client Quit) |
21:59:58 | salewski | exit |
22:00:05 | * | salewski quit (Quit: WeeChat 2.0.1) |
22:00:30 | * | nixfreak quit (Ping timeout: 260 seconds) |
22:02:14 | dom96 | shashlick: Yeah, I know what you mean. I thought strVal solves this. |
22:02:23 | dom96 | But apparently not, and so I'm out of idea |
22:02:27 | dom96 | *ideas |
22:05:21 | * | jrbrt joined #nim |
22:09:00 | * | jrbrt quit (Client Quit) |
22:19:19 | * | jrbrt joined #nim |
22:20:13 | * | jrbrt quit (Client Quit) |
22:25:56 | * | SenasOzys quit (Read error: Connection reset by peer) |
22:33:58 | * | Sentreen quit (Ping timeout: 264 seconds) |
22:36:23 | * | xet7 quit (Remote host closed the connection) |
22:38:48 | * | FromGitter quit (Ping timeout: 265 seconds) |
22:39:00 | dom96 | Araq: https://github.com/flaviut/nim-by-example/pull/62 is that a regression? |
22:46:24 | * | darithorn joined #nim |
22:48:02 | * | Sentreen joined #nim |
22:52:16 | * | jrbrt joined #nim |
22:52:33 | * | MyMind joined #nim |
22:54:05 | oprypin | Gitter <-> IRC bridge is down, seemingly because Gitter is down (at least in parts of Europe). It will be down for at least 8 more hours because I'm gonna sleep. |
22:54:57 | * | Sembei quit (Ping timeout: 248 seconds) |
22:57:21 | * | jrbrt quit (Quit: jrbrt) |
22:59:04 | * | darithorn quit (Remote host closed the connection) |
22:59:46 | * | darithorn joined #nim |
23:00:38 | * | noonien quit (Quit: Connection closed for inactivity) |
23:00:55 | * | jrbrt joined #nim |
23:01:41 | * | natrys quit (Quit: natrys) |
23:10:15 | * | kier quit (Read error: Connection reset by peer) |
23:10:29 | * | jrbrt quit (Quit: jrbrt) |
23:10:58 | * | jrbrt joined #nim |
23:14:07 | dom96 | oprypin: thanks for the heads up |
23:14:09 | * | kier joined #nim |
23:54:44 | * | Pisuke joined #nim |
23:55:13 | * | MyMind quit (Ping timeout: 248 seconds) |
23:58:29 | * | yglukhov_ quit (Ping timeout: 260 seconds) |