00:18:16 | * | azed quit (Quit: WeeChat 3.1) |
00:36:01 | * | azed joined #nim |
00:44:30 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
00:44:52 | * | njoseph joined #nim |
00:45:08 | * | thomasross joined #nim |
00:50:51 | * | Tlangir quit (Quit: Leaving) |
01:42:03 | * | krux02 quit (Remote host closed the connection) |
01:52:50 | * | Tlangir joined #nim |
02:14:26 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3mIP |
02:27:46 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3mIQ |
02:35:29 | FromGitter | <BracketMaster> I'm currently in a nim macro with untyped `statements`. ⏎ I want to know if one of the statements has the type `nnkCall` |
02:36:04 | FromGitter | <BracketMaster> in Python, I'd do something like, `nnkCall in [_.kind for _ in statements]` |
02:36:41 | FromGitter | <BracketMaster> not really seeing how to do something quite like that in nim, not even sure if such an approach is nimatic with regars to macros |
02:37:12 | FromDiscord | <ElegantBeef> You want to recursively check if it contains any calls or just top level? |
02:37:25 | FromGitter | <BracketMaster> top level |
02:41:29 | FromDiscord | <ElegantBeef> Well you could do this and have it be reusable https://play.nim-lang.org/#ix=3mIR |
02:41:45 | FromDiscord | <ElegantBeef> I dont think there is a way to do it nicely in a single line like that, but i'm often wrong 😄 |
02:42:20 | FromGitter | <BracketMaster> alright - no worries |
02:42:22 | FromGitter | <BracketMaster> thx |
02:44:36 | FromDiscord | <ElegantBeef> Ah it hit me that you could use sequtils and filter it https://play.nim-lang.org/#ix=3mIS |
02:45:02 | FromDiscord | <ElegantBeef> Or use anyit |
02:45:15 | FromDiscord | <ElegantBeef> And not be an idiot like me |
02:46:11 | FromDiscord | <ElegantBeef> Im totally a good Nim programmer that never has lapse in good code |
02:51:28 | FromDiscord | <Rika> mhm |
02:51:30 | FromDiscord | <Rika> yeah |
02:52:19 | FromDiscord | <ElegantBeef> Sounds like you doubt me |
02:55:57 | FromDiscord | <Rika> nah |
02:56:00 | FromDiscord | <Rika> totally believe you |
02:56:12 | FromDiscord | <ElegantBeef> Working on anything cool i can replicate? |
02:56:32 | FromDiscord | <Rika> yeah just building a diy nuclear fusion reactor |
02:56:41 | FromDiscord | <Rika> need to make the software tho |
02:56:43 | FromDiscord | <ElegantBeef> As jonathan blow has said "There is no creativity in open source", so might as well embrace it |
02:57:28 | FromDiscord | <Rika> in reality im trying to understand reactive programming and i have no worries of you copying my idea |
02:57:34 | FromDiscord | <Rika> because its async xdddd |
02:57:51 | FromDiscord | <ElegantBeef> makes you suprisingly safe |
02:58:06 | FromDiscord | <Rika> very |
03:18:22 | * | wasted_youth2 quit (Quit: Leaving) |
03:36:53 | * | spiderstew quit (Ping timeout: 250 seconds) |
03:36:54 | * | spiderstew_ joined #nim |
03:37:34 | * | Tlanger joined #nim |
03:40:22 | * | Tlangir quit (Ping timeout: 268 seconds) |
03:54:56 | * | rockcavera quit (Remote host closed the connection) |
03:55:27 | * | azed quit (Quit: WeeChat 3.1) |
03:57:51 | FromGitter | <awr1> @BracketMaster use sequtils / zero-functional |
03:58:00 | FromGitter | <awr1> https://play.nim-lang.org/#ix=3mJ2 |
03:58:37 | FromDiscord | <ElegantBeef> hey that's what i said to do after being a fuckwit |
04:04:56 | * | thomasross quit (Ping timeout: 260 seconds) |
04:28:59 | * | azed joined #nim |
04:31:23 | * | azed quit (Client Quit) |
04:56:25 | * | narimiran joined #nim |
04:57:26 | * | Cthalupa quit (Ping timeout: 246 seconds) |
04:57:57 | ForumUpdaterBot | New thread by Asrp: Seq of procs, see https://forum.nim-lang.org/t/7975 |
05:02:07 | * | Cthalupa joined #nim |
05:48:36 | FromDiscord | <James> Anyone know of an easy way to detect/create junctions in Windows? It looks like I might have to learn how to wrap a C++ library, or else implement it myself? |
05:58:41 | * | vicfred quit (Ping timeout: 260 seconds) |
06:08:25 | FromDiscord | <Varriount> In reply to @James "Anyone know of an": Should be a single API call, if I remember correctly |
06:12:27 | FromDiscord | <Varriount> In reply to @James "Anyone know of an": http://www.flexhex.com/docs/articles/hard-links.phtml↵Has code that can be adapted. |
06:12:47 | FromDiscord | <Varriount> Are you sure you need a junction, and not just a symbolic link? |
06:13:27 | * | GreaseMonkey quit (Remote host closed the connection) |
06:25:38 | * | hyiltiz quit (Ping timeout: 268 seconds) |
06:39:16 | * | hyiltiz joined #nim |
06:39:16 | * | hyiltiz quit (Changing host) |
06:39:16 | * | hyiltiz joined #nim |
07:08:19 | ForumUpdaterBot | New thread by Drkameleon: Enforcing type safety for custom Hash function, see https://forum.nim-lang.org/t/7976 |
07:10:20 | ForumUpdaterBot | New thread by Mantielero: Gcc.exe: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory, see https://forum.nim-lang.org/t/7977 |
07:19:18 | * | azed joined #nim |
07:25:00 | * | Tlangir joined #nim |
07:27:55 | * | Tlanger quit (Ping timeout: 268 seconds) |
07:30:58 | FromDiscord | <matkuki> @zetashift ↵Thanks. I will try it `choosenim` and report back. |
07:57:33 | * | azed quit (Quit: WeeChat 3.1) |
08:00:38 | FromDiscord | <matkuki> @zetashift ↵`choosenim` works, thanks 👍 |
08:01:45 | * | greaser|q joined #nim |
08:02:31 | ForumUpdaterBot | New thread by Mantielero: Xlsxwriter - Static compilation in windows, see https://forum.nim-lang.org/t/7978 |
08:21:28 | * | Vladar joined #nim |
08:26:27 | * | Tlangir quit (Remote host closed the connection) |
08:29:31 | * | clyybber joined #nim |
08:37:04 | * | goblinslayer[m] quit (Ping timeout: 245 seconds) |
08:37:37 | * | Northstrider[m] quit (Ping timeout: 250 seconds) |
08:37:54 | * | reversem3 quit (Ping timeout: 245 seconds) |
08:37:54 | * | blaumetallic[m] quit (Ping timeout: 245 seconds) |
08:37:54 | * | m33[m] quit (Ping timeout: 245 seconds) |
08:38:19 | * | konradmb[m] quit (Ping timeout: 245 seconds) |
08:38:19 | * | ronny quit (Ping timeout: 245 seconds) |
08:38:28 | * | Northstrider[m] joined #nim |
08:40:49 | * | blaumetallic[m] joined #nim |
08:42:15 | * | konradmb[m] joined #nim |
08:43:54 | * | goblinslayer[m] joined #nim |
08:44:13 | * | reversem3 joined #nim |
08:46:31 | * | m33[m] joined #nim |
08:48:05 | * | ronny joined #nim |
09:05:37 | * | krux02 joined #nim |
09:24:19 | * | deepend quit (Remote host closed the connection) |
09:24:39 | * | deepend joined #nim |
09:26:28 | * | Arrrrrrrr joined #nim |
10:19:24 | FromDiscord | <exelotl> @ajusa you can try compiling one of the devkitARM examples with `make V=1` to see exactly what commands and parameters are expected |
10:38:07 | FromDiscord | <ajusa> In reply to @exelotl "<@!102899813149855744> you can try": Will do. I realize you've already gone through a similar process for GBA lol |
10:41:37 | FromDiscord | <ajusa> So that gives me↵`arm-none-eabi-gcc -specs=3dsx.specs -g -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -Wl,-Map,3dsfun.map brew.bgr.o @moutput.nim.o stdlib_io.nim.o stdlib_system.nim.o main.o -L/opt/devkitpro/libctru/lib -lctru -lm`↵Passing that into Nim's passC doesn't fix anything, it still can't find those nim .o files |
10:42:39 | FromDiscord | <ajusa> also @exelotl I wrote a bit more about what my config files looked like in #embedded if you want to take a look. Not sure if I'm doing anything obviously wrong |
11:03:55 | FromDiscord | <ajusa> finally sort of understood the problem, nim outputs `stdlib_io.nim.c.o`, but the devkitARM Makefile expects `stdlib_io.nim.o` |
11:25:08 | * | Vladar quit (Remote host closed the connection) |
11:26:32 | * | jess joined #nim |
11:28:06 | * | Vladar joined #nim |
11:39:40 | * | hyiltiz quit (Ping timeout: 252 seconds) |
11:43:41 | * | hyiltiz joined #nim |
11:43:41 | * | hyiltiz quit (Changing host) |
11:43:41 | * | hyiltiz joined #nim |
11:53:47 | FromDiscord | <willyboar> is any way to escape triple quotes inside triple quotes? |
11:56:08 | * | krux02 quit (Remote host closed the connection) |
11:56:34 | Arrrrrrrr | use replace as a workaround |
11:56:56 | Benjamin[m]1 | !eval echo """\"\"\"""" |
11:56:58 | NimBot | \"\"\" |
11:57:34 | FromDiscord | <willyboar> !eval echo """ """something""" """ |
11:57:36 | NimBot | Compile failed: /usercode/in.nim(1, 13) Error: undeclared identifier: 'something' |
11:58:35 | Benjamin[m]1 | !eval echo """ \"\"\"something\"\"\" """ |
11:58:37 | NimBot | \"\"\"something\"\"\" |
11:59:29 | FromDiscord | <willyboar> ??? |
12:04:02 | Arrrrrrrr | !ecal echo """$1$1$1something$1$1$1""" % ["\""] |
12:04:04 | Arrrrrrrr | !eval echo """$1$1$1something$1$1$1""" % ["\""] |
12:04:06 | NimBot | Compile failed: /usercode/in.nim(1, 34) Error: undeclared identifier: '%' |
12:04:16 | Arrrrrrrr | !eval import strutils;echo """$1$1$1something$1$1$1""" % ["\""] |
12:04:20 | NimBot | """something""" |
12:04:55 | Arrrrrrrr | !eval import strutils;echo """$$$something$$$""".replace("$", "\"") |
12:04:57 | NimBot | """something""" |
12:16:17 | FromDiscord | <Rika> In reply to @willyboar "!eval echo """ """something"""": backslashes |
12:16:40 | FromDiscord | <Rika> `""" \"\"\"...\"\"\" ""'` prolly |
12:21:20 | FromDiscord | <willyboar> !eval echo """ \"\"\"...\"\"\" ""' |
12:21:21 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: closing """ expected, but end of file reached |
12:21:55 | FromDiscord | <willyboar> !eval echo """ \"\"\"...\"\"\" """ |
12:21:57 | NimBot | \"\"\"...\"\"\" |
12:25:23 | * | Arrrrrrrr quit (Remote host closed the connection) |
12:29:29 | * | rockcavera joined #nim |
12:37:53 | * | PMunch joined #nim |
12:50:46 | ForumUpdaterBot | New post on r/nim by bruce3434: How to return early from block expressions, see https://reddit.com/r/nim/comments/nc7ucj/how_to_return_early_from_block_expressions/ |
13:00:55 | FromDiscord | <VesperSparrow> sent a long message, see http://ix.io/3mLO |
13:05:31 | rockcavera | do the `nimFrame()` and `popFrame()` functions have to do with the stacktrace? |
13:54:01 | * | NimBot joined #nim |
14:04:45 | FromDiscord | <creonico> Ok, I don't know why nimble comes with a virus. I allowed the nimble process to work without being checked by my antivirus but it freezes my computer and never installs anything, just keeps running forever |
14:04:55 | FromDiscord | <Rika> it doesnt |
14:05:01 | FromDiscord | <Rika> av heuristics are dumb |
14:05:14 | FromDiscord | <creonico> but it does ._. |
14:05:26 | FromDiscord | <lamersc> How do you know that o-o |
14:05:33 | FromDiscord | <lamersc> After I whitelisted it, worked for me |
14:05:39 | FromDiscord | <lamersc> The anti virus fucks the install sometimes |
14:05:40 | FromDiscord | <creonico> cause it froze my computer ._. |
14:05:47 | FromDiscord | <lamersc> Well which av you using |
14:05:57 | FromDiscord | <creonico> windows default |
14:06:05 | FromDiscord | <lamersc> Huh that’s strange >.> |
14:06:16 | FromDiscord | <lamersc> For me I just get the pop up, white list, then rerun installer |
14:06:26 | FromDiscord | <creonico> I did that |
14:06:32 | FromDiscord | <creonico> I installed nimble fine after that |
14:06:46 | FromDiscord | <creonico> When I run nimble is when it freezes and does nothing forever |
14:06:52 | FromDiscord | <lamersc> Did you use choosenim? |
14:06:56 | FromDiscord | <creonico> yes |
14:07:03 | FromDiscord | <lamersc> Huh- |
14:07:06 | FromDiscord | <lamersc> That’s strange |
14:07:37 | FromDiscord | <lamersc> https://media.discordapp.net/attachments/371759389889003532/842765096455503882/image0.jpg |
14:07:44 | FromDiscord | <lamersc> No issues with mine- |
14:08:01 | FromDiscord | <lamersc> Did you check your environment variables? |
14:08:18 | FromDiscord | <creonico> yes |
14:08:22 | FromDiscord | <creonico> I had to add it manually |
14:08:42 | FromDiscord | <lamersc> Did you try using power shell with it? |
14:08:47 | FromDiscord | <creonico> no |
14:08:56 | FromDiscord | <lamersc> Restart your pc, then try that |
14:09:06 | FromDiscord | <creonico> ok |
14:14:45 | * | xet7 quit (Remote host closed the connection) |
14:14:57 | FromDiscord | <creonico> https://media.discordapp.net/attachments/371759389889003532/842766935979720774/gui_qn.PNG |
14:15:20 | FromDiscord | <creonico> I always have to cancel the process cause it freezes and does nothing |
14:15:25 | FromDiscord | <Rika> that's strange |
14:16:06 | * | xet7 joined #nim |
14:16:58 | FromDiscord | <willyboar> lol nim package.json file is huge |
14:17:07 | FromDiscord | <lamersc> In reply to @creonico "": Trying reinstalling manually |
14:17:13 | FromDiscord | <Rika> yes there are discussions on how to move forward |
14:17:21 | FromDiscord | <Rika> split the file? have multiple repos? |
14:17:37 | FromGitter | <BracketMaster> does anybody know what peeloff does here: https://github.com/krux02/ast-pattern-matching/blob/master/tests/test1.nim#L166 |
14:17:54 | FromDiscord | <creonico> In reply to @lamersc "Trying reinstalling manually": What do you meanually? |
14:18:00 | FromDiscord | <creonico> (edit) "meanually?" => "manually?" |
14:18:00 | FromDiscord | <willyboar> I think it is time for Nim package hosting |
14:18:46 | FromDiscord | <Rika> In reply to @BracketMaster "does anybody know what": probably removing a layer? ex: First(Second(Third)) --peeloff(First)--> Second(Third) |
14:24:23 | FromDiscord | <creonico> This is what I get every time I download nim. Nim downloads fine, but nimble is not in the bin and I get that pop up |
14:24:29 | FromDiscord | <creonico> https://media.discordapp.net/attachments/371759389889003532/842769338703937546/gui_qn.PNG |
14:41:42 | FromDiscord | <Araq> @creonico we're working on a fix, in the meantime use version 1.4.4 please |
14:42:10 | FromDiscord | <Araq> https://nim-lang.org/download/nim-1.4.4_x64.zip |
14:43:46 | * | PMunch quit (Quit: leaving) |
14:44:57 | ForumUpdaterBot | New Nimble package! hotdoc - Single Page Documentation Generator, see https://github.com/willyboar/hotdoc |
14:51:52 | Oddmonger | i go blank: how to write « #define FOO "i'm foo" » with nim ? (let FOO = "i'm foo" ?) |
14:52:03 | FromDiscord | <Rika> const FOO = "i'm foo" |
14:52:17 | Oddmonger | ah yeah, thanks |
14:52:59 | FromDiscord | <AhmadsAxioms> uh-huh |
14:53:19 | FromDiscord | <Rika> ? |
15:00:38 | FromDiscord | <AhmadsAxioms> wrong place , was supposed to sent that in #offtopic |
15:05:48 | FromDiscord | <creonico> sent a long message, see http://ix.io/3mMH |
15:18:50 | FromGitter | <ynfle> Does `toSeq({1, 2, 3, 4})` perserve order? |
15:19:18 | FromDiscord | <Rika> sets have no explicit order though |
15:19:34 | FromDiscord | <Rika> !eval import sequtils; echo toSeq({1, 2, 3, 4}); echo toSeq({1, 2, 3, 4}) |
15:19:36 | NimBot | @[1, 2, 3, 4]↵@[1, 2, 3, 4] |
15:19:37 | FromDiscord | <Rika> it prolly does |
15:20:02 | FromDiscord | <Rika> the order (implicit) is always lowest ordinal -> highest ordinal, i assume |
15:20:28 | FromDiscord | <Rika> !eval import sequtils; toSeq({1, 2, 3, 6, 5}) |
15:20:30 | NimBot | Compile failed: /playground/nim/lib/pure/collections/sequtils.nim(746, 7) Error: expression 'result`gensym4' is of type 'seq[range 0..65535(int)]' and has to be used (or discarded); start of expression here: /usercode/in.nim(1, 18) |
15:20:38 | FromDiscord | <Rika> didnt echo |
15:20:42 | FromDiscord | <Rika> !eval import sequtils; echo toSeq({1, 2, 3, 6, 5}) |
15:20:45 | NimBot | @[1, 2, 3, 5, 6] |
15:20:51 | FromDiscord | <Rika> huh |
15:21:02 | FromDiscord | <Rika> ah no thats right i misread |
15:21:59 | FromGitter | <ynfle> !eval import sequtils; echo toSeq {6, 5, 4, 3, 2, 1} |
15:22:03 | NimBot | @[1, 2, 3, 4, 5, 6] |
15:30:53 | FromDiscord | <hamidb80> In reply to @ynfle "!eval import sequtils; echo": it sorts the set |
15:32:42 | FromDiscord | <demotomohiro> !eval import sequtils; echo toSeq {253, 254, 255, 256, 257} |
15:32:44 | NimBot | @[253, 254, 255, 256, 257] |
15:34:58 | narimiran | @treeform you around? |
15:35:50 | FromDiscord | <hamidb80> !eval echo toSeq {'z', 'a', 'c', 'b'} |
15:35:51 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'toSeq' |
15:35:57 | FromDiscord | <treeform> In reply to @narimiran "<@107140179025735680> you around?": sure |
15:36:03 | FromDiscord | <hamidb80> (edit) "!eval ... echo" added "import sequtils;" |
15:36:12 | FromDiscord | <hamidb80> hey treeform |
15:36:27 | narimiran | why haven't i known about nimdocs.com until now?? |
15:36:40 | FromDiscord | <hamidb80> i was trying resize an image using pixie to 11 |
15:36:50 | FromDiscord | <treeform> In reply to @narimiran "why haven't i known": because its 3 days old |
15:36:56 | narimiran | oooh! |
15:37:01 | narimiran | it is great!!! |
15:37:05 | FromDiscord | <treeform> thanks |
15:37:22 | FromDiscord | <hamidb80> In reply to @hamidb80 "i was trying resize": it gave me an error that the scale is below than zero |
15:37:27 | FromDiscord | <treeform> idea is that any github.com/user/repo can just become nimdocs.com/user/repo |
15:37:43 | FromDiscord | <treeform> and it will pull down and sync change |
15:37:50 | FromDiscord | <treeform> no need to rebuild docs manually |
15:38:06 | FromDiscord | <zetashift> You are just _too damn awesome_ treeform 😄 |
15:38:07 | narimiran | i was about to post "guys, how can i easily build docs in CIs?", and then i was "wait, let's first see how pixie does it" |
15:38:10 | FromDiscord | <treeform> https://nimdocs.com/treeform/pixie/pixie.html |
15:38:30 | FromDiscord | <treeform> I we were trying to do a CI system before |
15:38:33 | narimiran | and after that it was "wait, what is this nimdocs stuff?" |
15:38:35 | FromDiscord | <treeform> and just said naa too much work |
15:38:39 | FromDiscord | <treeform> it should be as easy as URL! |
15:38:51 | narimiran | what a lifesaving idea! great stuff!!! |
15:39:02 | FromDiscord | <treeform> nim docs is very alpha right now |
15:39:18 | FromDiscord | <treeform> but you want to be included in allowed authors list open up a PR |
15:39:42 | FromDiscord | <hamidb80> In reply to @hamidb80 "it gave me an": can you check it ? |
15:40:29 | narimiran | it seems that nim-lang is already in the allowed authors list, and that's what i need for now. but i'll use it for my future projects too |
15:40:41 | FromDiscord | <treeform> https://github.com/treeform/nimdocs/blob/master/src/nimdocs.nim#L20 |
15:40:46 | FromDiscord | <treeform> yeah nim-lang felt safe |
15:41:20 | FromDiscord | <treeform> I just don't want to open it up to everyone till I know it works |
15:42:25 | FromDiscord | <treeform> what doc are you making for nim-lang? |
15:45:22 | FromDiscord | <treeform> In reply to @zetashift "You are just _too": thanks! |
15:48:42 | narimiran | it is still in WIP state.... |
15:49:36 | FromGitter | <BracketMaster> I'm trying to do list comprehensions in nim - but it seems `lc` isn't in sugar (https://nim-lang.org/docs/sugar.html) despite what SO suggests (https://stackoverflow.com/questions/29895918/nim-equivalent-of-pythons-list-comprehension) |
15:51:25 | FromDiscord | <zetashift> In reply to @BracketMaster "I'm trying to do": That's an old answer; maybe https://nim-lang.org/docs/sugar.html#collect.m%2Cuntyped%2Cuntyped `collect` can fit your needs |
15:51:51 | * | seizeheures[m] joined #nim |
15:52:13 | FromDiscord | <zetashift> Actually even that SO answer mentions `collect` |
15:56:31 | FromGitter | <BracketMaster> I think I found something that works: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=609e9dafd523ee3d3e316951] |
15:58:04 | * | seizeheures[m] left #nim ("User left") |
15:59:07 | FromDiscord | <zetashift> could also do `a.map(x => $x)` |
16:00:36 | FromDiscord | <zetashift> but `map` and `collect`/list-comprehensions have different purposes |
16:02:36 | FromGitter | <BracketMaster> yes and yes |
16:02:41 | FromGitter | <BracketMaster> thx |
17:13:22 | * | wasted_youth2 joined #nim |
17:23:59 | FromDiscord | <mlokis> do we have a cold pragma? |
17:26:36 | ForumUpdaterBot | New thread by Kobi: An incomplete mapping from C# to Nim, see https://forum.nim-lang.org/t/7979 |
17:44:53 | * | vicfred joined #nim |
17:54:29 | * | vicfred quit (Quit: Leaving) |
18:04:03 | * | rockcavera quit (Remote host closed the connection) |
18:08:19 | * | rockcavera joined #nim |
18:09:03 | * | vicfred joined #nim |
18:12:43 | ForumUpdaterBot | New thread by Ggibson: Cosmonim hello world - No such file or directory, see https://forum.nim-lang.org/t/7980 |
18:22:51 | FromDiscord | <VinKer> Hi all, Is it possible to use a destructor for a ref object ? |
18:44:17 | * | Jjp137 quit (Ping timeout: 250 seconds) |
18:46:03 | * | Jjp137 joined #nim |
18:49:50 | FromGitter | <BracketMaster> I'm working on a particular DSL in nim where I might do things such as `var a = newWire()`. ⏎ It would be useful to have `newWire()` somehow be aware of the name `a` |
18:50:50 | * | fosred joined #nim |
18:50:52 | FromGitter | <BracketMaster> any ideas how to do this cleanly? I used a macro which searches for VarSections, and ultimately emits newWire(name = "a") |
18:51:14 | FromGitter | <BracketMaster> but newWire can have multiple arguments with default values, so the macro itself becomes a bit tricky |
18:52:46 | * | abm joined #nim |
18:53:05 | FromGitter | <BracketMaster> ```code paste, see link``` ⏎ ⏎ for example, that code snippet is aware of the name `a` [https://gitter.im/nim-lang/Nim?at=609ec7105ca66330b0426831] |
18:53:33 | * | fosred quit (Client Quit) |
18:55:28 | FromDiscord | <AhmadsAxioms> learning nim and running nim code seems kinda like a long process(sometimes it's slow) but it prints out alot of `unnecessary` stuff to me 🤷♂️ |
18:55:32 | FromDiscord | <ElegantBeef> The only way to do that as far as i know is to use a template https://play.nim-lang.org/#ix=3mO7 |
18:55:44 | FromDiscord | <ElegantBeef> what do you mean prints out a lot? |
18:56:24 | FromDiscord | <ElegantBeef> I mean var pragma not template |
18:56:57 | FromDiscord | <ElegantBeef> Also what do you mean by slow? |
19:01:30 | FromDiscord | <InventorMatt> they are probably running in debug mode and don't have verbosity set to low and hints off |
19:04:44 | FromDiscord | <ElegantBeef> That's what i figured or they have type mismatch for a very popular procedure |
19:04:56 | FromDiscord | <ElegantBeef> We could write a book on how to read Nim error messages 😄 |
19:10:08 | * | nphg joined #nim |
19:25:53 | FromDiscord | <exelotl> @VinKer yes, but you should use --gc:arc or --gc:orc |
19:26:00 | FromDiscord | <exelotl> see: https://play.nim-lang.org/#ix=3mOh |
19:26:33 | FromDiscord | <exelotl> under arc/orc the destructor will be called deterministically at the end of the scope when there are no more references to the object |
19:26:43 | FromDiscord | <AhmadsAxioms> like when i do |
19:26:45 | FromDiscord | <exelotl> under the default gc, the destructor will be called whenever |
19:26:55 | FromDiscord | <AhmadsAxioms> sent a code paste, see https://play.nim-lang.org/#ix=3mOi |
19:26:56 | FromDiscord | <AhmadsAxioms> some stuff just prints out and whatnot |
19:26:56 | FromDiscord | <exelotl> (edit) "whenever" => "whenever." |
19:27:31 | FromDiscord | <AhmadsAxioms> sent a code paste, see https://play.nim-lang.org/#ix=3mOj |
19:27:32 | FromDiscord | <AhmadsAxioms> like i just want to print hello world |
19:28:30 | FromDiscord | <exelotl> @AhmadsAxioms you can use `nim r --verbosity:0 file.nim` |
19:29:00 | FromDiscord | <exelotl> if you want that to be the default you can add --verbosity:0 to nim.cfg in your home directory I think. |
19:29:51 | FromDiscord | <AhmadsAxioms> oh okay |
19:30:19 | FromDiscord | <AhmadsAxioms> whats the highest verbosity level? |
19:30:41 | FromDiscord | <exelotl> https://nim-lang.org/docs/nimc.html#compiler-usage-verbosity-levels |
19:30:44 | FromDiscord | <exelotl> 3 apparently |
19:31:42 | FromDiscord | <AhmadsAxioms> noice |
19:37:14 | * | wasted_youth2 quit (Quit: Leaving) |
19:51:30 | * | azed joined #nim |
19:51:47 | * | tane joined #nim |
19:56:47 | * | vicfred quit (Quit: Leaving) |
19:57:01 | FromDiscord | <VinKer> @exelotl Thanks for the reply. Let me try. |
19:59:07 | FromDiscord | <VinKer> Hi all, how do you multiply a uint variable with a float in nim ? |
19:59:39 | FromDiscord | <InventorMatt> You can convert the uint into a float first |
20:00:29 | FromDiscord | <VinKer> Then convert back to uint again |
20:01:01 | FromDiscord | <InventorMatt> Yeah that would probably be easiest other then just converting the float into a uint |
20:01:36 | FromDiscord | <VinKer> Is there a touint function ? |
20:02:54 | FromDiscord | <ElegantBeef> `.uint` we also do have the `leniantops` module |
20:03:04 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/lenientops.html |
20:05:37 | FromDiscord | <VinKer> @ElegantBeef Thanks. Got it. 🙂 |
20:10:01 | FromDiscord | <exelotl> oh I didn't know about that module x) |
20:31:55 | FromDiscord | <d4rckh> Is there anything similar to this for nim? https://console-menu.readthedocs.io/en/latest/consolemenu/SelectionMenu.html |
20:33:52 | FromDiscord | <ElegantBeef> Seems similar https://github.com/MnlPhlp/cli_menu |
20:35:34 | FromDiscord | <d4rckh> Yeah but I want it to be interactive, like using arrow keys |
20:52:11 | * | narimiran quit (Ping timeout: 240 seconds) |
20:53:54 | FromDiscord | <willyboar> https://github.com/johnnovak/illwill |
20:54:10 | FromDiscord | <willyboar> https://github.com/enthus1ast/illwillWidgets |
21:04:01 | FromDiscord | <inv> Hi,↵like it happens, 1-line commit was discussed for ~1h in telegram: https://github.com/nim-lang/Nim/pull/18010 |
21:06:54 | FromDiscord | <inv> What do you think about https://github.com/nim-lang/Nim/blob/devel/lib/pure/asynchttpserver.nim#L379 and ipv6 ?↵↵I think I prefer to have domain = AF_INET parameter only for listener. Is it fine to have custom socket here, I do not know, to run http-server on pipes and udp. Will http-server code fail on something not TCP/UDP and etc? |
21:18:47 | * | rockcavera quit (Remote host closed the connection) |
21:26:41 | * | tane quit (Quit: Leaving) |
21:29:59 | * | greaser|q quit (Changing host) |
21:29:59 | * | greaser|q joined #nim |
21:30:02 | * | greaser|q is now known as GreaseMonkey |
21:42:13 | * | azed quit (Quit: WeeChat 3.1) |
21:44:22 | FromGitter | <BracketMaster> What's the simplest way to raise an error? |
21:44:47 | FromGitter | <BracketMaster> in the example docs I see `OSError`, but there must be some base error type |
21:45:50 | FromDiscord | <inv> I use ValueError alot, but not 100% it is correct |
21:47:20 | FromDiscord | <Avatarfighter> https://nim-lang.org/docs/manual.html#exception-handling-custom-exceptions |
21:48:07 | FromDiscord | <Avatarfighter> @inv and BracketMaster |
21:48:12 | FromDiscord | <Avatarfighter> that should interest both of you 😛 |
21:49:00 | FromDiscord | <inv> The question was about `base` type, not custom 🙂 |
21:50:40 | FromDiscord | <Avatarfighter> you are not able to raise `Exception` directly ? I guess that's as base as it gets with exceptions |
21:52:54 | FromDiscord | <VinKer> Hi all, I would like to turn off the yello line (not used alert) & red line (background code checking) in VS code. How to do it. It;s annoying. |
21:53:03 | FromDiscord | <VinKer> (edit) "yello" => "yellow" |
21:54:16 | FromDiscord | <inv> @Avatarfighter If I remember correct, Nim will warn about it |
21:59:42 | FromDiscord | <Avatarfighter> Yeah, I'm pretty sure you should make a custom exception if you need something other than the ones builtin |
21:59:54 | FromDiscord | <Avatarfighter> but i could be wrong and a more knowledgeable nimion will know |
22:00:12 | * | Vladar quit (Quit: Leaving) |
22:04:29 | * | Gustavo6046 quit (Ping timeout: 250 seconds) |
22:05:20 | ForumUpdaterBot | New thread by Masiarek2: Why Nim is *not* confused - which proc to call?, see https://forum.nim-lang.org/t/7981 |
22:14:50 | * | aerona joined #nim |
22:18:13 | * | Gustavo6046 joined #nim |
22:29:32 | * | azed joined #nim |
22:37:15 | FromGitter | <nothratal> hello together |
22:38:41 | FromGitter | <nothratal> Does someone know any GUI designer tools which can be used together with nim? Glade with GTK still stucks with GTK3. |
22:42:27 | * | thomasross joined #nim |
22:44:20 | FromDiscord | <demotomohiro> !repo NimQt |
22:44:40 | FromDiscord | <demotomohiro> !repo PhilipWitte/NimQt |
22:45:11 | FromDiscord | <demotomohiro> https://github.com/PhilipWitte/NimQt |
22:45:19 | FromDiscord | <demotomohiro> https://github.com/filcuc/NimQml |
22:46:57 | FromDiscord | <demotomohiro> Qt has GUI designer but I don't know whether they work with GUI designer |
22:48:31 | FromGitter | <nothratal> thanks, I'll try it |
22:48:45 | FromDiscord | <lemos on lisp wizardries> levy fidelix 2022 |
23:27:25 | FromDiscord | <brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3mPD |
23:27:58 | FromDiscord | <brainproxy> (edit) "https://play.nim-lang.org/#ix=3mPD" => "https://play.nim-lang.org/#ix=3mPE" |
23:34:47 | * | azed quit (Quit: WeeChat 3.1) |
23:39:14 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
23:39:30 | FromDiscord | <exelotl> @brainproxy you want to disallow `A` itself, only allow things that inherit from it? |
23:41:06 | * | pbb joined #nim |
23:42:16 | FromDiscord | <brainproxy> I mean, I guess it would, but mainly I have a C, D, E, ... that all inherit from A, and want them each to have a different `baz` impl |
23:42:22 | FromDiscord | <brainproxy> (edit) "I mean, I guess it would, but mainly I have a C, D, E, ... that all inherit from A, and ... want" added "I" |
23:42:38 | FromDiscord | <brainproxy> (edit) "`baz`" => "`foo`" |
23:45:11 | FromDiscord | <ElegantBeef> Sounds like `method` |
23:45:43 | FromDiscord | <exelotl> yeahh I wanted to say that but it depends if you actually want the dynamic dispatch or not |
23:46:26 | FromDiscord | <brainproxy> I should probably read more about method and dynamic dispatch, don't really understand the implications |
23:46:51 | FromDiscord | <brainproxy> but, just guessing, I do want static dispatch and hence why I wanted to be able to express it like that |
23:47:04 | FromDiscord | <brainproxy> (edit) "wanted" => "want" |
23:47:11 | FromDiscord | <brainproxy> tbd, I'll read more manual |
23:49:58 | FromDiscord | <ElegantBeef> Well dynamic dispatch gives you the abillity to override function logic like methods in OOP languages |
23:50:27 | FromDiscord | <exelotl> I guess if you want static dispatch it might still be acceptable to use method, cause the compiler should be smart enough to see "you have a `B` object here and nothing inherits from `B`, so it's impossible that this can call anything other than the `B` version of `foo()`" |
23:51:18 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3mPN |
23:53:48 | FromDiscord | <exelotl> but if you don't _need_ methods, you can likely be using composition instead of inheritance anyways |
23:55:51 | * | befa7 joined #nim |
23:58:27 | * | befa7 quit (Client Quit) |