00:00:13 | * | endragor joined #nim |
00:04:36 | * | Hideki_ joined #nim |
00:14:18 | * | clyybber quit (Quit: WeeChat 2.6) |
00:40:00 | * | endragor quit (Ping timeout: 265 seconds) |
00:56:42 | FromDiscord_ | <mratsim> so @Clyybber I had to remove the backoff mechanism for now because it has a race condition and can deadlock 😛 |
01:04:44 | * | letto quit (Remote host closed the connection) |
01:05:10 | * | letto joined #nim |
01:23:46 | madprops | im doing something like this https://play.nim-lang.org/#ix=23Ac |
01:23:59 | * | dwdv quit (Ping timeout: 276 seconds) |
01:24:26 | madprops | oh wait |
01:36:33 | * | lritter quit (Ping timeout: 250 seconds) |
01:41:38 | * | snowolf is now known as Snowolf |
01:46:13 | FromDiscord_ | <mratsim> I'm jealous of your super widescreen if you can spend tab space like that :p |
01:46:36 | madprops | lol |
01:58:56 | * | blackbeard420 quit (Quit: ZNC 1.7.4 - https://znc.in) |
01:58:58 | * | hpyc9 quit (Quit: ZNC 1.7.4 - https://znc.in) |
02:00:04 | * | hpyc9 joined #nim |
02:01:41 | * | blackbeard420 joined #nim |
02:40:02 | * | letto quit (Ping timeout: 276 seconds) |
02:41:43 | * | endragor joined #nim |
02:43:42 | * | letto joined #nim |
02:44:17 | * | tiorock joined #nim |
02:44:17 | * | tiorock quit (Changing host) |
02:44:17 | * | tiorock joined #nim |
02:44:17 | * | rockcavera quit (Killed (card.freenode.net (Nickname regained by services))) |
02:44:17 | * | tiorock is now known as rockcavera |
02:48:48 | disruptek | i'm just gonna write a nimph subcommand that will setup missing tags for your project, binding every single nimble version update to the commit that introduced it. |
02:50:54 | * | NimBot joined #nim |
02:53:05 | * | dchem joined #nim |
02:55:37 | dchem | hi everyone, if I do "let a = b", where 'b' is an instance of an Object, 'a' is a ref to 'b' and not a copy of 'b', right? |
02:55:56 | zedeus | if it's a ref object, yes |
02:56:31 | dchem | Is Iterator a ref object? |
02:57:04 | dchem | Sorry I'll look it up myself, I think that helped. Thanks zedeus |
03:00:12 | FromDiscord_ | <Rika> if b is a ref object, b stores a reference (heap pointer). hence, let a = b will copy the pointer to a, making a a reference to whatever b was referencing |
03:00:24 | FromDiscord_ | <Rika> thats my thought process at least |
03:04:38 | dchem | Got it, and the iterator returned by items[T](iterable) is the pointer to the element of the iterable, right? |
03:05:16 | dchem | Sorry if question is super basic, just making sure I understand this. Thank you in advance. |
03:39:46 | * | sagax joined #nim |
04:05:57 | * | Pistos2 left #nim ("WeeChat 2.4") |
04:07:47 | * | chemist69 quit (Ping timeout: 276 seconds) |
04:08:56 | * | chemist69 joined #nim |
04:21:39 | * | njoseph quit (Ping timeout: 250 seconds) |
04:24:46 | * | nsf joined #nim |
04:39:18 | * | narimiran joined #nim |
04:45:18 | * | rockcavera quit (Remote host closed the connection) |
04:48:09 | * | dddddd quit (Remote host closed the connection) |
04:49:24 | FromDiscord_ | <Rika> it depends on whats contained is it not |
04:54:35 | * | dchem quit (Ping timeout: 250 seconds) |
05:01:17 | * | njoseph joined #nim |
05:33:09 | * | njoseph quit (Ping timeout: 250 seconds) |
05:36:04 | * | shodan45 quit (Quit: No Ping reply in 180 seconds.) |
05:36:08 | * | ng0 quit (Ping timeout: 260 seconds) |
05:36:08 | * | leorize quit (Ping timeout: 260 seconds) |
05:40:21 | * | nisstyre quit (Ping timeout: 246 seconds) |
05:40:27 | * | shodan45 joined #nim |
05:41:25 | * | nisstyre joined #nim |
05:52:59 | * | njoseph joined #nim |
06:04:14 | * | ng0 joined #nim |
06:07:31 | * | ltriant quit (Quit: leaving) |
06:13:01 | * | leorize joined #nim |
06:39:48 | * | sealmove joined #nim |
06:40:20 | * | disruptek quit (Ping timeout: 268 seconds) |
06:41:03 | * | disbot quit (Ping timeout: 265 seconds) |
06:43:33 | * | disbot joined #nim |
06:43:52 | * | disruptek joined #nim |
06:44:26 | * | sentreen quit (Ping timeout: 265 seconds) |
06:45:22 | * | sentreen joined #nim |
07:01:02 | * | solitudesf joined #nim |
07:02:55 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
07:23:14 | sealmove | hey, is anyone here? |
07:23:35 | * | Jjp137 quit (Read error: Connection reset by peer) |
07:23:55 | zedeus | hi |
07:24:06 | sealmove | in a macro, how can i instruct compiler to wait for a symbol (which will be generated in the same macro)? |
07:24:22 | sealmove | because I get Error: undeclared identifier: 'myIdentifier' |
07:24:37 | sealmove | but I myIdentifier will exist, compiler just don't know it |
07:24:51 | zedeus | example code? |
07:25:13 | zedeus | I think quote do checks idents |
07:25:26 | sealmove | wait, I |
07:25:31 | sealmove | 'll write a simple example |
07:27:51 | * | Jjp137 joined #nim |
07:32:06 | sealmove | https://play.nim-lang.org/#ix=23Bh |
07:32:12 | sealmove | here you go zedeus |
07:33:18 | sealmove | oops, the example is wrong, wait |
07:34:57 | * | Hideki_ quit (Remote host closed the connection) |
07:39:07 | sealmove | hmm, I can't reproduce |
07:43:45 | sealmove | xDDD sorry nvm, I confused an identifier from the to-generate code with an identifier from actual code |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:40 | * | gmpreussner joined #nim |
08:09:59 | * | tklohna joined #nim |
08:18:38 | * | PMunch joined #nim |
08:34:40 | * | revere quit (*.net *.split) |
08:34:40 | * | Lord_Nightmare quit (*.net *.split) |
08:38:20 | * | revere joined #nim |
08:38:20 | * | Lord_Nightmare joined #nim |
08:47:08 | * | sealmove quit (Quit: WeeChat 2.6) |
09:01:24 | * | Vladar joined #nim |
09:05:34 | * | solitudesf quit (Ping timeout: 265 seconds) |
09:08:25 | * | HrrHotler joined #nim |
09:10:22 | * | Hideki_ joined #nim |
09:13:30 | * | Hideki_ quit (Remote host closed the connection) |
09:26:07 | * | HrrHotler left #nim (#nim) |
09:31:11 | Araq | „Hi, I've concluded from asking questions around in the Nim communities that Nim is a great language with mostly just a PR issue. As I'm learning and adopting the language, I want to spend time closing this gap in the hope that more will have the opportunity to appreciate this language. |
09:31:12 | Araq | With that, can I propose we pimp up this sub, starting from adding the crown icon and creating a color theme that matches the Nim's website?“ |
09:31:31 | Araq | ^ is that the beginning of something that will be turned into spam anytime soon? |
09:31:40 | Araq | looks like it to me, but what do you think |
09:32:47 | Zevv | Nah, don't think so. They know about the crown! |
09:33:17 | livcd | Where do you see that ? |
09:33:44 | livcd | Posted 19daus ago on /r/nim |
09:34:26 | Araq | livcd: I'm an admin on the forum so I can see what you cannot |
09:34:38 | livcd | ah ok |
09:34:58 | Zevv | bwah why do I explictly make a has[] to be able to use my enum as Table index :/ |
09:35:22 | Zevv | hash(), that is |
09:38:46 | Araq | Zevv: because you're supposed to use an array with enum indexes |
09:38:56 | Araq | much faster |
09:39:58 | Zevv | gap in my enum :( |
09:40:10 | Zevv | but true, I hear you |
09:41:51 | Araq | mind the gap. |
09:43:17 | Araq | offtopic but when I was in England I found this so funny... "mind the gap" the signs said on the train station. I said, "no, I don't mind the gap, it was a single step over it" |
09:49:12 | PMunch | Haha |
09:49:32 | PMunch | How does one wrap a C++ abstract class in Nim? |
09:54:39 | * | revere quit (*.net *.split) |
09:54:39 | * | Lord_Nightmare quit (*.net *.split) |
09:54:41 | * | dillonb quit (*.net *.split) |
09:54:43 | * | Tanger quit (*.net *.split) |
09:54:44 | * | sentreen quit (*.net *.split) |
09:54:44 | * | nisstyre quit (*.net *.split) |
09:54:44 | * | chemist69 quit (*.net *.split) |
09:54:44 | * | sagax quit (*.net *.split) |
09:54:44 | * | blackbeard420 quit (*.net *.split) |
09:54:44 | * | hpyc9 quit (*.net *.split) |
09:54:45 | * | Jesin quit (*.net *.split) |
09:54:45 | * | zyklon quit (*.net *.split) |
09:54:45 | * | gangstacat quit (*.net *.split) |
09:54:45 | * | thomasross quit (*.net *.split) |
09:54:47 | * | noonien quit (*.net *.split) |
09:54:48 | * | oculux quit (*.net *.split) |
09:54:48 | * | pbb quit (*.net *.split) |
09:54:49 | * | zahary quit (*.net *.split) |
09:54:49 | * | vqrs_ quit (*.net *.split) |
09:54:50 | * | lbart quit (*.net *.split) |
09:54:50 | * | pigmej quit (*.net *.split) |
09:54:51 | * | lqdev[m] quit (*.net *.split) |
09:54:51 | * | GitterIntegratio quit (*.net *.split) |
09:54:52 | * | tribly quit (*.net *.split) |
09:54:52 | * | Zevv quit (*.net *.split) |
09:54:52 | * | stefantalpalaru quit (*.net *.split) |
09:54:52 | * | JStoker quit (*.net *.split) |
09:54:52 | * | Cadey quit (*.net *.split) |
09:54:53 | * | LyndsySimon quit (*.net *.split) |
09:54:53 | * | zielmicha__ quit (*.net *.split) |
09:54:53 | * | msmorgan quit (*.net *.split) |
09:54:53 | * | qwertfisch quit (*.net *.split) |
09:54:55 | * | deansher quit (*.net *.split) |
09:54:55 | * | gmpreussner quit (*.net *.split) |
09:54:56 | * | Jjp137 quit (*.net *.split) |
09:54:56 | * | disbot quit (*.net *.split) |
09:54:56 | * | Kaivo quit (*.net *.split) |
09:54:56 | * | MightyJoe quit (*.net *.split) |
09:54:56 | * | jwm224 quit (*.net *.split) |
09:54:58 | * | beatmox quit (*.net *.split) |
09:54:58 | * | shadowbane quit (*.net *.split) |
09:54:58 | * | ljoonal quit (*.net *.split) |
09:54:59 | * | blueberrypie quit (*.net *.split) |
09:54:59 | * | Ekho quit (*.net *.split) |
09:55:00 | * | jxy quit (*.net *.split) |
09:55:00 | * | dv^_^ quit (*.net *.split) |
09:55:02 | * | letto quit (*.net *.split) |
09:55:02 | * | endragor quit (*.net *.split) |
09:55:02 | * | bozaloshtsh quit (*.net *.split) |
09:55:03 | * | Yardanico quit (*.net *.split) |
09:55:04 | * | FromGitter quit (*.net *.split) |
09:55:04 | * | golechwi4 quit (*.net *.split) |
09:55:04 | * | tobbez quit (*.net *.split) |
09:55:04 | * | crem quit (*.net *.split) |
09:55:04 | * | junland quit (*.net *.split) |
09:55:05 | * | livcd quit (*.net *.split) |
09:55:05 | * | rayman22201 quit (*.net *.split) |
09:55:06 | * | FromDiscord_ quit (*.net *.split) |
09:55:06 | * | d10n_ quit (*.net *.split) |
09:55:07 | * | lmariscal quit (*.net *.split) |
09:55:09 | * | Sargun quit (*.net *.split) |
09:55:09 | * | zama quit (*.net *.split) |
09:55:10 | * | SunDwarf quit (*.net *.split) |
09:55:10 | * | odc quit (*.net *.split) |
09:55:10 | * | r4vi quit (*.net *.split) |
09:55:11 | * | jken quit (*.net *.split) |
09:55:11 | * | EastByte quit (*.net *.split) |
09:55:11 | * | planetis[m] quit (*.net *.split) |
09:55:11 | * | skrylar[m] quit (*.net *.split) |
09:55:12 | * | so quit (*.net *.split) |
09:56:36 | * | oculux joined #nim |
09:56:37 | * | pbb joined #nim |
09:56:37 | * | zahary joined #nim |
09:56:37 | * | vqrs_ joined #nim |
09:56:37 | * | lbart joined #nim |
09:56:37 | * | pigmej joined #nim |
09:56:37 | * | GitterIntegratio joined #nim |
09:56:37 | * | lqdev[m] joined #nim |
09:56:37 | * | tribly joined #nim |
09:56:37 | * | Zevv joined #nim |
09:56:37 | * | stefantalpalaru joined #nim |
09:56:37 | * | JStoker joined #nim |
09:56:37 | * | Cadey joined #nim |
09:56:37 | * | LyndsySimon joined #nim |
09:56:37 | * | zielmicha__ joined #nim |
09:56:37 | * | msmorgan joined #nim |
09:56:37 | * | qwertfisch joined #nim |
09:56:37 | * | deansher joined #nim |
10:00:00 | * | gmpreussner joined #nim |
10:00:00 | * | Jjp137 joined #nim |
10:00:00 | * | disbot joined #nim |
10:00:00 | * | Kaivo joined #nim |
10:00:00 | * | MightyJoe joined #nim |
10:00:00 | * | jwm224 joined #nim |
10:00:00 | * | beatmox joined #nim |
10:00:00 | * | shadowbane joined #nim |
10:00:00 | * | ljoonal joined #nim |
10:00:00 | * | blueberrypie joined #nim |
10:00:00 | * | Ekho joined #nim |
10:00:00 | * | jxy joined #nim |
10:00:00 | * | dv^_^ joined #nim |
10:00:22 | * | oculux quit (*.net *.split) |
10:00:22 | * | pbb quit (*.net *.split) |
10:00:22 | * | zahary quit (*.net *.split) |
10:00:24 | * | vqrs_ quit (*.net *.split) |
10:00:26 | * | lbart quit (*.net *.split) |
10:00:26 | * | pigmej quit (*.net *.split) |
10:00:26 | * | lqdev[m] quit (*.net *.split) |
10:00:27 | * | GitterIntegratio quit (*.net *.split) |
10:00:27 | * | tribly quit (*.net *.split) |
10:00:28 | * | Zevv quit (*.net *.split) |
10:00:28 | * | stefantalpalaru quit (*.net *.split) |
10:00:28 | * | JStoker quit (*.net *.split) |
10:00:29 | * | Cadey quit (*.net *.split) |
10:00:29 | * | LyndsySimon quit (*.net *.split) |
10:00:30 | * | zielmicha__ quit (*.net *.split) |
10:00:30 | * | msmorgan quit (*.net *.split) |
10:00:30 | * | qwertfisch quit (*.net *.split) |
10:00:33 | * | deansher quit (*.net *.split) |
10:01:41 | * | oculux joined #nim |
10:01:41 | * | pbb joined #nim |
10:01:41 | * | zahary joined #nim |
10:01:41 | * | vqrs_ joined #nim |
10:01:41 | * | lbart joined #nim |
10:01:41 | * | pigmej joined #nim |
10:01:41 | * | GitterIntegratio joined #nim |
10:01:41 | * | lqdev[m] joined #nim |
10:01:41 | * | tribly joined #nim |
10:01:41 | * | Zevv joined #nim |
10:01:41 | * | stefantalpalaru joined #nim |
10:01:41 | * | JStoker joined #nim |
10:01:41 | * | Cadey joined #nim |
10:01:41 | * | LyndsySimon joined #nim |
10:01:41 | * | zielmicha__ joined #nim |
10:01:41 | * | msmorgan joined #nim |
10:01:41 | * | qwertfisch joined #nim |
10:01:41 | * | deansher joined #nim |
10:01:54 | * | sentreen joined #nim |
10:01:54 | * | nisstyre joined #nim |
10:01:54 | * | chemist69 joined #nim |
10:01:54 | * | sagax joined #nim |
10:01:54 | * | blackbeard420 joined #nim |
10:01:54 | * | hpyc9 joined #nim |
10:01:54 | * | Jesin joined #nim |
10:01:54 | * | zyklon joined #nim |
10:01:54 | * | gangstacat joined #nim |
10:01:54 | * | thomasross joined #nim |
10:02:12 | * | nisstyre quit (Max SendQ exceeded) |
10:03:15 | * | nisstyre joined #nim |
10:03:44 | * | so joined #nim |
10:03:53 | * | revere joined #nim |
10:03:53 | * | Lord_Nightmare joined #nim |
10:04:02 | * | dillonb joined #nim |
10:04:03 | * | Tanger joined #nim |
10:04:11 | * | skrylar[m] joined #nim |
10:04:11 | * | planetis[m] joined #nim |
10:04:34 | * | noonien joined #nim |
10:04:34 | * | letto joined #nim |
10:04:34 | * | endragor joined #nim |
10:04:34 | * | bozaloshtsh joined #nim |
10:04:34 | * | Yardanico joined #nim |
10:04:34 | * | FromGitter joined #nim |
10:04:34 | * | golechwi4 joined #nim |
10:04:34 | * | tobbez joined #nim |
10:04:34 | * | crem joined #nim |
10:04:34 | * | junland joined #nim |
10:04:34 | * | livcd joined #nim |
10:04:34 | * | rayman22201 joined #nim |
10:04:34 | * | FromDiscord_ joined #nim |
10:04:34 | * | d10n_ joined #nim |
10:04:34 | * | lmariscal joined #nim |
10:04:34 | * | jken joined #nim |
10:04:34 | * | Sargun joined #nim |
10:04:34 | * | zama joined #nim |
10:04:34 | * | SunDwarf joined #nim |
10:04:34 | * | odc joined #nim |
10:04:34 | * | r4vi joined #nim |
10:04:34 | * | EastByte joined #nim |
10:04:55 | * | noonien quit (Changing host) |
10:04:55 | * | noonien joined #nim |
10:05:31 | * | FromDiscord_ quit (Excess Flood) |
10:05:32 | * | letto quit (Remote host closed the connection) |
10:05:37 | * | Xatenev joined #nim |
10:06:40 | * | letto joined #nim |
10:06:50 | * | FromDiscord joined #nim |
10:08:28 | livcd | Araq: i dont get it :F |
10:08:31 | * | Xatenev left #nim ("Leaving") |
10:09:02 | FromGitter | <alehander92> nice joke |
10:09:13 | FromGitter | <alehander92> but my english is faulty :P |
10:13:44 | * | Hideki_ joined #nim |
10:20:40 | Araq | PMunch, better-codegendecl is still not ready :-( |
10:20:50 | Araq | so much trouble introduced by this patch |
10:21:39 | PMunch | Really? |
10:22:20 | * | thomasross is now known as Guest70712 |
10:22:20 | * | thomasross_ joined #nim |
10:22:20 | * | Guest70712 quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
10:22:20 | * | thomasross_ is now known as thomasross |
10:22:29 | PMunch | It's been working fine for me |
10:23:33 | PMunch | By the way, any idea what introduces __mulohisi3, __mulshisi3, __negsi2, etc in the Nim binaries? |
10:23:53 | PMunch | I'm trying to figure out why the Nim generated binaries are bigger than the standard AVR ones |
10:32:06 | Araq | I don't know, no. |
10:33:31 | PMunch | Hmm, they are most of the things I don't recognise in the list of different symbols: http://ix.io/23BH |
10:33:44 | PMunch | Along with "next" and "random" |
10:35:21 | PMunch | I'm trying to get "nm -l" working to list where these come from. But so far with little luck |
10:35:37 | PMunch | The documentation just says it looks for "debugging information" but doesn't specify what kind.. |
10:36:19 | * | nc-x joined #nim |
10:36:38 | nc-x | PMunch: They seem to be defined by gcc for avr https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/avr/lib1funcs.S |
10:37:02 | nc-x | atleast thats what google search shows and me thinks |
10:37:09 | PMunch | Yeah, but the weird thing is that they don't appear in the same sketch compiled through the Arduino IDE |
10:37:28 | PMunch | So something in the generated Nim code prompts it to include them |
10:39:03 | nc-x | Maybe Arduino IDE uses lib1funcs-fixed.S (those symbols are not defined here), whereas nim uses lib1funcs.S (https://github.com/gcc-mirror/gcc/tree/master/libgcc/config/avr) |
10:39:29 | nc-x | I don't know the difference between *-fixed.S vs the normal file though |
10:39:39 | PMunch | But they should've been removed if they aren't used by the program |
10:40:43 | * | solitudesf joined #nim |
10:47:09 | Araq | nc-x, understood my remark about the bug you asked about? |
10:49:13 | nc-x | Well... The fix is done. will create PR in a few minutes. --Hopefully, I understood it correctly-- |
10:50:03 | Araq | wow nice |
10:50:14 | Araq | PMunch, I think I just fixed the "last" bug about it |
10:50:44 | PMunch | Oooh nice |
10:52:08 | * | dwdv joined #nim |
10:55:09 | PMunch | Hmm, it looks like these odd functions are 32 or 16 bit math functions |
10:55:31 | PMunch | Is this possibly related to the fact that Nim thinks AVR is 16 bit instead of the actual 8 bit? |
10:56:47 | Araq | possible yes |
10:56:59 | * | ng0 joined #nim |
10:57:16 | Araq | maybe it's as simple as patching nimbase.h |
10:57:25 | Araq | so that it uses C's 16 bit integers? |
10:57:38 | Araq | look at the NI typedef |
10:58:10 | Zevv | PMunch: avr is not really really 8 bit always, its a kind of hybrid. |
11:00:10 | solitudesf | another bot https://forum.nim-lang.org/t/5642 |
11:00:16 | * | tklohna quit (Ping timeout: 240 seconds) |
11:00:41 | nc-x | Araq: https://github.com/nim-lang/Nim/pull/12814 |
11:00:43 | disbot | ➥ Fixed objects being erroneously zeroed out before object construction @11nc-x |
11:01:09 | Araq | solitudesf, lol, told you |
11:04:03 | * | njoseph quit (Ping timeout: 245 seconds) |
11:04:29 | * | nc-x quit (Remote host closed the connection) |
11:12:50 | FromDiscord | <mratsim> Oooh, is that what I think it is? A fixed to the double zeroMem? |
11:13:45 | Araq | no. |
11:16:10 | * | njoseph joined #nim |
11:16:12 | Araq | the fix for that is to use a better C compiler |
11:19:46 | FromDiscord | <mratsim> Well, often you need to help it, that means tagging restrict, pure, const for example |
11:21:19 | Araq | we got --asm for easier asm code inspection |
11:22:19 | Zevv | araq: #12777 should be ok to go |
11:22:20 | disbot | https://github.com/nim-lang/Nim/pull/12777 -- 3Increased TInstr field sizes: allow long jumps and 65535 VM registers 🌈11zevv |
11:24:21 | FromDiscord | <mratsim> I've been doing Nim ASM code inspection for almost 3 years now, that's why I'm writing my own compiler with macros |
11:25:01 | Araq | good for you, so please me precisely when the double memsets are a problem |
11:25:59 | Araq | and not the usual "result = 0; result = 0" omg inefficient! cargo cult |
11:26:35 | FromDiscord | <mratsim> This: https://github.com/nim-lang/Nim/issues/6501 |
11:26:37 | disbot | ➥ Assignment in result variables generates genericResets @11edubart; snippet at https://play.nim-lang.org/#ix=23BW |
11:27:16 | Araq | that's 'genericSeqAssign', not memset afaict |
11:27:27 | Araq | also I fixed it in 1.0. I think |
11:27:30 | FromDiscord | <mratsim> you have double memSet in the generated code |
11:27:51 | Araq | so what do I have it in the asm too? if so, why? |
11:27:55 | FromDiscord | <mratsim> one because Nim always have one, and another brought in by genericReset AFAIK |
11:29:10 | FromDiscord | <mratsim> 30% perf difference: https://github.com/mratsim/Arraymancer/issues/104 |
11:29:11 | disbot | ➥ Bottleneck: find what generates "GenericResetAux" ⚫11mratsim |
11:29:24 | FromDiscord | <mratsim> also remember when noInit didn't work anymore? |
11:30:10 | FromDiscord | <mratsim> I even used templates to workaround those issues: https://github.com/mratsim/Arraymancer/issues/104#issuecomment-336235661 |
11:30:11 | disbot | ➥ Bottleneck: find what generates "GenericResetAux" ⚫11mratsim |
11:30:48 | FromDiscord | <mratsim> Ultimately I will remove all seq and use pointer + length potentially with my own allocator |
11:31:03 | FromDiscord | <mratsim> but those were very annoying to hunt and fight against |
11:33:24 | Zevv | hmm did nim not once do run time checks on enum values? I can do 42.MyEnum even if 42 is not a valid member, and then $ will show "(invalid data!)" only |
11:34:30 | FromGitter | <alehander92> where would it run them |
11:35:20 | FromGitter | <alehander92> some foreign code can always "corrupt" an enum, and i hope we dont check each enum access, too slow |
11:35:59 | Araq | look+ |
11:36:11 | Zevv | we also check ranges and overflows, right? |
11:36:26 | Araq | you're saying "do something about the double memsets" and then every bug you bring up is about genericReset |
11:36:42 | Araq | so all I'm asking for is to be precise |
11:37:10 | FromGitter | <alehander92> Zevv, but this is an operation check: we probably check it for enums in arrays as well |
11:37:28 | FromGitter | <alehander92> what do you want for a == value (enums) |
11:37:47 | Zevv | no, I'd expect an exception on assignment of an illegal enum value |
11:37:52 | Zevv | when not running -d:danger, at least |
11:38:24 | Zevv | but maybe I'm wrong and this never was like that in the past |
11:38:35 | FromGitter | <alehander92> does this happen for ints? |
11:39:14 | FromDiscord | <mratsim> I have to check in the nimbus codebase/bug tracker for the double memset, but we do have those as well |
11:39:16 | FromGitter | <alehander92> enums should be as fast as ints out of `debug mode` imo |
11:39:26 | FromGitter | <alehander92> and this still wouldn't catch all cases |
11:39:48 | FromGitter | <alehander92> e.g. some c code setting an enum to other value, or casting |
11:40:58 | FromGitter | <alehander92> we should check value.MyEnum imo |
11:41:04 | PMunch | Zevv, yeah that is true |
11:41:45 | FromGitter | <alehander92> because thats where corruption can be introduced, the other cases should be checked from the type systems |
11:41:53 | FromGitter | <alehander92> and cast-s are wild west anyway |
11:42:10 | FromGitter | <alehander92> sorry, if thats what you meant originally |
11:42:12 | Araq | no... |
11:42:26 | Araq | ok, give me one sec please |
11:42:51 | Zevv | alehander92: well, 4.MyEnum is technically not a cast |
11:43:21 | Araq | Zevv, I think it never produced a check |
11:43:26 | Araq | but it should :-) |
11:43:39 | Zevv | ranges do throw RangeError, but enums do not |
11:44:22 | FromGitter | <alehander92> ok so conversions "always unchecked" |
11:44:25 | FromGitter | <alehander92> in the manual |
11:44:43 | FromGitter | <alehander92> Zevv thats what i say |
11:44:55 | FromGitter | <alehander92> that enum conversions make sense to me to be checked |
11:45:13 | Zevv | right, I feel an enum deserves the same treatment as a range[] |
11:45:14 | PMunch | Aha, tried to add a "uint32_t" global variable and do some simple multiplication with it in the main loop of the program. Tha bumped the size up considerably and now it has "__muluhisi3" defined as well |
11:45:18 | FromGitter | <alehander92> but it seems the manual insists that now (from 1.0.4) type conversion are always unchecked |
11:45:39 | Zevv | oh :( |
11:45:47 | PMunch | So these are definitely caused by Nim somewhere spitting out multiplication, division, and modulo operations on various int types |
11:47:25 | PMunch | Now to figure out where this happens.. |
11:48:58 | * | nif quit (Quit: ...) |
11:49:01 | Araq | alehander92: no. conversions to *unsigned* integer types are unchecked |
11:49:07 | * | nif joined #nim |
11:52:15 | Zevv | so, should I file an issue for this? |
11:52:40 | FromGitter | <alehander92> well this should be a bit clarified in this paragraph |
11:52:47 | FromGitter | <alehander92> but sorry , i should've noticed the upper one indeed |
11:52:49 | PMunch | Hmm, tried to grep after the word "int" in the cache directory gave me nothing. Commenting out every mention of 32 bit integers in nimbase.h didn't throw an error.. |
11:57:29 | PMunch | Interesting, I moved some "passC" statements from the nim.cfg file over to {.passC:.} pragmas and added a strdefine constant to specify where to import from. And even though I import the same files the binary dropped 400 bytes.. |
11:58:58 | FromGitter | <alehander92> but Zevv |
11:59:13 | FromGitter | <alehander92> i still think you should write "check conversions" not assignments |
11:59:14 | PMunch | Doing it the way I originally had it apparently created an intFunc and a nothingv function, not sure what they do.. http://ix.io/23C3 |
12:00:04 | FromGitter | <alehander92> they are the problem here |
12:00:13 | FromGitter | <alehander92> and they can happen e.g. in calls |
12:00:31 | Zevv | right, updated |
12:00:38 | Zevv | thanks |
12:01:14 | FromGitter | <alehander92> thanks! |
12:03:37 | * | clyybber joined #nim |
12:03:39 | Zevv | boy are'nt we just nice people |
12:04:57 | clyybber | Zevv: Does a conversion to enum really not raise a range error? I relied on that in my code :p |
12:05:14 | Zevv | see https://github.com/nim-lang/Nim/issues/12815 |
12:05:16 | disbot | ➥ No run time checks on illegal values for enum with gaps 🌈11zevv; snippet at https://play.nim-lang.org/#ix=23C5 |
12:05:23 | Zevv | it does if you go too low or too high, but not if you hit a gap |
12:05:46 | clyybber | Huh, that explains something.. |
12:05:47 | Zevv | ah, how sweet, I even got a little red heart from alehander92! |
12:05:59 | clyybber | lemme give you one too |
12:06:15 | clyybber | Zevv: I think I'll try to implement contains for enums |
12:06:20 | clyybber | That should be really handy |
12:06:50 | Zevv | at the typedesc level? |
12:06:57 | clyybber | Hmm |
12:07:14 | clyybber | I don't know I just *want* to do it. I'm gonna think afterwards :p |
12:07:17 | Zevv | :) |
12:07:57 | clyybber | maybe it needs to be magic :\ |
12:08:59 | clyybber | mratsim: Why not just patch atomics.nim instead of that workaround? |
12:09:39 | clyybber | Its just a matter of adding enum to it, right? |
12:11:12 | Araq | oh no |
12:11:20 | Araq | so it's just the enum with holes *again* |
12:11:28 | Araq | such an expensive, silly feature |
12:11:44 | PMunch | Aha, I was compiling in "cores/arduino/WMath.cpp" which added all those things |
12:11:50 | PMunch | Removing it made them disappear |
12:12:48 | clyybber | !eval echo bool is enum |
12:12:51 | NimBot | false |
12:12:55 | FromGitter | <alehander92> Zevv no problem |
12:13:06 | clyybber | why is bool not an enum, when it actually is? |
12:13:11 | FromGitter | <alehander92> of course this should be turnable off |
12:13:27 | FromGitter | <alehander92> clyybber int64-s are also kind of enums :P |
12:13:48 | clyybber | alehander92: But bool is literally defined as an enum |
12:14:30 | FromGitter | <alehander92> huhh |
12:14:30 | clyybber | !eval type myBool = false, true; echo myBool is enum |
12:14:31 | NimBot | Compile failed: /usercode/in.nim(1, 20) Error: invalid indentation |
12:14:44 | clyybber | !eval type myBool = false, true\n echo myBool is enum |
12:14:46 | NimBot | Compile failed: /usercode/in.nim(1, 20) Error: invalid indentation |
12:14:54 | Zevv | "mind the holes" |
12:14:54 | FromGitter | <alehander92> no spaces |
12:15:08 | clyybber | no spaces? |
12:15:14 | FromGitter | <alehander92> remove the space |
12:15:16 | FromGitter | <alehander92> before echo |
12:15:21 | clyybber | !eval type myBool = false, true\necho myBool is enum |
12:15:23 | FromGitter | <alehander92> !eval bool is enum |
12:15:23 | clyybber | right |
12:15:23 | NimBot | Compile failed: /usercode/in.nim(1, 20) Error: invalid indentation |
12:15:24 | NimBot | Compile failed: ???(0, 0) Error: expression 'false' is of type 'bool' and has to be discarded |
12:15:43 | FromGitter | <alehander92> !eval echo bool is enum |
12:15:45 | NimBot | false |
12:16:24 | FromGitter | <alehander92> !eval type myBool = enum false, true |
12:16:26 | NimBot | <no output> |
12:16:31 | FromGitter | <alehander92> !eval type myBool = enum false, true |
12:16:34 | NimBot | <no output> |
12:16:43 | FromGitter | <alehander92> !eval type myBool = enum false, true\necho myBool is enum |
12:16:45 | NimBot | Compile failed: /usercode/in.nim(1, 31) Error: identifier expected, but got '\' |
12:16:49 | clyybber | !eval type myBool = f, t\necho myBool is enum |
12:16:50 | NimBot | Compile failed: /usercode/in.nim(1, 16) Error: invalid indentation |
12:16:56 | * | abm joined #nim |
12:16:58 | FromGitter | <alehander92> no youre forgetting the `enum` |
12:17:07 | clyybber | ha |
12:17:14 | clyybber | I tested it on playground |
12:17:17 | clyybber | it returns true |
12:17:24 | FromGitter | <alehander92> !eval type myBool = enum false, true \necho myBool is enum |
12:17:25 | NimBot | Compile failed: /usercode/in.nim(1, 32) Error: identifier expected, but got '\' |
12:17:26 | clyybber | So its a bug exclusive to our little bool |
12:17:34 | clyybber | don't use false |
12:17:36 | clyybber | or true |
12:17:40 | clyybber | but t and f |
12:17:55 | clyybber | !eval type myBool = enum f, t\necho myBool is enum |
12:17:57 | NimBot | Compile failed: /usercode/in.nim(1, 24) Error: identifier expected, but got '\' |
12:18:08 | clyybber | !eval type myBool = enum f, t; echo myBool is enum |
12:18:09 | NimBot | Compile failed: /usercode/in.nim(1, 24) Error: identifier expected, but got ';' |
12:18:17 | Araq | bool is not an enum. Proof: you cannot write 'if myenumValue:' |
12:18:45 | PMunch | Okay, so now with my imports and compiles better defined the overhead of using Nim comes down to 4 extra bytes of program memory |
12:19:06 | FromGitter | <alehander92> it works with false and true clyybber |
12:19:07 | clyybber | Araq: Thats not a proof :p We could just say that if takes a bool and not an enum. |
12:19:10 | FromGitter | <alehander92> ah in the playground |
12:19:23 | clyybber | alehander92: Yeah, the bot does some things I don't understand |
12:19:33 | clyybber | I looked into fixing it once, but I don't see the error |
12:19:52 | FromGitter | <alehander92> https://play.nim-lang.org/#ix=23C9 |
12:20:28 | * | tklohna joined #nim |
12:20:36 | FromGitter | <alehander92> notice that echo a |
12:20:39 | FromGitter | <alehander92> echoes false :D |
12:20:50 | clyybber | because of the magic |
12:20:57 | clyybber | remove it and it echoes true |
12:21:20 | FromGitter | <alehander92> yeah i know |
12:22:04 | FromGitter | <alehander92> but this means we can make our own |
12:22:07 | FromGitter | <alehander92> bool-like types |
12:22:11 | FromGitter | <alehander92> which we can `if` |
12:22:14 | FromGitter | <alehander92> e.g. ternary |
12:23:25 | clyybber | Araq: fuuuuck, I made a dumb mistake, I accidently pressed commit since the github UI displays that now instead of create PR :( |
12:23:33 | Araq | mratsim: https://play.nim-lang.org/#ix=23Ca |
12:23:48 | Araq | it optimized one memset call out for me |
12:24:07 | FromGitter | <alehander92> and this means that we can do |
12:24:07 | FromGitter | <alehander92> wow |
12:24:09 | FromGitter | <alehander92> wow |
12:24:12 | clyybber | Araq: https://github.com/nim-lang/Nim/commit/267fed53ee6ce6be70ff9f410e82b5847ddfa734 |
12:24:39 | clyybber | Its a simple change, but I didn't intend on commiting it directly, sorry :/ wont happen again |
12:24:42 | Araq | that's what I'm talking about, we don't have to optimize it. only genericReset and friends are terrible |
12:25:03 | Araq | clyybber, we'll be fine, it is the development branch |
12:25:07 | FromGitter | <alehander92> ok nevermind it didnt need a custom bool type |
12:25:15 | FromGitter | <alehander92> but yeah we can do if @[2]: like in python |
12:25:20 | FromGitter | <alehander92> i didnt realize it before |
12:25:30 | Araq | we can but it's a bad idea |
12:25:33 | FromGitter | <alehander92> or if @[]: # false |
12:25:36 | FromGitter | <alehander92> i agree |
12:25:52 | FromGitter | <alehander92> just another strange `converter` thing :P |
12:28:27 | PMunch | Hmm, weird that the math functions were included in the final binary though.. I wonder how the regular AVR compilation manages to avoid this and still have the procedures available when it needs them.. |
12:28:33 | clyybber | mratsim: welp, consider #12812 fixed :p |
12:28:34 | disbot | https://github.com/nim-lang/Nim/issues/12812 -- 5Enums should be considered Trivial types in Atomics ⚫11mratsim |
12:28:36 | FromGitter | <alehander92> ok a converter from T to U doesnt work at least |
12:29:03 | * | tklohna quit (Ping timeout: 265 seconds) |
12:31:33 | Araq | https://github.com/nim-lang/Nim/pull/12799 it's green! |
12:31:34 | disbot | ➥ better support for PROGMEM like annotations for lets/vars; fixes #12216 👑11Araq |
12:31:53 | clyybber | Araq: Niiice, what was the source of that math issue? |
12:32:15 | * | nsf quit (Quit: WeeChat 2.6) |
12:32:23 | PMunch | Aha, linker flags was the key! |
12:32:27 | Araq | clyybber, global lets in a loop are special and cannot rely on top level inits |
12:34:53 | * | rockcavera joined #nim |
12:37:09 | * | tklohna joined #nim |
12:37:37 | PMunch | Hmm, I have "PFlashStringHelper* {.importc: "const __FlashStringHelper*".} = distinct pointer" But this gets translated to a void * in the C code |
12:38:08 | PMunch | I had it without "distinct" to begin with, and that generated the correct type, but that meant Nim would see calls as ambiguous. |
12:39:28 | PMunch | Is that a bug? |
12:42:16 | * | tklohna quit (Ping timeout: 240 seconds) |
12:49:22 | Araq | no. the backend is allowed to ignore the 'distinct' and your importc requirement |
12:49:58 | Araq | let Nim do the pointer annotation and import it like |
12:50:16 | Araq | FlashStringHelper* {.importc: "const __FlashStringHelper".} = object |
12:52:48 | PMunch | Ah superb, that works well |
12:53:19 | PMunch | So that's how you import an abstract C++ class :) |
13:11:52 | PMunch | Hmm, more weird interesting bugs |
13:12:21 | PMunch | var test: uint32; {.emit: [arduboy, ".print(sizeof(", test, "));"].} |
13:12:26 | PMunch | That prints out 2 |
13:12:47 | PMunch | So somehow NU32 has become 2 bytes long.. |
13:19:37 | PMunch | So apparently "HAVE_STDINT_H" wasn't defined and nimbase.h pointed NU32 to "unsigned int" which is a 16-bit integer on this board. |
13:20:06 | Araq | fix it |
13:20:12 | PMunch | Using "passC = -DHAVE_STDINT_H" made it work, but I feel there is a proper place to fix it |
13:20:25 | Araq | nimbase.h |
13:20:29 | Araq | patch it |
13:20:46 | Araq | or maybe it got moved into the codegen, don't remember |
13:21:01 | PMunch | Nah there is a section here that defined HAVE_STDINT_H |
13:24:37 | * | lritter joined #nim |
13:31:01 | * | endragor quit (Remote host closed the connection) |
13:36:33 | FromDiscord | <mratsim> @Clyybber @Araq, no it's not enums with holes, just plain enums |
13:36:57 | FromDiscord | <mratsim> and I didn't patch the stdlib because I want to continue my investigation and then sleep |
13:37:03 | FromDiscord | <mratsim> wanted* |
13:37:12 | * | thomasross quit (Ping timeout: 268 seconds) |
13:37:16 | PMunch | Araq, done: https://github.com/nim-lang/Nim/pull/12817 |
13:37:17 | disbot | ➥ Fix AVR target to define ints properly @11PMunch |
13:37:56 | PMunch | I notice that I'm a bit off the beaten path here :P |
13:38:36 | FromDiscord | <mratsim> ah enu with holes was regarding Zevv issues not atomics, okay |
13:43:39 | * | thomasross joined #nim |
13:45:30 | * | nc-x joined #nim |
13:48:04 | clyybber | mratsim: Yeah, I was referring to the issue that enums werent considered Trivial for Atomics |
13:48:29 | FromDiscord | <mratsim> Casting is life |
13:48:35 | FromDiscord | <mratsim> Casting is living* |
13:49:50 | FromDiscord | <mratsim> Anyway, the thing is still broken, I need to readup on Software Transactional Memory or change the backoff scheme to something similar to what they use for Wifi and that is probabilistic and doesn't use synchronization. It increases latency and power consumption though |
13:59:40 | * | ng0 quit (Ping timeout: 260 seconds) |
14:03:21 | * | ng0 joined #nim |
14:09:32 | disruptek | Zevv: lemme know when your package manager manager is ready; i wanna use it to build nimph. |
14:17:29 | FromDiscord | <mratsim> ??? Yo dawg I heard you like package manager so I create a package manager to package your package manager? |
14:18:25 | disruptek | there are enough open issues in nimble/nimterop that it's actually hard to build. |
14:20:22 | * | solitudesf quit (Ping timeout: 268 seconds) |
14:21:46 | * | nsf joined #nim |
14:22:15 | clyybber | mratsim: You made me curious, how can one get the compiler to not semfold? And is that a bug? |
14:23:45 | FromDiscord | <Clyybber> @mratsim |
14:26:16 | FromDiscord | <mratsim> I use a proc |
14:26:17 | nc-x | Araq: Fixed `isPartOf()` https://github.com/nim-lang/Nim/pull/12814/files |
14:26:18 | disbot | ➥ Fixed objects being erroneously zeroed out before object construction @11nc-x |
14:29:07 | clyybber | nc-x: Nice |
14:29:11 | * | dddddd joined #nim |
14:34:18 | * | Vladar quit (Remote host closed the connection) |
14:35:39 | * | nc-x38 joined #nim |
14:35:55 | * | nc-x quit (Ping timeout: 260 seconds) |
14:36:44 | nc-x38 | and while I was reading Clyybber's msg, and congratulating myself, the build failed :) |
14:37:06 | nc-x38 | that too without any error https://builds.sr.ht/~araq/job/118193 |
14:37:20 | nc-x38 | found the error |
14:38:49 | nc-x38 | appveyor's interface was the best to find out where build actually failed |
14:39:15 | * | thomasross_ joined #nim |
14:39:15 | * | thomasross is now known as Guest87005 |
14:39:15 | * | Guest87005 quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
14:39:15 | * | thomasross_ is now known as thomasross |
14:39:39 | * | nc-x38 is now known as nc-x |
14:40:12 | * | solitudesf joined #nim |
14:43:34 | * | nc-x quit (Remote host closed the connection) |
14:44:01 | * | PMunch quit (Quit: Leaving) |
14:48:07 | * | thomasross quit (Ping timeout: 268 seconds) |
14:51:13 | * | krux02 joined #nim |
14:53:18 | * | thomasross joined #nim |
14:57:51 | * | ng0_ joined #nim |
14:59:52 | * | ng0 quit (Ping timeout: 260 seconds) |
15:03:13 | FromDiscord | <yewpad> Dark themed Nim docs soon! thanks @araq for taking over |
15:03:51 | FromDiscord | <yewpad> |
15:03:52 | FromDiscord | <yewpad> https://cdn.discordapp.com/attachments/371759389889003532/652163230096949258/unknown.png |
15:03:55 | FromDiscord | <yewpad> 👀 |
15:04:11 | FromGitter | <alehander92> i want a light theme |
15:04:18 | FromGitter | <alehander92> like, white, not just light :O |
15:04:46 | clyybber | alehander92: just buy a lamp? |
15:04:49 | FromDiscord | <yewpad> You can toggle between light and dark |
15:04:50 | FromDiscord | <yewpad> https://cdn.discordapp.com/attachments/371759389889003532/652163473127637043/unknown.png |
15:05:01 | FromGitter | <alehander92> no, i dont mean the current ones |
15:05:09 | FromDiscord | <yewpad> What do you mean? |
15:05:27 | FromGitter | <alehander92> i just want a white, simpler background |
15:05:51 | FromDiscord | <yewpad> For the documentation page(s) |
15:05:52 | FromDiscord | <yewpad> ? |
15:06:17 | clyybber | alehander92: I think you really are alone with that heretic wish |
15:06:27 | FromDiscord | <yewpad> i don't get it |
15:06:28 | clyybber | :p |
15:06:41 | clyybber | yewpad: He wants white white, not yellowish white |
15:07:15 | FromGitter | <alehander92> yes for the doc pages |
15:07:28 | FromDiscord | <yewpad> I don't know about you but for me it is all white, like pure white. Maybe I configured my monitor the wrong way or his monitor isn't configured the right way |
15:07:33 | FromGitter | <alehander92> i liked dark backgrounds in the past |
15:07:37 | FromGitter | <alehander92> no its not, look at the css |
15:07:46 | FromGitter | <alehander92> its very slightly not white but its not |
15:08:08 | FromGitter | <alehander92> however these days i dont really dig black backgrounds much, but i know people have prefs |
15:08:34 | FromDiscord | <yewpad> |
15:08:34 | FromDiscord | <yewpad> https://cdn.discordapp.com/attachments/371759389889003532/652164414035853334/unknown.png |
15:09:15 | disruptek | install a browser extension like stylebot. |
15:09:18 | clyybber | FFFFFF is what he wants |
15:09:26 | clyybber | disruptek: or stylus |
15:09:34 | FromGitter | <alehander92> yeah thats not #fff |
15:09:38 | disruptek | dark reader makes me happy. |
15:09:53 | FromGitter | <alehander92> yeah no problem, i just wondered if its a more general scheme change |
15:09:53 | FromDiscord | <yewpad> The difference between FFFFFF and FCFCFC is pretty much non-existent lol |
15:10:19 | clyybber | you start to notice it after training your eyes on the blank sun |
15:10:34 | FromGitter | <alehander92> yewpad sorry it is |
15:10:43 | FromGitter | <alehander92> you underestimate people's eyes :P |
15:10:47 | disruptek | how are these two lines ambiguous? |
15:10:51 | disruptek | + proc add*[K: string, V](group: Group[K, V]; url: Uri; value: V) |
15:10:56 | disruptek | + proc add*[K: Uri, V](group: Group[K, V]; url: Uri; value: V) |
15:10:57 | FromGitter | <alehander92> we tend to notice very small differences with enough habit |
15:11:02 | FromDiscord | <yewpad> Yeah, welp, just install an extension that re-styles the page |
15:11:23 | * | FromGitter quit (Read error: Connection reset by peer) |
15:11:41 | * | FromGitter joined #nim |
15:11:48 | disruptek | i can sorta understand why nim doesn't accept it, but i think it's a defect. |
15:11:52 | * | Vladar joined #nim |
15:12:09 | FromGitter | <alehander92> disruptek we dont see any lines |
15:12:23 | disruptek | really? |
15:12:26 | FromGitter | <alehander92> ah its the bridge thing |
15:12:27 | FromGitter | <alehander92> sorry |
15:12:42 | disruptek | should i repaste? |
15:12:49 | FromDiscord | <yewpad> @araq: https://github.com/nim-lang/Nim/pull/12816 |
15:12:49 | FromDiscord | <yewpad> https://cdn.discordapp.com/attachments/371759389889003532/652165484048810011/3ii7md.png |
15:12:50 | disbot | ➥ feature dracula themed doc 👑11Araq |
15:13:04 | FromGitter | <alehander92> yewpad well .. thats what i can tell you about your theme :P |
15:13:13 | * | Hideki_ quit (Remote host closed the connection) |
15:14:27 | * | Hideki_ joined #nim |
15:14:37 | clyybber | disruptek: Looks like a bug to me |
15:14:47 | clyybber | (well, depending on what Uri is) |
15:15:24 | FromDiscord | <yewpad> idc, i just need a dark theme because i can't stand this white at nighttimes anymore and i don't like the extensions that change everything to something dark the naive way. i like if something looks aesthetically pleasing |
15:17:01 | FromDiscord | <yewpad> maybe i can build in a contrast mode of some sort? |
15:17:01 | FromDiscord | <yewpad> idk |
15:17:02 | FromGitter | <alehander92> disruptek i cant reproduce |
15:17:18 | disruptek | can you share your attempt so we can hack at it? |
15:17:34 | FromGitter | <alehander92> yewpad ok, i was just looking at if people did want more themes |
15:18:06 | FromGitter | <alehander92> http://ix.io/23CM |
15:18:28 | disruptek | thanks 😉 |
15:18:40 | FromGitter | <alehander92> i mean i have to pass [string,int] to constructor |
15:18:47 | FromGitter | <alehander92> but i think thats a separate thing |
15:19:11 | * | Hideki_ quit (Ping timeout: 265 seconds) |
15:21:32 | disruptek | https://play.nim-lang.org/#ix=23CN |
15:21:52 | disruptek | curious. |
15:23:46 | FromGitter | <alehander92> didnt you expect that |
15:24:01 | disruptek | lol yes. |
15:24:07 | disruptek | but it's not working in nimph. |
15:24:13 | FromGitter | <alehander92> ah |
15:24:29 | disruptek | maybe it's my compiler. |
15:25:11 | * | Hideki_ joined #nim |
15:27:42 | FromDiscord | <yewpad> "oversubscribed"? :DDD |
15:27:42 | FromDiscord | <yewpad> https://cdn.discordapp.com/attachments/371759389889003532/652169229176406016/unknown.png |
15:29:10 | disruptek | this is so odd. |
15:32:13 | clyybber | disruptek: Not your compiler? |
15:32:25 | disruptek | nah. |
15:33:39 | disruptek | you know what it is? |
15:34:00 | clyybber | nah. |
15:34:14 | disruptek | i think i do. |
15:34:17 | FromGitter | <alehander92> its RUSSIA |
15:34:21 | clyybber | narimiran: Whats left to kill of appveyor and travis? |
15:34:35 | narimiran | clyybber: why would you want to do that? |
15:34:51 | clyybber | 2 much wait no fun 4 me |
15:35:02 | narimiran | they don't run on PRs anymore |
15:35:14 | clyybber | https://github.com/nim-lang/Nim/pull/12781 |
15:35:15 | disbot | ➥ arc devel 👑11Araq |
15:35:17 | narimiran | only on commits to our branches |
15:35:22 | clyybber | Ah |
15:35:41 | narimiran | yeah, it is in "araq-arc-devel" branch |
15:35:49 | narimiran | "3rd party" PRs don't have that |
15:35:56 | clyybber | I see, thanks |
15:36:12 | clyybber | So that PR is technically green as a PR and can be merged by you now? |
15:36:16 | disruptek | i thought maybe i wrote Url instead of Uri, but, seems like that ain't it. |
15:36:33 | FromGitter | <alehander92> but whats your error |
15:36:34 | narimiran | yeah, but what's the rush? :) |
15:36:44 | * | ng0_ quit (Ping timeout: 260 seconds) |
15:37:16 | narimiran | travis will be done in less than 10 minutes |
15:37:30 | clyybber | appveyor hasn't started yet :( |
15:38:17 | disruptek | this makes absolutely no sense. |
15:38:33 | * | leorize quit (Quit: WeeChat 2.6) |
15:38:36 | clyybber | disruptek: can you extract a test case or is it a heisenbug? |
15:38:40 | narimiran | clyybber: ok, compromise, i'll merge it once travis is green :) |
15:38:50 | FromGitter | <alehander92> are you editing the right file |
15:39:31 | clyybber | narimiran: \o/ |
15:39:48 | disruptek | now i manually changed it to [K: Uri] ... url: Uri ... and it passes muster, but then i get collision elsewhere. |
15:41:27 | disruptek | oh, that one is my mistake. maybe the other is too. |
15:41:42 | clyybber | so the error message was wrong? |
15:41:54 | disruptek | i think so. |
15:42:26 | disruptek | the problem was that my K type was string, and I was trying to all a Uri method. |
15:42:32 | disruptek | s/all/call/ |
15:42:54 | disruptek | not sure about the original bug yet. |
15:43:53 | disruptek | hmm, /still/ doesn't work. |
15:44:39 | disruptek | i mean, look at this error message: |
15:44:48 | disruptek | /home/adavidoff/git/nimph/src/nimph/thehub.nim(178, 8) Error: ambiguous call; both group.add(group: Group[add.K, add.V], url: Uri, value: V) [declared in /home/adavidoff/git/nimph/src/nimph/group.nim(92, 6)] and group.add(group: Group[add.K, add.V], url: Uri, value: V) [declared in /home/adavidoff/git/nimph/src/nimph/group.nim(107, 6)] match for: (HubGroup, Uri, HubResult) |
15:45:00 | FromGitter | <Willyboar> !search pandoc |
15:45:02 | disbot | https://github.com/nim-lang/Nim/issues/6429 -- 3[Doc gen Feature request] Grid Table ⚫11mratsim 7& 6 more... |
15:45:14 | disruptek | !repo pandoc |
15:45:16 | disbot | https://github.com/jgm/pandoc -- 9pandoc: 11Universal markup converter 15 17425⭐ 2029🍴 7& 29 more... |
15:45:17 | FromGitter | <Willyboar> !repos pandoc |
15:45:19 | disbot | https://github.com/jgm/pandoc -- 9pandoc: 11Universal markup converter 15 17425⭐ 2029🍴 |
15:45:19 | disbot | https://github.com/mszep/pandoc_resume -- 9pandoc_resume: 11The Markdown Resume 15 842⭐ 422🍴 |
15:45:21 | disbot | https://github.com/Wandmalfarbe/pandoc-latex-template -- 9pandoc-latex-template: 11A pandoc LaTeX template to convert markdown files to PDF or LaTeX. 15 1980⭐ 335🍴 7& 27 more... |
15:45:30 | disruptek | pandoc for everyone! |
15:46:11 | FromGitter | <Willyboar> hmmm. no nim lib |
15:47:04 | disruptek | i think the error message is composed wrong, but it might be incorrectly emitted, too. |
15:50:51 | disruptek | https://play.nim-lang.org/#ix=23CW -- working |
15:52:08 | * | Hideki_ quit (Remote host closed the connection) |
15:52:45 | clyybber | so is there a bug? |
15:52:48 | * | Hideki_ joined #nim |
15:52:57 | disruptek | https://play.nim-lang.org/#ix=23CW -- broken! |
15:53:21 | clyybber | narimiran: \o the time has cometh o/ |
15:54:18 | narimiran | clyybber: can all that be squashed, or better not? |
15:54:41 | * | junland quit (Quit: %ZNC Disconnected%) |
15:54:50 | narimiran | well, some of the commits might be useful. on the other hand, there are lots of "wip" and similar |
15:55:55 | * | junland joined #nim |
15:55:59 | clyybber | I think squashing is normal procedure right? |
15:56:03 | narimiran | yep |
15:56:36 | disruptek | you could just hold onto the branch. |
15:56:37 | narimiran | hmmm, some of the commits have [backport] tag |
15:56:41 | disruptek | costs you nothing. |
15:56:46 | narimiran | i'm not touching this :) |
15:57:38 | clyybber | narimiran: Not to worry, those two commits are already in devel |
15:57:48 | narimiran | clyybber: oooh, then ok |
15:59:02 | FromGitter | <alehander92> ` git log | grep WIP | wc -l` 267 |
15:59:10 | FromGitter | <alehander92> i put wip in too many of my commit |
15:59:13 | narimiran | there, merged |
15:59:20 | clyybber | nice, thank you |
15:59:24 | narimiran | and if there's any trouble, i'll just point at you clyybber |
15:59:26 | disruptek | #2724 |
15:59:32 | * | Hideki_ quit (Ping timeout: 276 seconds) |
15:59:33 | clyybber | narimiran: heh |
15:59:40 | disruptek | disbot: you awake? |
15:59:42 | disbot | yep. 😊 |
15:59:46 | disruptek | #2724 |
15:59:48 | disbot | https://github.com/nim-lang/Nim/issues/2724 -- 5Generics + inheritance – type mismatch / dispatch issues @11boydgreenfield; snippet at 12https://play.nim-lang.org/#ix=23CX |
15:59:50 | disruptek | thanks. |
16:00:26 | narimiran | can't somebody volunteer to periodically speak to disruptek, so he doesn't have to talk with his bot? come on guys, it is christmas time! |
16:00:36 | disruptek | #88 |
16:00:38 | disbot | https://github.com/nim-lang/Nim/issues/88 -- 5inheritance for generics does not work 👑11Araq |
16:00:46 | disruptek | now that's an old issue. |
16:01:54 | FromGitter | <alehander92> i can cook him panaguristhe eggs |
16:02:11 | FromGitter | <alehander92> with a bit of a hardware upgrade |
16:02:42 | disruptek | well, (88) snippet works. |
16:03:04 | disruptek | https://play.nim-lang.org/#ix=23CY |
16:03:19 | solitudesf | disbot: you asleep? |
16:03:28 | solitudesf | a fuck |
16:03:39 | disruptek | lol |
16:03:57 | disruptek | i patched your bug eventually, solitudesf. thanks again. |
16:04:08 | disruptek | https://play.nim-lang.org/#ix=23CZ this is 2724. |
16:05:03 | solitudesf | yeah, i checked it out. now i need to find how do i fit it in my workflow. |
16:05:25 | disruptek | tell me. |
16:08:32 | * | Hideki_ joined #nim |
16:08:38 | disruptek | oh, when i pasted the "broken!" link, it was the wrong link. |
16:11:54 | disruptek | uncomment the last line to break: https://play.nim-lang.org/#ix=23D3 |
16:13:19 | * | Hideki_ quit (Ping timeout: 265 seconds) |
16:17:15 | clyybber | hmm |
16:32:00 | * | Hideki_ joined #nim |
16:36:09 | * | Hideki_ quit (Ping timeout: 250 seconds) |
16:59:28 | * | Hideki_ joined #nim |
17:04:24 | * | Hideki_ quit (Ping timeout: 268 seconds) |
17:06:00 | * | thomasross quit (Ping timeout: 265 seconds) |
17:07:59 | * | thomasross joined #nim |
17:09:48 | Araq | clyybber, can we generalize =operation? |
17:10:05 | Araq | looks to me like we can and it's easy |
17:10:10 | * | nsf quit (Quit: WeeChat 2.6) |
17:11:04 | clyybber | =operation? |
17:12:51 | clyybber | Araq: Care to elaborate? |
17:12:51 | Araq | yeah |
17:13:34 | Araq | proc `=yournameHere`(x: T; otherargs) # attach to T like the other existing =hooks |
17:13:56 | clyybber | ah. |
17:13:59 | Araq | and then it's lifted for objects, case objects, arrays of objects yadda yadda |
17:14:31 | FromDiscord | <yewpad> @araq: https://github.com/nim-lang/Nim/pull/12816 |
17:14:32 | disbot | ➥ feature dracula themed doc 👑11Araq |
17:15:08 | Araq | yewpad: somebody needs to confirm it works and looks nice |
17:16:29 | clyybber | how do I build the docs? |
17:16:33 | Araq | and what's var(--secondary-background) ? |
17:16:37 | Araq | new CSS? |
17:16:45 | FromGitter | <alehander92> but how would one use\ |
17:16:46 | Araq | clyybber, 'koch docs' |
17:16:50 | FromGitter | <alehander92> the custom =name |
17:17:06 | clyybber | hmm, I did koch doc |
17:17:10 | clyybber | and it works too |
17:17:11 | clyybber | I think |
17:17:16 | Araq | alehander42: `=hook`(x) |
17:17:25 | Araq | call it with backticks if you have to |
17:17:50 | FromGitter | <alehander92> but why not a normal name |
17:18:08 | Araq | clyybber, of "doc", "docs": buildDocs(op.cmdLineRest) |
17:18:10 | Araq | both work |
17:18:14 | clyybber | Ah nice |
17:18:30 | Araq | alehander42: normal procs are not attached to types |
17:18:31 | FromDiscord | <yewpad> `var(--secondary-background)` is basically the "cheap" version of scss/sass. it's vanilla css where you can define custom variables and use them with `var(--name)` |
17:19:24 | Araq | yewpad: but ... my lynx doesn't know it and I cannot afford to use anything invented after 1980 |
17:19:31 | Araq | just kidding. |
17:19:39 | FromDiscord | <yewpad> lynx? |
17:20:16 | Araq | http://lynx.browser.org/ |
17:20:25 | FromDiscord | <yewpad> lul |
17:20:32 | FromDiscord | <yewpad> never heard of that |
17:20:55 | FromDiscord | <mratsim> wait until you hear about elinks and links2, which support colors :p |
17:20:59 | clyybber | Not to worry, lynx will just ignore it :) |
17:21:12 | clyybber | mratsim: Or emacs :P |
17:21:18 | clyybber | the os |
17:22:05 | FromDiscord | <yewpad> I know that this was probably a joke but the latest release was in 2018. How can it know about the var thingy |
17:22:06 | FromDiscord | <yewpad> https://cdn.discordapp.com/attachments/371759389889003532/652198015133679637/unknown.png |
17:22:41 | FromDiscord | <yewpad> Unless, of course, the var thingy was released just recently |
17:22:45 | FromDiscord | <yewpad> Doubt that though |
17:23:36 | FromDiscord | <yewpad> Can choosenim setup me the devel version of Nim |
17:23:37 | FromDiscord | <yewpad> ? |
17:24:23 | FromGitter | <alehander92> Araq: i see |
17:24:23 | FromDiscord | <yewpad> yup, seems like |
17:24:24 | FromDiscord | <yewpad> cool |
17:24:41 | FromGitter | <alehander92> it still sounds to me like procs on typedesc |
17:24:45 | FromGitter | <alehander92> but probably i am missing something |
17:24:50 | clyybber | No its procs |
17:24:54 | clyybber | but attached to the type |
17:25:00 | clyybber | so when you export the type |
17:25:08 | clyybber | and import it |
17:25:12 | clyybber | you will get them too |
17:26:34 | * | tiorock joined #nim |
17:26:46 | * | tiorock quit (Changing host) |
17:26:46 | * | tiorock joined #nim |
17:26:46 | * | rockcavera is now known as Guest61411 |
17:26:46 | * | tiorock is now known as rockcavera |
17:29:41 | * | Guest61411 quit (Ping timeout: 265 seconds) |
17:30:26 | clyybber | Araq: Confirming that it works! |
17:30:38 | clyybber | looking really slick |
17:30:44 | FromDiscord | <yewpad> hold the phone |
17:30:49 | FromDiscord | <yewpad> testing it too right nw |
17:30:51 | FromDiscord | <yewpad> now |
17:31:24 | clyybber | yewpad: It resets to light mode when I click on `Manual` or `Standard Library` |
17:31:36 | clyybber | Could be thats because im viewing it locally |
17:32:20 | FromDiscord | <yewpad> The script sometimes doesn't get hold of the preference. It sometimes works and sometimes doesn't. Couldn't figure out why, for now, sorry |
17:32:32 | clyybber | hmm, wierd |
17:32:37 | clyybber | I can't search either |
17:32:38 | FromDiscord | <yewpad> I had that too |
17:32:43 | FromDiscord | <yewpad> It is pretty random |
17:33:05 | FromDiscord | <yewpad> Now I didn't change anything besides the styling and **added** some JavaScript |
17:33:14 | FromDiscord | <yewpad> So the search thingy isn't on my behalf |
17:33:40 | clyybber | yeah, my firefox is broken atm |
17:33:47 | clyybber | so probably not your fault :) |
17:35:44 | FromDiscord | <yewpad> Is working (Brave [Chromium], Linux lambda 5.0.0-37-generic #40-Ubuntu SMP Thu Nov 14 00:14:01 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux) |
17:35:44 | FromDiscord | <yewpad> https://cdn.discordapp.com/attachments/371759389889003532/652201451170430977/unknown.png |
17:37:53 | clyybber | I'm on firefox |
17:37:55 | clyybber | linux |
17:38:05 | FromDiscord | <yewpad> Oh yeah, forgot to mention that: I think there is still one or there are two syntax highlighting "categories" I couldn't include in the Dracula version: I think it was ASM and something else. I didn't find any ASM related syntax in the docs so yeah |
17:38:15 | * | Trustable joined #nim |
17:38:38 | FromDiscord | <yewpad> Because the css somewhat had colors for asm syntax |
17:40:29 | FromDiscord | <yewpad> This is the cause why the search doesn't work |
17:40:29 | FromDiscord | <yewpad> https://cdn.discordapp.com/attachments/371759389889003532/652202646115188736/unknown.png |
17:40:36 | FromDiscord | <yewpad> it assumes this is hosted |
17:40:46 | FromDiscord | <yewpad> so it attempts to do some form of request to localhost |
17:40:48 | clyybber | ah, yeah that explains it |
17:41:26 | FromDiscord | <yewpad> and theindex is not being generated |
17:41:38 | FromDiscord | <yewpad> i think you must provide a switch for that in the command line |
17:41:52 | clyybber | I can access the index |
17:41:57 | FromDiscord | <yewpad> yeah |
17:41:57 | Araq | the only thing that is beginning to annoy me is the inline CSS |
17:41:58 | FromDiscord | <yewpad> ? |
17:42:16 | Araq | it's time we use an external .css file IMO |
17:42:20 | FromDiscord | <yewpad> true |
17:42:27 | Araq | then the tests wouldn't require updates either |
17:42:56 | Araq | and we need to deploy dochack.js into the proper outdir already so no complexity is added |
17:43:18 | FromDiscord | <yewpad> before i began work on the dracula theme, i initially thought 'this is f'ed right up how css is included in the docs'. |
17:45:15 | Araq | well I agree. now fix it please |
17:45:25 | disruptek | lol |
17:45:29 | FromDiscord | <yewpad> wa what me? |
17:45:33 | FromDiscord | <yewpad> lol |
17:50:27 | FromGitter | <Varriount> yewpad: The first one to complain about a problem gets the gift of fixing it. :3 |
17:50:45 | FromDiscord | <yewpad> ironic isn't it |
17:50:46 | FromDiscord | <yewpad> lol |
17:50:56 | FromDiscord | <yewpad> not gonna fix that |
17:50:59 | FromGitter | <Varriount> The spirit of the season graces #nim |
17:53:15 | FromGitter | <Willyboar> Someone gets an early xmas gift @yewpad :p |
17:54:10 | FromDiscord | <yewpad> nah nah nah baitin' not working on me lol |
17:54:47 | FromDiscord | <yewpad> baitin' doesn't work lol* |
17:54:58 | FromDiscord | <yewpad> sry, my brain's dead, haven't slept in a while |
17:55:49 | * | Hideki_ joined #nim |
17:56:11 | FromGitter | <Willyboar> Go to sleep. You have a lot of time until next release. |
17:56:19 | FromDiscord | <yewpad> xD |
18:00:18 | * | Hideki_ quit (Ping timeout: 245 seconds) |
18:05:33 | FromGitter | <Varriount> Araq: So, what Big Things are currently being worked on? |
18:05:52 | FromDiscord | <mratsim> gc:arc |
18:06:00 | clyybber | cycle checker |
18:06:07 | FromDiscord | <mratsim> and then it's back to incremental compilation AFAIK |
18:06:20 | FromDiscord | <mratsim> and a proposition for a threading API |
18:06:22 | * | nsf joined #nim |
18:07:07 | clyybber | and if you include works by other ppl then destructor eliding, init eliding, default fields, and the great weave |
18:07:09 | FromDiscord | <mratsim> What is liftLocals doing? https://github.com/nim-lang/Nim/blob/bab5e30972743d9dc343c9c4d3ad06f3645e5741/tests/fields/tfields.nim#L99 from the name I thought it would help me create my own closures but it doesn't seem so |
18:10:50 | FromDiscord | <Rika> Incremental compilation on a language that compiles so quickly already 🤔 kinda exciting |
18:11:17 | * | rockcavera quit (Remote host closed the connection) |
18:11:46 | Araq | Varriount: you're a prophet, you told me to use refcounting + a cycle collector and it looks like we'll get it |
18:13:38 | Araq | mratsim: isn't it obvious? |
18:14:05 | Araq | indeed it's a mechanism for "roll your own" closures |
18:26:39 | FromDiscord | <mratsim> I don't even see how "t" is used there >_> |
18:27:19 | FromDiscord | <mratsim> I just want to write a macro so that I extract all the non-local variables in a "parallel" / "parallel_for" block |
18:27:33 | FromDiscord | <mratsim> this way I can serialize them |
18:28:22 | FromDiscord | <mratsim> removing the liftLocals still make the code produce the same output so I fail to see what it brought |
18:29:03 | Araq | the locals are moved inside the 't' so you can stop and resume the function |
18:29:22 | Araq | but you're right, it's a mechanism for closure iterators, not for ordinary closures |
18:29:59 | FromDiscord | <mratsim> ah, I guess I need a liftNonLocal then |
18:30:31 | FromDiscord | <mratsim> basically I want to replicate "for i in 0||10: echo i" |
18:31:22 | FromDiscord | <mratsim> more like "var a = 10; for i in 0||10: echo(a+i)" |
18:31:58 | FromDiscord | <mratsim> I guess I could use the owner magic macro |
18:32:22 | FromDiscord | <mratsim> I wonder about the compilation time though |
18:34:08 | Araq | I fail to see how that's a "liftNonLocal" |
18:34:13 | Araq | operation |
18:35:28 | FromDiscord | <mratsim> var a is not local to the for loop scope |
18:35:38 | FromDiscord | <mratsim> maybe I'm using wrong vocabulary |
18:36:17 | FromDiscord | <mratsim> to multithread this I need to capture the value of "a" as it's not local to the for loop but defined before |
18:36:25 | FromDiscord | <mratsim> and I need to send it to each thread |
18:38:05 | FromDiscord | <mratsim> so I need to transform this to proc generated_mt_proc(i: int, env: PoorMansClosure) = let a = readFromEnv(env); echo(a+i) (something like this) |
18:47:02 | FromDiscord | <mratsim> seems like "owner" won't help |
18:48:28 | Araq | explicit captures are all the rage these days |
18:48:48 | Araq | https://github.com/nim-lang/Nim/pull/12712 |
18:52:18 | * | Hideki_ joined #nim |
18:54:07 | FromDiscord | <mratsim> If I have too I will but it's very verbose |
18:56:13 | FromDiscord | <mratsim> Ah I have an idea of a reasonable syntax for explicit captures |
18:57:15 | * | Hideki_ quit (Ping timeout: 268 seconds) |
19:02:31 | FromDiscord | <mratsim> yes I'll do it with explicit captures, it will still be way beyond the C++ TBB or Swift Grand Central Dispatch ugly syntax |
19:03:53 | Araq | at least until we figured out a more elegant system |
19:04:25 | Araq | what's wrong with a 'parallel' block btw? inside it you can analyse the locals and it's the idiomatic Nim solution |
19:04:38 | Araq | as macros are not supposed to look "up" in the syntax tree |
19:05:49 | FromDiscord | <mratsim> I don't mind the parallel block |
19:06:10 | FromDiscord | <mratsim> it's analyzing what is locals/what is defined in the outer scope that I want to do |
19:06:28 | FromDiscord | <mratsim> because what is in the outer scope needs to be packaged in tasks |
19:06:46 | FromDiscord | <mratsim> so that it can be shared between threads, or be stealable and so on |
19:07:13 | FromDiscord | <mratsim> maybe I missed an obvious solution |
19:07:35 | clyybber | if its a block |
19:07:43 | clyybber | you could collect all var and let |
19:07:49 | clyybber | so all variable declarations |
19:08:14 | clyybber | and then to check wether its of an outer scope just check that its not in the previously collected set |
19:08:44 | FromDiscord | <mratsim> But I need to design something that collects all symbols used in a block |
19:09:01 | * | wink joined #nim |
19:09:12 | FromDiscord | <mratsim> I'm pretty sure it exists somewhere in the compiler that's why I wanted to piggyback on it |
19:09:23 | FromDiscord | <mratsim> but for now explicit capture will be fine |
19:09:50 | wink | hello. I just tried choosenim and it fails to build on Ubuntu 18.04 - any ideas? https://gist.github.com/winks/7332db98eceb0678cffb95bf7d3ef0b8 |
19:10:15 | wink | "use --verbose" is a bit annoying if you have no means to use it. |
19:11:39 | lqdev[m] | how can I take an enum in a macro and generate a string with all of its possible values? the enum is provided by the user in a nnkIdent |
19:11:55 | lqdev[m] | and the macro is AST-phase (no typed params) |
19:12:08 | Araq | lqdev[m], then it's impossible |
19:12:14 | Araq | wink, do you have GCC installed? |
19:12:29 | Araq | it's the "build-essentials" package for Ubu or something like that |
19:12:34 | wink | Araq: yes, 7.4.0 |
19:12:55 | wink | right. I'll try that one |
19:13:04 | FromDiscord | <mratsim> So I will do macros that do the following transformation: https://gist.github.com/mratsim/4d0ccfb89a0cec3fc12ec60eefa720ec |
19:13:24 | Araq | strange, try the download from https://nim-lang.org/install_unix.html |
19:13:37 | Araq | mratsim: that's my point |
19:13:51 | FromDiscord | <mratsim> @lqdev: with getImpl |
19:13:53 | Araq | the "variables from outer scope" must all be inside your 'parallel' block |
19:14:53 | FromDiscord | <mratsim> they are available, but they are not defined in there. |
19:15:10 | FromDiscord | <mratsim> anyway I'll go with that for now |
19:15:42 | FromDiscord | <mratsim> now I just need to find a name, parallel_for is verbose, parfor is strange, forEach misses the parallel part |
19:17:04 | FromDiscord | <mratsim> ah, I could use for loop macros for in in parallel(0..10) |
19:17:05 | disruptek | race |
19:20:20 | lqdev[m] | @mratsim not possible, I can't have typed parameters |
19:20:25 | lqdev[m] | but I found a workaround |
19:22:31 | clyybber | mratsim: Collecting all symbols in a block is not that hard, just recurse to nnkVarSection/nnkLetSection |
19:23:09 | lqdev[m] | did this for the time being, maybe it can be improved somehow https://github.com/liquid600pgm/euwren/blob/162d4a680247fb7c2b13cb9eff8a6b6081d88507/src/euwren.nim#L884-L901 |
19:23:58 | FromDiscord | <mratsim> @clyyber, I know, I wrote the freshIdent macro that is used everywhere in sugar 😉 |
19:24:28 | FromDiscord | <mratsim> I just don't like reimplementing the compiler as macro |
19:24:49 | disruptek | something we need to get used to. |
19:25:05 | FromDiscord | <mratsim> explicit capturing also has benefits on safety and also on not copying consts |
19:29:23 | * | rockcavera joined #nim |
19:34:21 | lqdev[m] | any ideas on how I could implement the syntax for this? https://github.com/liquid600pgm/euwren/issues/4 |
19:34:43 | lqdev[m] | I was thinking about creating a `[static]` attribute, but then I remembered that's a keyword -_- |
19:37:12 | FromDiscord | <mratsim> you can use [`static`] with quote |
19:37:33 | FromDiscord | <mratsim> quotes allow you to use keywords |
19:37:45 | FromDiscord | <mratsim> very useful for the block keyword and C interop |
19:37:56 | lqdev[m] | yeah, but it looks pretty ugly |
19:38:09 | lqdev[m] | maybe [exStatic] for 'explicit static'? |
19:39:05 | FromDiscord | <mratsim> ecstatic |
19:39:37 | FromDiscord | <mratsim> or just CT? |
19:39:50 | FromDiscord | <mratsim> or if it's for a constant, use constant or immut |
20:09:40 | * | narimiran quit (Ping timeout: 265 seconds) |
20:12:13 | * | nsf quit (Quit: WeeChat 2.6) |
20:22:10 | lqdev[m] | it's not for a constant, it's for a static method in a class |
20:22:27 | * | NimBot joined #nim |
20:23:28 | disruptek | #12815 |
20:29:49 | clyybber | good job disbot |
20:33:23 | disruptek | don't be rude. |
20:35:27 | clyybber | don't be dude. |
20:36:26 | Zevv | just be nude! |
20:36:47 | disruptek | #12815 |
20:36:48 | disbot | https://github.com/nim-lang/Nim/issues/12815 -- 3No run time checks on illegal values for enum with gaps 🌈11zevv; snippet at 12https://play.nim-lang.org/#ix=23C5 |
20:36:55 | disruptek | aight. |
20:37:47 | Zevv | if nick in coolDudes: nick = "🌈" & nick |
20:38:22 | disruptek | !pull author:clyybber |
20:38:22 | disbot | https://github.com/nim-lang/Nim/pull/12793 -- 5Refactor injectdestructors ☁️11Clyybber 7& 29 more... |
20:38:29 | disruptek | he got his cloud. |
20:43:56 | clyybber | Zevv: Thats the spirit! |
20:44:45 | clyybber | disruptek: nice |
20:50:35 | clyybber | disruptek: Why is the PR red and not purple? |
20:51:25 | disruptek | hmm, it doesn't seem to know it's a pr. |
20:55:04 | planetis[m] | ...I just wonder how long till someone finally bans that forum spammer :-D |
20:55:47 | * | thomasross_ joined #nim |
20:55:47 | * | thomasross quit (Killed (wolfe.freenode.net (Nickname regained by services))) |
20:55:47 | * | thomasross_ is now known as thomasross |
21:02:14 | * | filcuc joined #nim |
21:19:52 | dom96 | which one? |
21:22:22 | FromDiscord | <Joco223> How can I get which arrow key was pressed with `getch()`? I looked online but couldn't find much, calling it again if `ord(getch())` is 0 return 0 again |
21:22:59 | clyybber | Joco223: Arrow keys send escape sequences |
21:23:23 | clyybber | Incidentally I'm working on a lib that does that for you rn |
21:24:44 | clyybber | Joco223: But to answer your question, you must check for '\e' |
21:24:51 | clyybber | And then call getch() again |
21:25:25 | clyybber | and parse the input for '\eOX' or '\e[X' |
21:25:40 | clyybber | Where X is either A, B, C or D depending on which direction was pressed |
21:26:15 | FromDiscord | <Joco223> I suppose \eOX is pressed and \e[X is released? |
21:26:31 | FromDiscord | <Clyybber> Nope |
21:26:43 | FromDiscord | <Clyybber> Older terminals used to sen \eOX when it was pressed |
21:26:48 | FromDiscord | <Clyybber> and something else when released |
21:26:55 | dom96 | You probably want to use a library which abstracts this for you, there is many platform-specific differences |
21:26:57 | FromDiscord | <Clyybber> Some newer ones send \e[X |
21:27:19 | FromDiscord | <Joco223> Ah ok, thanks |
21:27:44 | FromDiscord | <Joco223> I'm just using `terminal` module right now, seems fitting enough (Making a simple terminal text editor btw) |
21:27:57 | FromDiscord | <Clyybber> nice |
21:28:18 | * | Jesin quit (Quit: Leaving) |
21:28:20 | FromDiscord | <Clyybber> If you want I'll let you know when my lib is ready for public consumption |
21:28:22 | dom96 | you might want to make a nice package that abstracts this then :) |
21:28:42 | FromDiscord | <Joco223> Sure |
21:33:21 | * | Jesin joined #nim |
21:34:11 | FromDiscord | <Joco223> Just another thing, how do I compare against '\eOX' and '\e[X'? Just doing `if input == '\eOX'` where input is `input = getch()`, Nim doesn't seem to like that |
21:38:13 | clyybber | Joco223: Because getch returns one char |
21:38:19 | clyybber | You need to collect them |
21:40:09 | FromDiscord | <Joco223> Oooh |
21:56:58 | * | Trustable quit (Remote host closed the connection) |
22:12:24 | * | PMunch joined #nim |
22:12:47 | * | Vladar quit (Quit: Leaving) |
22:15:12 | * | Hideki_ joined #nim |
22:19:28 | * | Hideki_ quit (Ping timeout: 245 seconds) |
22:26:54 | FromDiscord | <treeform> So using Visual Studio Code + nim plugin, but when editing JS files it wants to compile them as C files which causes errors. Is there a way to get the plugin (which uses nimsuggest) to suggest things as if the file was compiled in JS mode? |
22:27:19 | FromDiscord | <treeform> "compile them" for intelisence |
22:34:11 | * | solitudesf quit (Ping timeout: 265 seconds) |
22:36:38 | * | PMunch quit (Remote host closed the connection) |
22:37:23 | Araq | treeform: in your config --define: js |
22:37:57 | FromDiscord | <treeform> Araq, that worked! Thanks! |
22:40:57 | * | pbb quit (Ping timeout: 246 seconds) |
22:44:20 | * | pbb joined #nim |
22:45:08 | * | filcuc quit (Ping timeout: 276 seconds) |
23:13:05 | * | Hideki_ joined #nim |
23:14:56 | disruptek | #12718 |
23:14:57 | disbot | https://github.com/nim-lang/Nim/pull/12718 -- 6Cosmetic compiler cleanup ☁️11Clyybber |
23:15:30 | disruptek | pulls are annoying. |
23:18:17 | * | Hideki_ quit (Ping timeout: 240 seconds) |
23:18:47 | clyybber | disruptek: Whats the problem? |
23:18:49 | clyybber | Rebasing? |
23:18:58 | clyybber | Or did you test the bot? |
23:19:04 | disruptek | no, fixing the bot was annoying. |
23:19:46 | clyybber | ah, but now it works? |
23:20:02 | clyybber | #12793 |
23:20:04 | disbot | https://github.com/nim-lang/Nim/pull/12793 -- 6Refactor injectdestructors ☁️11Clyybber |
23:20:05 | disruptek | yes. |
23:20:06 | clyybber | Nice |
23:20:16 | disruptek | also with random searches that find a pull. |
23:20:20 | disruptek | !search cloning requirement ssh remote |
23:20:21 | disbot | https://github.com/disruptek/nimph/issues/13 -- 5when cloning one of your github packages as a requirement, setup an ssh remote automatically 🧚11disruptek |
23:37:11 | * | abm quit (Read error: Connection reset by peer) |
23:37:59 | * | clyybber is now known as cloudber |
23:42:15 | * | Hideki_ joined #nim |
23:43:42 | FromDiscord | <treeform> Are we doing `x..y/x..<y` ? I just changed all my code to `x .. y/x ..< y` ? |
23:44:08 | FromDiscord | <treeform> because I though the other thing was the standard |
23:45:08 | FromDiscord | <mratsim> @clyyber @Araq, good news, I managed to do a parallelFor macro with a pretty good syntax, including capturing scope. |
23:45:08 | FromDiscord | <mratsim> |
23:45:08 | FromDiscord | <mratsim> Bad news, if I capture, the compiler crashes just after toStrLit in "semAfterMacroCall" |
23:45:08 | FromDiscord | <mratsim> |
23:45:08 | FromDiscord | <mratsim> https://github.com/mratsim/weave/blob/parallel_for/weave/parallel_for.nim#L170 |
23:45:09 | cloudber | treeform: Do what you like more :) |
23:45:31 | FromDiscord | <treeform> cloudber, but I want to do the nim style? |
23:46:00 | cloudber | treeform: The nim style is: don't do x.. y or x ..y |
23:46:30 | cloudber | treeform: I prefer x..y since it feels more "connected" |
23:46:39 | cloudber | which makes sense for a range IMO |
23:46:41 | * | Hideki_ quit (Ping timeout: 265 seconds) |
23:46:52 | cloudber | thats why the compiler for instance is now using that style |
23:48:46 | FromDiscord | <treeform> ok |
23:49:01 | FromDiscord | <treeform> which one does nimpretty pick? |
23:49:14 | cloudber | according to narimiran x .. y |
23:49:38 | cloudber | But I think it should be patched to just do what is more common in the file that it operates on |
23:49:44 | cloudber | or just don't care |
23:50:03 | cloudber | or be configurable |
23:51:41 | FromDiscord | <treeform> I don't want configurable, I want it to be strict. But world isn't about what I want. |
23:54:02 | * | dchem joined #nim |