00:00:02 | * | junland quit (Quit: %ZNC Disconnected%) |
00:03:20 | * | junland joined #nim |
00:04:14 | * | lritter quit (Ping timeout: 240 seconds) |
00:05:11 | * | lritter joined #nim |
00:08:34 | * | lritter quit (Client Quit) |
00:09:20 | * | vsantana_ quit (Quit: leaving) |
00:13:45 | * | synshroud joined #nim |
00:14:13 | * | synshroud quit (Client Quit) |
00:15:31 | Prestige | What's the license of the nim logo? |
00:15:35 | * | synshroud_ quit (Ping timeout: 258 seconds) |
00:20:43 | * | dsrw quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:20:58 | bung | child proccess stdin hangs, anything should noticed ? not specify to nim. |
00:21:10 | * | dsrw joined #nim |
00:21:24 | bung | it randomly hangs , sometime works |
00:21:37 | zedeus | are you using startProcess? |
00:21:58 | bung | not in nim |
00:22:14 | zedeus | can't help you then |
00:22:30 | bung | am wondering something in theory I should knew |
00:23:36 | zedeus | I had a Windows-specific problem where launching mpv using startProcess would hang the child process till the parent got killed, and adding poParentStreams to options fixed it. Not sure if this is related to your problem |
00:25:04 | * | dsrw quit (Client Quit) |
00:29:10 | bung | not like that,hmm |
00:33:20 | * | dsrw joined #nim |
01:11:49 | * | dsrw quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:14:18 | * | Tyresc quit (Quit: WeeChat 2.9-dev) |
01:18:16 | FromGitter | <Knaque> Hey, there was some full-stack web framework written in Nim that I'm looking for, but I can't remember it's name/creator for the life of me. Anyone know what I'm talking about? |
01:19:06 | leorize | !repo prologue |
01:19:07 | disbot | https://github.com/planety/prologue -- 9prologue: 11Full-Stack Web Framework written in Nim. 15 363⭐ 8🍴 7& 1 more... |
01:19:54 | FromGitter | <Knaque> That's the one! Thanks. |
01:33:08 | * | dsrw joined #nim |
01:45:17 | * | dsrw quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:49:02 | * | aenesidemus quit (Read error: Connection reset by peer) |
01:52:51 | * | chemist69 quit (Ping timeout: 272 seconds) |
01:54:09 | * | chemist69 joined #nim |
02:02:41 | * | aenesidemus joined #nim |
02:07:36 | FromGitter | <deech> Araq, awesome talk! |
02:13:08 | shashlick | anyone has a windows machine for a test? |
02:15:37 | * | Romanson joined #nim |
02:24:55 | FromDiscord | <impbox> @shashlick yep |
02:27:33 | shashlick | do you have Nim 1.0.6 or can get it installed |
02:37:53 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
02:47:44 | FromDiscord | <Balu> ello whats the state of nim and parallelism? |
02:48:40 | shashlick | check out weave and threadpool |
02:48:53 | FromDiscord | <Balu> i have looked at it maybe a year ago or so and it had some issues and what not |
02:49:22 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:49:35 | shashlick | what exactly are you trying to do |
02:50:37 | * | theelous3 joined #nim |
02:50:40 | FromDiscord | <Balu> mainly consuming websockets and or rest apis and responding |
02:50:49 | FromDiscord | <flywind> https://onlinetechinfo.com/concurrency-and-parallelism-in-nim/ |
02:51:25 | * | muffindrake joined #nim |
02:52:24 | FromDiscord | <Balu> on 1-10 how stable is all that? |
02:54:40 | shashlick | what's 1-10? |
02:54:49 | FromDiscord | <Balu> from 1 to 10 |
02:55:08 | FromDiscord | <Balu> 10 being super stable and no worries |
02:55:46 | shashlick | ah okay - i've used threads with zero issues for the last three years |
02:56:05 | shashlick | i've messed up with passing memory around and crashing that way |
02:56:12 | shashlick | but if you use channels, it's very good |
02:56:22 | shashlick | you should check out weave which is the current state of the art |
02:56:26 | FromDiscord | <Balu> hows the speed with all that do you kno? |
02:56:38 | FromDiscord | <Balu> in comparison maybe to go or rust |
02:56:45 | * | dashed joined #nim |
02:57:40 | * | dsrw joined #nim |
02:57:41 | shashlick | i've not tried rust - compared to what little Go I wrote, performance has never been a problem for me with Nim |
02:57:51 | shashlick | i know Go made me feel very restricted in expression |
02:58:02 | FromDiscord | <Balu> but you would not know if something was faster? |
02:58:14 | FromDiscord | <Balu> speed is the main issue for me right now |
02:58:18 | FromDiscord | <flywind> some benchmark games https://github.com/kostya/benchmarks |
02:58:26 | shashlick | speed wise, Nim is hard to beat cause you can open the hood and tweak to the n'th level |
02:58:39 | shashlick | you can get C'ish preformance |
02:58:43 | FromDiscord | <Balu> and from what i understand it compiles to c but idk how well that handles the threading stuff |
02:59:09 | shashlick | I think it will be best if you try yourself but you won't be disappointed by the performance and the power |
02:59:25 | FromDiscord | <Balu> so the the threading translates well to c? |
02:59:57 | FromDiscord | <Balu> ye i am probably going to just wanted to test the waters first |
03:01:26 | leorize | what is C-ish performance anyway :P |
03:02:03 | * | dsrw quit (Client Quit) |
03:05:01 | * | dashed left #nim (#nim) |
03:06:45 | shashlick | @Balu - see https://github.com/mratsim/weave |
03:07:16 | FromDiscord | <Balu> ty looking at it right now |
03:08:08 | FromDiscord | <Balu> but still a bit hesitant tbh this all seems still pretty bleeding edge |
03:09:50 | FromDiscord | <Rika> good morning |
03:10:01 | FromDiscord | <Balu> 👋 |
03:12:46 | FromDiscord | <Elegant Beef> Hello rika |
03:14:45 | shashlick | Nim's been around for 12 years now |
03:15:18 | shashlick | Weave is new yes but it's based on the latest research |
03:15:39 | shashlick | If you want plain threading, that's been stable for years |
03:16:06 | Prestige | didn't it start in 2005? |
03:17:18 | FromDiscord | <Rika> 2004ish afaik |
03:17:29 | FromDiscord | <Rika> think the git repo started 2006? |
03:19:09 | FromGitter | <raydf> Hello |
03:20:15 | FromGitter | <raydf> I'm importing segfaults but my code generates a "SIGABRT: Abnormal termination" from the duktape library |
03:20:33 | FromGitter | <raydf> How can i catch SIGABRT exceptions? |
03:22:01 | * | casaca joined #nim |
03:39:21 | * | theelous3 quit (Read error: Connection reset by peer) |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:41 | * | supakeen joined #nim |
04:12:11 | FromGitter | <jeberly> complete newbie to nim, but i am trying to create a hello world test api service. I am struggling to understand how to read from mysql db table and output json. I am using jester in case it matters. Here is what i have so far, but it just outputs each row as json. ```for x in theDb.fastRows(sql"select * from myTestTbl"): ⏎ echo($$x)``` |
04:15:54 | * | dddddd quit (Ping timeout: 260 seconds) |
04:20:13 | FromDiscord | <SeanOMik> How would I get the current unix time? |
04:21:52 | FromDiscord | <Elegant Beef> `import times; echo epochTime()` |
04:22:01 | FromDiscord | <Elegant Beef> Now imagine the bot ran that and i remembed the eval command |
04:22:16 | FromDiscord | <Elegant Beef> !eval import times; echo epochTime() |
04:22:19 | NimBot | 1592713338.954584 |
04:22:21 | FromDiscord | <Elegant Beef> 😄 |
04:22:43 | FromDiscord | <SeanOMik> Well thats epoch |
04:22:48 | FromDiscord | <SeanOMik> Isn't epoch different from unix? |
04:22:55 | FromDiscord | <Elegant Beef> `gets time after the UNIX epoch (1970) in seconds.` |
04:23:03 | FromDiscord | <SeanOMik> Oh okay |
04:23:09 | FromDiscord | <SeanOMik> Why does it have decimals though |
04:23:13 | FromDiscord | <Elegant Beef> in seconds |
04:23:16 | FromDiscord | <SeanOMik> I guess I could just floor |
04:23:27 | FromDiscord | <Elegant Beef> there is also getTime |
04:23:39 | FromDiscord | <SeanOMik> Okay |
04:23:44 | FromDiscord | <SeanOMik> I'll test them both out |
04:23:45 | FromDiscord | <SeanOMik> Thanks |
04:23:50 | FromDiscord | <Elegant Beef> no problem |
04:31:46 | * | a_chou joined #nim |
04:37:46 | leorize | use getTime |
04:48:44 | FromDiscord | <impbox> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/724123613883662426 |
04:51:31 | * | a_chou quit (Remote host closed the connection) |
05:02:51 | * | solitudesf joined #nim |
05:12:09 | FromDiscord | <Elegant Beef> `choosenim stable` |
05:12:23 | FromDiscord | <Elegant Beef> @impbox |
05:12:44 | FromDiscord | <Elegant Beef> Atleast i think i recall that |
05:13:07 | FromDiscord | <impbox> no change |
05:23:50 | FromDiscord | <impbox> building manually worked |
05:24:04 | FromDiscord | <impbox> (edit) 'building ... manually' => 'buildingnim + nimble' |
05:29:06 | FromDiscord | <Zed> is there a way to check for multiple values instead of chaining together or statements? |
05:29:19 | FromDiscord | <Zed> `if currLine.strip.startswith("if") and currLine.endsWith(syntax.if_open):` |
05:29:35 | FromDiscord | <Zed> like i want to also check for "else" and "elif" |
05:31:13 | FromDiscord | <Rika> what |
05:31:16 | FromDiscord | <Rika> nest themn |
05:31:27 | FromDiscord | <Rika> if x:↵ if x:↵ else:↵else: |
05:31:28 | FromDiscord | <Rika> etc |
05:31:57 | FromDiscord | <Zed> so theres no way for it to like check them all at once? |
05:32:44 | FromDiscord | <Rika> it doesnt do that even if you use an `and` |
05:33:14 | FromDiscord | <Rika> an `and` is just a nested if statement if you think hard about it |
05:35:30 | FromDiscord | <Zed> yeah, nesting works but it's not exactly pretty |
05:35:40 | FromDiscord | <Zed> ah well |
05:36:24 | FromDiscord | <Rika> neither is a convoluted way to specify what portion of the `if` statement the `else` statement refers to |
05:37:04 | FromDiscord | <Rika> you can use a "quick return" style if statement instead |
05:37:48 | FromDiscord | <Rika> `if not currLine.strip.startswith("if"): do else stuff and return` then another line with `if not currLine.endsWith(syntax.if_open): do else stuff and return` |
05:38:01 | FromDiscord | <Rika> then the total if contents go below these two statements |
05:38:34 | FromDiscord | <Rika> sent a code paste, see http://ix.io/2pKa |
05:39:11 | FromDiscord | <Rika> sent a code paste, see http://ix.io/2pKb |
05:39:27 | FromDiscord | <Rika> can look cleaner kinda |
05:39:34 | FromDiscord | <Rika> this only applies if the else stuff returns |
05:39:46 | FromDiscord | <Rika> or stops or something |
05:44:10 | FromDiscord | <Zed> i ended up just implementing a proc that will loop through an openarray and returns true is there is a match else false |
05:44:27 | FromDiscord | <Zed> i always forget about the not and do keywords |
05:45:19 | FromDiscord | <Rika> i dont mean the do keyword on the thing btwe |
05:45:35 | FromDiscord | <Zed> yeah i know |
05:46:00 | FromDiscord | <Zed> but i read code on github and just see the do keyword and im like "oh yeah that exists" |
05:46:22 | * | solitudesf- joined #nim |
05:49:07 | FromGitter | <Knaque> Is https://github.com/GaryM-exkage/vscode-nim-alt worth switching to from the standard Nim extension? |
05:49:14 | * | solitudesf quit (Ping timeout: 260 seconds) |
05:49:26 | FromGitter | <Knaque> In its current state, at least. |
05:52:22 | FromDiscord | <Rika> its pretty ok |
05:53:24 | FromDiscord | <Elegant Beef> I use it, but im also gary's friend so |
05:54:06 | FromGitter | <Knaque> Is it at all meaningfully better? |
05:54:19 | FromDiscord | <Elegant Beef> If you like better highlighted code |
05:55:27 | FromDiscord | <Elegant Beef> It only changes the highlighting regex |
05:56:28 | FromGitter | <Knaque> I'll take that. Does it seem like it's being improved more frequently? |
05:58:36 | FromDiscord | <Rika> kindabutnotrly |
05:58:43 | FromDiscord | <Elegant Beef> Weirdly i cant even install the official atm |
05:59:03 | FromDiscord | <Elegant Beef> But it's just better syntax, i assume gary will update if any meaningful update comes out of the official |
05:59:08 | FromDiscord | <Elegant Beef> Since it's just regex differences |
05:59:28 | FromGitter | <Knaque> I mean, it does seem to have more and more recent commits. |
06:02:03 | FromGitter | <Knaque> I'll use the alt and just keep an eye on the two of them. |
06:02:13 | FromDiscord | <Elegant Beef> It's literally just regex changes so if you like it and the modern one changes you can always easily bring the changes over |
06:20:28 | * | solitudesf- quit (Remote host closed the connection) |
06:20:56 | * | solitudesf- joined #nim |
06:25:40 | * | NimBot joined #nim |
06:42:10 | * | solitudesf- is now known as solitudesf |
06:47:07 | FromDiscord | <Zed> hey PMunch, any chance you can test nim_braces on some actual code? |
06:48:50 | FromDiscord | <Zed> has anyone used the prologue web framework? |
06:52:02 | FromDiscord | <Zed> sorry I mean Prestige ^ |
06:55:27 | Prestige | Sorry, trying to learn a new keyboard layout atm so I haven't been programming |
06:58:06 | FromDiscord | <Zed> No Problem, just when you get a chance, just trying to get some speed tests on larger files |
06:58:16 | FromDiscord | <Rika> whys everyone moving to dvorak/coleman lmao |
06:58:33 | FromDiscord | <Zed> it's meant to be better for programmers |
06:58:38 | FromDiscord | <Zed> i dont know |
06:58:53 | FromDiscord | <Zed> easier then qwerty |
06:59:26 | FromDiscord | <Rika> i dont really have an issue with qwerty tho |
07:00:24 | FromDiscord | <Zed> neither |
07:00:35 | FromDiscord | <Varriount> @Zed Your name is going to make all the IRC users mad |
07:01:10 | Prestige | I started having really bad finger pain so I switched |
07:01:13 | FromDiscord | <Zed> why? |
07:01:25 | FromDiscord | <Rika> its not |
07:01:28 | FromDiscord | <Rika> nickname is not used |
07:01:39 | FromDiscord | <Varriount> Ah, ok |
07:02:21 | FromDiscord | <Varriount> Anyone looked at the recent PR for first class symbols? |
07:05:51 | Zevv | Prestige: keep at it dude, be strong |
07:05:58 | Zevv | i tried 4 times and i failed |
07:06:15 | Zevv | then my wife decided she might as well give it a try |
07:06:24 | Zevv | and switched in under two weeks to over her old typing speed |
07:06:32 | Zevv | I'm not mad at all |
07:08:01 | Prestige | I'm extremely hard headed, I'll stick to it |
07:08:21 | * | narimiran joined #nim |
07:09:53 | Zevv | cool! |
07:11:50 | * | oprypin quit (Quit: Bye) |
07:11:58 | * | oprypin joined #nim |
07:12:28 | * | tefter joined #nim |
07:12:41 | * | vicfred quit (Quit: Leaving) |
07:16:46 | narimiran | Nim discussion on HN: https://news.ycombinator.com/item?id=23585006 |
07:32:20 | * | clemens3 quit (Quit: reboot) |
07:35:05 | * | Romanson quit (Quit: Connection closed for inactivity) |
07:40:54 | * | brainbomb joined #nim |
07:48:36 | * | Vladar joined #nim |
07:51:28 | * | oddp quit (Ping timeout: 246 seconds) |
08:00:09 | * | kaletaa quit (Read error: Connection reset by peer) |
08:00:34 | Araq | Zevv: https://github.com/zevv/nimcsp is this the latest repo? |
08:10:41 | * | clemens3 joined #nim |
08:34:25 | * | waleee-cl joined #nim |
08:34:41 | FromDiscord | <Shucks> any cool one liner to get every second item from a array into a new array? |
08:34:55 | FromDiscord | <Shucks> could be a seq aswell |
08:35:27 | FromDiscord | <Rika> what do you mean |
08:35:51 | FromDiscord | <Shucks> [1, 0, 2, 0, 3] == [1, 2, 3] |
08:36:01 | FromDiscord | <Rika> oh every odd item |
08:36:05 | FromDiscord | <Rika> *even index |
08:37:00 | FromDiscord | <Rika> `toSeq(theSeq.pairs).filterIt(it[0] % 2 == 0)` |
08:37:12 | FromDiscord | <Rika> needs `import sequtils |
08:37:13 | FromDiscord | <Rika> (edit) 'sequtils' => 'sequtils`' |
08:37:14 | FromDiscord | <Rika> i think |
08:37:22 | FromDiscord | <Rika> not sure if that works actually but it should be easy to fix |
08:37:37 | FromDiscord | <Rika> oh oh oh i see whats wrong |
08:37:49 | FromDiscord | <Rika> `toSeq(theSeq.pairs).filterIt(it[0] % 2 == 0).mapIt(it[1])` i think |
08:37:57 | FromDiscord | <Rika> well, this isnt as efficient as you could be |
08:39:54 | FromDiscord | <Shucks> looks good, i guess `%` should be `mod` right |
08:40:04 | FromDiscord | <Rika> oops lmao |
08:40:25 | FromDiscord | <Rika> i dont use mod often enough to remember that it is no longer % but mod |
08:40:32 | FromDiscord | <Shucks> ^.^ |
08:41:44 | * | nsf joined #nim |
08:59:12 | * | chemist69 quit (Ping timeout: 260 seconds) |
09:00:12 | * | chemist69 joined #nim |
09:03:52 | * | drewr quit (Ping timeout: 260 seconds) |
09:04:09 | * | neceve_ joined #nim |
09:05:53 | * | drewr joined #nim |
09:06:06 | Araq | ok, time to try https://github.com/GaryM-exkage/vscode-nim-alt |
09:09:04 | Araq | yay! finally 'case of' is highlighted correctly |
09:09:20 | FromDiscord | <Gary M> Hello Araq 🙂 |
09:09:43 | Araq | thanks for the plugin! you gave an old man hope |
09:10:23 | FromDiscord | <Elegant Beef> Love that you |
09:10:32 | FromDiscord | <Elegant Beef> 're only a few months off |
09:10:37 | FromDiscord | <Elegant Beef> That hope must've been fading |
09:10:56 | FromDiscord | <Gary M> Sure thing, let me know if you find anything out of place |
09:11:46 | FromDiscord | <Gary M> When I have abundant spare time I'll try to rewrite the nimsuggest side of it too |
09:12:48 | Araq | oh yeah please ... could make it a bounty if that helps |
09:18:20 | * | qn68h joined #nim |
09:18:53 | FromDiscord | <Gary M> I wouldn't oppose that offer. |
09:18:56 | qn68h | hi again |
09:19:02 | FromDiscord | <Elegant Beef> Hello |
09:19:14 | qn68h | since the yesterday discussion about OOP: |
09:19:31 | * | l1pz joined #nim |
09:20:09 | qn68h | nim transpiles (or compiles i don't know the right wording) to c / c++. So wouldn't it be straightforward to have c++/python-style classes with classic __init__ ? |
09:20:24 | Prestige | Zevv: are you still interested in learning it? |
09:20:41 | qn68h | wouldn't it be a feature nearly out-of-the-box? |
09:20:56 | qn68h | to add to nim? (c++/python style OOP) |
09:21:17 | FromDiscord | <Elegant Beef> What's the benefit of init in python? |
09:21:45 | * | l1pz quit (Client Quit) |
09:22:30 | * | l1pz joined #nim |
09:24:21 | qn68h | ElegantBeef, beauty / clarity / structure of code. Even if you don't read the code precisely, you see the structure by analyzing the layout of code: https://paste.ee/p/Hw4EF |
09:24:29 | * | l1pz quit (Client Quit) |
09:24:37 | FromDiscord | <Elegant Beef> But nim doesnt have that layout |
09:24:49 | FromDiscord | <Elegant Beef> Nim doesnt have procedures defined inside objects |
09:25:03 | FromDiscord | <Elegant Beef> They're defined in the module at indent level 0 |
09:25:07 | qn68h | ElegantBeef, everything is contained in its class, there is nothing flying out of the classes |
09:25:33 | narimiran | one day i'll make my mission to go to other languages and try to convince them they should be more like some other language |
09:25:34 | FromDiscord | <Elegant Beef> Nim doesnt have that, you could make a macro that adds a parameter to the start of `self` to emulate that |
09:25:37 | FromDiscord | <Elegant Beef> but it's quite moot |
09:25:42 | narimiran | hey Guido, add { and }, pronto!! |
09:25:47 | FromDiscord | <Elegant Beef> Python is not nim an nim isnt python |
09:26:13 | qn68h | narimiran, sorry for sounding like this |
09:26:32 | qn68h | but coming from Python or coming from C++, many people expect this |
09:26:36 | narimiran | qn68h: the thing is: we hear it very very often |
09:26:48 | narimiran | qn68h: i'm coming from python and i don't expect it |
09:26:48 | qn68h | narimiran, then probably it's what people want |
09:27:08 | qn68h | it's not only python, it's also c++ and many other lang who do the same |
09:27:10 | narimiran | qn68h: nah, it is just people who haven't used nim long enough |
09:27:13 | * | clemens3 quit (Read error: Connection reset by peer) |
09:27:20 | FromDiscord | <Elegant Beef> I mean nim doesnt even have classes |
09:27:31 | narimiran | inb4 cHanGe imPorTs!!!!1!1! |
09:27:34 | qn68h | ElegantBeef, would it be a problem to add them? |
09:27:36 | FromDiscord | <Elegant Beef> Im fairly certain the `ref object` is still a struct, even in C++ |
09:27:47 | FromDiscord | <Elegant Beef> Well cause it doesnt need them, yes |
09:28:09 | FromDiscord | <Elegant Beef> But im not a contributor or core member so idk |
09:28:12 | narimiran | o_h bTw s_tyL_e_InseNsiTivitY |
09:28:20 | FromDiscord | <Elegant Beef> We have UFCS and methods |
09:28:23 | FromDiscord | <Elegant Beef> OOP is in here |
09:28:29 | FromDiscord | <Elegant Beef> Just not a way you are used to |
09:28:41 | FromDiscord | <Elegant Beef> You're used to a java/C#/python/C++ OOP |
09:28:45 | FromDiscord | <Elegant Beef> Different isnt worse |
09:28:46 | qn68h | narimiran, I've used many lang in the past decades, and what people want when starting a new lang is to *not* have a difficult learning curve; when something is good in lang a+b+c+d+e why not reusing it? |
09:29:01 | FromDiscord | <Elegant Beef> Cause this isnt ABCDE |
09:29:10 | FromDiscord | <mratsim> I can't believe no one talked about Rust or imports or significant whitespaces or the lenient-case of Nim identifier in the Hacker News thread. |
09:29:14 | FromDiscord | <Elegant Beef> This is a different language, it doesnt suite this languages syntax |
09:29:17 | narimiran | qn68h: why would anybody use a new language if it is the same as old ones? |
09:29:25 | * | l1pz joined #nim |
09:29:30 | FromDiscord | <Elegant Beef> That's suprising mratsim |
09:29:32 | narimiran | @mratsim: ...yet :D |
09:29:37 | FromDiscord | <Elegant Beef> Any qualified imports? |
09:29:43 | FromDiscord | <mratsim> no |
09:29:53 | FromDiscord | <mratsim> it's about, use in production, not nil, performance |
09:30:00 | qn68h | narimiran, it's good to invent new things at useful places, but for classes, is it really needed? |
09:30:04 | * | dddddd joined #nim |
09:30:09 | qn68h | i quote the Nim home page: "It combines successful concepts from mature languages like Python, Ada and Modula." |
09:30:30 | narimiran | qn68h: and i quote myself: "it is just people who haven't used nim long enough" |
09:30:31 | qn68h | C++/java+/Python/many-other-land OOP is really one major successful concept, |
09:30:37 | FromDiscord | <mratsim> Classes? just use variants :p |
09:31:00 | FromDiscord | <Elegant Beef> Yea |
09:31:17 | FromDiscord | <Elegant Beef> We have OOP/inheritance but it's typically avoided by most profcient nim users |
09:31:20 | FromDiscord | <mratsim> OOP is not compatible with multithreading |
09:31:20 | narimiran | qn68h: i also didn't like some nim things when i was fresh from python, but when you start seriously using nim you see why the things are the way they are |
09:31:21 | qn68h | narimiran, this is the point. probably lots of people "won't use nim long enough" because they will think "it takes too much time to learn it, they reinvented OOp in a different manner and i don't have time for that" |
09:31:23 | FromDiscord | <Elegant Beef> Not that im proficient |
09:31:29 | qn68h | and they will give up |
09:31:31 | FromDiscord | <Elegant Beef> Ok cool |
09:31:42 | FromDiscord | <Elegant Beef> People stop using languages all the time for whatever reason |
09:31:42 | qn68h | for traction/adoption of the lang, it's sad the classic OOP isn't there |
09:31:46 | FromDiscord | <mratsim> Give up OOP, it's not compatible with multithreading |
09:31:47 | narimiran | qn68h: yesterday i heard in NimConf "nim is for everything, but maybe not for everybody" |
09:31:49 | FromDiscord | <Elegant Beef> if the language isnt for you dont attempt to make it for oyu |
09:31:50 | * | l1pz quit (Client Quit) |
09:32:02 | FromDiscord | <Elegant Beef> Cause all you're going to do is make a language you already have |
09:32:19 | FromDiscord | <Elegant Beef> Take features that improve the language and implement it, but dont expect it to be 1:1 to anything else |
09:32:27 | qn68h | I don't except 1:1 |
09:32:36 | FromDiscord | <Elegant Beef> As i said you can use a macro to add that self parameter |
09:32:39 | FromDiscord | <Elegant Beef> So then it's like it's there |
09:33:03 | FromDiscord | <mratsim> and you can reimplement OOP has macros on top of variants: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/support/emulate_classes_with_ADTs.nim |
09:33:09 | qn68h | but my point is: i've looked at a lots of things in nim already, and I was really amazed and happy. I sent mails to friends saying it seems the cool new language to start to use! |
09:33:28 | qn68h | until one exception: "why reinvent the OOP wheel in a different uncommon manner?" |
09:33:36 | FromDiscord | <Elegant Beef> You can do that |
09:33:36 | FromDiscord | <Elegant Beef> sent a code paste, see http://ix.io/2pLe |
09:33:51 | qn68h | i'm not saying everything should be different, and so far, nim looks great on every point |
09:33:54 | FromDiscord | <Elegant Beef> Make a macro that does that to all of it's passed parameters |
09:33:55 | qn68h | except this, |
09:33:57 | FromDiscord | <mratsim> Explicit is better than implicit |
09:34:07 | FromDiscord | <mratsim> implicit self/this is error prone |
09:34:10 | FromDiscord | <Elegant Beef> I agree there but if they must |
09:34:16 | narimiran | https://nim-lang.github.io/Nim/tut2.html#object-oriented-programming |
09:34:31 | narimiran | qn68h: ^ |
09:34:43 | FromDiscord | <Elegant Beef> Im basically just stating the macro system makes it possible so if you want it so badly you can make a system that mirrors it |
09:34:44 | FromDiscord | <mratsim> Rust also doesn't have those OOP implicit things in their functions |
09:34:48 | qn68h | narimiran, yes i read that and followed the tutorial yesterday |
09:36:14 | qn68h | well it's just my 2 cents |
09:36:25 | FromDiscord | <Elegant Beef> I mean it can be done in many ways |
09:36:30 | FromDiscord | <Elegant Beef> You can use a `block:` |
09:36:34 | FromDiscord | <Elegant Beef> or whatever |
09:36:41 | qn68h | and maybe I'll just be another who gives up because the balance benefit/time spent is not enough |
09:36:50 | FromDiscord | <Elegant Beef> Well buh bye |
09:36:54 | qn68h | and this would confirm your "nim is for everything, but maybe not for everybody" |
09:37:01 | FromDiscord | <Elegant Beef> Well it's a weird issue |
09:37:08 | FromDiscord | <Elegant Beef> *I want muh format* |
09:37:14 | FromDiscord | <Elegant Beef> But we have UFCS so that doesnt matter |
09:37:34 | FromDiscord | <Elegant Beef> You can literally make a proc anywhere and it's treated as if it was a class member in any other language |
09:38:46 | qn68h | really sorry to sound like this, i really wish the best for the lang, and am still very enthusiastic and will start using it a few weeks to see if it fits my needs |
09:39:01 | qn68h | but you said it before: |
09:39:03 | qn68h | <narimiran> qn68h: the thing is: we hear it very very often |
09:39:25 | qn68h | this might be a signal that people expect a cool language like nim BUT with classic-style OOP |
09:39:53 | qn68h | once again i don't want to be the guy "hello i'm new please change this and that in your lang" |
09:40:09 | narimiran | qn68h: this might be a signal that people expect nim to be python/c++/whatever |
09:40:18 | qn68h | i just give my feeling since i've used many lang in the past decades and i read a lot about new languages and what people expect |
09:40:38 | * | Zectbumo quit (Remote host closed the connection) |
09:40:41 | narimiran | did python change whitespace to braces because people "expect a cool language"? |
09:40:56 | FromDiscord | <mratsim> But what you're talking about is only the syntax of OOP, it's just a look-and-feel not familiar thing |
09:41:27 | qn68h | mratsim look-and-feel really matters |
09:41:53 | FromDiscord | <mratsim> Well, I absolutely hate C++ implicit field access in classes, and same thing for python implicit self |
09:41:54 | FromDiscord | <Elegant Beef> But whose look and feel is objectively better |
09:42:14 | qn68h | years after years i notice that it's important to see structure in the code even by layout at the layout, and here it's good, it would be the same on C++: https://paste.ee/p/Hw4EF |
09:42:15 | FromDiscord | <mratsim> in particular the C++ way leads to symbol conflict and bugs |
09:42:56 | * | clemens3 joined #nim |
09:43:06 | qn68h | the fact that everything is grouped nicely/nested is what people expect, the layout already tells something about the code |
09:43:09 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2pLh |
09:43:20 | FromDiscord | <Elegant Beef> Without changing anything |
09:43:22 | FromDiscord | <mratsim> https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/physics/hittables/hittables_lists.nim#L14-L55 |
09:43:27 | FromDiscord | <Shucks> Correct me if im wrong. But isn't go just doing the same with their structs? There are no real classes. |
09:43:37 | FromDiscord | <Elegant Beef> No clue |
09:43:54 | FromDiscord | <mratsim> My code is clear about mutable/dangerous proc and the rest |
09:43:58 | Zevv | Prestige: no, I don't think so. My wife is a translator, and for her it makes perfect sense; I was able to type regular language after a week or two as well. But my muscle memory is hard to defat. Tens of passwords I don't even know anymore but type often, all these shortcuts. And when I'm panicing during accidental `rm -rf` I'm sitting there hysterically hitting ^K ^K ^K ^K and nothing happens... |
09:44:57 | Zevv | oh, ^J ^J ^J it is |
09:45:02 | Prestige | ah |
09:45:23 | Prestige | What language btw? |
09:45:56 | FromDiscord | <mratsim> also when Nim was created it had multiple dispatch, you can't structure code that way if it's used from 2 classes |
09:45:59 | * | nikita` joined #nim |
09:47:04 | Zevv | Prestige: nl -> en, mostly |
09:47:50 | Prestige | Cool stuff |
09:48:21 | qn68h | ElegantBeef, has there been pull requests / github issues / proposals on the contributors website about different OOP? |
09:48:32 | qn68h | I'm probably not the first one to ask this question ;) |
09:48:56 | FromDiscord | <mratsim> well yes, multidispatch was removed and there are discussion to use VTable |
09:49:09 | FromDiscord | <mratsim> also implicit self was removed |
09:49:23 | FromDiscord | <mratsim> and "use" was introduce so that people don't have to put the types every single time |
09:49:39 | FromDiscord | <mratsim> or using sorry |
09:49:54 | qn68h | and (maybe rejected) pull requests about classic-style OOP? |
09:50:03 | FromDiscord | <mratsim> See: https://nim-lang.org/docs/manual.html#statements-and-expressions-using-statement |
09:50:15 | FromDiscord | <mratsim> no, those go to RFC |
09:50:42 | qn68h | oh ok |
09:50:46 | FromDiscord | <mratsim> Nim has a strong preference of explicit over implicit |
09:50:48 | FromDiscord | <Shucks> `https://golangbot.com/structs-instead-of-classes/` |
09:51:01 | qn68h | has there been a RFC about that (differnt style oop)? |
09:51:12 | FromDiscord | <mratsim> implicit arguments (self/this/field access) would be quite strange in the language |
09:51:52 | FromDiscord | <mratsim> only newcomers care about OOP in Nim, most people don't use it except in their first few projects |
09:52:02 | FromDiscord | <mratsim> (or functional programming) |
09:52:36 | FromDiscord | <mratsim> In terms of philosophy, Nim is nearer to C (structured programming) than Python or C++ |
09:53:01 | FromDiscord | <lqdev> qn68h: fyi this simple object model can be turned into classes by using macros: https://nim-by-example.github.io/macros/ |
09:54:03 | FromDiscord | <lqdev> also I agree with mratsim, explicit > implicit |
09:54:26 | * | krux02 joined #nim |
09:54:34 | qn68h | thanks lqdev for this link, seems interesting with a macro |
09:55:04 | qn68h | so you can nearly "customize" your use of the lang with macros? |
09:55:22 | * | suchasurge joined #nim |
09:55:26 | FromDiscord | <lqdev> yes, pretty much |
09:55:41 | qn68h | nice, i'll read this deeply |
09:56:16 | FromDiscord | <lqdev> they're really flexible because you can turn some AST into some other AST, so anything that Nim can parse can be read by a macro |
09:56:19 | qn68h | last thing: is this macro that "transforms" classic-OOP into nim-oop available out of the box by importing something? |
09:56:35 | FromDiscord | <lqdev> no, I don't think so |
09:56:41 | FromDiscord | <lqdev> there may be a package |
09:56:47 | FromDiscord | <lqdev> on Nimble |
09:57:00 | qn68h | then it would be interesting to have an import with the code after "To get that nice notation, we can use a macro: |
09:57:00 | qn68h | ", ready to use |
09:57:17 | qn68h | so then, when annoying people like me come and whine "why is there no classic OOP", you can just link to that :) |
09:57:35 | qn68h | !python-oop-to-nim-oop-converter |
09:57:42 | qn68h | or even trigger this ^ ;) |
09:59:01 | qn68h | I think most people who ask this question like me would be happy with the code written in https://nim-by-example.github.io/macros/ after "Something like this would be nice:" |
09:59:51 | qn68h | if we could write like this and do "import oop" that would automatically run this macro, I'm sold :) |
10:01:00 | narimiran | qn68h: this can be your first nim project |
10:01:29 | narimiran | and by the time you finish writing it, you'll realize "classic OOP" is really not that important in nim as you initally thought ;) |
10:01:40 | narimiran | win-win |
10:01:47 | * | l1pz joined #nim |
10:01:51 | * | l1pz quit (Client Quit) |
10:03:20 | * | l1pz joined #nim |
10:03:22 | * | l1pz quit (Client Quit) |
10:04:07 | * | aeverr quit (Remote host closed the connection) |
10:04:33 | * | aeverr joined #nim |
10:05:19 | FromDiscord | <Vindaar> there's https://github.com/bluenote10/oop_utils 🙂 |
10:06:30 | * | narimiran_ joined #nim |
10:07:10 | * | l1pz joined #nim |
10:07:19 | * | l1pz quit (Client Quit) |
10:09:13 | * | l1pz joined #nim |
10:09:13 | * | l1pz quit (Client Quit) |
10:09:39 | * | l1pz joined #nim |
10:09:39 | * | l1pz quit (Client Quit) |
10:09:43 | * | narimiran quit (Ping timeout: 246 seconds) |
10:10:29 | * | l1pz joined #nim |
10:10:41 | * | l1pz quit (Client Quit) |
10:13:36 | * | narimiran_ is now known as narimiran |
10:14:06 | * | l1pz joined #nim |
10:14:30 | * | l1pz quit (Client Quit) |
10:15:30 | * | l1pz joined #nim |
10:18:55 | * | vegai joined #nim |
10:21:05 | * | lritter joined #nim |
10:28:03 | * | Trustable joined #nim |
10:36:05 | * | l1pz quit (Quit: Lost terminal) |
10:36:29 | qn68h | narimiran, good idea :) |
10:39:21 | * | qn68h quit (Quit: Leaving) |
10:39:44 | * | nsf quit (Quit: WeeChat 2.8) |
10:53:28 | * | NimBot joined #nim |
11:02:54 | FromDiscord | <kodkuce> @treeform nice talk, i too hate how UI are done this days, it tryed glade but it suxed |
11:06:17 | * | nsf joined #nim |
11:09:33 | * | NimBot joined #nim |
11:14:05 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
11:21:58 | * | NimBot joined #nim |
11:28:33 | FromDiscord | <Skaruts> what does `^1` do in something like `foo[^1]`? |
11:28:49 | FromDiscord | <Skaruts> saw it here: <https://github.com/treeform/fidget/blob/master/src/fidget.nim#L70> |
11:28:59 | narimiran | index from the back |
11:29:06 | narimiran | like python's -1 |
11:29:09 | FromDiscord | <Skaruts> ah |
11:29:18 | FromDiscord | <Skaruts> so in that case it's the last item? |
11:29:23 | FromDiscord | <Rika> yes |
11:29:45 | FromDiscord | <Skaruts> so I guess I could also do ^2, ^3, etc |
11:30:00 | FromDiscord | <lqdev> indeed |
11:30:02 | FromDiscord | <Skaruts> nice, thanks |
11:32:16 | FromDiscord | <Skaruts> btw, I've been meaning to ask this, is there a difference between using spaces in `0 .. 10` instead of `0..10`? |
11:32:33 | narimiran | no difference |
11:32:43 | FromDiscord | <Rika> preference |
11:32:44 | FromDiscord | <Skaruts> I saw Araq mentioning something like this one time, I think it was about ranges, but it could be something else... |
11:32:52 | narimiran | but just beware when you use `..<` to not put space between `..` and `<` |
11:33:47 | FromDiscord | <Rika> `0 ..< 2` is preferred but `0 .. ^1` is preferred, kinda confusing imo but it makes some sense |
11:34:09 | FromDiscord | <Skaruts> hmm.. |
11:34:22 | FromDiscord | <Skaruts> it does make sense yea |
11:35:15 | FromDiscord | <Skaruts> maybe I got the wrong impression then, from what Araq said |
11:35:18 | FromDiscord | <Skaruts> thanks |
11:35:46 | * | synthmeat joined #nim |
11:36:26 | * | synthmeat quit (Quit: WeeChat 2.8) |
11:36:50 | * | synthmeat joined #nim |
11:42:08 | * | oddp joined #nim |
11:55:34 | * | silvernode joined #nim |
12:00:49 | * | bung quit (Ping timeout: 264 seconds) |
12:00:57 | FromDiscord | <Shucks> Would love if some of you experienced nim coders would take a look into https://github.com/Sann0/Nimem and let me know if im doing something terrible wrong 🙂 |
12:03:26 | FromDiscord | <Rika> that demo though hahaha |
12:04:04 | FromDiscord | <Shucks> ^.^ |
12:04:35 | FromDiscord | <Shucks> your oneliner was needed in that example btw |
12:05:06 | FromDiscord | <Rika> its not terribly efficient |
12:05:18 | FromDiscord | <Rika> there are >1 liners that are more efficient |
12:05:33 | FromDiscord | <Shucks> well it works, its fine. Noone will ever use it lol |
12:05:48 | FromDiscord | <Rika> makes me think of an idea |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:08 | FromDiscord | <Rika> new iterutils lib it is i guess.... |
12:06:37 | * | supakeen joined #nim |
12:08:04 | * | bung joined #nim |
12:10:02 | FromDiscord | <Shucks> sounds fancy |
12:13:14 | narimiran | new iterutils? |
12:13:38 | * | dsrw joined #nim |
12:13:56 | * | neceve_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
12:14:08 | narimiran | i feel personally offended! https://github.com/narimiran/itertools |
12:14:10 | FromDiscord | <Rika> dunno |
12:14:13 | FromDiscord | <Rika> i mean |
12:14:20 | FromDiscord | <Rika> instead of operating on seqs... |
12:14:28 | FromDiscord | <Rika> maybe operate on closure iters |
12:14:30 | FromDiscord | <Rika> no clue tbh |
12:14:36 | FromDiscord | <Rika> i'm still thinking if its a good idea |
12:16:05 | * | Trustable quit (Remote host closed the connection) |
12:19:32 | * | dsrw quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:21:34 | * | dsrw joined #nim |
12:21:37 | chemist69 | Rika: there is also: https://github.com/zero-functional/zero-functional |
12:23:03 | FromDiscord | <Rika> yeah but i kinda dont want a dsl for my iterator tools |
12:24:45 | FromDiscord | <InventorMatt> I am trying to create a template for starting and connecting to a server so that I can easily wrap the proc I need with some boiler plate. |
12:24:53 | FromDiscord | <InventorMatt> however I am having problems because the template needs the async pragma for the awaits to work but when I attach it to the template |
12:25:00 | FromDiscord | <InventorMatt> I get an error saying I cannot attach a custom template to the pragma I made |
12:25:07 | FromDiscord | <InventorMatt> here is the code for it https://play.nim-lang.org/#ix=2pLS |
12:25:23 | FromDiscord | <Rika> you cant use await within a template so yeah |
12:25:32 | FromDiscord | <Rika> basically outta luck there, gotta be a proc |
12:26:47 | FromDiscord | <InventorMatt> I would have thought there would have been another way. thanks anyways |
12:27:07 | * | vikfret joined #nim |
12:27:51 | FromDiscord | <Rika> theres an rfc? i think |
12:27:53 | FromDiscord | <Rika> for fixing this |
12:28:19 | FromDiscord | <Rika> basically making await a template instead of dsl in async or something |
12:28:32 | FromDiscord | <Rika> @InventorMatt oh idea |
12:28:44 | FromDiscord | <Rika> but you need to tell me if pubsub encapsulates the whole proc first |
12:28:50 | * | krux02 quit (Quit: Leaving) |
12:29:03 | FromDiscord | <Rika> if it does, you can make pubsub a macro instead i think |
12:30:00 | FromDiscord | <InventorMatt> yes, it should |
12:30:12 | FromDiscord | <Rika> ok gimme a moment |
12:34:47 | FromDiscord | <Rika> @InventorMatt https://play.nim-lang.org/#ix=2pLY |
12:34:50 | FromDiscord | <Rika> this should work |
12:36:45 | * | brainbomb1 joined #nim |
12:38:48 | FromDiscord | <InventorMatt> that is working so far. thanks so much |
12:38:51 | * | brainbomb quit (Ping timeout: 272 seconds) |
12:53:26 | * | dsrw quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:25:23 | * | MTRNord[m] joined #nim |
13:38:36 | FromDiscord | <Rika> hm, just rewatched the erlang video in computerphile, wonder if it is a good idea implementing some sort of pragma-macro for similar (runtime) checks that arent limited to just `range[M, N]`s |
13:40:58 | * | testnimnoob quit (Remote host closed the connection) |
14:22:08 | * | tane joined #nim |
14:45:01 | * | brainbomb1 quit (Quit: Leaving.) |
14:46:41 | FromDiscord | <Rika> eh, decided it was pretty dumb |
14:47:16 | FromDiscord | <demotomohiro> I tried to use Nim's Embedded Stack Trace Profiler but I got no result.↵There is only 1 line of text in profile_results.txt.↵https://play.nim-lang.org/#ix=2pMz |
14:48:16 | FromDiscord | <Synth> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/724274490548420618 |
14:50:09 | FromDiscord | <demotomohiro> You can do forward declaration. |
14:50:10 | FromDiscord | <demotomohiro> forward declaration |
14:50:15 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#procedures |
14:50:40 | FromDiscord | <Synth> Thank you! |
14:50:42 | FromDiscord | <demotomohiro> Just dont write `=` and proc body |
14:51:22 | FromDiscord | <Synth> Thank you! |
14:52:01 | FromDiscord | <Rika> @demotomohiro because most procs arent run enough to be counted as "worth profiling" i assume |
14:52:36 | FromDiscord | <Rika> tested with a for loop 0..9999 instead of 0..9 and there are now lines in the profiler output |
14:54:43 | FromDiscord | <Rika> no clue how to force it to log more |
14:54:47 | FromDiscord | <demotomohiro> @Rika Thank you! you are right, I can get result with 1000 loop count. |
15:01:31 | FromDiscord | <demotomohiro> I wanted to profiling code that call few C functions but one of them takes few seconds. |
15:03:20 | FromDiscord | <demotomohiro> Maybe ESTP doesn't work well in that case. |
15:04:22 | FromGitter | <Julioevm> Hi everyone |
15:05:14 | FromDiscord | <Rika> @demotomohiro then i would recommend using Intel VTune or AMD uProf depending on your CPU |
15:05:19 | FromGitter | <Julioevm> this might be a silly question, but I'm trying to do varY = varX =+1 and Im getting has no type or is ambiguous |
15:05:21 | FromGitter | <Julioevm> both vars are ints |
15:05:24 | FromDiscord | <Rika> that might give more information |
15:05:27 | FromGitter | <Julioevm> what am I missing? |
15:05:39 | * | vsantana joined #nim |
15:05:45 | FromGitter | <Julioevm> sorry += 1 |
15:05:53 | FromDiscord | <Rika> afaik you must do that separately |
15:06:11 | narimiran | think about what `varx += 1` really does, and what is its return value |
15:06:46 | FromDiscord | <Rika> also yeah that's vague |
15:06:51 | FromDiscord | <Rika> are you adding 1 to each var |
15:06:56 | narimiran | no, it is not vague |
15:07:00 | FromGitter | <Julioevm> it doesnt return anything I guess |
15:07:01 | FromDiscord | <Rika> or only to varX and setting the result to varY |
15:07:04 | narimiran | it is quite straight forward |
15:07:05 | FromDiscord | <Rika> if it were to work, i mean |
15:07:18 | narimiran | yep, you guessed correctly |
15:07:21 | FromDiscord | <demotomohiro> @Rika Thank you! I wrote few code that measure time as my code is not long. |
15:07:22 | * | vsantana quit (Client Quit) |
15:08:05 | FromGitter | <Julioevm> gotcha |
15:08:05 | FromDiscord | <Rika> though personally, i havent understood how amd uprof worked |
15:08:12 | FromDiscord | <Rika> you might have more luck than me |
15:09:17 | FromDiscord | <Shucks> sent a code paste, see http://ix.io/2pMG |
15:09:27 | FromDiscord | <demotomohiro> Long time ago, I used some AMD's profiler on Intel CPU and it worked. |
15:09:36 | FromDiscord | <Shucks> im surprised that this works. How lol |
15:09:38 | FromDiscord | <Rika> @Shucks that's scary stuff you're doing |
15:10:00 | FromGitter | <machineko> Hello guys did i need to install openssl on windows to use https requests in httpclient? (I wanna to ship executable for clients and cant test it right now) |
15:10:23 | FromDiscord | <Rika> no |
15:10:33 | FromDiscord | <Rika> i dont think you need to |
15:12:25 | FromDiscord | <demotomohiro> machineko, you get dlls you needs from https://nim-lang.org/install_windows.html |
15:13:15 | FromGitter | <machineko> @demotomohiro ye it'll be working on my machine but what if i wanna send compiled executable for another users and they didnt have nim installed? |
15:13:16 | FromDiscord | <demotomohiro> There is a link to dll.zip in `Other dependencies` section. |
15:13:47 | FromDiscord | <Rika> maybe try out bearssl or something if you want a static binary |
15:14:07 | FromDiscord | <Rika> or you can package the dll with the binary |
15:14:57 | FromDiscord | <demotomohiro> I think just put dll files in dll.zip in the same directory that containing your executable will be fine. |
15:15:14 | FromGitter | <machineko> K thanks guys ill try it :) |
15:15:51 | FromDiscord | <Rika> yeah i'd recommend packaging the dll with the binary instead of using bearssl since this is crypto stuff and being weird with crypto is very risky i think |
15:16:56 | * | Senny joined #nim |
15:18:01 | FromGitter | <machineko> Kk thanks ill try pack it like that first :P |
15:18:14 | FromGitter | <machineko> Never done stuff like this thats why i'm asking :) |
15:21:12 | * | drdee joined #nim |
15:21:46 | FromDiscord | <juan_carlos> https://github.com/juancarlospaco/nimscript4python#nimscript4python |
15:24:37 | * | dr-dd joined #nim |
15:24:40 | * | dr-dd quit (Remote host closed the connection) |
15:27:42 | FromDiscord | <j$> is explicit type casting any more expensive than implicit? |
15:29:33 | FromDiscord | <j$> actually, I mean is type casting more expensive than type conversion |
15:29:46 | FromDiscord | <Generic> no |
15:30:05 | FromDiscord | <Generic> the cost of casting can vary extremely |
15:30:46 | FromDiscord | <Generic> for example on cpu's getting the raw value of a float can be expensive |
15:30:58 | FromDiscord | <Generic> while on other's it's a moderate cost |
15:31:21 | FromDiscord | <j$> but that is the same for conversions, right? |
15:32:02 | FromDiscord | <Generic> it just does sometimes different things, which can have different costs |
15:32:15 | FromDiscord | <Generic> though in Nim you can be sure that atleast all conversions done implicitely |
15:32:17 | FromDiscord | <Generic> are cheap |
15:32:26 | FromDiscord | <Generic> like conversions from a small integer to a larger integer |
15:34:30 | FromDiscord | <Generic> do you have any concrete problem? |
15:35:49 | FromDiscord | <j$> not a really a problem, I'm doing opengl stuff using distinct types and am casting and I was curious |
15:36:26 | FromDiscord | <Generic> casting a distinct type to it's underlying type is always free |
15:36:56 | FromDiscord | <Generic> because the "distinctness" exists only for us humans |
15:37:26 | FromDiscord | <j$> right, I assumed so, |
15:37:34 | FromDiscord | <j$> just wanted to dbl check |
15:38:23 | * | NimBot joined #nim |
15:38:24 | FromDiscord | <j$> and the same for ptrs, right? |
15:38:44 | FromDiscord | <Generic> yes |
15:39:23 | FromDiscord | <j$> thanks |
15:40:42 | FromDiscord | <KrispPurg> Is there a reason why when I make an async http request when I await for the body and the data is like super huge like 1010 lines in pretty json format, it does not respond with any data? I haven't upgraded my Nim version yet which is Nim v1.2.0 |
15:57:31 | * | waleee-cl joined #nim |
15:59:25 | * | narimiran quit (Quit: leaving) |
15:59:56 | federico3 | Araq: can I suggest clarifying if defer is part of 1.0 or not in your initial comment on https://github.com/nim-lang/RFCs/issues/236 ? |
15:59:57 | disbot | ➥ Deprecate the 'defer' statement ; snippet at 12https://play.nim-lang.org/#ix=2pwd |
17:04:51 | FromDiscord | <Balu> is the nim package for the atom editor broken? or is anyone using that successfully? |
17:13:01 | * | drdee quit (Remote host closed the connection) |
17:14:05 | * | hzx joined #nim |
17:15:50 | hzx | Hey! I ran into this bug today: https://github.com/nim-lang/zip/issues/45 How long does it usually take to repair a bug like this at Nim? This one was reported a year ago. |
17:15:52 | disbot | ➥ addFile StringStream fails on Windows ; snippet at 12https://play.nim-lang.org/#ix=2pNk |
17:17:54 | * | silvernode quit (Ping timeout: 240 seconds) |
17:18:01 | * | silvernode joined #nim |
17:19:44 | FromDiscord | <KrispPurg> Update: There was an ssl nil access error and I used segfaults without noticing |
17:19:59 | * | silvernode quit (Client Quit) |
17:35:47 | * | vicfred joined #nim |
17:38:00 | zedeus | hey @treeform |
17:40:01 | FromDiscord | <treeform> hey @Zedeus |
17:40:15 | FromDiscord | <treeform> (edit) '@Zedeus' => 'zedeus' |
17:40:47 | zedeus | I'm having trouble running the fidget examples on Linux |
17:40:51 | zedeus | http://ix.io/2pNq |
17:41:15 | zedeus | compiled with nim devel and fidget #head, the window flashes for a split second then this error is printed |
17:41:29 | zedeus | tried on two linux installs, both running up to date graphical drivers etc |
17:41:37 | FromDiscord | <treeform> So its not my error. Looks like Linux internal stuff. |
17:41:46 | FromDiscord | <treeform> What max openGL version do you get with glxinfo ? |
17:42:12 | zedeus | 4.6.0 |
17:42:40 | zedeus | fails both with nvidia and intel igpu |
17:43:41 | FromDiscord | <treeform> Can you open a window with just static glfw? https://github.com/treeform/staticglfw |
17:44:09 | zedeus | same error |
17:44:16 | zedeus | red window flashes quickly |
17:45:17 | FromDiscord | <treeform> here are some people talking about the error: https://github.com/openframeworks/openFrameworks/issues/2334 |
17:45:20 | disbot | ➥ X error of failed request (openbox based) ; snippet at 12https://play.nim-lang.org/#ix=2pNt |
17:47:21 | FromDiscord | <treeform> It looks like this thing might fix it: https://github.com/glfw/glfw/commit/e65de2941c056ee5833b4dab3db36b297b53aa14 |
17:47:40 | FromDiscord | <treeform> But its not part of staticglfw, will update staticglfw and lets see if it works then. |
17:47:48 | zedeus | cool, thank you |
17:54:31 | Zevv | p |
17:55:31 | * | bolti[m] left #nim ("User left") |
18:00:36 | FromDiscord | <treeform> hey so, zedeus I just pushed an update to the https://github.com/treeform/staticglfw . Could you clone the repo down then go into the tests folder and run nim c -r redwindow.nim ? |
18:01:23 | zedeus | works! |
18:01:32 | FromDiscord | <treeform> wow really? great |
18:01:51 | FromDiscord | <treeform> can you run `nimble develop` in the main folder (cd ..) where the .nimble file is. |
18:02:11 | FromDiscord | <treeform> then after that run a fidget sample? |
18:02:21 | zedeus | yep works correctly now |
18:02:54 | Araq | federico3, I can add it |
18:02:59 | FromDiscord | <treeform> Cool so it was a glfw but "A handle race condition could cause a `BadWindow`"... now fixed! |
18:03:18 | FromDiscord | <treeform> I will cut new releases of staticglfw and fidget |
18:03:18 | * | hecanjog quit (Ping timeout: 260 seconds) |
18:04:25 | * | krux02 joined #nim |
18:05:02 | * | hecanjog joined #nim |
18:05:17 | zedeus | thanks! |
18:12:47 | * | hzx quit (Quit: Going offline, see ya! (www.adiirc.com)) |
18:14:42 | FromGitter | <raydf> Hello everyone, how can i handle signals from my app so it does not crash. I'm receiving a ``` ⏎ "SIGABRT: Abnormal termination." ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5eefa392e6668d35db11da36] |
18:15:10 | FromDiscord | <treeform> zedeus, I tagged a new release of fidget (0.4.2) ... no need for `nimble develop` any more. |
18:16:56 | leorize | @raydf just override the signal handler as usual |
18:17:00 | leorize | but why do you have to do that? |
18:17:22 | leorize | it's usually discouraged due to how signal-based programming is pretty flawed |
18:18:04 | leorize | I'm actually not even sure if SIGABRT can be handled... |
18:21:11 | FromGitter | <raydf> I'm using this wrapper https://github.com/manguluka/duktape-nim |
18:21:16 | leorize | looks like it can but you shouldn't due to what the signal is supposed to do |
18:21:40 | FromGitter | <raydf> and when the javascript runtime find an error it crash the main app. Even if i use try catch |
18:22:00 | leorize | SIGABRT is usually used for fatal error |
18:22:05 | leorize | read: you should never handle it |
18:22:54 | FromGitter | <raydf> Any ideas on how to create a sandbox for that c library wrapper so the main thread never fails? |
18:23:01 | leorize | https://duktape.org/guide.html#error-handling |
18:23:12 | leorize | ^ it details how to handle errors so that it won't crash with SIGABRT |
18:23:44 | leorize | you can create a sandbox, but you shouldn't |
18:25:46 | leorize | > It is strongly recommended to provide a custom fatal error handler. |
18:25:50 | leorize | quote from their manual |
18:27:33 | leorize | from what I can see, if you caught errors early on you should be fine |
18:27:44 | leorize | as for fatal errors, you will need to write a custom handler for those |
18:28:21 | FromGitter | <raydf> @leorize thx for the orientation, let me see how can i learn the FFI of nim and nimgen |
18:28:59 | leorize | np :) |
18:29:07 | leorize | that wrapper seems to be pretty old |
18:29:16 | leorize | now the next gen of nimgen is nimterop |
18:29:19 | leorize | !repo nimterop |
18:29:21 | disbot | https://github.com/nimterop/nimterop -- 9nimterop: 11Nimterop is a Nim package that aims to make C/C++ interop seamless 15 189⭐ 14🍴 7& 11 more... |
18:29:48 | FromGitter | <raydf> nice |
18:30:03 | FromGitter | <raydf> let me try to create a new wrapper based on nimterop |
18:30:23 | FromGitter | <raydf> is this the correct way to handle signals? https://gist.github.com/dom96/908782 |
18:31:17 | leorize | sigaction should be used instead as in the comments |
18:31:37 | * | hecanjog quit (Quit: WeeChat 2.8) |
18:31:40 | leorize | though I'd recommend not doing signal handling unless it's really necessary |
18:32:32 | leorize | for duktape you can install a simple default handler that's basically: `raise newException(DuktapeError, "message here")` and you should be set for catching fatal errors via try-except |
18:33:04 | leorize | at least that's what I get from reading their manual |
18:33:47 | * | hecanjog joined #nim |
18:34:28 | * | hecanjog left #nim (#nim) |
18:34:41 | * | hecanjog joined #nim |
18:35:15 | FromGitter | <raydf> ok, nice, nimterop is amazing :). Let me keep grinding with learning c and nim, this kind of concepts are a little hard for web developers. |
18:35:23 | FromGitter | <raydf> thx again |
18:36:49 | leorize | yw :) |
18:37:12 | leorize | nimterop's author hang around here as well, so if you have any trouble just ask away :) |
18:38:02 | * | bung quit (Ping timeout: 256 seconds) |
18:44:08 | FromDiscord | <demotomohiro> If nimgl/imgui's author hang around here, please review this PR.↵https://github.com/nimgl/imgui/pull/3 |
18:44:09 | disbot | ➥ Fix compile error when igSetNextWindowPos is called |
18:48:21 | * | nsf quit (Quit: WeeChat 2.8) |
18:57:05 | * | bung joined #nim |
19:01:38 | * | bung quit (Ping timeout: 260 seconds) |
19:08:13 | * | drdee joined #nim |
19:30:33 | * | bung joined #nim |
19:34:28 | * | casaca quit (Remote host closed the connection) |
19:35:16 | * | bung quit (Ping timeout: 256 seconds) |
19:38:48 | * | casaca joined #nim |
20:08:21 | FromGitter | <antonkatz> Hello again! I came around a couple of weeks ago saying that I'd love to give NIM a try, and hey, I just did. Finally found a little project to try it out on. |
20:08:38 | FromGitter | <antonkatz> So far I like it, the thing I'm looking for now is reactive programming support and streams |
20:08:50 | FromGitter | <antonkatz> And google is not being a very good friend here |
20:09:15 | FromGitter | <antonkatz> Almost seems like there isn't much interest in reactive programming from the NIM community |
20:10:41 | FromDiscord | <Shucks> could i declare "invisibile" object variables? Not just non public rather not accessible at all? |
20:11:12 | * | Senny quit (Ping timeout: 260 seconds) |
20:13:35 | leorize | if it doesn't have a `*` next to it, it's not accessible from other modules |
20:14:06 | leorize | @antonkatz yea the interest on reactive programming isn't huge here |
20:14:16 | leorize | for streams we do have a streams module |
20:14:48 | leorize | though I'm not even sure what "reactive programming" is |
20:15:43 | FromDiscord | <Shucks> Yea I know. Since I'm messing around with memories I got pad arrays in my objects which don't have any function. So I wan't to make them truly hidden |
20:15:56 | FromDiscord | <Shucks> (edit) 'memories' => 'process memory' |
20:16:52 | leorize | shouldn't the `{.align.}` pragma works better for data structure alignment? |
20:17:32 | FromGitter | <antonkatz> @leorize Reactive programming is pretty big in UI world. The basic idea is that you have some variables that depend on the value of other variables, so that when the other variable changes all dependents change. |
20:18:21 | leorize | the closet thing that I know of is: |
20:18:23 | leorize | !repo karax |
20:18:24 | disbot | https://github.com/pragmagic/karax -- 9karax: 11Karax. Single page applications for Nim. 15 563⭐ 47🍴 7& 13 more... |
20:18:48 | leorize | and maybe |
20:18:55 | leorize | !repo figma |
20:18:56 | disbot | https://github.com/treeform/fidget -- 9fidget: 11Figma based UI library for nim, with HTML and OpenGL backends. 15 193⭐ 8🍴 |
20:19:19 | FromGitter | <antonkatz> I really like the fidget concept |
20:19:32 | FromGitter | <antonkatz> i just saw it on nimble today. it was featured |
20:19:57 | leorize | yep, the author recently gave a talk on NimConf |
20:21:52 | leorize | @Shucks we don't have anything built in to automagically hide an identifier, but you can easily make a type section macro for this |
20:23:39 | FromGitter | <antonkatz> Did you get to listen to it? I'm coming from a JS background and I understand how let's say React works under the hood and how it knows when to refresh the dom. How does the fidget know when to refresh the dom if a value changes? I'm looking at this example https://github.com/treeform/fidget/blob/master/examples/todo/todo.nim and it just directly changes the mutable set. |
20:23:46 | FromDiscord | <Shucks> Thank you. The align pragma looks interesting. Just not sure how to use it in my case. https://play.nim-lang.org/#ix=2pOl |
20:25:40 | * | kungtotte quit (Read error: Connection reset by peer) |
20:25:54 | * | bung joined #nim |
20:26:20 | leorize | @antonkatz I think fidget uses a vdom approach |
20:26:31 | * | Jesin quit (Quit: Leaving) |
20:26:32 | leorize | the talk can be found on conf.nim-lang.org if you're interested |
20:26:55 | * | kungtotte joined #nim |
20:27:09 | leorize | fully reactive similar to svelete is still in development afaik |
20:27:48 | leorize | there was a post on the forum about a library that can do something like svelete (not sure if correct spelling) |
20:28:02 | zedeus | svelte |
20:28:13 | leorize | thanks :) |
20:28:16 | leorize | !repo svelte |
20:28:17 | disbot | https://github.com/awseward/hello_nim_svelte -- 9hello_nim_svelte: 11An exploration of getting svelte up and running with a nim backend 15 0⭐ 0🍴 |
20:29:30 | FromGitter | <antonkatz> @leorize you're awesome. thank you. |
20:30:07 | * | Jesin joined #nim |
20:30:13 | FromDiscord | <willyboar> There is a nice new project |
20:30:23 | FromDiscord | <willyboar> !repo clear |
20:30:24 | disbot | https://github.com/thoughtbot/clearance -- 9clearance: 11Rails authentication with email & password. 15 3276⭐ 444🍴 7& 29 more... |
20:31:38 | leorize | @Shucks: I think I can hack something up for you, but I gtg now |
20:32:18 | FromDiscord | <Shucks> awesome. Sure have a good one |
20:34:08 | FromDiscord | <willyboar> !repo nclearseam |
20:34:09 | disbot | https://github.com/mildred/nclearseam -- 9nclearseam: 11front-end templating for Nim with direct DOM modification and no specific syntax 15 10⭐ 0🍴 |
20:37:07 | FromDiscord | <willyboar> mratsim you put in HN a link of my fork of awesome nim and people staring it. |
20:41:40 | FromDiscord | <Technisha Circuit> In python, i can do `" ".join(list)` to get a list joined with the space as a separator, how would i do this in Nim? |
20:41:59 | FromDiscord | <Technisha Circuit> I don't want to use the for loop |
20:42:07 | * | leorize quit (Quit: WeeChat 2.8) |
20:42:43 | FromDiscord | <😬🤣> `strutils.join(list, " ")` |
20:43:08 | FromDiscord | <Technisha Circuit> Thankz! |
20:43:34 | FromDiscord | <Technisha Circuit> So `sequence.join(" ")` should work, right? |
20:43:49 | FromDiscord | <Technisha Circuit> After importing strutils |
20:43:51 | FromDiscord | <😬🤣> yes, I just made it clear what module it's from |
20:43:57 | FromDiscord | <Technisha Circuit> Thanks! |
20:44:01 | FromDiscord | <😬🤣> np |
20:46:57 | FromDiscord | <Technisha Circuit> If i have a custom type, how do i assign values to the fields? `newType = Type(fields=values)`? |
20:47:04 | FromDiscord | <Technisha Circuit> (edit) '`newType' => '`var newType' |
20:47:55 | FromDiscord | <😬🤣> https://nim-lang.org/docs/manual.html Ctrl+F "object constr" |
20:49:34 | * | Senny joined #nim |
20:50:16 | FromDiscord | <Recruit_main707> ayyyman, no forwards declaration is killing me |
20:53:18 | * | krux02 quit (Remote host closed the connection) |
20:54:03 | FromDiscord | <Elegant Beef> What do you mean? |
20:54:39 | Araq | Recruit_main707: there is {.experimental: "codeReordering".} |
20:54:56 | Araq | and it will become non-experimental |
20:56:21 | * | clemens3 quit (Read error: No route to host) |
20:56:31 | FromDiscord | <djazz> codeReordering works across modules? |
20:56:32 | FromDiscord | <Recruit_main707> it might work in this situation |
20:56:47 | * | drdee quit (Quit: Leaving) |
20:57:43 | FromDiscord | <Recruit_main707> i apreciate all the work you put into the lang, i cannot even imagine how hard it should be to create and maintain nim |
20:58:36 | FromDiscord | <Technisha Circuit> Thanks :p |
21:03:34 | * | Senny quit (Ping timeout: 240 seconds) |
21:03:40 | * | tefter quit (Quit: WeeChat 2.8) |
21:16:03 | FromDiscord | <Technisha Circuit> I just realized I haven't wished for classes in Nim for ages now |
21:16:17 | FromDiscord | <Technisha Circuit> Classes are completely redundant because of Nim's power- |
21:16:39 | FromDiscord | <Recruit_main707> see, if you survive the first weeks, you see you dont really need them |
21:17:18 | FromDiscord | <Technisha Circuit> That's true |
21:17:49 | FromDiscord | <Recruit_main707> add this to the nim for the python programmer wiki :P |
21:17:54 | * | solitudesf quit (Ping timeout: 260 seconds) |
21:18:01 | FromDiscord | <Technisha Circuit> That should actually be added hahaha |
21:21:24 | FromDiscord | <Technisha Circuit> Is it `myTable.keys` to get all keys as a sequence? |
21:21:40 | FromDiscord | <Technisha Circuit> I'm looking at docs tryna figure out my issue |
21:21:46 | FromDiscord | <Technisha Circuit> Nvm |
21:21:52 | FromDiscord | <Technisha Circuit> That's an undeclared field |
21:22:34 | FromDiscord | <Technisha Circuit> Yeah, i can't figure out how to get all Keys in a table T^T |
21:32:27 | FromDiscord | <Shucks> tables.keys is a iterator `for key in myTable.keys: echo key` |
21:33:31 | * | lritter quit (Quit: Leaving) |
21:34:29 | FromDiscord | <😬🤣> you can do `sequtils.toSeq(myTable.keys)` if you need to make it a seq |
21:35:21 | * | Vladar quit (Quit: Leaving) |
21:35:55 | FromDiscord | <Technisha Circuit> Oh thanks! |
21:39:30 | FromDiscord | <Technisha Circuit> sent a code paste, see http://ix.io/2pOK |
21:40:13 | FromDiscord | <Recruit_main707> that could have killed irc |
21:40:17 | FromDiscord | <Technisha Circuit> I'm definitely doing something wrong :p |
21:40:27 | FromDiscord | <Technisha Circuit> Isn't there the new message handler now? |
21:40:42 | FromDiscord | <Recruit_main707> i think so |
21:40:47 | FromDiscord | <Technisha Circuit> That's why i sent it :p |
21:40:53 | FromDiscord | <Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/724378323282821130/Screenshot_20200621_223950_com.discord.jpg |
21:40:56 | FromDiscord | <Technisha Circuit> If they can't see the message |
21:41:50 | * | drdee joined #nim |
21:42:06 | FromDiscord | <😬🤣> commands isn't a table |
21:42:07 | FromDiscord | <Recruit_main707> Command is not a table |
21:42:55 | FromDiscord | <Technisha Circuit> `commands` is a table |
21:43:02 | FromDiscord | <Technisha Circuit> And `Command` is a custom type |
21:43:30 | FromDiscord | <Technisha Circuit> Wait |
21:44:07 | FromDiscord | <Technisha Circuit> Nearly fixed |
21:44:13 | FromDiscord | <Recruit_main707> you have to do .toTable iirc |
21:44:25 | FromDiscord | <Shucks> sent a code paste, see http://ix.io/2pOL |
21:44:33 | FromDiscord | <Shucks> i suggest installing inim. Awesome tool ;D |
21:45:04 | FromDiscord | <Recruit_main707> was that your talk? |
21:45:20 | FromDiscord | <Shucks> naw im a nim newbie lol |
21:45:28 | FromDiscord | <Shucks> but i was missing something like that |
21:45:31 | FromDiscord | <Recruit_main707> ah, ok |
21:46:46 | FromDiscord | <Technisha Circuit> I already have Inim! :3 |
21:48:02 | FromDiscord | <Technisha Circuit> It works! Thanks Recruit_main! |
21:54:30 | FromDiscord | <Recruit_main707> np |
21:54:40 | FromDiscord | <Recruit_main707> @djazz it doesnt btw |
21:55:05 | FromDiscord | <Recruit_main707> but you know, something is better than nothing |
22:00:46 | * | Senny joined #nim |
22:08:23 | FromDiscord | <djazz> Alright |
22:09:31 | * | tane quit (Quit: Leaving) |
22:11:48 | FromDiscord | <Recruit_main707> also, method arguments cannot change names, (they should have the same ones as the base method), is that intended? |
22:12:44 | * | clemens3 joined #nim |
22:15:16 | FromDiscord | <Recruit_main707> hmm, maybe im doing something wrong, ill ask tomorrow gtg now |
22:30:14 | * | dddddd quit (Ping timeout: 240 seconds) |
22:39:58 | FromDiscord | <😬🤣> what does `createShared` actually do that `create` doesn't? |
22:40:09 | FromDiscord | <😬🤣> can't you share normal pointers between threads? |
22:48:46 | * | drdee quit (Remote host closed the connection) |
22:50:42 | FromDiscord | <Elegant Beef> > The allocated memory belongs to its allocating thread! Use createShared to allocate from a shared heap. |
23:02:53 | FromDiscord | <Shucks> What exactly happens if I use `0.bool`? I dont want to be petty but would `if var == 0` or `if var.bool` better? |
23:06:32 | FromDiscord | <Elegant Beef> It converts 0 to a bool which is false, i'd say the comparison is better |
23:06:41 | FromDiscord | <Elegant Beef> Since it's more explicit |
23:10:12 | FromGitter | <Vindaar> yes, please treat ints as ints. If you actually need bools, use them. Until right now I wasn't even aware that `0.bool` is allowed (and even e.g. `2.bool` works). Don't introduce one of the worst C features into Nim :) |
23:10:57 | FromDiscord | <Elegant Beef> well if you so want you could make a `proc hasValue(a : int):bool= a !=0` |
23:11:04 | FromDiscord | <Elegant Beef> Just something clear 😄 |
23:11:27 | FromDiscord | <Shucks> Alright. Just asking because the winapi returns "Winbools" which is 0 or 1. |
23:12:11 | * | dddddd joined #nim |
23:12:42 | FromGitter | <Vindaar> that would at least signify to me as a reader of the code that the variable that there is a certain, well defined `hasValue`. ⏎ For such a case (if you are certain that it's really effectively a bool), feel free to write a `toBool` proc for those `Winbools`. Would be better though if `Winbool` was a distinct int \ |
23:13:34 | FromGitter | <Vindaar> as in to avoid misuse of the `toBool` for normal `int` which have values outside of {0, 1} |
23:14:09 | FromGitter | <Vindaar> can you give a link to the winapi lib? |
23:14:19 | FromDiscord | <Shucks> !repo winim |
23:14:20 | disbot | https://github.com/khchen/winim -- 9winim: 11Nim's Windows API and COM Library 15 118⭐ 10🍴 |
23:15:02 | FromDiscord | <Shucks> https://github.com/khchen/winim/blob/master/winim/inc/windef.nim#L57 |
23:16:58 | FromGitter | <Vindaar> ok, I see. Since introducing `distint int` is a little out of scope here, I'd go with the `toBool` convention and manually call that on the winbools, where I use them |
23:19:54 | FromGitter | <Vindaar> in any case, gotta go to bed. Have a good evening (or whatever ;)) |
23:20:08 | FromDiscord | <Shucks> gn8 😉 thanks btw |
23:20:24 | FromDiscord | <Vindaar> no worries |
23:33:21 | * | dsrw joined #nim |
23:38:03 | * | dsrw quit (Client Quit) |
23:38:11 | FromDiscord | <kaletaa> what's the easiest way to write unit tests for something like a discord bot? |
23:38:15 | FromDiscord | <kaletaa> without going insane |
23:46:34 | FromGitter | <antonkatz> @kaletaa I'm interested too |
23:48:10 | FromDiscord | <kaletaa> i guess on discord making another bot to test the first one wouldn't be too hard |
23:48:18 | FromDiscord | <kaletaa> since a bot can do most things a human can |
23:49:04 | FromDiscord | <kaletaa> making such a bot for telegram would be quite hard though |
23:57:59 | * | iwq joined #nim |