00:01:41 | * | Jesin joined #nim |
00:25:44 | * | Tanger joined #nim |
00:29:09 | * | j-james joined #nim |
00:31:48 | * | j-james quit (Client Quit) |
00:38:30 | FromDiscord | <ElegantBeef> @guzba what's with the 100 character filename limit in Zippy? š |
00:39:46 | FromDiscord | <ElegantBeef> Is it a limtiation with tarballs and the header? |
00:43:58 | * | j-james joined #nim |
00:45:55 | * | Tlangir joined #nim |
00:48:05 | * | Tanger quit (Ping timeout: 240 seconds) |
01:00:45 | * | wasted_youth2 quit (Quit: Leaving) |
01:04:46 | * | wasted_youth2 joined #nim |
01:09:59 | * | oculux joined #nim |
01:46:56 | * | Cthalupa quit (Ping timeout: 256 seconds) |
01:48:49 | * | Cthalupa joined #nim |
01:53:30 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:53:56 | * | njoseph joined #nim |
01:54:39 | * | abm quit (Read error: Connection reset by peer) |
02:09:25 | FromDiscord | <Avatarfighter> Does anyone know the repository CPS shenanigans are taking place or has the idea of CPS stalled ? |
02:12:19 | Prestige | !repo cps |
02:12:21 | Prestige | :( |
02:16:22 | FromDiscord | <Avatarfighter> Prestige: yeah I know it was taking place in disruptek's repo but now that he is gone I'm afraid that the development of cps will stall |
02:19:37 | FromDiscord | <Avatarfighter> it's such a great concept too I was pretty skeptical/didn't understand its advantages till I went through and read a paper on it lol |
02:20:10 | * | oculuxe joined #nim |
02:21:21 | FromDiscord | <ElegantBeef> Well time to go fork CPS and start working on it š |
02:21:33 | * | oculux quit (Ping timeout: 246 seconds) |
02:22:47 | FromDiscord | <Avatarfighter> @ElegantBeef thanks for volunteering š |
02:23:04 | FromDiscord | <ElegantBeef> Wait... shit |
02:23:11 | FromDiscord | <ElegantBeef> You read the white pages |
02:23:51 | FromDiscord | <Avatarfighter> I'll be your motivator |
02:23:58 | FromDiscord | <Avatarfighter> emotional support for when it makes you cry |
02:26:08 | Prestige | Did he also stop working on/with Nim since he was banned from chat? |
02:27:45 | FromDiscord | <Avatarfighter> Yeah |
02:27:53 | Prestige | dammit.. |
02:35:40 | * | Cthalupa quit (Ping timeout: 256 seconds) |
02:44:08 | * | jess quit (Quit: Leaving) |
02:51:00 | * | a_chou quit (Quit: a_chou) |
02:53:35 | * | NimBot joined #nim |
02:59:04 | FromDiscord | <JSGRANT> In reply to @Scarecrow "is there some lib": Gintro seems pretty mature; Plan to mess with it when my Pinephone finally ships (by the end of the month). |
03:04:56 | FromDiscord | <guzba> @ElegantBeef the basic filename field is limited to 100 characters, however there is a field for a prefix for longer filenames so in reality it should just work. i just kept it simple for a first version and did the basic filename only. if you create an issue it'll remind me to add that support next time i work on zippy stuff |
03:05:17 | FromDiscord | <ElegantBeef> Will make an issue, just hit the issue with mac builds š |
03:05:38 | FromDiscord | <guzba> kk sorry for issue but happy to hear its being used and otherwise working, thats nice |
03:06:12 | FromDiscord | <ElegantBeef> It's fine not like i'm being paid to make it š |
03:09:55 | FromDiscord | <ElegantBeef> Disclaimer: The above isnt sarcasm, i'm not being paid |
03:11:07 | * | Cthalupa joined #nim |
03:11:19 | leorize | @Avatarfighter mratsim said he will continue the work |
03:12:33 | leorize | Prestige: he's in #disruptek if you still wanna chat with him :) |
03:13:10 | Prestige | thanks! |
03:13:13 | FromDiscord | <Avatarfighter> What repo leorize ? |
03:13:30 | leorize | probably still in disruptek's repo |
03:13:34 | FromDiscord | <Avatarfighter> lit |
03:13:35 | leorize | mratsim has commit access there iirc |
03:13:35 | FromDiscord | <Avatarfighter> thanks |
03:13:40 | FromDiscord | <Avatarfighter> Ok thats good |
03:14:19 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/pull/16992 |
03:15:18 | FromDiscord | <ElegantBeef> Am i the only one that prefers `a..(-3)`? |
03:15:27 | leorize | I always use a space :P |
03:16:09 | leorize | why are we keep adding arbitrary stuff into nep1? :P |
03:16:18 | FromDiscord | <flywind> I think using a space is less error prone too. |
03:16:52 | FromDiscord | <flywind> maybe should add that to contributing guide |
03:17:17 | FromDiscord | <flywind> But we should figure out which one is preferred. |
03:18:04 | FromDiscord | <ElegantBeef> I'm all about consistancy so i prefer not having spaces just cause operations are being done š |
03:18:39 | leorize | consistency and nim, pick one |
03:26:23 | FromDiscord | <konsumlamm> oof |
03:32:54 | * | j-james quit (Quit: WeeChat 3.0) |
03:49:03 | * | muffindrake quit (Ping timeout: 260 seconds) |
03:50:57 | * | muffindrake joined #nim |
03:59:00 | * | Cthalupa quit (Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in) |
04:00:18 | * | a_chou joined #nim |
04:07:54 | * | Cthalupa joined #nim |
04:22:25 | * | sz0 quit (Ping timeout: 240 seconds) |
04:22:37 | * | kwilczynski quit (Read error: Connection reset by peer) |
04:22:45 | * | robertmeta quit (Ping timeout: 264 seconds) |
04:23:32 | * | kwilczynski joined #nim |
04:23:44 | * | sz0 joined #nim |
04:25:46 | * | robertmeta joined #nim |
04:30:13 | * | j-james joined #nim |
04:35:28 | * | cornfeedhobo quit (Quit: ZNC - https://znc.in) |
04:37:47 | * | kwilczynski quit (*.net *.split) |
04:37:47 | * | wasted_youth2 quit (*.net *.split) |
04:37:47 | * | waleee-cl quit (*.net *.split) |
04:37:48 | * | grobe0ba quit (*.net *.split) |
04:37:48 | * | synthmeat quit (*.net *.split) |
04:37:48 | * | ryanhowe quit (*.net *.split) |
04:37:48 | * | FromGitter quit (*.net *.split) |
04:38:11 | * | wasted_youth2 joined #nim |
04:40:45 | * | casaca quit (Ping timeout: 264 seconds) |
04:42:16 | * | kwilczynski joined #nim |
04:42:16 | * | waleee-cl joined #nim |
04:42:16 | * | grobe0ba joined #nim |
04:42:16 | * | synthmeat joined #nim |
04:42:16 | * | ryanhowe joined #nim |
04:42:16 | * | FromGitter joined #nim |
04:43:06 | * | kwilczynski quit (Max SendQ exceeded) |
04:45:13 | * | kwilczynski joined #nim |
04:45:40 | * | Avatarfighter[m] quit (Ping timeout: 260 seconds) |
04:45:57 | * | Clonkk[m] quit (Ping timeout: 246 seconds) |
04:45:57 | * | Avahe[m] quit (Ping timeout: 246 seconds) |
04:46:09 | * | MTRNord quit (Ping timeout: 260 seconds) |
04:46:09 | * | j-james[m] quit (Ping timeout: 260 seconds) |
04:46:09 | * | planetis[m] quit (Ping timeout: 260 seconds) |
04:46:09 | * | GitterIntegratio quit (Ping timeout: 260 seconds) |
04:46:18 | * | FlammableDuck[m] quit (Ping timeout: 246 seconds) |
04:46:18 | * | Zoom[m] quit (Ping timeout: 246 seconds) |
04:46:19 | * | silvernode[m] quit (Ping timeout: 272 seconds) |
04:46:19 | * | himup[m] quit (Ping timeout: 272 seconds) |
04:46:26 | * | unclechu quit (Ping timeout: 240 seconds) |
04:46:39 | * | antholop[m] quit (Ping timeout: 246 seconds) |
04:46:44 | * | lnxw37d4 quit (Ping timeout: 265 seconds) |
04:46:50 | * | cadmium[m] quit (Ping timeout: 264 seconds) |
04:46:55 | * | spiderstew joined #nim |
04:47:04 | * | BitPuffin quit (Ping timeout: 260 seconds) |
04:47:12 | * | lqdev[m]3 quit (Ping timeout: 265 seconds) |
04:47:16 | * | reversem3 quit (Ping timeout: 268 seconds) |
04:48:24 | * | jaens[m] quit (Ping timeout: 240 seconds) |
04:48:26 | * | liblq-dev quit (Ping timeout: 240 seconds) |
04:48:26 | * | stisa[m] quit (Ping timeout: 240 seconds) |
04:48:39 | * | vycb[m] quit (Ping timeout: 265 seconds) |
04:48:40 | * | i_use_arch_btw[m quit (Ping timeout: 265 seconds) |
04:48:40 | * | leorize[m] quit (Ping timeout: 265 seconds) |
04:48:47 | * | spiderstew_ quit (Ping timeout: 256 seconds) |
04:49:44 | * | vindaar[m] quit (Ping timeout: 240 seconds) |
04:49:45 | * | BauxnaMatrix[m] quit (Ping timeout: 240 seconds) |
04:50:21 | * | wiltzutm[m] quit (Ping timeout: 268 seconds) |
04:50:21 | * | oswin[m] quit (Ping timeout: 268 seconds) |
04:50:21 | * | jk13579[m] quit (Ping timeout: 268 seconds) |
04:50:21 | * | ee7[m] quit (Ping timeout: 268 seconds) |
04:50:21 | * | awici[m] quit (Ping timeout: 268 seconds) |
05:00:54 | * | rockcavera quit (Remote host closed the connection) |
05:05:11 | Prestige | I prefer a space there as well |
05:05:50 | FromDiscord | <ElegantBeef> And i prefer spacing you so look where we're at now |
05:06:37 | * | MTRNord joined #nim |
05:06:49 | Prestige | We've grown so far apart beef |
05:07:28 | * | j-james[m] joined #nim |
05:07:29 | * | Avatarfighter[m] joined #nim |
05:07:34 | * | planetis[m] joined #nim |
05:08:36 | FromDiscord | <ElegantBeef> You deserve better |
05:08:53 | FromDiscord | <ElegantBeef> Someone that respects you for your empirically wrong opinions |
05:09:18 | * | silvernode[m] joined #nim |
05:09:19 | * | himup[m] joined #nim |
05:09:40 | * | cadmium[m] joined #nim |
05:10:45 | * | antholop[m] joined #nim |
05:10:48 | Prestige | You're such a romantic |
05:11:05 | FromDiscord | <ElegantBeef> I'm not roman but i do have a tick |
05:11:12 | * | lnxw37d4 joined #nim |
05:11:16 | * | unclechu joined #nim |
05:11:53 | * | Clonkk[m] joined #nim |
05:11:54 | * | Zoom[m] joined #nim |
05:11:55 | * | FlammableDuck[m] joined #nim |
05:12:01 | * | Avahe[m] joined #nim |
05:12:35 | Prestige | What are you working on these days? |
05:13:06 | FromDiscord | <ElegantBeef> Putting off working on linerino, and trying to get my unity build system fully functional |
05:14:42 | * | vycb[m] joined #nim |
05:14:43 | * | liblq-dev joined #nim |
05:14:44 | * | stisa[m] joined #nim |
05:14:44 | * | lqdev[m]3 joined #nim |
05:14:48 | * | leorize[m] joined #nim |
05:14:58 | Prestige | Looking forward to hearing about it more |
05:15:02 | * | BauxnaMatrix[m] joined #nim |
05:15:02 | * | vindaar[m] joined #nim |
05:15:16 | FromDiscord | <ElegantBeef> About what more? |
05:17:10 | Prestige | Your game |
05:19:17 | * | awici[m] joined #nim |
05:19:17 | * | ee7[m] joined #nim |
05:19:19 | * | jk13579[m] joined #nim |
05:19:23 | * | wiltzutm[m] joined #nim |
05:22:29 | * | BitPuffin joined #nim |
05:24:11 | * | i_use_arch_btw[m joined #nim |
05:24:56 | * | jaens[m] joined #nim |
05:24:59 | * | reversem3 joined #nim |
05:25:41 | * | oswin[m] joined #nim |
05:25:59 | FromDiscord | <mattrb> Any thoughts for how I could get compilation time down on this? Currently sitting at 25s on my machine https://play.nim-lang.org/#ix=2OUy |
05:29:43 | FromDiscord | <Rika> use less templates/macros xd but no i dont think you can otherwise |
05:33:14 | saem | Which version of the compiler? |
05:33:35 | saem | Easy win could come from using a nightly in case there are optimizations hanging around. |
05:38:41 | FromDiscord | <mattrb> In reply to @saem "Which version of the": Currently on 1.4.0 |
05:39:18 | FromDiscord | <mattrb> Do you know that there are optimizations, or are you just saying that there might be on the nightlies? |
05:39:30 | saem | It's a guess |
05:40:55 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
05:41:02 | * | njoseph joined #nim |
05:46:22 | FromDiscord | <ElegantBeef> no harm in `choosenim update devel` followed by `choosenim devel`:D |
05:52:50 | * | casaca joined #nim |
06:02:52 | * | narimiran joined #nim |
06:05:55 | * | a_chou quit (Remote host closed the connection) |
06:06:12 | FromDiscord | <mattrb> Only did one attempt on devel, but that resulted in 27s :p |
06:07:56 | FromDiscord | <Rika> get a better machine xd |
06:07:57 | leorize | that's a lot of templates |
06:08:01 | FromDiscord | <Rika> (im joking) |
06:09:56 | leorize | @mattrb any reason why you're using staticFor? |
06:11:23 | FromDiscord | <mattrb> I wanted to build this LUT at compile-time so that each of the procs could be optimized. I was struggling to find a way to do that, and this was the approach that mratsim@ suggested. Otherwise the compiler complained that the values weren't available at compile-time |
06:12:43 | leorize | shouldn't a normal for-loop work? |
06:13:25 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:13:30 | FromDiscord | <Rika> didnt he just say it didnt work |
06:14:06 | leorize | my point is that it should :/ |
06:14:24 | leorize | but if mratsim told you to do so he probably filed a bug somewhere |
06:15:39 | leorize | the amount of template instantiations here are exponential |
06:16:38 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2OUM |
06:19:16 | leorize | I'm afraid there's no better way to clean it unless you managed to reduce the amount of templates |
06:21:09 | FromDiscord | <mattrb> At the end of the day, I'd like that array to have ~4096 unique procs all at compile-time so that I don't need to parse as much of the instruction at runtime. Do you happen to know of another way to do that? I used templates because it seems to accomplish what I want, but I definitely don't know if it's the best way to do that in Nim |
06:21:37 | FromDiscord | <Rika> you want less runtime cost, you pay for it in compiletime cost |
06:23:11 | FromDiscord | <mattrb> Yeah as always, but 25s at compile-time seems a little extreme considering it's only generating <4096 procs that effectively do nothing. I figured there was something I was doing that was making that worse |
06:23:39 | FromDiscord | <ElegantBeef> You could always try tcc for your debug builds and gcc for release |
06:23:42 | FromDiscord | <ElegantBeef> Actually nvm |
06:23:44 | FromDiscord | <ElegantBeef> I'm dumb |
06:24:18 | FromDiscord | <Rika> In reply to @mattrb "Yeah as always, but": i thought it was impressive |
06:24:19 | leorize[m] | does your template ever create two procs that are the same? |
06:24:36 | FromDiscord | <ElegantBeef> Though compared to vlang's demo test, it actually did turn it from a slow project that wasnt really compileble to something very compilable |
06:25:07 | FromDiscord | <mattrb> Yeah it's going to be a decent amount smaller than 4096. There will be duplicates |
06:25:27 | leorize[m] | then maybe static generics would help |
06:25:41 | leorize[m] | since the compiler would remember every instantiation |
06:26:07 | leorize[m] | make the proc themselves generic, not the template :p |
06:26:24 | FromDiscord | <mattrb> Do you mind giving me a little demo of that or linking me to some documentation? |
06:26:49 | FromDiscord | <ElegantBeef> Speaking of generics Pmunch's generics from his fosdem talk was very cool passing in a w/h but never actually storing them anywhere to differentiate types |
06:32:00 | FromDiscord | <mattrb> This is what you're referring to? https://nim-lang.org/docs/manual.html#special-types-static-t |
06:32:57 | leorize | yea, but you can use them as generic parameters too, like: `[Pre, Add: static bool]` |
06:39:14 | leorize | I tried https://play.nim-lang.org/#ix=2OUP |
06:39:20 | leorize | still takes a very long time though |
06:39:57 | leorize | I suppose this form of looping is just slow |
06:40:17 | FromDiscord | <Rika> well its unrolling |
06:40:23 | leorize | IC would help once 1.6 is released |
06:40:50 | FromDiscord | <mattrb> In reply to @leorize "I tried https://play.nim-lang.org/#ix=2OUP": Hey well if nothing else, it _looks_ nicer imo |
06:41:49 | FromDiscord | <mattrb> Is there somewhere I can see a nim roadmap? |
06:42:07 | leorize | ask @Araq |
06:42:21 | FromDiscord | <mattrb> Or more specifically for this case, is IC a feature that's expected in 1.6, and is there any sort of rough eta for that? |
06:42:27 | leorize | I think there might be a way out for you |
06:42:31 | leorize | IC is expected in 1.6 |
06:42:51 | FromDiscord | <mattrb> I was looking around for nim ic earlier, but I just found a bunch of old github issues that are still open because ic is challenging :p |
06:44:39 | leorize | if you build the array manually via a macro it might be faster |
06:44:56 | leorize | but the syntax is not as friendly... |
06:45:40 | leorize | @mattrb afaik Araq said IC will be the feature of 1.6. From there on it'll be bugfixes |
06:46:01 | FromDiscord | <mattrb> What would that look like? Do you mind making an example for one of the instructions and I'll decide if it's worth it to copy across to all of them? š¬ |
06:46:43 | FromDiscord | <mattrb> Awesome. I'm still pretty new to the Nim world. Is there a rough eta for 1.6 considering we're on 1.4.2 right now, or is that in the distant future? |
06:47:05 | leorize | 1.6 is the next minor release |
06:47:51 | leorize | 1.x where x is odd then it's a development version, where x is even then it's a stable release |
06:50:31 | FromDiscord | <mattrb> Ah gotcha, thanks. Looks like about a 6 month cycle for each of the last 2 stable minor releases, so maybe another couple months on 1.6 if that can reasonably be extrapolated |
06:54:42 | * | cornfeedhobo joined #nim |
06:59:18 | * | krux02 joined #nim |
06:59:36 | leorize | @mattrb here you go: https://play.nim-lang.org/#ix=2OUU |
07:00:02 | leorize | 1.743s on the playground |
07:00:22 | leorize | the syntax is horrible and there are probably ways to make it prettier |
07:00:25 | leorize | but I gtg now |
07:00:28 | leorize | have fun |
07:00:37 | FromDiscord | <mattrb> Tyvm š |
07:05:12 | FromDiscord | <mattrb> sent a long message, see https://paste.rs/QAv |
07:13:45 | * | j-james quit (Ping timeout: 264 seconds) |
07:33:13 | * | liblq-dev quit (Quit: authenticating) |
07:33:20 | * | liblq-dev joined #nim |
07:49:19 | * | azed joined #nim |
07:49:27 | * | PMunch joined #nim |
07:54:50 | saem | @Araq: read over the nkError outline, I'm wondering would it be beneficial to have nkError node either be mostly an ID into a table that stores the rest of the data or have an index of the error nodes? My tired brain is thinking that it might simplify things wherein a pass can fill up errors and then at the end of process module or something we just output the ones it's accumulated thus far. The other thought was for |
07:54:50 | saem | propagating errors up, reduction/inheritance, but I think that's mostly from not seeing enough error cascade prevention examples. |
07:56:10 | ForumUpdaterBot | New thread by Miran: Nim 1.2.10 RC and 1.4.4 RC, see https://forum.nim-lang.org/t/7494 |
07:58:35 | * | haxscramper joined #nim |
08:00:33 | * | azed quit (Quit: WeeChat 3.0) |
08:03:18 | FromGitter | <Araq> saem: the idea of nkError is to make the error handling simpler |
08:04:00 | FromGitter | <Araq> and it already improved some of the compiler's error messages, so that works ok |
08:04:21 | PMunch | Hmm, for C data structures that I have defined in Nim I should use importc right? And that will make sure that the fields have the same alignment and sizes? |
08:06:11 | FromGitter | <Araq> yes, in general. |
08:06:56 | PMunch | In general? |
08:07:35 | PMunch | With that I can skip fields as well right? |
08:07:41 | PMunch | Like not including them at all |
08:07:53 | FromGitter | <Araq> there are two ways: one is to 'importc' from a header file, the other is get the layout right yourself, don't use the header and wrap the binary DLL instead |
08:08:02 | PMunch | Currently I have a bunch of pointers to structs I don't care about just stored as "pointer" |
08:08:28 | FromGitter | <Araq> if you import from a header file there is little that can go wrong as Nim produces an `#include header` and not much else |
08:08:39 | PMunch | Well I have to use the headers because I'm compiling a DLL for another program |
08:09:16 | PMunch | But I've been going with the "declare all the fields myself and make sure the layout is right" |
08:09:21 | PMunch | Which is quite tricky |
08:09:45 | PMunch | Has been causing some issues.. |
08:10:15 | FromGitter | <Araq> if you don't access the fields you only have to get sizeof and alignment right |
08:10:19 | FromGitter | <gogolxdong> Anyone met errors `C:\Users\asus\nimcache\manual_experimental_d\manual_experimental\manual_experimental_snippet_102.nim(21, 1) Error: attempting to call undeclared routine: 'match'` when using ./koch doc to generate docs. |
08:10:34 | PMunch | It's still a bit annoying that there is no dead simple way to convert a lot of C code into wrappers that is robust enough to work well for real projects |
08:11:07 | FromGitter | <Araq> well but there is |
08:11:11 | FromGitter | <Araq> use `.header` |
08:11:27 | FromGitter | <Araq> I don't like it but it surely is simple to use |
08:11:37 | FromGitter | <Araq> and there is little that can go wrong |
08:11:41 | PMunch | @Araq, "only" :P Between versions they added a field in the middle of a struct. Which just caused my program to silently fail until I figured out that my alignment was off |
08:11:47 | PMunch | .header? |
08:12:16 | FromGitter | <Araq> type Foo {.header: "foo.h".} = object ## you don't need to declare fields here at all |
08:12:24 | PMunch | I meant converting a bunch of C header files into objects/procs with importc. Similar to what c2nim does, but that handles macros and all the oddities of C a bit better |
08:12:35 | PMunch | Ah well, I need to access the fields |
08:12:35 | FromGitter | <Araq> @gogolxdong I think that's a tiny regression |
08:12:53 | PMunch | And for this project for example I didn't even know where to find the fields |
08:13:06 | FromGitter | <haxscramper> @gogolxdong my guess is that it is related to recent renaming of `match` macro to ` `case` ` |
08:13:07 | FromGitter | <Araq> `.header` does support fields |
08:13:20 | FromGitter | <Araq> if you need them, add them to your declaration |
08:13:35 | PMunch | So it would've been helpful to have generated Nim structs I could walk through. Instead of having to navigate through the C sources and porting all the structs I needed over |
08:13:57 | PMunch | Yeah that would definitely have been better than my complete approach |
08:14:13 | FromGitter | <gogolxdong> maybe, it's been a while. |
08:14:19 | PMunch | But it would still be nice to have the full structs defined so I could go looking for the interesting parts without leaving Nim code |
08:15:38 | PMunch | The perfect workflow would be something like clone C project -> run magic program -> have complete Nim wrapper that I can look through and use in my code |
08:15:51 | PMunch | With little to no human interaction |
08:17:00 | PMunch | But that might require interaction with things like ./configure or CMake to make sure that all the defines are correct |
08:25:34 | * | vicfred quit (Ping timeout: 272 seconds) |
08:27:54 | FromGitter | <gogolxdong> That's what have been trying for the past serveral months. |
08:34:38 | FromGitter | <gogolxdong> I was trying to convert FFmpeg to Nim |
08:37:14 | PMunch | Yeah it's pretty hard to wrap big C things.. |
08:37:32 | PMunch | But the complexity of parsing C files is huge unfortunately |
08:38:06 | PMunch | I wish there was a way to just ask GCC for the information we need. I mean it must know what symbols exists and what their signatures are at some point, right? |
08:39:26 | PMunch | Hey @Araq, with --gc:arc/orc what is the story with nimrtl for DLLs? |
08:42:28 | FromGitter | <gogolxdong> I used nimterop as a start point. |
08:49:19 | krux02 | PMunch, I think you can do that with clang |
08:49:55 | krux02 | clang has a pluginapi to extend the language with some features. As fas as I know with full access to the AST. |
08:50:35 | krux02 | So maybe you can write a clang plugin that compiles C to Nim. |
08:57:13 | PMunch | Oooh, that would be amazing |
08:57:29 | FromGitter | <gogolxdong> https://play.nim-lang.org/#ix=2OVj @PMunch that's what I got. |
09:00:08 | PMunch | @gogolxdong, what's that? |
09:04:09 | FromGitter | <gogolxdong> It finds all references the example fflay.c of FFmpeg uses , and put them in a single file in topo sort ,then compile to Nim with treesitter part of nimterop. |
09:05:19 | PMunch | Well this looks interesting: https://github.com/hlandau/compex |
09:10:09 | PMunch | Fairly small project, should be easy enough to modify it to just output all types and include some type information |
09:13:30 | * | vicfred joined #nim |
09:14:47 | FromGitter | <gogolxdong> but alose have to translate functions one by one with c2nim, because it's very likely that c2nim doesn't compile such a big single C file to Nim all at once. |
09:14:51 | * | narimiran quit (Quit: leaving) |
09:19:23 | haxscramper | I haven't used libclang for actually *rewriting* C code to nim, but I think you can get fully semchecked AST |
09:20:12 | haxscramper | Though `libclang` is better suited for writing wrapper generators than full code analysis, so I'm not sure if it has all the necessary information |
09:20:31 | Yardanico | yeah, for example Zig uses libclang to translate C code into Zig |
09:20:39 | Yardanico | although Zig is arguably closer to C than Nim |
09:20:55 | haxscramper | In general I see almost to reason to convert C code to nim |
09:21:05 | haxscramper | For it to be compiled back to C again |
09:21:22 | haxscramper | s/to reason/no reason/g |
09:21:32 | Yardanico | yeah, you're right |
09:38:55 | * | muffindrake quit (Ping timeout: 272 seconds) |
09:54:10 | PMunch | Yeah I don't want to convert C to Nim |
09:54:16 | * | jess joined #nim |
09:54:24 | PMunch | I just want to extract the type information and procedure signatures |
10:22:10 | * | abm joined #nim |
10:34:26 | * | muffindrake joined #nim |
10:41:57 | Oddmonger | do you know a software which can define graphically trees relations, with an output format which could be used by num data types ? |
10:47:41 | FromDiscord | <no name fits> R? |
10:48:23 | Oddmonger | hum maybe |
10:48:26 | FromDiscord | <no name fits> Scratch that, I have no idea |
10:48:48 | FromDiscord | <no name fits> I actually have no idea if R supports relational stuff |
10:49:58 | haxscramper | Oddmonger: are you looking for a graph/tree drawing software (I'm just not sure if I understand the question correctly) |
10:50:02 | FromDiscord | <no name fits> It does seem to support the notion of objects though |
10:50:37 | Oddmonger | haxscramper: teh use case would be to describe relations in a crafting system of a game |
10:50:37 | FromDiscord | <no name fits> https://rdrr.io/cran/ape/man/write.tree.html |
10:51:56 | Oddmonger | may be this one: http://strlen.com/treesheets/ |
10:51:59 | FromDiscord | <no name fits> I mean you could probably write your own in Nim |
10:52:20 | haxscramper | So you have a graph of crafting recipes, and want to show relationship tree for them? graphviz can used as a library for graph layout, there is also an `ogdf` |
10:52:47 | haxscramper | Graphviz solves graph layout for you, but drawing can be done in any way |
10:52:51 | Oddmonger | yes i could check the output with graphviz |
11:04:43 | Yardanico | all pkgs that directly and indirectly depend on cligen |
11:04:44 | Yardanico | https://svgshare.com/s/TtP |
11:06:38 | haxscramper | I realized that if I put haxdoc on nimble now we would get max dependency depth of 8 |
11:06:40 | PMunch | Hmm, TreeSheets looks interesting |
11:06:44 | PMunch | Just as a program in general |
11:07:58 | haxscramper | Yardanico: how many packages depend on `nimble` or `compiler`? |
11:08:25 | Yardanico | https://i.imgur.com/krdJUtc.png |
11:08:41 | Yardanico | https://i.imgur.com/1vOUYrR.png |
11:09:07 | haxscramper | huh, that is surprising |
11:09:20 | haxscramper | I mean that I'm basically one of two people who depends on `compiler` |
11:13:48 | * | Vladar joined #nim |
11:50:20 | haxscramper | How I can determine if error passed to `structuredErrorHook` is a fatal one, or result of `compiles()` check? Severity of the error does seem to be particularly useful because I still have a lot of `Error`-level messages |
12:00:51 | haxscramper | I ended up just checking `config.errorCounter >= config.errorMax` |
12:13:33 | Yardanico | haxscramper: one of the longest paths I found is |
12:13:34 | Yardanico | web3 -> jsonrpc -> chronicles -> jsonserialization -> serialization -> faststreams -> chronos -> bearssl |
12:13:35 | Yardanico | i mean deps |
12:14:05 | Yardanico | but it's conditional ofc |
12:14:17 | Yardanico | or not |
12:14:19 | haxscramper | Maybe I'm missing some dependencies. |
12:14:32 | Yardanico | hmm seems to be correct |
12:14:53 | Yardanico | chronos depends on bearssl unconditionally |
12:15:16 | Yardanico | haxscramper: do you correctly parse requires over multiple lines? |
12:15:26 | Yardanico | like https://github.com/status-im/nim-faststreams/blob/master/faststreams.nimble#L10 |
12:15:49 | haxscramper | Yes, I use nim code parser |
12:16:16 | haxscramper | So for `Call[_, all @args]` I should get all possible placements |
12:16:23 | haxscramper | handled correctly |
12:17:08 | haxscramper | I refactored parser into reusable standalone proc - https://github.com/haxscramper/haxdoc/blob/master/src/haxdoc/compiler_aux.nim#L213 , but this is mostly edge case handling |
12:17:14 | Yardanico | https://i.imgur.com/Vku0VAY.png |
12:18:02 | Yardanico | hmm, how can I return the second longest result with cypher |
12:18:17 | Yardanico | ah "skip" |
12:19:33 | Yardanico | https://i.imgur.com/DmrUJmL.png another long path |
12:23:17 | * | rockcavera joined #nim |
12:40:03 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OWx |
12:40:23 | Yardanico | not returning explicitly is fine |
12:40:29 | Yardanico | that's what "result" is for |
12:40:42 | Yardanico | you can improve performance of your reverse proc by preallocating the result string though |
12:40:45 | Yardanico | since you already know the length |
12:41:01 | FromDiscord | <no name fits> Oh so put a new string in result? |
12:41:47 | Yardanico | yeah |
12:41:55 | FromDiscord | <Rika> result = newString(input.len) at the start or something |
12:41:57 | Yardanico | as the first line in the proc result = newString(input.len) |
12:42:05 | FromDiscord | <Rika> and then you do result[i] = input[i] |
12:42:07 | FromGitter | <Araq> unicode.reverse ? |
12:42:11 | FromDiscord | <Rika> i mean no |
12:42:19 | FromDiscord | <Rika> result[input.len-i] i think |
12:42:31 | FromDiscord | <Rika> araq its as an exercise |
12:42:53 | FromDiscord | <no name fits> In reply to @Araq "unicode.reverse ?": Yeah I'm just trying to learn š |
12:44:25 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OWA |
12:44:37 | FromDiscord | <Rika> yeah |
12:44:40 | FromDiscord | <no name fits> my tests pass at least š |
12:44:46 | FromDiscord | <no name fits> Alright, thanks a lot |
12:44:48 | FromDiscord | <Rika> should be somewhat faster that way |
12:45:02 | FromGitter | <haxscramper> @Araq I need to get semchecked AST, but *before* any implicit transformations - just resolved as many symbols as possible. If I write pre-semcheck pass, it would only operate on untyped AST, and post-chemcheck would only get fully expanded AST. Ideally I would like to have some kind of 'around secmcheck' pass so I would get new node, resolve it, then run semcheck. I need this to correctly index uses of |
12:45:02 | FromGitter | ... templates/macros etc. |
12:45:14 | FromGitter | <haxscramper> Do you have any recommendations on how to do this? |
12:45:14 | FromDiscord | <no name fits> I saw there was a benchmark lib. is there a tutorial to get started with that? |
12:47:13 | FromGitter | <haxscramper> So for example if I have ā ā ```proc main() = ā template test(): untyped = discard ā test()``` ā ā I need to process all nodes in `main()` step-by-step, logging each expansion and each resolved symbol [https://gitter.im/nim-lang/Nim?at=6023d5d155359c58bf3400bd] |
12:47:28 | FromGitter | <Araq> @haxscramper that's why we have the araq-nkerror branch |
12:47:34 | FromGitter | <Araq> it does that |
12:47:41 | FromGitter | <Araq> (more or less) |
12:47:45 | FromGitter | <haxscramper> I need this for an external tool |
12:48:02 | FromGitter | <haxscramper> That injects into compilation process |
12:48:14 | FromGitter | <Araq> so make the external tool use the compiler as an API |
12:49:00 | FromGitter | <haxscramper> yes, I've already done that. What I'm asking is which particular part of a compiler API would be best suite for this kind of task? |
12:49:14 | FromGitter | <haxscramper> I'm looking at `sempass2.nim`, but don't quite see how I can jump in the middle of it |
12:49:21 | FromGitter | <haxscramper> yet |
12:50:11 | FromGitter | <haxscramper> Right now I'm using post-semcheck AST, which is quite good, but I want to get more information about what happened during compilation |
12:51:39 | FromGitter | <Araq> what do you need to know? |
12:53:42 | * | waleee-cl joined #nim |
12:54:17 | FromGitter | <haxscramper> For example above I need to know that `test()` was first resolved to `template test()`, and then expanded into `discard`. Right now I know what it expanded to, but without any particular details of what template was expanded actually |
12:55:24 | FromGitter | <Araq> template/macro expansions leave no trace |
12:55:43 | FromGitter | <Araq> known problem, to be fixed in that they are part of the .rod file (IC support) |
12:55:54 | FromGitter | <Araq> what else? |
12:55:55 | PMunch | By the way @no name fits, Nim typically uses 2 spaces instead of 4 for indentation :) |
12:57:14 | * | Madcotto joined #nim |
12:57:21 | * | Madcotto quit (Connection closed) |
12:57:39 | ForumUpdaterBot | New question by Artem Klevtsov: Performance issue when call isSpaceAscii, see https://stackoverflow.com/questions/66137351/performance-issue-when-call-isspaceascii |
12:59:45 | FromDiscord | <no name fits> In reply to @PMunch "By the way @no": Oh thanks! |
13:00:07 | FromDiscord | <no name fits> Oh it's four in my editor. Must be a Discord thing |
13:00:35 | FromDiscord | <no name fits> (edit) "Discord" => "linter" |
13:01:34 | FromDiscord | <Rika> i mean its not a requirement of course |
13:01:42 | FromDiscord | <Rika> its just most people prefer it, you dont need to follow |
13:01:56 | FromDiscord | <no name fits> I don't mind following standards |
13:02:03 | FromDiscord | <no name fits> I just need to change a setting somewhere |
13:05:34 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OWI |
13:07:13 | FromDiscord | <no name fits> btw how am I supposed to use the ESTP? <https://nim-lang.org/docs/estp.html> This is for benchmarking right? Or only mem profiling? I tried doing the thing it says, and it does create the stack trace text file, but there's nothing in it, even if I invoke reverse |
13:07:26 | * | tane joined #nim |
13:08:07 | FromGitter | <Araq> don't use ESTP, it's crap |
13:08:13 | FromGitter | <Araq> use some external profiler tool |
13:08:18 | FromDiscord | <haxscramper> https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html |
13:08:24 | * | Vladar quit (Quit: Leaving) |
13:08:34 | FromDiscord | <Rika> some people recommend hyperfine, some use another tool i forgot the name of |
13:09:03 | * | Mr_Sheesh joined #nim |
13:09:09 | Mr_Sheesh | /!\ this channel has moved to ##hamradio /!\ |
13:09:37 | FromGitter | <Araq> and don't profile when you are learning Nim, I cannot imagine it would teach you much |
13:10:18 | * | Mr_Sheesh quit (Remote host closed the connection) |
13:10:25 | FromDiscord | <no name fits> Oh? I just wanted to learn how to profile and benchmark code while it was still simple and try different variations of the same proc to see the difference, no? |
13:10:31 | FromDiscord | <no name fits> I'm also trying to do TDD |
13:13:06 | * | and joined #nim |
13:13:14 | and | /!\ this channel has moved to #nyymit /!\ |
13:13:54 | * | pixdamix joined #nim |
13:13:56 | FromDiscord | <Rika> spam? |
13:14:00 | Oddmonger | yes |
13:14:01 | pixdamix | /!\ this channel has moved to #nyymit /!\ |
13:14:23 | Oddmonger | seen in different irc chans i follow: they connect, post a line like this, and quit |
13:14:33 | Oddmonger | seems like a test for an ircbot |
13:14:37 | FromDiscord | <Rika> i assume araq is already on it or something |
13:14:54 | * | pixdamix quit (Remote host closed the connection) |
13:14:57 | Oddmonger | /ircbot/botnet |
13:14:59 | * | and quit (Remote host closed the connection) |
13:15:21 | * | tasseUL joined #nim |
13:15:26 | tasseUL | /!\ this channel has moved to #nyymit /!\ |
13:15:32 | * | IotawD joined #nim |
13:15:36 | * | IotawD quit (Remote host closed the connection) |
13:16:03 | FromGitter | <Araq> in general you should write idiomatic Nim code and push the burden onto our optimizer. of course in practice optimizers are usually disappointing. but then you can rewrite the performance critical parts in non-idiomatic Nim code and complain about our optimizer |
13:16:24 | * | tasseUL quit (Remote host closed the connection) |
13:16:59 | FromDiscord | <Clyybber> @Araq Talking about optimization, I was able to improve performance a lot by caching aliased results |
13:17:14 | FromDiscord | <Clyybber> It also fixed the pathological bad case I mentioned |
13:18:15 | FromDiscord | <no name fits> Oh ok. I was just planning to use Nim for engine dev, so I wanted to get comfortable with profiling relatively early |
13:19:26 | stefantalpalaru | Can I trust the default array comparison to do the right thing? |
13:19:35 | stefantalpalaru | (in the VM) |
13:20:20 | FromDiscord | <haxscramper> Yes, why not? |
13:21:11 | haxscramper | From my experience you can trust VM almost all the time, at least in such basic operations |
13:21:49 | stefantalpalaru | OK. Thanks. |
13:33:24 | FromDiscord | <mratsim> In reply to @haxscramper "From my experience you": except shifts |
13:36:44 | FromGitter | <Araq> mratsim: I don't understand how https://github.com/mratsim/constantine/blob/master/azure-pipelines.yml ever worked for you |
13:37:33 | FromGitter | <Araq> as you don't use dlls.zip nor windeps.zip |
13:37:36 | federico3 | https://www.bleepingcomputer.com/news/security/researcher-hacks-over-35-tech-firms-in-novel-supply-chain-attack/ |
13:40:36 | FromDiscord | <mratsim> In reply to @Araq "as you don't use": probably because those deps (OpenSSL, zip, pcre) are by default in Azure agent paths |
13:44:13 | FromGitter | <Araq> mratsim: use this command `bitsadmin.exe /rawreturn /transfer "JobName" /priority FOREGROUND https://curl.se/ca/cacert.pem $nim/bin` please |
13:44:33 | FromGitter | <Araq> with the right replacement for $nim |
13:45:51 | FromDiscord | <mratsim> will do this evening |
13:46:11 | FromDiscord | <mratsim> note that I have been using this setup for months across many project: https://forum.nim-lang.org/t/5763, https://github.com/nim-lang/Nim/wiki/BuildServices#7-azure-pipelines |
13:46:19 | * | leorize quit (Remote host closed the connection) |
13:46:33 | FromDiscord | <mratsim> since no one changed the wiki, I supposed either it's correct or no one cares |
13:46:47 | * | leorize joined #nim |
13:47:33 | FromGitter | <Araq> neither, I wasn't aware and our CIs do use dlls.zip |
13:47:56 | FromGitter | <Araq> that's why we have this "release candidate", you know |
13:48:27 | FromGitter | <Araq> (final official release is one week from now) |
13:49:08 | FromDiscord | <mratsim> I test against devel |
13:49:42 | FromDiscord | <mratsim> at least for this particular lib |
13:50:13 | FromDiscord | <mratsim> 1.0 and 1.2 didn't work when I tried in the past and didn't find the time to test against 1.4 |
13:51:20 | FromGitter | <Araq> well ok, but devel is like a release candidate, only worse |
13:52:02 | PMunch | federico3, damn that's a nice little hack |
13:52:23 | federico3 | PMunch: not suprising, given the "design" of npm |
13:53:16 | PMunch | Not at all, when I saw that the private packages had no special prefix I immediately knew what he was going to do |
13:53:35 | PMunch | The pre-install script and DNS bit is nice though |
13:54:07 | PMunch | I mean that could also easily try to infect machines on the network and then rely on DNS for C&C |
13:56:15 | federico3 | other tricks can be done using DNS bitsquatting and so on |
14:00:14 | PMunch | Yeah DNS is fun |
14:01:13 | PMunch | Huh, just google bitsquatting |
14:01:31 | PMunch | googled* |
14:02:04 | PMunch | The Wikipedia article mentions that they managed to get 3434 requests in one day from bit-flips |
14:02:09 | PMunch | That sounds really high.. |
14:02:25 | FromDiscord | <mratsim> there are trillions of requests a day |
14:02:49 | PMunch | Sure, but still |
14:03:13 | FromDiscord | <mratsim> that's a 0.0000000000003434% probability? :p |
14:03:44 | federico3 | it depends on the device |
14:03:53 | PMunch | You'd think most of the DNS servers would run ECC memory, so the error is happening mostly during network transport or the consumer device(s) |
14:04:16 | federico3 | and it's high enough to be exploited |
14:04:33 | federico3 | PMunch: it's mainly memory error on the devices |
14:04:48 | FromDiscord | <Rika> incoming "you can blame intel for ecc memory not being on consumer devices" |
14:05:29 | * | j-james joined #nim |
14:06:30 | FromDiscord | <Rika> this http://www.dinaburg.org/bitsquatting.html says 52k requests |
14:06:45 | FromDiscord | <Rika> over around half a year |
14:06:53 | FromDiscord | <Rika> so very miniscule |
14:18:25 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OWW |
14:19:09 | FromDiscord | <haxscramper> IF you need stylistic comments - `proc {.noSideEffect.}` is the same as `func` |
14:19:21 | FromDiscord | <no name fits> oh right I forgot about that! |
14:19:22 | FromDiscord | <Yardanico> "return" is also redundant in your code |
14:19:34 | * | xet7 quit (Quit: Leaving) |
14:19:35 | FromDiscord | <haxscramper> ^ and this |
14:19:41 | FromDiscord | <Yardanico> you can remove it and replace second and third ifs with elif |
14:19:53 | FromDiscord | <no name fits> oh yeah return is implicit :NotLikeThis: |
14:19:56 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/jx2 |
14:20:10 | FromDiscord | <Yardanico> @no name fits sometimes using return is fine (for control flow for example) |
14:20:32 | FromDiscord | <no name fits> I'm coming from C# so I'm still learning |
14:20:43 | FromDiscord | <no name fits> You guys are super helpful btw |
14:20:49 | FromDiscord | <haxscramper> Some people prefer `result = ` most of the time, even when explicit could do fine |
14:21:10 | FromDiscord | <haxscramper> So `return/result =/<implicit>` is mostly a matter of preference |
14:21:28 | FromDiscord | <no name fits> What do people usually expect to see? |
14:21:34 | FromDiscord | <Rika> no preference |
14:21:38 | FromDiscord | <no name fits> Alright |
14:21:45 | FromGitter | <Araq> avoid `return` |
14:22:02 | FromDiscord | <no name fits> Because? |
14:22:04 | FromGitter | <Araq> it's bad, unstructured control flow |
14:22:06 | FromDiscord | <Rika> use result as much as you can, until it starts looking awful |
14:22:10 | FromDiscord | <no name fits> Ah ok |
14:22:25 | FromDiscord | <Rika> also because theres an optimisation that can be done w/ result i believe |
14:22:30 | FromDiscord | <Rika> but not return |
14:22:54 | FromGitter | <Araq> I routinely rewrite code full of 'continue' and 'return' to use more indentation and 'elif' |
14:23:02 | FromDiscord | <no name fits> I see |
14:23:44 | FromDiscord | <no name fits> Also is it better to do more elif or long ``or`` expressions? |
14:24:03 | FromDiscord | <Yardanico> well, if you have the same code, it's better to not repeat and use or |
14:24:10 | FromGitter | <Araq> yeah |
14:24:36 | FromDiscord | <Rika> i do it only if the expressions are related, but once theyre not related, split it |
14:25:06 | FromDiscord | <Yardanico> @Araq so it's better to use more indentation? For example if in a for loop I need to go to next iteration if the value doesn't satisfy the condition I can either do "if not x: continue" and then the code, or "if x: code" |
14:25:14 | FromDiscord | <mratsim> I like return |
14:25:22 | FromDiscord | <Yardanico> the latter results in more indentation but no "continue" |
14:26:33 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OX2 |
14:26:51 | FromDiscord | <no name fits> or the ``or`` on the next line? |
14:26:56 | FromDiscord | <Rika> i dont know my opinion tbh, i'm for using result as much as possible but then there's stuff like early return thats really nice |
14:27:27 | FromDiscord | <Yardanico> also, about your algorithm for checking if something is an isogram - another way is to simple iterate over the alphabet and check if .count of the letter in the string is more than 1 |
14:27:52 | FromGitter | <Araq> Yardanico: yes. And yes, I know many people don't agree. They are all wrong though. |
14:28:10 | FromDiscord | <Yardanico> okay, thanks, will try to use continue less often |
14:30:16 | FromDiscord | <Yardanico> @no name fits for example this: |
14:30:23 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/A8X |
14:30:37 | FromDiscord | <Yardanico> you can use return inside the loop too instead of result + break, not sure what would be better in this case |
14:30:48 | FromDiscord | <Rika> that sounds slow though doesnt it |
14:30:59 | FromDiscord | <Yardanico> well, their original solution is recursive |
14:31:05 | FromDiscord | <Yardanico> and a lot of slices |
14:31:34 | FromDiscord | <no name fits> Yeah I wasn't sure how I wanted to solve it honestly. I know it's a sorting problem, but I don't know how to sort quickly in Nim :NotLikeThis: |
14:31:35 | FromDiscord | <Yardanico> also yeah, I forgot |
14:31:35 | FromDiscord | <Rika> cant you have a container where you have all letters and their counts, increment while iterating, then if one is over 1, result = false? |
14:31:39 | FromDiscord | <Yardanico> need to toLowerAscii |
14:31:49 | FromDiscord | <Yardanico> @Rika yes, CountTable for example |
14:32:41 | FromDiscord | <Yardanico> but idk which would be faster |
14:32:51 | FromDiscord | <Rika> O(n^2) vs O(n)? |
14:32:51 | FromDiscord | <no name fits> Like if you have ``aba`` you wanna sort it so you have ``aab``. That's how I learned it anyway |
14:32:57 | FromDiscord | <Rika> you dont need sorting do you? |
14:33:14 | FromDiscord | <Rika> actually more of O(mn) vs O(n) sorry |
14:33:30 | FromDiscord | <Yardanico> @no name fits wait, why sorting? |
14:33:37 | FromDiscord | <Rika> i dont see why sorting is needed yeah |
14:33:49 | FromDiscord | <Yardanico> isogram is simply a string which has no repeated letters (each letter appears zero or one times) |
14:34:07 | FromDiscord | <no name fits> They just told me that sort to find duplicates |
14:34:27 | FromDiscord | <Rika> whatr |
14:34:28 | FromDiscord | <Rika> no |
14:34:28 | FromDiscord | <no name fits> "They" being uni |
14:34:31 | FromDiscord | <Rika> you dont need to |
14:34:35 | FromDiscord | <Rika> thats wasteful |
14:34:36 | FromDiscord | <Zeus> I think the idea is once you sort, you do a pass where you check if the current letter and the previous letter are the same |
14:34:49 | FromDiscord | <Rika> well depends on what you need more |
14:34:49 | FromDiscord | <Yardanico> oh, yeah |
14:34:51 | FromDiscord | <Rika> time vs memory |
14:35:11 | FromDiscord | <Rika> though the time rampup for this is much more than memory |
14:35:12 | FromDiscord | <no name fits> I'm sorry if I've been taught wrong :NotLikeThis: |
14:35:32 | FromDiscord | <Rika> the memory complexity of mine only needs max all letters aka 26 ints or so |
14:35:39 | FromDiscord | <Rika> 26 single byte ints even |
14:35:56 | FromDiscord | <Rika> while you need a hella lot of time if the string was like 20000 chars long |
14:36:03 | FromDiscord | <no name fits> Oh I see |
14:36:07 | FromDiscord | <no name fits> That makes sense |
14:36:09 | FromDiscord | <Rika> for sorting |
14:36:22 | FromDiscord | <Rika> mine only needs to iterate once, and not even the whole thing if there is a duplicate |
14:36:54 | FromDiscord | <Zeus> yeah the worst case is O(N) |
14:37:09 | FromDiscord | <Yardanico> @Araq I'm not sure if I asked that already, but can `sink` annotation be used to simply have a mutable proc argument? Instead of doing `var arg = arg` in the procedure body |
14:37:17 | FromDiscord | <Rika> i believe the "O" in O(n) means worst case š |
14:37:25 | FromDiscord | <no name fits> lol |
14:37:57 | FromDiscord | <Zeus> Ah yeah. I forgot |
14:38:30 | FromDiscord | <Rika> i dont know why i know this when ive only been in uni for a few months xd ig i'm too interested in these kinds of things |
14:38:57 | FromDiscord | <Rika> anyway |
14:40:27 | FromDiscord | <no name fits> I also didn't know about ``Letters`` so thanks |
14:40:39 | FromDiscord | <Yardanico> it's a constant from strutils |
14:40:45 | FromDiscord | <Yardanico> https://nim-lang.org/docs/strutils.html#10 |
14:42:31 | krux02 | ,9Does Discord show irc colored text? |
14:42:41 | FromDiscord | <arne> aparently not |
14:42:53 | FromDiscord | <Rika> i believe its not possible |
14:42:55 | FromDiscord | <Yardanico> discord doesn't support colors |
14:42:57 | FromDiscord | <Rika> discord doesnt |
14:42:58 | FromDiscord | <Rika> yeah |
14:42:58 | stefantalpalaru | So IRC is superior. |
14:43:05 | FromDiscord | <Yardanico> in some ways, yes :) |
14:43:09 | FromDiscord | <Rika> yeah] |
14:43:12 | planetis[m] | matrix does. |
14:43:17 | krux02 | I knew it |
14:43:21 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OXd |
14:44:04 | FromDiscord | <Yardanico> @no name fits why do you use normalize instead of toLowerAscii? and also sorry, if you convert string to lowercase you don't need Letters, you can just do 'a' .. 'z' |
14:44:11 | krux02 | @no name fits: you code is pasted on nim playground |
14:44:22 | FromDiscord | <no name fits> I thought normalize was preferred? |
14:44:53 | FromDiscord | <Rika> to what? |
14:44:54 | FromDiscord | <Rika> for what? |
14:45:00 | FromDiscord | <haxscramper> You can just use whatever you want |
14:45:02 | FromDiscord | <no name fits> Comparing strings? |
14:45:09 | FromDiscord | <Yardanico> but you're not comparing strings |
14:45:12 | FromDiscord | <Rika> it depends on the usecase |
14:45:15 | FromDiscord | <Yardanico> you just need to lowercase the string |
14:45:16 | FromDiscord | <no name fits> oh, right |
14:45:19 | FromDiscord | <haxscramper> There is not a lot of "preferred" things anyway here |
14:45:33 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/bng |
14:45:34 | FromDiscord | <Yardanico> @krux02 yes, the discord bridge auto-pastes code pastes |
14:45:52 | FromDiscord | <Yardanico> it also tries to handle code pastes with text (converts text into code comments) |
14:46:01 | FromDiscord | <dom96> federico3: you should join #nimble if you havenāt already |
14:46:02 | FromDiscord | <no name fits> should I do an early exit if the string is just one character? |
14:46:08 | krux02 | your normalization does a string copy. Could be avoided. And you could return early when the result is set to false once |
14:46:23 | FromDiscord | <no name fits> right, thanks |
14:46:28 | krux02 | I don't know what "normalize" does |
14:46:46 | FromDiscord | <Yardanico> "That means to convert it to lower case and remove any '_'. This should NOT be used to normalize Nim identifier names." |
14:46:46 | krux02 | but usually it is better to do the normalization during iteration |
14:46:47 | FromDiscord | <Rika> removes underscores and lowercases |
14:46:56 | FromDiscord | <Rika> lowercases -> makes lowercase |
14:47:21 | krux02 | ouch, that function shouldn't be used at all. |
14:47:39 | FromDiscord | <no name fits> I'm not normalizing a Nim identifier though? |
14:47:52 | FromDiscord | <Yardanico> but why do you need to replace _ with a space anyway ? :P |
14:48:04 | FromDiscord | <Yardanico> there's toLowerAscii which just changes string to lowercase without doing anything extra |
14:48:12 | FromDiscord | <no name fits> I don't :NotLikeThis: I just have no idea what I'm doing mostly |
14:48:13 | FromDiscord | <Rika> i think it would be better to error out when an undesirable character is found? |
14:48:22 | FromDiscord | <Yardanico> why? |
14:48:23 | FromDiscord | <Zeus> Doesn't `count` iterate through the string? So in every iteration through `a..z` you're going to be iterating through the string n times. |
14:48:30 | FromDiscord | <Yardanico> yeah that's true, we talked about it |
14:48:34 | FromDiscord | <raymanlib> Can I make a GUI library without requiring another one that was written in C/C++ like gtk or qt? |
14:48:40 | krux02 | no the function was made for nim identifiers. Then nim identifiers got changed to be aware of the first letter casing but this function was left as it is for "backwards compatibility" breaking all code that used it for identifiers. |
14:48:43 | FromDiscord | <no name fits> In reply to @Rika "i think it would": The assignment wants the func to continue, only letters that are the same |
14:48:47 | krux02 | no this function shouldn't be used at all. |
14:48:53 | FromDiscord | <Yardanico> @raymanlib well, it depends on what level of abstraction we're talking |
14:49:02 | FromDiscord | <Yardanico> do you consider using native OS frameworks ok ? |
14:49:07 | FromDiscord | <Zeus> (edit) "n times." => "again." |
14:49:08 | FromDiscord | <Yardanico> if so, there's NIGui already for example |
14:49:17 | FromDiscord | <Yardanico> it's rather simple though |
14:49:18 | krux02 | just do a normal to lower case per charactor, if you hate underscores, do a continue on them |
14:49:21 | FromDiscord | <Yardanico> but yeah, you totally can |
14:49:23 | FromDiscord | <Rika> would you like to rewrite SDL? xdddd |
14:49:26 | FromDiscord | <Rika> im joking btw |
14:49:58 | FromDiscord | <no name fits> I thought we were just told ``continue`` was bad? :NotLikeThis: |
14:50:14 | FromDiscord | <Rika> opinion |
14:50:16 | FromDiscord | <Rika> depends on you |
14:50:19 | FromDiscord | <Yardanico> and on the situation |
14:50:35 | FromDiscord | <Rika> avoid it if you want |
14:50:39 | krux02 | no name fits: I like to disagree with @Araq on many things. |
14:50:49 | krux02 | And usually he is wrong about it when we disagree. |
14:50:55 | FromDiscord | <Rika> people will criticise no matter what you do to your code |
14:51:27 | krux02 | have your own opinion. No code or language feature is bad for the sake of being bad. |
14:51:53 | krux02 | using continue without a concept on when to use it or not might end up in dirty code. |
14:52:03 | krux02 | Using continue consistently can be very clean. |
14:52:09 | krux02 | You are still learning |
14:52:23 | FromDiscord | <raymanlib> What did you mean by abstraction and using native OS frameworks? |
14:52:35 | krux02 | your code will be inconsistent anyway becaues you are still learing, don't spend too much time investing into what is good and what is bad. |
14:52:39 | krux02 | Just do what works. |
14:52:56 | FromDiscord | <Yardanico> @raymanlib I'm just not sure what you exactly want |
14:53:09 | FromDiscord | <Yardanico> if you mean "create my own gui framework without gtk/qt by using pure opengl/vulkan/etc" - sure |
14:53:15 | FromDiscord | <no name fits> @krux I'd just hate to pick up too many bad habits |
14:53:47 | FromDiscord | <raymanlib> I know nim has native libraries for working with xlib/win32 without external dependencies. |
14:56:09 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OXm |
14:56:27 | liblq-dev | @no name fits, you'll see what works and what doesn't as you learn how to code |
14:56:44 | liblq-dev | do as krux said, don't worry too much about correctness or good practices. just make it work |
14:58:07 | FromGitter | <Araq> the good practice is what I said though |
14:59:08 | FromGitter | <Araq> but it doesn't matter for `isPalindrome` indeed |
15:01:16 | FromDiscord | <Yardanico> ok, seems like nigui's 4th example still crashes with orc (nimDecRefIsLastCyclicDyn is last in the stack trace), guess I'll have to minimise it this time (although it might be a nigui bug at this point) |
15:02:08 | FromDiscord | <Clyybber> If it works with refc but doesn't with orc then it's probably an orc bug |
15:02:21 | FromDiscord | <Clyybber> we know that there is one remaining at least |
15:02:31 | FromDiscord | <Yardanico> sorry, arc |
15:02:36 | FromDiscord | <Clyybber> oh? |
15:02:45 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/809076894242570300/unknown.png |
15:02:48 | FromDiscord | <Clyybber> nimDecRefIsLastCyclicDyn sounds very orc |
15:02:57 | FromDiscord | <Yardanico> the first time I seen it was a bit more than half a year ago |
15:03:08 | FromDiscord | <Yardanico> i mean in this nigui example |
15:04:00 | FromDiscord | <Clyybber> so it happens with arc too? |
15:04:02 | FromDiscord | <Yardanico> yes |
15:04:09 | FromDiscord | <Clyybber> try without cursor inference |
15:04:27 | FromDiscord | <Yardanico> still crashes |
15:05:39 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2OXJ |
15:05:40 | FromDiscord | <Yardanico> click the "ok" button and it crashes |
15:05:42 | FromGitter | <Araq> run it on valgrind, nothing else works |
15:05:46 | FromDiscord | <Yardanico> ah okay |
15:06:53 | * | xet7 joined #nim |
15:08:39 | FromDiscord | <raymanlib> I'm making a text editor for nim. Should I make everything in one file or split it up into many different files? |
15:09:04 | PMunch | Depends on how big of a project it's going to be |
15:09:08 | FromDiscord | <Yardanico> that's up to you, but splitting would be better :) |
15:09:11 | PMunch | But multiple files is probably the best |
15:11:02 | * | Vladar joined #nim |
15:14:05 | krux02 | @Araq: I see, now you are blocking me on nim-lang and deleting my comments |
15:14:18 | krux02 | nice move |
15:14:21 | FromGitter | <Araq> coming soon. an IRC ban |
15:14:30 | krux02 | awesome |
15:14:36 | krux02 | you wanna ban all good people now |
15:14:40 | FromDiscord | <Rika> why? |
15:14:42 | FromDiscord | <Rika> the hell |
15:14:52 | FromDiscord | <Rika> what did he do exactly that warrants this |
15:15:02 | FromGitter | <Araq> too much trolling |
15:15:09 | FromDiscord | <Rika> where? |
15:15:20 | krux02 | here: https://github.com/nim-lang/RFCs/issues/338 |
15:15:23 | FromGitter | <Araq> here, there, everywhere. |
15:15:47 | * | j-james quit (Quit: WeeChat 3.0) |
15:16:07 | krux02 | first you ban disruptek, now you want to ban me? |
15:16:12 | FromDiscord | <Rika> In reply to @krux02 "here: https://github.com/nim-lang/RFCs/issues/338": well how would i know now if its deleted |
15:16:21 | krux02 | you don't |
15:17:21 | krux02 | @Rika: here I reuploaded it to ix.io: http://ix.io/2OXN |
15:18:19 | FromDiscord | <Rika> where the fuck here is the trolling |
15:18:55 | FromDiscord | <Rika> In reply to @krux02 "first you ban disruptek,": legitimately dis's ban was justified |
15:19:52 | FromDiscord | <Rika> careful with what, @Solitude? might get banned? that's fine, it's just gonna bring attention to the issue anyway |
15:21:34 | krux02 | Btw that is how @Araq handles with criticism. Banning the people who criticise. |
15:21:43 | krux02 | And make them shut up on all channels. |
15:22:25 | FromGitter | <Araq> plenty of people manage to criticize without forgetting about their manners |
15:22:28 | FromDiscord | <Rika> this isnt even inflammatory, though of course i cant trust it fully since its not the actual source |
15:22:37 | FromDiscord | <Solitude> your last comment doesnt reads like a criticism |
15:22:51 | FromDiscord | <Rika> `I also don't get what the point is to read the spec as you change the spec to whatever you want at any point anyway.` this? |
15:23:10 | FromDiscord | <Rika> it doesnt read inflammatory to me |
15:23:19 | krux02 | @Rika: It is a copy paset of the original, I saw that it was removed and could save it. |
15:23:32 | FromGitter | <Araq> it's not just this one remark |
15:23:37 | FromGitter | <Araq> let me quote you |
15:23:52 | krux02 | @Solitude: It is criticsm. A bit sarcastic, but criticism never the less. |
15:23:53 | FromGitter | <Araq> https://irclogs.nim-lang.org/01-02-2021.html#23:35:35 |
15:24:11 | krux02 | wow |
15:24:14 | FromGitter | <Araq> now you're back and I don't see the point of having you around. |
15:24:29 | FromDiscord | <Rika> what |
15:24:30 | * | xet7 quit (Remote host closed the connection) |
15:24:32 | FromDiscord | <Rika> what about this remark |
15:24:40 | FromDiscord | <Rika> whats the issue with that remark |
15:26:44 | krux02 | @Araq: how about instead of shuttin up and stopping people who want to contribute to improve the compiler and then falsely claiming you would do it on your own. You either fix the problems on your own, or you let the people who want to help fix the problem. |
15:26:56 | krux02 | It's not like I didn't provide a patch to the problem. |
15:27:38 | krux02 | The part that you didn't like is the "As I sad so" part, because I knew the problem from the beginning and you can't accept it that I was right from the beginning. |
15:27:46 | krux02 | And now you want to ban me because of it. |
15:28:04 | FromGitter | <Araq> you were right from the beginning indeed |
15:28:09 | * | xet7 joined #nim |
15:28:10 | FromDiscord | <Rika> okay |
15:28:20 | FromDiscord | <Rika> okay i see it now |
15:28:36 | FromGitter | <Araq> but you never came up with a good alternative solution to the problem |
15:28:43 | FromGitter | <Araq> not that you have to. |
15:28:43 | krux02 | I did |
15:28:53 | krux02 | provide a good compilation error message, done. |
15:29:18 | krux02 | I am done with making PR to Nim anyway. They get closed by the stale bot. |
15:29:30 | krux02 | So much about "You are going to merge them eventually" |
15:30:53 | * | vicfred quit (Quit: Leaving) |
15:31:29 | FromGitter | <Araq> what's the point of this? so I'm a liar, ok. Is that your strategy for avoiding a ban, throw mud at me and see what sticks? |
15:34:05 | PMunch | People are just frustrated that things they do don't get merged |
15:34:16 | PMunch | Well, not "just", but that's partly the reason |
15:34:26 | krux02 | The stategy is to make you resign and provide an appropriate apology. |
15:35:46 | krux02 | And then improve in the future. |
15:35:54 | PMunch | Well that's a bit harsh.. |
15:36:08 | PMunch | Oh wait, the other kind of resign |
15:36:16 | FromGitter | <Araq> PRs get merged all the time, but if we say "do X before it gets merged" and then the X is never done that's not my fault. |
15:36:41 | krux02 | Araq: don't make me dig up PR now |
15:37:06 | FromDiscord | <mratsim> In reply to @Rika "this isnt even inflammatory,": it's the actual comment, i actually upvoted it |
15:37:08 | krux02 | after all I am banned anyway |
15:38:34 | krux02 | I know I am uncomfortable for you. But I just bring up the problems that you caused on your own. |
15:38:38 | FromDiscord | <mratsim> anyway I agree that providing an error message and not compiling is the proper way to handle {.compileTime.} accessed at runtime. it would have closed the original issue as well |
15:39:08 | krux02 | And when your fix is to ban the messenger, then there is no point in me being active here in this community. Then you can ban me. |
15:39:19 | FromDiscord | <mratsim> (the original issue being trying to access those and it didn't work, as in the manual, though it didn't handle that gracefully) |
15:40:28 | krux02 | @Araq It would tell me the sign that you are not interesting in fixing the problems in Nim. |
15:41:40 | krux02 | Btw, with resign I mean resign fighting me and finally accepting my criticism. |
15:41:52 | krux02 | not resiging you position in Nim |
15:43:26 | FromDiscord | <Clyybber> krux02: Araq said > you were right from the beginning indeed |
15:43:39 | krux02 | I read that |
15:43:42 | FromDiscord | <Clyybber> krux02: Do you want him to automatically accept all your criticism? |
15:43:43 | krux02 | That is a start |
15:43:52 | FromDiscord | <Clyybber> Talk about concrete stuff |
15:44:01 | FromDiscord | <Clyybber> not all your criticisims are automatically valid |
15:44:48 | FromDiscord | <Clyybber> For this issue, making {.compileTime.} accessible at runtime was to provide for a way to have a "value after all compilation is done" relay from compiletime into runtime |
15:45:07 | krux02 | @Clyybber: you are not helping it. |
15:45:10 | FromDiscord | <Clyybber> So an alternative needs to provide this |
15:45:24 | FromDiscord | <mratsim> no, for this issue specifically that was a workaround to close the issue nicely |
15:45:26 | FromDiscord | <Clyybber> krux02: not sure what you mean by that |
15:45:36 | PMunch | I like @mratsims new suggestion there, the whole `var myRTVar = static: myCTVar` |
15:45:37 | krux02 | I know how compileTime works, I know not all of my criticsm is valid. |
15:45:47 | FromDiscord | <mratsim> the proper way to close it would have been, this is illegal and should be an error anyway use static |
15:45:55 | FromDiscord | <Clyybber> I also want compileTime to be not accessible at runtime |
15:46:16 | FromDiscord | <Clyybber> We need a staticDelayed magic |
15:46:20 | FromDiscord | <Clyybber> name up for debat |
15:46:28 | FromDiscord | <Rika> the issue is that it feels like araq is just universally against criticism against him, at least its what i feel as well |
15:46:50 | krux02 | But discussing a feature with me. Then hearing my advice. Then ignoring it, change the implementation, change the spec and last but not least say "Did anybody read the spec and the reason behind this feature? Oh well" is a behavior that is not acceptable as a leader. |
15:46:53 | FromDiscord | <konsumlamm> In reply to @Clyybber "We need a staticDelayed": you mean something like rust's lazy_static? |
15:47:31 | FromDiscord | <Clyybber> @konsumlamm Nope |
15:47:57 | FromDiscord | <mratsim> Rust lazy_static is a workaround for Rust not able to call proc and assign the result to a const |
15:47:58 | FromDiscord | <Clyybber> Think of a static value, but it's put into the C code after the Nim VM has already run |
15:48:47 | krux02 | @Clyybber: I really don't want to disciss this specific issue here, you can write in the issue itself if you want that. |
15:49:12 | krux02 | this discussion is about the meta level of dealing is criticism and managing Nim. |
15:49:21 | FromDiscord | <Clyybber> no I mean what you meant with "you are not helping it" |
15:49:27 | FromDiscord | <mratsim> I don't understand the need of "staticDelayed", I believe i do th most funky things at compile-time, including writing a compiler a macros, and I only ever needed `const foo = static(myComputation(arg1, arg2, arg3))` |
15:49:35 | FromDiscord | <Clyybber> Not sure if it's the language barrier, but tend to make things personal |
15:49:43 | FromDiscord | <Clyybber> (edit) "Not sure if it's the language barrier, but ... tend" added "you" |
15:50:13 | krux02 | @Clyybber: well that is because it is personal |
15:50:25 | FromDiscord | <Clyybber> I mean "you are not helping it" |
15:50:25 | krux02 | it is a personal problem not a technical one. |
15:50:50 | krux02 | sorry, I meant it leads the discussion in the wrong direction. |
15:50:55 | FromDiscord | <mratsim> it's a ego and tone problem here |
15:50:55 | FromDiscord | <Clyybber> ah ok |
15:52:35 | FromGitter | <Araq> not my ego. everybody but krux02 managed to talk just fine about the RFC and other Nim defects. |
15:52:41 | FromDiscord | <Clyybber> @mratsim Hmm, I can imagine a class macro for example, would collect all classes during compile time and then wants to translate that info to runtime |
15:52:57 | FromDiscord | <mratsim> In reply to @Clyybber "<@!570268431522201601> Hmm, I can": I have that |
15:53:15 | krux02 | Araq: I managed to talk about it just fine as well. You decided to ban me however. |
15:53:23 | FromDiscord | <mratsim> https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/support/emulate_classes_with_ADTs.nimāµāµhttps://github.com/mratsim/compute-graph-optim |
15:53:27 | FromDiscord | <Clyybber> In reply to @mratsim "I have that": When do you do the calculation of type ids? |
15:53:29 | krux02 | So I guess it is your ego |
15:53:41 | FromDiscord | <mratsim> In reply to @Clyybber "When do you do": all IDs are done in a table at compile-time |
15:53:53 | FromDiscord | <Rika> i seriously dont see the issue with the thing that you blocked krux for |
15:54:22 | FromDiscord | <Recruit_main707> how is he banned and talking tho š¤ |
15:54:22 | FromDiscord | <Clyybber> In reply to @mratsim "all IDs are done": Do you store it in a const? |
15:54:33 | FromDiscord | <Rika> blocked in the github repo |
15:54:35 | FromDiscord | <Rika> not banned in irc |
15:54:41 | FromDiscord | <Recruit_main707> ah |
15:54:50 | krux02 | I am blocked on github now yes |
15:55:02 | stefantalpalaru | That's not cool. |
15:55:14 | FromDiscord | <mratsim> In reply to @Clyybber "Do you store it": I store it in a let {.compileTime.} that I then move to a const array here: https://github.com/status-im/nimbus-eth1/blame/5248be1766834697a0c0ef194270767488112e70/nimbus/vm/interpreter/gas_costs.nim#L459-L460 |
15:55:26 | FromDiscord | <no name fits> Is this a regular thing? Not trying to worsen the mood |
15:55:44 | FromDiscord | <Clyybber> not really |
15:55:50 | stefantalpalaru | No, this is one of the better days. |
15:55:55 | FromDiscord | <Clyybber> huh? |
15:55:55 | FromDiscord | <mratsim> In reply to @no name fits "Is this a regular": No, there was a warranted ban 2 weeks ago, and this is another one. |
15:55:57 | FromDiscord | <Clyybber> lol |
15:56:21 | FromDiscord | <Rika> In reply to @mratsim "No, there was a": another one? |
15:56:27 | FromDiscord | <mratsim> disruptek |
15:56:31 | FromDiscord | <Rika> i mean this |
15:56:34 | FromDiscord | <Clyybber> In reply to @mratsim "I store it in": Hmm, but how do you ensure that you move it to a const array after all macro invocations have been processed |
15:56:35 | FromDiscord | <Rika> this is another one? |
15:56:40 | FromDiscord | <Rika> this is warranted? |
15:56:45 | FromDiscord | <mratsim> no this one is not |
15:57:02 | FromDiscord | <Rika> i mean sure the chat AFTER the block was pretty inflammatory |
15:57:11 | FromDiscord | <Rika> BUT thats what happens when emotions get to you |
15:57:18 | FromDiscord | <reilly> Is there a graph somewhere comparing compile-times between Nim and a few other languages? I'm sure I remember seeing one, but I can't remember where to look. |
15:57:23 | FromDiscord | <reilly> I need it for reasons. |
15:57:57 | FromDiscord | <mratsim> In reply to @Clyybber "Hmm, but how do": I use static |
15:57:59 | FromDiscord | <Clyybber> In reply to @reilly "Is there a graph": hmm maybe @Yardanico knows |
15:58:24 | FromDiscord | <Clyybber> In reply to @mratsim "I use static": yeah, but static gives you the value of the compileTime variable at the time that the compiler encounters static: afaik |
15:58:38 | FromDiscord | <Yardanico> @Clyybber not really :) |
15:58:43 | FromDiscord | <Clyybber> oh :D |
15:58:50 | FromDiscord | <Yardanico> the issue with arc is strange |
15:59:11 | FromDiscord | <mratsim> In reply to @Clyybber "yeah, but static gives": so I make sure it's the last. |
15:59:20 | FromDiscord | <no name fits> I was just wondering if it was ok if I posted another mini assignment I did for feedback? or if it's a bad time |
15:59:32 | FromDiscord | <Clyybber> @no name fits sure, go ahead |
15:59:42 | FromDiscord | <Clyybber> it's never a bad time :D |
15:59:54 | krux02 | @Araq: please undo my ban and revive my comment. |
16:00:04 | FromDiscord | <Clyybber> In reply to @mratsim "so I make sure": But you can't when your module is not the main module |
16:00:34 | FromGitter | <Araq> will you apologize for blaming me that I pull the spec out of my ass and it's not worth reading? |
16:00:37 | FromDiscord | <mratsim> In reply to @Clyybber "But you can't when": shared mutable compile-time global just go in the Nim anti-pattern bin |
16:00:47 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OY7 |
16:00:57 | krux02 | @Araq: Didn't you pull the spec out of your ass? |
16:01:17 | FromDiscord | <Clyybber> In reply to @mratsim "shared mutable compile-time global": heh; it's a reasonable use case IMO and needed for some features |
16:01:18 | FromGitter | <Araq> I didn't, I collect use cases from my users |
16:01:27 | FromDiscord | <no name fits> Also not to kiss ass or anything but I actually thought the spec was one of the better ones I've seen, compared to Java, Python and C# |
16:01:40 | FromDiscord | <no name fits> I would've just liked more example for people like me |
16:01:45 | FromDiscord | <no name fits> (edit) "I would've just liked more example ... for" added "code" |
16:01:52 | FromDiscord | <mratsim> In reply to @Clyybber "heh; it's a reasonable": It's completely broken because Nim has a different hash function between compile-time and runtime and so ID aren't stable |
16:01:59 | krux02 | But you ignored my advice and the spec that explicitly said only compile time. |
16:02:11 | FromDiscord | <Clyybber> In reply to @mratsim "It's completely broken because": Is that the case still? |
16:02:23 | FromDiscord | <Clyybber> Even if it is, it should be possible eventually |
16:02:33 | FromDiscord | <mratsim> In reply to @Clyybber "Is that the case": It's the one of the reasons why we can't use 1.4.x at status |
16:02:49 | krux02 | So there is no agreement in the spec that people settlo on after a discussion. After all it is you who writes it and changes it at your desire alone. |
16:02:54 | FromDiscord | <Clyybber> In reply to @mratsim "It's the one of": Oh it's a regression too? |
16:02:59 | krux02 | And that is my criticsm. |
16:03:04 | krux02 | And it is still valid. |
16:03:18 | FromDiscord | <Clyybber> krux02: The RFC is about a spec change |
16:03:24 | FromDiscord | <Clyybber> And it has not been rejected? |
16:03:53 | krux02 | Clyybber: The RFC is about a reversal of a spec change |
16:03:59 | FromDiscord | <mratsim> In reply to @Clyybber "krux02: The RFC *is*": https://github.com/nim-lang/Nim/blob/devel/lib/pure/hashes.nim#L352-L355 |
16:04:16 | krux02 | a spec change that I explicity said from the beginning it would cause problems. |
16:04:17 | FromDiscord | <reilly> Okay, how about that graph for executable sizes? I know it's hidden somewhere on the website, I just can't ever remember where nor find it. |
16:04:17 | FromDiscord | <mratsim> argh, scrolling is too fast, reply to the wrong comment |
16:04:42 | FromDiscord | <mratsim> In reply to @Clyybber "krux02: The RFC *is*": The spec was changed without a RFC |
16:05:33 | krux02 | @mratsim: you can edit comments as far as I know |
16:05:34 | FromDiscord | <Clyybber> In reply to @mratsim "https://github.com/nim-lang/Nim/blob/devel/lib/pure": Is there an issue for this? |
16:05:38 | FromDiscord | <mratsim> This was the change https://github.com/nim-lang/Nim/pull/12128 |
16:06:18 | FromDiscord | <no name fits> In reply to @reilly "Okay, how about that": I found this? https://github.com/def-/nim-benchmarksgame |
16:06:36 | FromGitter | <Araq> I don't see how "you pull the spec out of your ass" is a valid, well-founded criticism that doesn't deserve a ban. |
16:06:37 | FromDiscord | <mratsim> In reply to @Clyybber "Is there an issue": I don't think so but you can piggy back on this one: https://github.com/nim-lang/Nim/issues/12516 :p |
16:06:53 | krux02 | @Araq: That are your words, not mine. |
16:07:13 | krux02 | I just repeated them. |
16:07:26 | FromDiscord | <Rika> what? |
16:07:45 | stefantalpalaru | Only actual spam deserves a ban. Work out your personal issues and keep contributing to this small community. |
16:07:57 | FromDiscord | <mratsim> In reply to @reilly "Okay, how about that": There are some blog post about minimizing execurable sizes |
16:08:03 | FromGitter | <Araq> true but your original words were just as offensive because I'm not an idiot |
16:08:16 | FromDiscord | <mratsim> In reply to @reilly "Okay, how about that": https://hookrace.net/blog/nim-binary-size/ |
16:08:27 | krux02 | @Araq: what was offensive about it? |
16:08:36 | krux02 | Did I use offensive language? |
16:08:43 | FromDiscord | <no name fits> pls no drama :NotLikeThis: Maybe use a different channel? |
16:09:00 | PMunch | stefantalpalaru, agreed |
16:09:14 | FromDiscord | <reilly> Yes, but I need the one that compares size with other languages. Knowing a Nim exe size in isolation isn't helpful to me right now. |
16:09:47 | FromDiscord | <mratsim> In reply to @reilly "Yes, but I need": write code in the languages of interest and use `bloaty` to look into the differences. |
16:10:12 | FromDiscord | <mratsim> make sure to use the same options w.r.t. to debugging symbols because with debugging symbols 90% of the binary is text. |
16:10:29 | FromDiscord | <Rika> with regards to to debugging |
16:10:29 | FromDiscord | <Clyybber> I remember the graph that reilly was talking about |
16:10:44 | FromDiscord | <Clyybber> but don't know where it was |
16:11:13 | krux02 | @Araq: The part that was offensive to you was the part were I spoke the uncomfortable truth. |
16:11:22 | FromDiscord | <reilly> If anybody ends up finding it, I'm gonna save that graph somewhere for next time, cause this is the second time this exact thing has happened. |
16:12:02 | FromGitter | <Araq> really? the truth? then how come you still don't understand the actual issue? |
16:12:23 | FromDiscord | <haxscramper> In reply to @reilly "If anybody ends up": https://hackaday.com/2018/09/25/nim-writes-c-code-and-more-for-you/ & |
16:12:24 | FromDiscord | <haxscramper> ? |
16:12:34 | FromDiscord | <reilly> That's the one! |
16:12:38 | FromDiscord | <Clyybber> \o/ |
16:12:40 | FromDiscord | <hamidb80> Can anyone give some info about `gdb`? How `gdb` can show Nim code to you but execute C code? |
16:13:10 | krux02 | @himidb80, I can |
16:13:11 | FromDiscord | <haxscramper> Also found this article https://sdevprog.blogspot.com/2018/04/overview-of-efficient-programming.html |
16:13:13 | FromDiscord | <mratsim> In reply to @hamidb80 "Can anyone give some": gdb executes machine code not C code |
16:13:17 | krux02 | I wrote the gdb plugin for Nim |
16:13:25 | krux02 | but @Araq is about to ban me right now |
16:13:34 | PMunch | krux02, don't be like that.. |
16:13:41 | FromDiscord | <haxscramper> @reilly It does not have a graph directly, but features quite comprehensive table from what I can tell |
16:14:08 | FromDiscord | <haxscramper> oh, but no binary sizes |
16:14:20 | PMunch | I mean I agree with you, but that's just a bit petty |
16:14:29 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2OY9 |
16:14:32 | krux02 | yea sorry it is. |
16:14:44 | FromDiscord | <Clyybber> In reply to @Yardanico "<@!107882072974065664> so, I realised": Hmm, interesting, yeah please do! |
16:14:45 | PMunch | @himidb80, it's basically what's called a source code filter I believe |
16:14:52 | FromDiscord | <Yardanico> (edit) "https://play.nim-lang.org/#ix=2OYb" => "https://play.nim-lang.org/#ix=2OYa" |
16:15:14 | PMunch | If you look it your C source code it has line directives telling GDB which line of which Nim file you're in |
16:15:28 | krux02 | @Araq: How do I not understand the actual issues? Can you elaborate? |
16:15:44 | FromGitter | <Araq> clyybber explained it well here |
16:15:51 | FromDiscord | <hamidb80> In reply to @krux02 "but <@757977596066660455> is about": I don't know what's going on but I think one of you should end up this argument. |
16:16:11 | FromDiscord | <haxscramper> @reilly and also - https://github.com/frol/completely-unscientific-benchmarks < this one has more useful programs (not just 'hello world') |
16:16:14 | FromDiscord | <Rika> or take it to dms or something, like please |
16:17:21 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OYd |
16:17:27 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/issues/17003 |
16:17:32 | FromDiscord | <no name fits> I'm not sure if the ``break`` is considered bad? |
16:17:33 | FromDiscord | <Clyybber> @no name fits does that proc not work? |
16:17:52 | FromDiscord | <no name fits> No it works fine, I'm just trying to learn from feedback |
16:18:30 | FromDiscord | <no name fits> I'm basically doing some mini challenges until they work, and then having you guys tell me all the stuff that could be better š
|
16:18:37 | FromDiscord | <hamidb80> In reply to @mratsim "gdb executes machine code": So gdb show you something and execute something else? |
16:18:51 | FromDiscord | <Clyybber> alphabet = alphabet - {c} could be turned into alphabet.excl c |
16:18:58 | krux02 | @Araq: maybe you repeat it your words what I don't understand. |
16:19:45 | FromDiscord | <Clyybber> @no name fits then you don't need the alphabet.contains(c) anymore either |
16:20:19 | FromDiscord | <no name fits> oh right, I didn't even notice that |
16:20:36 | * | cyraxjoe quit (Read error: Connection reset by peer) |
16:20:49 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OYf |
16:20:55 | FromDiscord | <Clyybber> and you don't need the tmp |
16:21:03 | FromDiscord | <Clyybber> You can just do for c in toLowerAscii(input) |
16:21:12 | FromDiscord | <no name fits> also can't I just do ``true`` instead of the break? |
16:21:18 | FromDiscord | <Clyybber> nope |
16:21:19 | FromGitter | <Araq> > This is how the spec used to be: ā ā > A global var that are accessed via a compile-time mechanism needs to be annotated via .compileTime. To use a .compileTime var at runtime, convert it to a a const or let helper variable. ā ā > One big problem was when to turn it into this helper variable. It needs to be done after the full compilation. This is hard to implement properly but we require the same mechanism for |
16:21:19 | FromGitter | ... IC and "method" code generation so there is no way around it. So since conversion from .compileTime vars to runtime vars is hard to do with const, we can say that a compileTime variable can be used at runtime and it's initial value is that after the full compilation. And maybe in order to use a .compleTime variable at ru ... [https://gitter.im/nim-lang/Nim?at=602407ff9d5c644f66623f3c] |
16:21:20 | FromDiscord | <haxscramper> I swear there was a `toSet(string)` somewhere |
16:21:26 | FromDiscord | <Clyybber> In reply to @no name fits "also can't I just": but you can do return true |
16:21:43 | FromGitter | <Araq> that is the problem, it's not solved by "just provide a good error message" |
16:21:57 | FromDiscord | <konsumlamm> what's so bad about `break`? |
16:22:01 | FromGitter | <Araq> that is what I tried to allow, that's why the spec ended up being this way |
16:22:08 | FromDiscord | <Clyybber> In reply to @konsumlamm "what's so bad about": nothing, sometimes it's needed |
16:22:13 | FromDiscord | <haxscramper> In reply to @haxscramper "I swear there was": So with this one you could've done `len({'a' .. 'z'} - toSet(toLowerAscii(input))) == 0` |
16:22:19 | FromGitter | <Araq> and it is a feature that was requested by a paying customer |
16:22:32 | FromGitter | <Araq> and it's why I don't pull the spec out of my ass. |
16:22:35 | FromDiscord | <haxscramper> In reply to @konsumlamm "what's so bad about": Absolutely nothing |
16:22:46 | FromDiscord | <Clyybber> In reply to @haxscramper "So with this one": oh smart! |
16:22:47 | krux02 | @Araq: The spec is more than problematic. I even agree with timmotheecour here |
16:22:47 | FromDiscord | <no name fits> oh right I don't even need to iterate |
16:22:57 | FromDiscord | <no name fits> You guys are so much smarter than me omg |
16:22:59 | FromDiscord | <konsumlamm> @no name fits why do you try to avoid `ļ»æbreakļ»æ` so hard? |
16:23:04 | FromDiscord | <Clyybber> In reply to @no name fits "oh right I don't": you need to iterate somewhere, toSet will do it for you |
16:23:06 | FromGitter | <Araq> and btw we all agree this part of the spec sucks |
16:23:20 | krux02 | but making a {.compilerTime.} var avaialeb at runtime is as simle as assigning it to a const. |
16:23:29 | FromDiscord | <Clyybber> krux02: No its not |
16:23:33 | FromDiscord | <no name fits> In reply to @konsumlamm "<@!199678698499080192> why do you": was told early ``break`` and ``return`` broke control flow and was bad? |
16:23:37 | FromDiscord | <Clyybber> krux02: The timing is important |
16:23:40 | FromDiscord | <no name fits> and ``continue`` |
16:23:42 | FromDiscord | <konsumlamm> wat |
16:23:44 | FromGitter | <Araq> everybody but you managed to say this without personally offending me. |
16:23:57 | FromDiscord | <konsumlamm> wdym "break control flow"? |
16:24:12 | FromDiscord | <Clyybber> @no name fits It's not bad in general; it's just a more "messy" controlflow than simple branching |
16:24:16 | krux02 | @Araq: but that is your problem not mine. I did insult you at all. |
16:24:25 | FromDiscord | <Clyybber> But it is very much needed for some algorithms |
16:24:25 | FromDiscord | <Yardanico> @Clyybber yeah, the issue is not related to ARC at all, it's overloading resolution, but sadly due to nigui using "dispose" and arc having a template with the same name we got a crash |
16:24:32 | FromDiscord | <Clyybber> Unless you want loads of code duplication |
16:24:39 | FromGitter | <Araq> if you want me to unban you, it's pretty much your problem. |
16:24:42 | FromDiscord | <konsumlamm> "I did insult you at all"? |
16:24:45 | FromDiscord | <Clyybber> In reply to @Yardanico "<@!107882072974065664> yeah, the issue": Ah, I see! |
16:24:55 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2OYg |
16:25:07 | FromDiscord | <no name fits> In reply to @konsumlamm "wdym "break control flow"?": https://discord.com/channels/371759389889003530/371759389889003532/809066585276416030 |
16:25:09 | krux02 | Well it is your reputation after all that goes to the drain here, not mine. |
16:25:10 | FromDiscord | <haxscramper> @no name fits I would really advise not to focus on general stylistic advises |
16:25:26 | FromDiscord | <haxscramper> not to focus too much |
16:26:11 | FromDiscord | <konsumlamm> i think what Araq meant there is to use `result` instead of `return` |
16:26:13 | FromDiscord | <haxscramper> For example I could tell you that writing `let variable = case <expr>:` and raising in `else` might be a good idea |
16:26:16 | FromDiscord | <no name fits> ah ok |
16:26:20 | FromDiscord | <konsumlamm> but there are still enough case where `return` is useful and should be used |
16:26:23 | FromDiscord | <haxscramper> But I would be clobbered to death instantly |
16:26:28 | FromDiscord | <Rika> https://canary.discordapp.com/channels/371759389889003530/371759389889003532/809067427123429386 |
16:26:35 | FromDiscord | <Rika> see that as well |
16:26:38 | krux02 | @Araq: As I said earlier, I want an improved situation. The reason you banned me was I triggered you on a weak spot. If your solution is to ban me instead of fixing the weak spot, then I am all fine with the ban anyway. |
16:26:39 | FromDiscord | <haxscramper> Because this is actually very convoluted code |
16:26:47 | FromDiscord | <konsumlamm> it's more of a "avoid if it makes the code more simple" |
16:26:57 | krux02 | Then I see that my contributions aren't welcome anyway. |
16:27:11 | FromDiscord | <konsumlamm> (it being avoiding `return`) |
16:27:11 | krux02 | That would be equal to a soft ban. |
16:28:56 | krux02 | What is the point to be not banned in a community where problems are shoved under the rack anyway. |
16:29:05 | FromDiscord | <Yardanico> changed https://github.com/nim-lang/Nim/issues/17003 to the root cause (overloading resolution) |
16:30:14 | FromDiscord | <Yardanico> ah wait im stupid |
16:30:14 | FromDiscord | <Yardanico> lol |
16:30:19 | FromDiscord | <Clyybber> krux02: The RFC is about the problem, the problem is being solved |
16:30:54 | FromGitter | <Araq> we are both happy with your ban then, good bye. |
16:32:03 | krux02 | @Araq: I see a lucky man go home and be pround of what he did today. |
16:32:41 | FromGitter | <Araq> you're looking in a mirror, apparently. |
16:33:00 | FromGitter | <Araq> as I don't enjoy bans at all. which is why we had 2 of them in 10 years. |
16:33:01 | krux02 | @Araq: I am looking at an IRC chat |
16:33:05 | FromDiscord | <Yardanico> ah darn, it's not even overload resolution since methods are dynamic |
16:33:09 | FromDiscord | <Clyybber> krux02: Leave it be already, Araq already has acknowledged that we should fix it; and yet you are continuing with the shit slinging |
16:33:11 | FromDiscord | <Yardanico> i'm not sure how to classify the issue |
16:33:12 | krux02 | 2? |
16:33:30 | krux02 | I recall disruptek, me, timotheecour |
16:33:31 | krux02 | those are 3 already |
16:33:34 | krux02 | all very active memebres |
16:33:40 | krux02 | not counting actual trolls |
16:33:47 | FromDiscord | <konsumlamm> timothee was banned? |
16:33:55 | FromGitter | <Araq> timotheecour is back and you wanted me to ban him... |
16:34:11 | krux02 | yes |
16:34:23 | krux02 | I did |
16:34:23 | krux02 | that is the ban I agreed on |
16:34:35 | FromDiscord | <Yardanico> so we have Test1 = ref object of RootObj, Test2 = ref object of Test1, template dispose[T](x: ref T), method dispose(x: Test) and for Test2().dispose() the template is called instead of the method |
16:34:39 | krux02 | banning disruptek though not so much |
16:34:40 | FromDiscord | <Yardanico> not sure if this is even a bug |
16:34:55 | FromDiscord | <Yardanico> (edit) "Test)" => "Test1)" |
16:34:57 | FromDiscord | <Clyybber> krux02: Who asked? You are constantly digging up stuff to throw |
16:35:24 | FromDiscord | <Clyybber> In reply to @konsumlamm "timothee was banned?": a long time ago |
16:35:24 | FromDiscord | <konsumlamm> what was he banned for? |
16:35:39 | FromGitter | <Araq> for DOS'ing us |
16:35:39 | FromDiscord | <Clyybber> opening too much issues |
16:35:46 | FromDiscord | <konsumlamm> wait what |
16:35:48 | FromDiscord | <Clyybber> that could have been aggregated |
16:35:49 | krux02 | @konsumlamm: cluttering the issue tracker with incomprehensible issues everey day |
16:35:58 | FromDiscord | <konsumlamm> sounds like something he'd do lol |
16:36:03 | FromDiscord | <konsumlamm> though not intentionally |
16:36:13 | FromDiscord | <Clyybber> let's not dig up old stuff |
16:36:15 | FromDiscord | <Clyybber> that was resolved |
16:36:43 | * | NimBot joined #nim |
16:37:22 | * | a_chou joined #nim |
16:37:28 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OYl |
16:37:54 | FromDiscord | <Clyybber> Oh yeah, I don't think there is a toSet that gives a set |
16:37:57 | FromDiscord | <Clyybber> Only for HashSets |
16:38:21 | FromDiscord | <konsumlamm> there actually is toSet iirc |
16:38:25 | FromDiscord | <konsumlamm> in std/setutils |
16:38:35 | FromDiscord | <Clyybber> oh |
16:38:36 | FromDiscord | <Clyybber> nice |
16:38:47 | FromDiscord | <dom96> krux02: I'm amazed that you'd want disruptek to stay but not timotheecour |
16:39:23 | FromDiscord | <haxscramper> In reply to @no name fits "<@!608382355454951435> so I tried": What I meant is https://play.nim-lang.org/#ix=2OYm - there is no `toSet(string)` by default, but you could write one like this |
16:39:40 | FromDiscord | <konsumlamm> ~~inb4 timothee accuses you of DOSing him for constantly pinging him~~ |
16:39:47 | * | clyybber joined #nim |
16:39:50 | * | clyybber quit (Client Quit) |
16:39:55 | krux02 | @dom96: To be honest I saw you and disruptek had an argument. I would have used different words, but egenrally I agreed with him. I think you should improve your software. |
16:40:00 | FromDiscord | <haxscramper> By the way using `import std/<packagename>` or `std/[<package-1>, <package-2>]` is actually really recommended |
16:40:10 | krux02 | And not take his insult persnoally |
16:40:11 | FromDiscord | <haxscramper> Because some new modules can only be imported using `std/` |
16:40:21 | FromDiscord | <no name fits> oh! ok I'll remember that, thanks |
16:40:53 | FromDiscord | <dom96> I honestly have no words any more |
16:41:09 | FromDiscord | <konsumlamm> oh, std/setutils seems to require devel |
16:41:21 | FromDiscord | <Yardanico> ok I think I finally made a correct test case - but are methods even taken into the account in overloading resolution? |
16:41:32 | FromDiscord | <Yardanico> this is why nigui's 4th example crashes with arc/orc |
16:41:33 | FromGitter | <Araq> they are, yes |
16:41:36 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2OYn |
16:42:03 | FromDiscord | <konsumlamm> speaking of timothee and `std/`, he made a draft PR to add the path prefix to the generated docs :) |
16:42:10 | FromDiscord | <Clyybber> yep, pretty neat |
16:42:14 | FromDiscord | <haxscramper> In reply to @konsumlamm "oh, std/setutils seems to": It is actually only available on devel - https://nim-lang.github.io/Nim/setutils.html, but @no name fits, this has `toSet(string)` implementation from what I can see |
16:42:22 | stefantalpalaru | I want everybody to stay and act like thick-skinned adults. This community is too small to let petty arguments have serious consequences. |
16:42:27 | FromDiscord | <Clyybber> not sure if we should have it as the title or as a subtitle tho |
16:42:39 | FromDiscord | <dom96> I think timothee has really listened to feedback and has improved, right now he does a lot of great things. |
16:42:45 | FromDiscord | <Clyybber> yep |
16:42:46 | krux02 | @dom96: I had to fight with nimble a lot and eventually gave up on it. I open issue with it that were not mereged for a long time. And nimble constantly broke my project dependencies and never ensure that my software can be build reproducably. So I can understand when someone gets angry at you because of it. But oft course that is not the right way to communicate it after all you worked for free on it. |
16:43:20 | FromDiscord | <dom96> krux02: Yes, your last point is that all that matters |
16:43:21 | FromDiscord | <dom96> The rest doesn't |
16:43:39 | krux02 | @dom96: I was away for 6 months, so I don't know how much he changed. |
16:43:43 | FromDiscord | <dom96> (edit) removed "that" |
16:44:14 | krux02 | but I still sumble upon bad code that git tells me who wrote it. |
16:45:00 | FromDiscord | <dom96> stefantalpalaru: PMunch: spam is just one category that will get you banned here, there are others too just like in any positive community. |
16:45:25 | FromDiscord | <haxscramper> Well, nimble might use some refactoring I guess, and general ergonomics improvement, but flipping up and trying to boil the ocean and declaring that `nimble` is bad and fundamentally unfixable ... well, I can understand the reasoning, but just as `stefantalpalaru` said |
16:45:38 | ForumUpdaterBot | New thread by DPixie: Is "global_state" a special name in Nim's internals?, see https://forum.nim-lang.org/t/7495 |
16:45:44 | stefantalpalaru | Disagree, dom96. I prefer freedom over safety. |
16:45:52 | FromDiscord | <haxscramper> I don't see why carefuly discussing it is not an option |
16:46:19 | FromDiscord | <konsumlamm> is there a workaround for nimble not being able to depend on two different versions of a package? |
16:46:20 | krux02 | @dom96: It would all be much better if nimble would be a completely optional side project that can be used to manage nim packages. But nimble the central package manager that comes with nim and everybody who uses nim has to use in some form or another. It makes people sometimes mad when it doesn't work. Even if it is completely free. |
16:46:41 | FromDiscord | <Clyybber> can you discuss in #nimble please? |
16:46:51 | FromDiscord | <konsumlamm> sure |
16:47:00 | FromDiscord | <dom96> clyybber: +1 |
16:47:04 | FromDiscord | <Clyybber> In reply to @konsumlamm "sure": oh, wasn't referring to you actually :p |
16:47:11 | FromDiscord | <konsumlamm> ah lol |
16:47:11 | FromDiscord | <Clyybber> but I guess it fits there better too :) |
16:47:23 | krux02 | @Clyybber: this is not about nimble, nor is this about the RFC. This is about banning people and the reasons behind it. |
16:47:45 | FromDiscord | <hamidb80> Araq didn't ban krux, right? |
16:47:55 | FromDiscord | <Clyybber> not from IRC; but from the github |
16:48:15 | FromDiscord | <dom96> stefantalpalaru: Yes, well I'm afraid this is not how this community will be managed. |
16:48:25 | krux02 | @hamidb80: he did |
16:48:28 | FromDiscord | <hamidb80> In reply to @Clyybber "not from IRC; but": Aha |
16:48:31 | krux02 | I am banned on github |
16:49:08 | krux02 | after all, I am still on gitter and discord. |
16:50:08 | krux02 | @Araq: get ready that I will rub it in that you banned me. |
16:50:21 | FromDiscord | <Clyybber> krux02: You are acting just childish now |
16:50:55 | krux02 | @Clyybber: Then, what do you suggest should I do? |
16:51:23 | stefantalpalaru | Fork Nim. |
16:51:32 | krux02 | stefantalpalaru, I already did |
16:51:56 | krux02 | my PR in Nim were closed by the stale bot |
16:52:03 | FromDiscord | <Clyybber> krux02: Either accept it, and stop slinging shit, maybe you'll get unbanned; or > will you apologize for blaming me that I pull the spec out of my ass and it's not worth reading? |
16:52:04 | krux02 | not reviewed. ready to be merged. |
16:52:43 | krux02 | @Clyybber: these are the words that I used: http://ix.io/2OXN |
16:53:20 | krux02 | And I told you that I had a discussion with araq personally about this change. |
16:53:33 | krux02 | I told his as clearly as possible that it is a bad idea. |
16:53:50 | krux02 | It was a personal discussion on voice chat. |
16:53:57 | krux02 | then He ignored me. |
16:54:06 | krux02 | and changed the spec |
16:54:15 | krux02 | and then pointed to the spec and said read it |
16:54:23 | krux02 | WTF |
16:54:29 | FromGitter | <Araq> and then you never understood it... |
16:54:32 | stefantalpalaru | You guys should do a rap battle. |
16:54:43 | FromDiscord | <Clyybber> stefantalpalaru: lol |
16:55:35 | PMunch | @dom96, obviously, I was agreeing with stefantalpalaru that Araq and krux02 could take this discussion somewhere more private and not work this out in a public forum while other users where trying to get help |
16:56:07 | FromDiscord | <dom96> PMunch: huh, doesn't look that way to me https://irclogs.nim-lang.org/10-02-2021.html#16:07:45 |
16:56:23 | PMunch | I was agreeing to his second part, not the first |
16:56:40 | FromDiscord | <dom96> I see |
16:56:47 | FromDiscord | <dom96> I wouldn't say that was obvious š |
16:56:48 | PMunch | (Didn't open that link, my computer is a bit loaded at the moment and I'm afraid that it will crash if FF starts) |
16:57:05 | PMunch | But I assume it was the comment I made where I just said "agreed" or something like that |
16:57:31 | FromDiscord | <Clyybber> In reply to @PMunch "(Didn't open that link,": lol, another "how many args can a function have" style experiment? |
16:57:46 | PMunch | Haha, no I'm playing modded KSP |
16:57:51 | FromDiscord | <Clyybber> haha |
16:58:19 | PMunch | And for some reason it just tanked my performance while only using about a third of my CPU and half my RAM.. |
16:58:41 | stefantalpalaru | Does it phone home? |
16:59:28 | * | rockcavera quit (Remote host closed the connection) |
17:00:41 | krux02 | @Araq: The point is, I don't care about a spec that just represents your opinion of the time when you were writing it instead of clear technicaly specifications. |
17:01:12 | FromGitter | <Araq> you cannot apologize, I cannot unban you. it's pretty simple really. |
17:02:18 | krux02 | Sorry that I pushed your buttons and made you ban me |
17:03:50 | krux02 | @Araq, do you unban me now? |
17:05:32 | FromGitter | <Araq> it doesn't feel like an apology. |
17:06:28 | FromDiscord | <reilly> Just stumbled across this thing: https://github.com/jart/cosmopolitan Out of curiosity, is this something that could be made compatible with Nim? That'd be pretty neat. |
17:06:56 | FromDiscord | <Rika> its possible but i wouldnt recommend using it |
17:07:00 | FromDiscord | <Rika> its very hacky imo |
17:07:42 | FromDiscord | <reilly> Immediately after asking this I realized that of course you could, w/ the generated C code in nimcache. I'm sure it would be hacky though, just food for thought. |
17:08:11 | * | rockcavera joined #nim |
17:10:57 | FromDiscord | <JSGRANT> Uh, the logo for that is literally ... https://media.discordapp.net/attachments/371759389889003532/809109158774964284/honeybadger.png |
17:10:58 | FromDiscord | <JSGRANT> LOOOOOOOOOOOOL |
17:11:07 | * | hyiltiz quit (Ping timeout: 256 seconds) |
17:11:27 | FromDiscord | <dom96> omg is that our mascot |
17:11:56 | FromDiscord | <JSGRANT> On a similar note; My Honeybadger 'plush' is coming today. Should be on my bookshelf by tonight. :^) |
17:12:15 | PMunch | @JSGRANT, have you made a crown for it? |
17:12:25 | krux02 | it looks better than the go mascot. |
17:12:42 | krux02 | and better than the crown |
17:12:59 | FromDiscord | <JSGRANT> PMunch: Trying to think how to do it; Was looking online for a premade one but they all stink. lol |
17:13:27 | FromDiscord | <JSGRANT> Need to just get like some yellow fabric and cut it out myself self. |
17:13:34 | PMunch | I made a 3D model for printing at some point |
17:14:23 | FromDiscord | <JSGRANT> If there's ever an excuse to shell out a few thousand for a 3d-printer... <_< >_> |
17:14:41 | FromDiscord | <JSGRANT> Wow thanks Discord; Underscores are nix'd lol |
17:15:04 | FromDiscord | <JSGRANT> \shifting look back and forth \ (?) |
17:15:21 | FromDiscord | <JSGRANT> At least it respects escapes |
17:15:42 | krux02 | nix'd ? |
17:15:50 | FromDiscord | <JSGRANT> nyx'd? |
17:15:52 | FromDiscord | <JSGRANT> killed |
17:15:55 | FromDiscord | <JSGRANT> axed |
17:16:31 | krux02 | let me try underscores ___ |
17:17:52 | FromDiscord | <reilly> In case you didn't already know, you can get around that with a backslash. \_\_hello\_\_ = `\hello` |
17:18:06 | FromDiscord | <no name fits> is there a built-in way to convert a string to a set[char] or am I misunderstanding something? |
17:18:36 | FromDiscord | <no name fits> or if there a way to use char slice to init a HashSet? |
17:18:39 | FromDiscord | <haxscramper> In reply to @no name fits "is there a built-in": ON devel https://nim-lang.github.io/Nim/setutils.html |
17:18:42 | FromDiscord | <haxscramper> (edit) "ON" => "On" |
17:18:58 | FromDiscord | <no name fits> Am I expected to use the devel? |
17:19:02 | FromDiscord | <haxscramper> No |
17:19:14 | FromDiscord | <no name fits> Sorry if my questions are dumb |
17:19:25 | FromDiscord | <haxscramper> But in general it is a three-line implementation, so you can just use it |
17:19:30 | FromDiscord | <JSGRANT> Also I like the crown; Made a lil man just yesterday with that idea in mind (have been experimenting with the idea of messing around with an OS again ... since @Ardek casually mentioned it the other day; I really can't help myself...) https://media.discordapp.net/attachments/371759389889003532/809111312943939604/minmo.png |
17:19:33 | FromDiscord | <no name fits> alrighty |
17:19:39 | FromDiscord | <exelotl> In reply to @JSGRANT "Uh, the logo for": honestly if our honeybadger looked like that and not like "i am going to kick down your door and devour you alive" I would be in full support of the honeybadger |
17:19:42 | FromDiscord | <JSGRANT> Supposed to look like an upside crown with kirby-like sitting feet |
17:19:49 | FromDiscord | <Yardanico> @exelotl that's how it should look like :P |
17:19:51 | FromDiscord | <Yardanico> :nimRawr: |
17:20:16 | FromDiscord | <Solitude> :nimRawr: šŖ go programmer spotted |
17:20:27 | FromDiscord | <Yardanico> :nimAngry: |
17:20:38 | * | hyiltiz joined #nim |
17:20:38 | * | hyiltiz quit (Changing host) |
17:20:38 | * | hyiltiz joined #nim |
17:21:52 | FromDiscord | <JSGRANT> I still don't exactly get the 'reasoning' behind the honeybadger -- if it even needs any; lol Is it that they have the tendency to "go after" animals much bigger than them? |
17:22:08 | * | vicfred joined #nim |
17:22:17 | FromDiscord | <arne> it is hip |
17:23:28 | FromDiscord | <JSGRANT> @arne I mean it was a meme; but like 10 or-so years ago. Don't know if I'd exactly call it a hip / relevant animal anymore ... unless I'm missing something? lol |
17:24:01 | FromDiscord | <mratsim> It was supposed to be a lion >_> |
17:25:01 | Clonkk[m] | Why not go for a kingbird if you want something related to a crown ? |
17:25:37 | FromDiscord | <JSGRANT> @mratsim Well it's not like it's "too late" or anything; Wouldn't exactly say that the honeybadger is a universally loved / accepted symbol in the community or anything. loool When I asked the other day about it (regarding getting one for my bookshelf) someone was like "... uh I guess the honeybadger still?" loool |
17:26:33 | FromDiscord | <Rika> barely anyone knows about the honeybadger i feel |
17:26:40 | FromDiscord | <Yardanico> yes it was just a concept |
17:27:39 | FromDiscord | <JSGRANT> I don't even mind the honeybadger as a mascot; Agree that the popular one is "way too aggressive" like I've seen posted about it in various places -- they're supposed to be borderline cutesy not WE'RE GOING TO F YOUR SH-- UP!!! |
17:28:13 | FromDiscord | <Yardanico> it's at least 6 years old, probably more |
17:28:15 | FromDiscord | <Yardanico> https://github.com/nim-lang/assets/blob/68c7559921fc98d47d96f0bd1d446e27d53bd8c4/Art/mascot.svg |
17:29:26 | FromDiscord | <JSGRANT> @Yardanico In the wild a HoneyBadger only lives 7-8 years. His time is coming ... |
17:29:28 | FromDiscord | <JSGRANT> ;_; |
17:30:18 | FromDiscord | <JSGRANT> If it ever becomes a Lion ... is his name ... going to be ... Nimba ? |
17:30:19 | FromDiscord | <hamidb80> In reply to @krux02 "<@757977596066660455>, do you unban": Any progress? |
17:30:54 | FromDiscord | <mratsim> In reply to @hamidb80 "Any progress?": Discord replies don't work across IRC/Matrix/Gitter |
17:32:09 | FromDiscord | <Yardanico> they work in IRC |
17:32:18 | FromDiscord | <Yardanico> pls don't spread misinformation :P |
17:32:29 | FromDiscord | <Solitude> or you might get banned |
17:32:33 | FromDiscord | <Yardanico> and because they work in IRC, they work in Gitter |
17:32:38 | FromDiscord | <Yardanico> not sure about matrix |
17:32:44 | FromDiscord | <JSGRANT> @Yardanico Do they just repost the original message in quotes or something? |
17:32:50 | FromDiscord | <Yardanico> there's a slight bug for now, but they work https://media.discordapp.net/attachments/371759389889003532/809114665698197525/unknown.png |
17:32:52 | FromDiscord | <Yardanico> @JSGRANT context |
17:32:58 | FromDiscord | <Yardanico> first 4 words at max |
17:33:14 | FromDiscord | <JSGRANT> Ah, not ideal but fair I guess to avoid irc spam |
17:33:17 | FromDiscord | <Yardanico> also they're italicized |
17:33:26 | FromDiscord | <Yardanico> i mean the "in reply to" thing |
17:33:42 | leorize | Yardanico: it does work but it won't be rendered as a native reply in matrix |
17:33:43 | ForumUpdaterBot | New thread by Mantielero: Fmusdk: porting from C to nim - looking for advice, see https://forum.nim-lang.org/t/7496 |
17:34:05 | FromDiscord | <Yardanico> @leorize well we use t2bot for matrix, no? |
17:34:09 | FromDiscord | <Yardanico> doesn't it support replies? :P |
17:34:23 | FromDiscord | <Yardanico> if you're talking about the freenode matrix bridge then yeah, it won't be native |
17:34:50 | leorize | we only use t2bot for #nim-science and #nim-test :P |
17:34:56 | FromDiscord | <Yardanico> oh |
17:34:57 | FromDiscord | <mratsim> oh I wasn't aware they worked |
17:35:04 | FromDiscord | <Yardanico> yeah I added support for them recently |
17:35:10 | FromDiscord | <Yardanico> before they just posted the reply message itself |
17:35:13 | FromDiscord | <mratsim> you don't spread information at all š |
17:36:10 | krux02 | @hamidb80: replies on in IRC to dicord users are ugly, and here: https://imgur.com/L2XATUr.png |
17:36:13 | leorize | as much as I hate to say it, not spreading information is kind of a Nim thing :P |
17:36:28 | leorize | for example, only now I realize that fusion/astdsl is a thing and it's super cool |
17:37:10 | FromDiscord | <Avatarfighter> Whatās astdsl ? |
17:37:19 | FromDiscord | <mratsim> something cool |
17:37:26 | FromDiscord | <mratsim> https://tenor.com/view/smooth-so-smooth-easy-no-problem-hes-good-gif-15610930 |
17:37:30 | FromDiscord | <JSGRANT> https://nim-lang.github.io/fusion/src/fusion/astdsl.html |
17:37:39 | leorize | karax-like API to build AST |
17:38:03 | FromDiscord | <Avatarfighter> judging by how fast everyone responded itās got to be cool lol! |
17:38:13 | FromDiscord | <mratsim> never used it |
17:38:20 | FromDiscord | <mratsim> "Save trees" they say |
17:38:22 | FromDiscord | <Yardanico> so it's a macroutils clone? :P |
17:38:24 | krux02 | looks like a new `quote` |
17:38:38 | FromDiscord | <Yardanico> idk if you can do loops with macroutils though |
17:38:47 | FromDiscord | <JSGRANT> dumpLisp ? |
17:38:52 | FromDiscord | <JSGRANT> https://tenor.com/view/vince-mc-mahon-falling-in-chair-surprised-wwe-gif-7810711 |
17:40:13 | FromDiscord | <JSGRANT> Honestly at minimum 1/3rd of my interest in Nim is the metaprogramming-magic; Love to see it |
17:42:15 | FromDiscord | <hamidb80> In reply to @JSGRANT "Honestly at minimum 1/3rd": Yeah. Meta programming in Nim is a hot topic |
17:43:01 | FromDiscord | <JSGRANT> @hamidb80 Hot-topic as-in popular / interesting or controversial ? |
17:43:37 | FromDiscord | <JSGRANT> In some ways I see Nim as the Anti-Go |
17:43:37 | FromDiscord | <hamidb80> In reply to @JSGRANT "<@!745944009918251010> Hot-topic as-in popular": I think all of them š |
17:43:50 | FromDiscord | <haxscramper> In reply to @JSGRANT "<@!745944009918251010> Hot-topic as-in popular": Absolutely everything uses metaprogramming |
17:43:58 | FromDiscord | <JSGRANT> In reply to @JSGRANT "In some ways I": And to be clear (I think that's a good thing). |
17:44:26 | FromDiscord | <konsumlamm> In reply to @JSGRANT "In some ways I": every language with some features can be seen as an anti-go |
17:45:18 | FromDiscord | <hamidb80> In reply to @JSGRANT "And to be clear": Programming is about thinking, not writing |
17:45:28 | leorize | to demonstrate the coolness of astdsl, here's the rewrite of that macro I wrote for @mattrp: from https://play.nim-lang.org/#ix=2OUU to https://play.nim-lang.org/#ix=2OYI |
17:45:37 | FromDiscord | <hamidb80> Macros can reduce a lot of boilerplates |
17:46:08 | FromDiscord | <Yardanico> reply spam :D https://media.discordapp.net/attachments/371759389889003532/809118012380151848/unknown.png |
17:46:31 | FromDiscord | <JSGRANT> In reply to @Yardanico "reply spam :D": DYING loooool |
17:46:32 | FromDiscord | <Yardanico> hehe https://media.discordapp.net/attachments/371759389889003532/809118114678833223/unknown.png |
17:46:36 | FromDiscord | <JSGRANT> Didn't even notice tbh |
17:47:12 | FromDiscord | <JSGRANT> @hamidb80 Also eh to be fair, it's about both; You don't want to get so abstracted that it's actually hard to reason about what's happening. "Great power; Great responsibility yadda yadda yadda" but still |
17:47:19 | FromDiscord | <JSGRANT> Much rather have it as an option than not |
17:49:21 | FromDiscord | <JSGRANT> @Yardanico On the irc variant -- if you only looked at the first-half of those messages; You'd just assume I said something very controversial loool |
17:49:40 | FromDiscord | <JSGRANT> In reply to @JSGRANT ... In reply to @JSGRANT ... In reply to @JSGRANT ... In reply to @JSGRANT ... In reply to @JSGRANT ... |
17:50:30 | saem | @Araq: I'll look again tonight hopefully, unless timothee and xfly are still stuck on nimsuggest tests. But your response was a little ambiguous, I'm presuming you could go either way, just want nkError sooner than later, which makes sense. I think I was assuming the tests to be a little more inflexible than I should have and instead I should ask myself does the message as tested really help the user and explain the issue or |
17:50:31 | saem | not. Then see about getting it green. |
17:51:52 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OYN |
17:52:11 | FromDiscord | <haxscramper> In reply to @Yardanico "hehe": Will you filter out discord ids in later vesions of a bridge? |
17:52:30 | FromDiscord | <Clyybber> @no name fits I think the version without toHashSet is best, should also be the fastest |
17:52:36 | leorize | @no name fits: it's a bit too heavyweight |
17:52:52 | FromDiscord | <no name fits> alrighty |
17:53:08 | leorize | instead, create a set containing the entire alphabet, then iterate through the string, excluding characters in the string from the set |
17:53:11 | FromDiscord | <Yardanico> @haxscramper wdym? |
17:53:41 | FromDiscord | <no name fits> In reply to @leorize "instead, create a set": Yeah that was my initial solution š I'll go back to what I had before |
17:53:50 | FromDiscord | <haxscramper> In reply to @Yardanico "<@608382355454951435> wdym?": https://media.discordapp.net/attachments/371759389889003532/809119952245358652/unknown.png |
17:53:51 | FromDiscord | <Hi02Hi> Hi. new here. @no name fits if the hashsets are equal, cant you just return input == alphabet ? |
17:54:11 | FromDiscord | <Hi02Hi> (edit) "input" => "input.toSet" | "alphabet" => "alphabet.toSet" |
17:54:17 | FromDiscord | <Yardanico> If you mean the pings being displayed as IDs - raw message text in Discord is like that, for normal messages I handle that but in replies I just take the original message's content |
17:54:37 | FromDiscord | <Yardanico> I have it in the GitHub issues list |
17:54:39 | FromDiscord | <no name fits> In reply to @Hi02Hi "Hi. new here. <@!199678698499080192>": It might also contain numerics, which I'm supposed to ignore, so I'm not sure |
17:55:55 | FromDiscord | <Hi02Hi> ahh |
17:57:32 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OYP |
17:58:01 | FromDiscord | <Hi02Hi> welcome |
17:58:37 | FromDiscord | <Hi02Hi> (edit) "welcome" => "welcome. didn't help much though" |
17:58:52 | PMunch | @Yardanico, I think astdsl came out right about the same time as macroutils |
17:58:56 | FromGitter | <Araq> saem: some of the failing tests cases for nkError might indicate a design problem with nkError |
17:59:02 | PMunch | They're similar, but a slightly different approach |
18:00:31 | leorize | @no name fits: a slightly more performant version for you: https://play.nim-lang.org/#ix=2OYS |
18:00:33 | FromDiscord | <Yardanico> Oh, okay, never heard of astdsl until today so I assumed that it was pretty new :) |
18:00:50 | PMunch | Not as far as I remember |
18:00:58 | PMunch | I might be wrong of course |
18:01:29 | leorize | this is because `toLower(string)` will first create a new string with all the character lowercased, which involves an another loop |
18:01:51 | leorize | @Yardanico: have you heard of fusion/matching then? :p |
18:02:27 | FromDiscord | <Yardanico> yes |
18:02:57 | leorize | even after we have fusion, we still don't makes things more discoverable |
18:02:57 | * | leorize sighs |
18:09:25 | saem | @Araq: gotcha, so I should keep that in mind as I go and discuss/rework along the way. |
18:14:34 | FromDiscord | <mratsim> @leorize, having multidocs search would help (and no theindex is not discoverable either) |
18:14:40 | FromDiscord | <no name fits> In reply to @leorize "@no name fits: a": oh thanks! |
18:15:24 | FromDiscord | <Daniel> ot: rust got detached from Mozilla |
18:15:44 | FromDiscord | <Rika> woah what really? what happened? was it the layoffs |
18:16:00 | * | a_chou quit (Ping timeout: 246 seconds) |
18:16:02 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OYZ |
18:16:09 | leorize | I think it's just that rust is no longer mozilla's rust, right? |
18:16:16 | FromDiscord | <haxscramper> In reply to @mratsim "<@695851404832538684>, having multidocs search": Ideally something like https://hoogle.haskell.org/ |
18:16:19 | leorize | and probably mozilla remains a funding source |
18:17:25 | FromDiscord | <hamidb80> Can anyone explain me what a "scaffold" is exacly? āµI couldn't find any translation for it in dictionary |
18:17:27 | leorize | @no name fits: we have `..<` to replace your `input.len - 1` :) |
18:17:50 | FromDiscord | <haxscramper> In reply to @no name fits "So I did another": sent a code paste, see https://play.nim-lang.org/#ix=2OZ0 |
18:17:52 | FromDiscord | <haxscramper> To avoid repeating `result[i]` all ove |
18:18:06 | FromDiscord | <haxscramper> In reply to @leorize "@no name fits: we": And either this, or `input.high` |
18:18:13 | FromDiscord | <no name fits> oh I totally forgot the case expression was a thing :NotLikeThis: |
18:18:15 | FromDiscord | <Hi02Hi> @no name fits looks fine, but one style note i have is that on L3, input.len - 1 can be replaced with input.high |
18:18:36 | FromDiscord | <no name fits> thanks guys! |
18:21:33 | FromDiscord | <mratsim> or you create a mapping, `const Map = [dna.G: rna.C, dna.C, rna.G, dna.T, rna.A, dna.A, rna.U]` |
18:21:44 | FromDiscord | <mratsim> (edit) "dna.C," => "dna.C:" | "dna.T," => "dna.T:" | "dna.A," => "dna.A:" |
18:21:49 | FromGitter | <haxscramper> @Araq you said that "(final official release is one week from now)" (https://irclogs.nim-lang.org/10-02-2021.html#13:48:27) - this was about nim correct? |
18:22:42 | FromDiscord | <Hi02Hi> @mratsim is there a way to error out if its unrecognized? |
18:23:02 | FromDiscord | <mratsim> In reply to @Hi02Hi "<@!570268431522201601> is there a": it will |
18:23:35 | FromDiscord | <Hi02Hi> like a custom error message or something? |
18:24:58 | FromDiscord | <mratsim> In reply to @Hi02Hi "like a custom error": The compiler will complain that you are using undefined values |
18:25:03 | FromDiscord | <mratsim> this is an enum syntax |
18:25:10 | FromDiscord | <Hi02Hi> ok |
18:25:36 | FromGitter | <Araq> @haxscramper yes but these are merely bugfix releases |
18:25:46 | FromGitter | <Araq> 1) 6 is a long time away :-/ |
18:26:39 | FromDiscord | <haxscramper> Yes, but I still need to make sure my fusion PR is ready & all |
18:27:06 | FromDiscord | <haxscramper> And article for it is already written etc. so maybe it might look as something more than just patch release |
18:27:25 | FromDiscord | <haxscramper> Like with ARC - new features + article etc. |
18:28:24 | FromDiscord | <haxscramper> Python got pattern matching RFC merged recently |
18:30:08 | stefantalpalaru | @Araq, I don't know if you still check the super-secret #nim-testers channel, but I need a 1.2.10 release for Nimbus-eth2. Please do the needful. |
18:30:29 | FromGitter | <Araq> what shall it contain? |
18:30:37 | stefantalpalaru | version-1-2 HEAd. |
18:30:58 | FromGitter | <Araq> seen https://forum.nim-lang.org/t/7494 ? |
18:31:13 | FromDiscord | <mratsim> "Please do the needful", ugh, the only time I heard this was from lazy support provided by Indian company. |
18:32:07 | stefantalpalaru | No, but that commit is the same as HEAD, so it's perfectly fine for me. I already tested that. |
18:33:16 | FromGitter | <Araq> ok, so just to be really clear: our release candidate is what you need? the RC will turn into 1.2.10 as Miran is on holidays |
18:33:26 | stefantalpalaru | Correct. |
18:34:37 | FromGitter | <Araq> alright |
18:35:36 | * | PMunch quit (Quit: leaving) |
18:42:32 | * | Nick1234 joined #nim |
18:55:30 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2OZd |
18:55:39 | FromDiscord | <no name fits> Looks fine? |
18:56:21 | FromDiscord | <no name fits> And yeah it's just supposed to return the number of errors |
18:57:57 | FromDiscord | <haxscramper> Looks good to me |
18:59:36 | FromDiscord | <no name fits> Yay! <:pepo_hype:470228232164343808> |
18:59:42 | * | Nick1234 quit (Quit: Connection closed) |
19:07:09 | FromDiscord | <Daniel> In reply to @leorize "I think it's just": indeed |
19:10:07 | FromDiscord | <no name fits> there's hope for me yet |
19:28:42 | FromDiscord | <CodeHz> nim fusion's document says it will raise MatchError on failure, but actually it doesn't raise... https://media.discordapp.net/attachments/371759389889003532/809143822957150269/unknown.png |
19:30:47 | FromDiscord | <CodeHz> And leaves an unused variable https://media.discordapp.net/attachments/371759389889003532/809144346531594260/unknown.png |
19:30:59 | FromGitter | <Araq> @haxscramper can you please update fusion to use the new `case` macro syntax? |
19:33:43 | FromDiscord | <CodeHz> and when not use case macro, got many unused variables (it seems to be incorrected result... https://media.discordapp.net/attachments/371759389889003532/809145088625213471/unknown.png |
19:34:00 | FromDiscord | <haxscramper> @CodeHz all fixed in follow-up PR |
19:34:05 | FromDiscord | <haxscramper> https://github.com/nim-lang/fusion/pull/61/files#diff-33abcca7f03798f7fd369f34051711499dee90cea8d05859cd933d31ce115f09R2026 - test for raises |
19:34:39 | FromDiscord | <CodeHz> In reply to @haxscramper "<@!765817034944020521> all fixed in": ok |
19:34:43 | FromDiscord | <haxscramper> @Araq I added ``macro `case`()`` couple of days ago |
19:34:59 | FromGitter | <Araq> I didn't see the PR. did I miss it? |
19:35:20 | FromDiscord | <haxscramper> https://github.com/nim-lang/fusion/pull/61/commits/c66b8553dd7eadb6942aa2c97da1155288df4680 |
19:35:37 | FromDiscord | <haxscramper> @hlaaftana commented on that one and I pushed fix right after |
19:55:50 | * | letto quit (Quit: Konversation terminated!) |
19:58:07 | * | letto joined #nim |
20:01:40 | * | qwr quit (Ping timeout: 265 seconds) |
20:29:09 | * | matthias[m]5 joined #nim |
20:29:10 | matthias[m]5 | M |
20:44:29 | * | kenran joined #nim |
20:44:55 | * | kenran quit (Client Quit) |
20:46:55 | * | haxscramper quit (Remote host closed the connection) |
20:57:25 | * | Vladar quit (Quit: Leaving) |
20:58:28 | * | quantimnot joined #nim |
21:08:07 | FromDiscord | <mratsim> F |
21:14:35 | FromDiscord | <exelotl> W |
21:22:26 | * | alex[m]3 joined #nim |
22:02:15 | * | vicfred_ joined #nim |
22:02:28 | FromGitter | <Araq> N |
22:02:29 | * | vicfred quit (Read error: Connection reset by peer) |
22:11:38 | * | qwr joined #nim |
22:17:17 | * | a_chou joined #nim |
22:23:14 | FromDiscord | <carpal> what do you use as text editor for nim= |
22:23:15 | FromDiscord | <carpal> (edit) "nim=" => "nim?" |
22:23:39 | FromDiscord | <Recruit_main707> intellij, the most popular one is vscode |
22:24:14 | FromDiscord | <carpal> I tried intellij too, but the nim plug in for i. works bad |
22:25:30 | FromDiscord | <carpal> I always used vscode, but the extension in not very good, but acacceptable |
22:26:03 | FromDiscord | <Recruit_main707> did you try the ""official"" one? |
22:26:11 | FromDiscord | <carpal> yes |
22:26:53 | FromDiscord | <Recruit_main707> its still very new, i hope it will become a good option in the future |
22:27:16 | FromDiscord | <Recruit_main707> the next most used editor is vim iirc |
22:27:36 | FromDiscord | <carpal> for example: when I press . and I write a proc name to use a method, this does not appear https://media.discordapp.net/attachments/371759389889003532/809188847987982426/unknown.png |
22:27:46 | FromDiscord | <carpal> this popup I mean |
22:28:14 | FromDiscord | <dk> I'm afraid vscode is one of the best we have |
22:28:19 | FromDiscord | <dk> I mean, the extension |
22:28:22 | FromDiscord | <Recruit_main707> yet |
22:28:37 | FromDiscord | <carpal> if I call the proc as an instance one, the popup will not appear https://media.discordapp.net/attachments/371759389889003532/809189105996660857/unknown.png |
22:28:42 | FromDiscord | <dk> I heard people saying nvim's nim extension is good |
22:28:59 | FromDiscord | <Recruit_main707> if only my neovim didnt crash more than i write |
22:29:01 | FromDiscord | <carpal> In reply to @dk "I'm afraid vscode is": yes yes, not bad, but very slow on big projects |
22:29:02 | FromDiscord | <dk> From my experience kakoune has problems with nim (the lsp) |
22:29:16 | FromDiscord | <dk> you need to kill nimsuggest processes from time to time |
22:29:29 | FromDiscord | <dk> if they take more than 0% cpu, they're propably stuck |
22:30:21 | FromDiscord | <carpal> but I need nimsuggest |
22:30:33 | FromDiscord | <dk> it should start again |
22:30:53 | FromDiscord | <dk> I usually restart the editor just to be sure |
22:31:40 | * | dddddd_ joined #nim |
22:31:52 | FromDiscord | <dk> the tooling situation is bad but the language makes up for it |
22:32:59 | * | dddddd quit (Ping timeout: 256 seconds) |
22:35:05 | * | a_chou quit (Ping timeout: 240 seconds) |
22:55:14 | * | j-james joined #nim |
22:56:09 | FromDiscord | <SneakyBaguette> In reply to @dk "I heard people saying": Indeed. I use alaviss/nim.nvim extension with NimLSP and I don't have any issue |
22:57:42 | FromDiscord | <SneakyBaguette> Since it's neovim, even if nimsuggest gets stuck restarting is almost instant |
23:00:27 | FromDiscord | <slymilano> Hey ya'll my asyncCheck's aren't running anymore. š¦ I'm on latest Nim and this bug happened last year in October as well. I'm using Prologue, and if I comment out prologue's app.run() the asyncChecks function as intended. I'm probably making a dumb mistake, any pointers? https://github.com/sergiotapia/torrentinim/blob/master/src/torrentinim.nim#L31 |
23:01:35 | FromDiscord | <slymilano> My intent with asyncCheck is to spin up crawlers for every website source we're pulling data from, then after that fire Prologue's app.run() to get the web api running. |
23:02:42 | FromGitter | <Araq> please also ask on Prologue's issue tracker |
23:02:54 | FromDiscord | <slymilano> thank you will do |
23:03:34 | FromDiscord | <slymilano> https://github.com/planety/prologue/issues/68 |
23:03:41 | FromDiscord | <slymilano> this might help trying now! |
23:05:13 | * | tane quit (Quit: Leaving) |
23:10:15 | FromDiscord | <slymilano> @Araq Thank you for your suggestion, this fixed the issue. However I'm not sure what the difference between usesStdlib and usestd is. They both seem equivalent. https://github.com/sergiotapia/torrentinim/commit/9b5b41ce65510807b0c7f00c0ee3dcbdc454fa77 |
23:12:31 | FromDiscord | <konsumlamm> for runnableExamples in the random module, would it be acceptable to just keep echo? |
23:12:37 | FromDiscord | <Avatarfighter> @slymilano Do you plan on adopting a similar API to jackett? |
23:13:00 | FromDiscord | <slymilano> Yes sir, working on that after I land sonarr/radarr compatible API |
23:13:25 | FromDiscord | <Avatarfighter> nice Iām excited |
23:13:56 | FromDiscord | <Avatarfighter> Jackett has been failing me recently as an indexer so Iām excited |
23:14:59 | FromDiscord | <slymilano> Nice I couldnt do it without this language, i really enjoy working with nim, very pure. like i'm working with my hands and carving out something sharp and explicit hard to explain |
23:27:57 | * | stefantalpalaru quit (Ping timeout: 272 seconds) |
23:43:03 | FromDiscord | <neow> why is the syntax for creating instances of closure iterators this https://media.discordapp.net/attachments/371759389889003532/809207834952728576/unknown.png |
23:45:11 | FromDiscord | <ElegantBeef> You mean why does it return 0 when done? |
23:45:31 | FromDiscord | <neow> nope, why does `var b = a` create a new "instance" of the iterator |
23:45:42 | FromDiscord | <neow> why is it not `var b = a()` |
23:46:13 | FromDiscord | <neow> or why can I not `echo a()` |
23:46:59 | FromDiscord | <ElegantBeef> Why would you do `var b = a()` |
23:47:14 | FromDiscord | <ElegantBeef> You are not invoking `a` there you're saying b is whatever a is |
23:47:23 | FromDiscord | <ElegantBeef> It's the same thing with pointer procedures |
23:47:30 | FromDiscord | <neow> the same reason why I'd `items(whateverSequence)` |
23:47:46 | FromDiscord | <ElegantBeef> Except items takes a parameter |
23:48:45 | FromDiscord | <ElegantBeef> I dont know why it is the way, but it seems sensible since you're not unrolling the iterator like you are with items and the like |
23:48:59 | FromDiscord | <neow> https://media.discordapp.net/attachments/371759389889003532/809209327985885204/unknown.png |
23:49:02 | FromDiscord | <neow> this does not compile |
23:49:25 | FromDiscord | <neow> attempting to call routine: 'a' ... of kind 'iterator' |
23:49:27 | FromDiscord | <ElegantBeef> And it shouldnt since you're expected to provide adder with each invoke of the closure |
23:49:56 | FromDiscord | <neow> hmm |
23:50:00 | FromDiscord | <ElegantBeef> non closure iterators are not functions, they're fancy templates |
23:50:15 | FromDiscord | <ElegantBeef> Atleast as i understand them |
23:51:51 | FromDiscord | <Avatarfighter> Closure iterators are resumable functions and so one has to provide the arguments to every call |
23:52:15 | FromDiscord | <ElegantBeef> And you do the same for normal iterators |
23:52:18 | FromDiscord | <neow> I still don't understand why I need to "copy" it to a new variable or create an "instance" with such a weird syntax |
23:52:30 | FromDiscord | <ElegantBeef> Cause it's basically a pointer function |
23:53:09 | FromDiscord | <Avatarfighter> @neow the syntax is really weird but you'll want to wrap your closure iterator in a proc to pass arguments once |
23:53:37 | FromDiscord | <neow> In reply to @Avatarfighter "<@!726113081947717734> the syntax is": yes I figured that's possible |
23:53:57 | FromDiscord | <ElegantBeef> I mean it's identical to what you'd do with a pointer proc so i dont see how it's weird https://play.nim-lang.org/#ix=2P0A |
23:54:06 | FromDiscord | <Avatarfighter> I'm getting all my info from this btw <https://nim-lang.org/docs/manual.html#closures-creating-closures-in-loops> |
23:54:17 | FromDiscord | <neow> In reply to @ElegantBeef "I mean it's identical": because you can call the original function as well |
23:54:20 | FromDiscord | <Avatarfighter> Its really weird behavior though I will admit I wouldn't have expected this to be honest |
23:56:28 | * | j-james quit (Quit: WeeChat 3.0) |
23:57:43 | FromDiscord | <ElegantBeef> It'd be giving a global state to them which is weirder to me |
23:58:02 | * | vicfred_ quit (Quit: Leaving) |
23:58:08 | FromDiscord | <neow> the semantics is fine, I'm complaining about the syntax |
23:58:17 | FromDiscord | <neow> but whatever it's just syntax I can get used to it |
23:58:28 | * | CcxWrk quit (Ping timeout: 272 seconds) |
23:58:28 | FromDiscord | <ElegantBeef> ~~I dont see an issue with the syntax~~ |
23:58:38 | FromDiscord | <ElegantBeef> And you havent really explained the issue with it |