00:06:12 | * | krux02 quit (Remote host closed the connection) |
00:18:04 | * | abm quit (Read error: Connection reset by peer) |
00:34:56 | FromDiscord | <Avatarfighter> I assume it would be better to do `s.len > 0` |
00:35:10 | FromDiscord | <Avatarfighter> I have no factual based evidence to support this reasoning though |
00:35:17 | * | Onionhammer quit (Quit: Ping timeout (120 seconds)) |
00:36:41 | * | Onionhammer joined #nim |
00:36:51 | * | ldlework quit (Remote host closed the connection) |
00:37:45 | * | ldlework joined #nim |
00:41:01 | * | nature quit (Ping timeout: 264 seconds) |
00:59:36 | * | NimBot joined #nim |
01:06:17 | FromDiscord | <PizzaFox> having an annoying issue with streams + threadpool |
01:06:45 | FromDiscord | <Avatarfighter> mood |
01:06:53 | FromDiscord | <PizzaFox> after a bunch of testing i have determined that opening a RW stream on this cursed windows file (`C:\bootTel.dat`) |
01:07:02 | FromDiscord | <PizzaFox> causes this error↵```↵SIGSEGV: Illegal storage access. (Attempt to read from nil?)↵``` |
01:07:27 | FromDiscord | <PizzaFox> (edit) 'causes this error↵```↵SIGSEGV: Illegal storage access. (Attempt to read from nil?)↵```' => 'sent a code paste, see https://play.nim-lang.org/#ix=2AfX' |
01:07:35 | FromDiscord | <Avatarfighter> I wonder if you need a higher privileged process to read that file |
01:07:39 | FromDiscord | <PizzaFox> when i try to catch in it a proc i call `threadpool.spawn` |
01:07:43 | FromDiscord | <PizzaFox> it seems to simply not care |
01:07:51 | FromDiscord | <PizzaFox> doesnt run the code in my catch block |
01:07:56 | FromDiscord | <PizzaFox> and just exits program without logging a stacktrace |
01:08:08 | FromDiscord | <PizzaFox> what gives |
01:09:41 | FromDiscord | <PizzaFox> will attempt a repro repo |
01:09:44 | FromDiscord | <Avatarfighter> I actually have no idea |
01:10:00 | FromDiscord | <PizzaFox> my first instinct is that the error is so insane fucky wucky that it somehow bypasses the trycatch |
01:10:01 | FromDiscord | <Avatarfighter> But my suspicion is that the process doesn't have enough privilege to read a file in C:\ |
01:10:13 | FromDiscord | <PizzaFox> why wouldnt that just throw a regular perms error |
01:10:19 | FromDiscord | <PizzaFox> also i can `cat C:\bootTel.dat` without any privs |
01:10:23 | FromDiscord | <Avatarfighter> Maybe windows kills the OS? |
01:10:37 | FromDiscord | <Avatarfighter> Maybe windows allows you to read the files in C:\ but not write? |
01:10:47 | FromDiscord | <Avatarfighter> idk |
01:10:51 | FromDiscord | <Avatarfighter> That's my theory though |
01:12:21 | * | arecacea1 quit (Remote host closed the connection) |
01:12:45 | * | arecacea1 joined #nim |
01:13:15 | * | luis joined #nim |
01:13:36 | FromDiscord | <PizzaFox> `bootTel.dat` isn't empty |
01:13:45 | FromDiscord | <PizzaFox> copying it to a test directory doesnt break the program |
01:13:53 | FromDiscord | <PizzaFox> so something specifically with `C:\bootTel.dat` is borked |
01:14:48 | * | astronavt joined #nim |
01:15:38 | FromDiscord | <PizzaFox> i can consistently reproduce |
01:16:11 | FromDiscord | <PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2AfZ |
01:16:18 | FromDiscord | <PizzaFox> (edit) 'https://play.nim-lang.org/#ix=2AfZ' => 'https://play.nim-lang.org/#ix=2Ag0' |
01:16:25 | FromDiscord | <Avalier> Hi, All! |
01:16:29 | FromDiscord | <PizzaFox> (edit) 'https://play.nim-lang.org/#ix=2Ag0' => 'https://play.nim-lang.org/#ix=2Ag1' |
01:16:51 | FromDiscord | <PizzaFox> (edit) 'https://play.nim-lang.org/#ix=2Ag1' => 'https://play.nim-lang.org/#ix=2Ag2' |
01:17:13 | FromDiscord | <hobbledehoy> Hello |
01:17:22 | FromDiscord | <Avatarfighter> @PizzaFox try opening it without the write permission? |
01:17:35 | FromDiscord | <PizzaFox> no errors |
01:17:53 | FromDiscord | <Avatarfighter> yeah its a permission issue guarenteed |
01:17:58 | FromDiscord | <PizzaFox> h |
01:18:03 | FromDiscord | <Avalier> I am new and I am getting to know the language, I hope everything is fine! |
01:18:11 | FromDiscord | <PizzaFox> i am suffering 😃 👍 |
01:18:16 | FromDiscord | <Avalier> I come from C |
01:18:16 | FromDiscord | <Avatarfighter> if you build your debug program and then run as administrator I bet it will work @PizzaFox |
01:18:23 | FromDiscord | <PizzaFox> ok so that aside |
01:18:28 | FromDiscord | <PizzaFox> why does threadpool behave badly |
01:18:29 | FromDiscord | <Avatarfighter> @Avalier you should feel right at home with such a powerful language 🙂 |
01:18:34 | FromDiscord | <Avalier> > I come from C↵@Avalier C# |
01:18:37 | FromDiscord | <Avatarfighter> ah |
01:18:39 | FromDiscord | <Avatarfighter> well |
01:18:50 | FromDiscord | <Elegant Beef> Hey coming from C# is my thing! |
01:18:57 | FromDiscord | <Avatarfighter> I suggest following the tutorial and reading the docs |
01:19:04 | FromDiscord | <Elegant Beef> Find something else to seperate you! |
01:19:06 | FromDiscord | <Avatarfighter> They helped me learn the language quickley |
01:19:36 | FromDiscord | <Avalier> C # is my first language that I have known, and googling a little, I got this from Nim, really that happened on Monday |
01:19:57 | FromDiscord | <Avalier> Excuse my language, my native language is Spanish |
01:19:58 | FromDiscord | <Avatarfighter> @PizzaFox Opening the stream as fmReadWrite fails silently for some reason/returns a nil value so when you do `stream.close` you're actually doing `nil.close` which isn't possible and it crashes |
01:20:00 | FromDiscord | <PizzaFox> @Avatarfighter error happens when i try closing the stream, think i know why↵> This function returns nil in case of failure.↵so when i call stream.close(), stream is `nil` |
01:20:03 | FromDiscord | <PizzaFox> yes |
01:20:05 | FromDiscord | <PizzaFox> ahaha |
01:20:11 | FromDiscord | <Avatarfighter> great minds think a like |
01:20:18 | FromDiscord | <Avatarfighter> Its 100% a permission error though |
01:20:30 | FromDiscord | <PizzaFox> ok so |
01:20:33 | FromDiscord | <Avalier> > I suggest following the tutorial and reading the docs↵@Avatarfighter Thanks |
01:20:35 | FromDiscord | <PizzaFox> we know why stream code breaks |
01:20:39 | FromDiscord | <PizzaFox> why doesnt threadpool behave properly |
01:20:44 | FromDiscord | <Avatarfighter> wym |
01:20:50 | FromDiscord | <PizzaFox> lemme make a repo for you |
01:20:53 | FromDiscord | <PizzaFox> wait no |
01:20:54 | FromDiscord | <PizzaFox> i cant L |
01:20:55 | FromDiscord | <Avatarfighter> Nonono |
01:21:01 | FromDiscord | <Avatarfighter> Describe the issue with threadpool? |
01:21:08 | FromDiscord | <PizzaFox> threadpool silently dies after many seconds |
01:21:09 | FromDiscord | <Avatarfighter> The fact that there isn't a stacktrace? |
01:21:11 | FromDiscord | <PizzaFox> no stacktrace |
01:21:12 | FromDiscord | <PizzaFox> yes |
01:21:15 | FromDiscord | <Elegant Beef> @Avalier Welcome and yea follow the tutorial/manual and you'll learn a lot, Nim does things in a much different way to C# so you'll either love it or hate it 😛 |
01:21:16 | FromDiscord | <PizzaFox> surely there should be a stacktrace |
01:21:17 | FromDiscord | <Avatarfighter> yeah its because of the memory error |
01:21:19 | FromDiscord | <Avatarfighter> no |
01:21:24 | FromDiscord | <PizzaFox> wtf |
01:21:26 | FromDiscord | <PizzaFox> i hate memory now |
01:21:30 | FromDiscord | <Avatarfighter> the OS kill the program i believe |
01:21:46 | FromDiscord | <Avatarfighter> another more skilled nimion will probably correct me though |
01:22:10 | FromDiscord | <Avalier> > @Avalier Welcome and yea follow the tutorial/manual and you'll learn a lot, Nim does things in a much different way to C# so you'll either love it or hate it 😛↵@Elegant Beef jajajaja yes. I have seen a little other codes in github and I see that everything changes |
01:22:13 | FromDiscord | <PizzaFox> well ok |
01:22:17 | FromDiscord | <PizzaFox> thanks for your help |
01:22:18 | FromDiscord | <PizzaFox> once again |
01:22:21 | FromDiscord | <PizzaFox> this comes down to |
01:22:28 | FromDiscord | <PizzaFox> "simply write error free code and you dont have to handle any errors" |
01:22:34 | FromDiscord | <Avatarfighter> https://en.wikipedia.org/wiki/Segmentation_fault |
01:22:49 | FromDiscord | <Avatarfighter> The code is error free |
01:23:05 | FromDiscord | <Avatarfighter> its just the binary you're running doesn't have the permissions to open files to write in `C:\` |
01:23:24 | FromDiscord | <Avatarfighter> you'll be able to modify everywhere else but the system files that are usually located right in `C:\` |
01:24:11 | FromDiscord | <Avatarfighter> Another theory I have is if you right click the file go to properties and uncheck "read only" I'm pretty sure the program will run correctly @PizzaFox |
01:24:25 | FromDiscord | <PizzaFox> the file doesnt even show up in windows explorer |
01:24:28 | FromDiscord | <PizzaFox> not even as a hidden file |
01:24:31 | FromDiscord | <PizzaFox> its in the shadow realm |
01:26:08 | FromDiscord | <Avatarfighter> lmao |
01:29:35 | * | sealmove joined #nim |
01:30:21 | sealmove | Hi, I am using `re` lib at CT and I get this error: re.nim(93, 28) Error: VM does not support 'cast' from tySet to tyInt32 |
01:33:44 | FromDiscord | <PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2Ag8 |
01:33:46 | FromDiscord | <PizzaFox> so |
01:33:52 | FromDiscord | <PizzaFox> i now have a lot of 0 byte files |
01:34:09 | FromDiscord | <PizzaFox> why is this the case |
01:34:22 | FromDiscord | <PizzaFox> surely closing the stream is not a destructive action |
01:34:43 | sealmove | https://play.nim-lang.org/#ix=2Ag9 |
01:34:48 | sealmove | does re not work at CT? |
01:34:52 | sealmove | this is sad |
01:36:15 | sealmove | PizzeFox what do you mean? It deletes the file? |
01:36:32 | sealmove | PizzaFox* sorry |
01:38:57 | * | apahl quit (Ping timeout: 272 seconds) |
01:40:24 | * | apahl joined #nim |
01:40:30 | FromDiscord | <PizzaFox> not deletes |
01:40:35 | FromDiscord | <PizzaFox> it sets the content of the files to be empty |
01:40:37 | FromDiscord | <PizzaFox> 0 bytes |
01:40:53 | FromDiscord | <PizzaFox> i assume `stream.close()` must flush whatever i've written, which is nothing |
01:40:58 | sealmove | so it deletes the content of the file? |
01:41:32 | FromDiscord | <PizzaFox> it would seem that way |
01:41:41 | FromDiscord | <PizzaFox> docs do have it tagged with `WriteIOEffect`, so it must be doing some kind of writing |
01:41:50 | FromDiscord | <PizzaFox> can i just never call stream.close if i dont want to write to the stream |
01:42:33 | sealmove | it has WriteIOEffect because it can write (fmReadWrite is obvious for writing for example) |
01:43:18 | FromDiscord | <PizzaFox> yes |
01:43:25 | FromDiscord | <PizzaFox> is there a way to open a write stream and not write anything |
01:43:32 | FromDiscord | <PizzaFox> just leave the file untouched |
01:43:48 | sealmove | you need fmReadWriteExisting |
01:43:57 | FromDiscord | <PizzaFox> oooo |
01:44:09 | FromDiscord | <juan_carlos> jsre works at ct ;P |
01:44:29 | FromDiscord | <PizzaFox> > Existing files will be cleared!↵god |
01:44:34 | sealmove | PizzaFox I know it's confusing but: https://nim-lang.org/docs/io.html#7 |
01:44:34 | FromDiscord | <PizzaFox> i should have read this before lmao |
01:44:46 | FromDiscord | <PizzaFox> looking at that page now |
01:45:16 | FromDiscord | <PizzaFox> how does `fmReadWrite` work |
01:45:19 | FromDiscord | <PizzaFox> when does it clear the file |
01:45:25 | FromDiscord | <PizzaFox> presumably after reading all the data, right? |
01:45:37 | sealmove | the moment you create the stream |
01:45:51 | sealmove | it's for reading after you write |
01:45:59 | FromDiscord | <PizzaFox> hmmmmmmmmmmm |
01:46:16 | FromDiscord | <PizzaFox> so `fmReadWriteExisting` is good for reading data, doing stuff with said data, and then writing modified data to the file? |
01:46:36 | sealmove | yup sure |
01:46:46 | FromDiscord | <PizzaFox> ok |
01:47:06 | sealmove | it should be called fmReadAppend imo :P |
01:47:47 | * | luis quit (Quit: luis) |
01:47:59 | * | luis joined #nim |
01:49:14 | sealmove | juan_carlos: does re really not work? |
01:49:33 | sealmove | it's so surprising |
01:52:27 | sealmove | also jsre is only in devel right |
01:52:50 | FromDiscord | <juan_carlos> ye |
01:53:09 | FromDiscord | <juan_carlos> Just steal the code tho |
01:57:03 | * | astronavt quit (Read error: Connection reset by peer) |
02:00:14 | sealmove | when should `func compile` be used? |
02:00:23 | sealmove | is it optional? |
02:03:26 | sealmove | also this only works for javascript target :P |
02:04:51 | FromDiscord | <juan_carlos> eval it at ct |
02:05:46 | sealmove | I am |
02:06:19 | sealmove | probably need config hacking because nim sees .importjs. and complains |
02:11:44 | sealmove | ah, regex (instead of re) library works |
02:12:05 | sealmove | also I don't remember downloading it with nimble but I have it |
02:12:10 | sealmove | and it's not in stdlib |
02:12:50 | sealmove | maybe it was a dependency of some other package |
02:46:47 | * | muffindrake quit (Ping timeout: 240 seconds) |
02:49:14 | * | muffindrake joined #nim |
03:04:45 | * | Cthalupa quit (Ping timeout: 240 seconds) |
03:06:50 | * | Cthalupa joined #nim |
03:08:23 | * | tiorock quit (Remote host closed the connection) |
03:21:27 | FromDiscord | <PizzaFox> how can i convert a `seq` of length `0..8` to an `array[8]` |
03:21:50 | FromDiscord | <PizzaFox> is there a better way than just iterating over each item in the sequence and setting whatever is at that index to the array |
03:24:42 | * | apahl quit (Ping timeout: 260 seconds) |
03:25:35 | * | apahl joined #nim |
03:25:42 | Prestige | cast it to an array? |
03:26:16 | Prestige | hm maybe not |
03:28:01 | * | FromDiscord quit (Remote host closed the connection) |
03:28:16 | * | FromDiscord joined #nim |
03:42:38 | FromDiscord | <PizzaFox> unrelated question |
03:42:53 | FromDiscord | <PizzaFox> how do i know `bufLen` for `stream.readData` https://nim-lang.org/docs/streams.html#readData%2CStream%2Cpointer%2Cint |
03:43:05 | FromDiscord | <PizzaFox> sent a code paste, see https://play.nim-lang.org/#ix=2Agv |
03:43:13 | FromDiscord | <Elegant Beef> it's supposed to be the max size of the buffer |
03:43:49 | FromDiscord | <PizzaFox> what does 1024 represent |
03:43:53 | FromDiscord | <PizzaFox> is that like 1024 bytes |
03:43:58 | FromDiscord | <Elegant Beef> how many bytes will be attempted to be read |
03:45:20 | FromDiscord | <Elegant Beef> if you replace that to 5 you'll see it works aswell |
03:48:15 | FromDiscord | <Elegant Beef> You can imagine the inside being like `while not strm.atEnd and i < bufLen` |
03:49:06 | FromDiscord | <PizzaFox> ah ok |
04:03:15 | * | luis quit (Quit: luis) |
04:03:25 | * | luis joined #nim |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:32 | * | supakeen joined #nim |
04:08:49 | FromDiscord | <Avatarfighter> @PizzaFox btw I don't know if anyone told you this but I just remembered but `proc (): void =` is the same thing as `proc () =` the second option is considered more correct I believe |
04:09:20 | FromDiscord | <PizzaFox> wtf |
04:09:38 | FromDiscord | <Avatarfighter> I couldn't remember if you wrote that in a snippet |
04:09:40 | FromDiscord | <Avatarfighter> but if you did 🙂 |
04:09:42 | FromDiscord | <PizzaFox> i would have |
04:09:51 | FromDiscord | <PizzaFox> i write typescript mostly |
04:09:59 | FromDiscord | <PizzaFox> and best practice is to explicitly define type signatures |
04:10:03 | FromDiscord | <Avatarfighter> Yeah |
04:10:14 | FromDiscord | <Avatarfighter> I believe void is the only one you can safely let the compiler infer |
04:10:21 | FromDiscord | <Avatarfighter> since its just void |
04:11:26 | Prestige | You can also skip the () if there's no params |
04:11:36 | FromDiscord | <Avatarfighter> that too |
04:12:02 | FromDiscord | <Avatarfighter> !repo webview |
04:12:03 | disbot | https://github.com/daniel-j/nim-webview -- 9nim-webview: 11 15 2⭐ 1🍴 & 1 more... |
04:12:45 | FromDiscord | <Avatarfighter> has anyone used this webview wrapper before? |
04:14:24 | FromDiscord | <Avatarfighter> nvm it looks good so im using it >:) |
04:18:28 | FromDiscord | <Avatarfighter> welp it doesn't have build instructions for mac so ima just hope it works |
04:25:56 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:29:26 | FromDiscord | <anto> question, is there a way to use big endians when reading from a file stream? im new to nim and there seems to be a total lack of examples regarding this |
04:30:30 | FromDiscord | <Avatarfighter> You can use the endians library from the stdlib to read data as big endian |
04:30:39 | FromDiscord | <Avatarfighter> An example of how this might be done is like this: https://play.nim-lang.org/#ix=2zbI |
04:31:20 | FromDiscord | <Avatarfighter> Most other nimions would recommend using a generic to handle all the types of data you're reading though I believe |
04:31:38 | FromDiscord | <Avatarfighter> but for understanding what's going on I suggest making helper methods like the ones in that link |
04:32:05 | FromDiscord | <Elegant Beef> "Most other nimions..." that implies most other nimions are reasonable 😛 |
04:32:10 | FromDiscord | <Avatarfighter> psh |
04:32:46 | FromDiscord | <Avatarfighter> imo for learning I would keep it simple and do separate procs until you're comfortable with the idea of making a generic to handle all the types of data you want |
04:33:51 | FromDiscord | <anto> thank you, ive been loving nim, and the docs have been great so far, until they arent |
04:33:59 | FromDiscord | <Avatarfighter> yeah... |
04:34:10 | FromDiscord | <Avatarfighter> the endian library was especially an issue for me |
04:35:11 | FromDiscord | <Elegant Beef> If you ever find the docs are subpar, learn how it works then document it 😛 |
04:35:19 | FromDiscord | <Avatarfighter> 😐 |
04:35:21 | FromDiscord | <Elegant Beef> Nim is community centric |
04:35:24 | FromDiscord | <anto> im too new to write docs |
04:35:27 | FromDiscord | <anto> i started 4 days ago |
04:35:28 | FromDiscord | <Avatarfighter> me too |
04:35:38 | FromDiscord | <Avatarfighter> I started 2 years ago but same idea |
04:35:57 | FromDiscord | <anto> anything i contribute would be accompanied with a "sub-par solution :-)" |
04:36:02 | FromDiscord | <Elegant Beef> If you understand what things that werent clear prior do not like you can make it much worse |
04:36:07 | FromDiscord | <anto> true |
04:36:21 | Prestige | @Elegant Beef were you asking about disruptek earlier? |
04:36:24 | FromDiscord | <Elegant Beef> Plus someone would most likely read over the PR |
04:36:28 | FromDiscord | <Elegant Beef> Nah |
04:36:29 | FromDiscord | <Avatarfighter> I was |
04:36:42 | FromDiscord | <Avatarfighter> I wanted to know if he was alive recently, I hadn't seen him type in a while Prestige |
04:36:44 | Prestige | I haven't seen him since https://i.redd.it/tax880f2rnr51.png |
04:37:05 | FromDiscord | <Avatarfighter> Yeah I assumed he was taking a compiler break |
04:38:48 | FromDiscord | <Avatarfighter> I hope he is doing good :L |
04:39:12 | FromDiscord | <Elegant Beef> I hope for the IC's sake he is 😛 |
04:39:16 | FromDiscord | <Avatarfighter> naw |
04:39:20 | FromDiscord | <Avatarfighter> he was doing mangling |
04:39:31 | FromDiscord | <Elegant Beef> Which was an offshoot of the IC afailk |
04:39:38 | FromDiscord | <Avatarfighter> shhhh |
04:39:41 | FromDiscord | <Avatarfighter> details detail |
04:39:42 | FromDiscord | <Avatarfighter> (edit) 'detail' => 'details' |
04:42:50 | * | a_chou quit (Remote host closed the connection) |
04:46:44 | * | NimBot joined #nim |
05:16:24 | * | luis quit (Quit: luis) |
05:31:34 | * | solitudesf joined #nim |
05:36:46 | * | narimiran joined #nim |
06:47:23 | * | letto quit (Quit: Konversation terminated!) |
06:57:24 | * | Vladar joined #nim |
07:02:04 | * | letto joined #nim |
07:08:32 | * | natrys joined #nim |
07:25:07 | * | nature joined #nim |
07:36:07 | * | apahl quit (Ping timeout: 260 seconds) |
07:37:49 | * | apahl joined #nim |
07:49:56 | * | vicfred quit (Quit: Leaving) |
07:53:03 | * | luis joined #nim |
08:00:19 | * | vicfred joined #nim |
08:02:54 | * | arecacea1 quit (Remote host closed the connection) |
08:03:23 | * | arecacea1 joined #nim |
08:08:44 | FromDiscord | <Yardanico> Ping |
08:08:50 | supakeen | morning |
08:08:55 | FromDiscord | <Yardanico> Indeed |
08:09:55 | supakeen | shto novava? |
08:13:09 | Oddmonger | priviet |
08:20:57 | FromDiscord | <Yardanico> @supakeen will buy a used windows tablet today |
08:21:52 | FromDiscord | <Yardanico> For $72, Intel atom z5-8350, 2gb ram/32gb emmc, 10.1" 1920x1200 with a pluggable keyboard |
08:22:00 | supakeen | huh i didn't even know windows made tablets |
08:22:11 | supakeen | those specs sound suspiciously like my old netbook when they still made those |
08:22:24 | FromDiscord | <Yardanico> well it's not by Microsoft :P |
08:22:34 | supakeen | well sure but did they have an adjusted OS for it? :) |
08:22:44 | FromDiscord | <Yardanico> It's normal win10 |
08:22:47 | FromDiscord | <Yardanico> x86 |
08:22:49 | supakeen | + |
08:22:58 | FromDiscord | <Yardanico> But those tablets still exist, search for Chuwi ones for example |
08:23:02 | supakeen | got a special goal for it? |
08:23:08 | FromDiscord | <Yardanico> Although the one I'm going to buy isn't chuwi |
08:23:16 | supakeen | or just to tinker |
08:23:23 | FromDiscord | <Yardanico> Well no, but I just want a x86 device |
08:23:28 | supakeen | haha sure |
08:23:33 | FromDiscord | <Yardanico> also I will install linux there probably |
08:23:52 | FromDiscord | <Yardanico> people have already done that, read the thread about that tablet on 4pda |
08:24:07 | Oddmonger | why foo() and not foo () ? |
08:25:01 | supakeen | i was browsing for a nice logic analyzer |
08:25:08 | FromDiscord | <Yardanico> of course I'll also install Nim on that tablet |
08:25:17 | FromDiscord | <Yardanico> Programming-on-the-go |
08:25:19 | FromDiscord | <Yardanico> lol |
08:25:45 | FromDiscord | <Elegant Beef> I didnt see used and thought you were buying a usable tablet for $72 |
08:25:48 | supakeen | and searching for more documentation on the К1810ВМ86 |
08:26:00 | FromDiscord | <Elegant Beef> I know there are some cheap x86 but they're not my definition of usable 😄 |
08:26:16 | FromDiscord | <Yardanico> My current phone has more RAM and better CPU (even if ARM vs x86, it's still better in this case) than that tablet |
08:26:31 | FromDiscord | <Yardanico> but screen size and x86 with uefi |
08:26:41 | FromDiscord | <Yardanico> x86_64 to be exact |
08:27:26 | supakeen | phones are pretty insane nowadays |
08:27:56 | FromDiscord | <haxscramper> Oddmonger: because in the first you call a function with arguments inside parenthesis `foo(<arg1>, <arg2>)` and second one is a command syntax (e.g. like in `echo 12`) and you are passing tuple as an argument. This is like `echo(12)`, `echo (12)` |
08:28:17 | FromDiscord | <Yardanico> that's why projects like postmarketOS are good |
08:28:25 | nature | Why did nimble take the approach to install package in a common directory in your home by default ? And not go for something on a per repo/project basis ? |
08:28:25 | FromDiscord | <haxscramper> First one prints `12`, second should print `(12)` |
08:28:28 | FromDiscord | <Yardanico> So we can then use that phone hardware for other stuff |
08:28:56 | FromDiscord | <Yardanico> @nature I'm far from being an expert on PMs, but wouldn't the second approach be just worse? |
08:29:10 | FromDiscord | <Yardanico> You specify versions in your nimble file anyway |
08:29:13 | FromDiscord | <Yardanico> Less file usage |
08:29:34 | FromDiscord | <Yardanico> You can have multiple versions of the same package installed for different packages |
08:31:48 | nature | In terms of file usage I see your point yeah, but for instance I always found it cleaner to isolate projects from one another, I don't really know why actually ^^' |
08:32:28 | FromDiscord | <Elegant Beef> Well they are isolated |
08:32:39 | FromDiscord | <Elegant Beef> One nimble package doesnt know what the others are doing 😄 |
08:33:04 | nature | I should have stayed "contained" |
08:33:14 | nature | *said |
08:34:40 | FromDiscord | <Elegant Beef> !eval let a = (12);echo a.typeOf |
08:34:42 | NimBot | int |
08:34:49 | FromDiscord | <Elegant Beef> That's for you hax |
08:36:55 | FromDiscord | <Elegant Beef> Afaik a tuple is only constructed if there is a comma inbetween values, or you explictly do `(a: 10` |
08:36:59 | FromDiscord | <Elegant Beef> (edit) '10`' => '10)`' |
08:37:04 | FromDiscord | <haxscramper> !eval echo 12, (12), (12, 12) |
08:37:06 | NimBot | 1212(12, 12) |
08:37:19 | FromDiscord | <haxscramper> Single element tuple is the same as value |
08:37:28 | FromDiscord | <Elegant Beef> I proved it's not a tuple |
08:37:48 | FromDiscord | <Elegant Beef> if it was a tuple the type would've been `tuple[int]` |
08:38:00 | FromDiscord | <haxscramper> yes? the question was about the spacing anyway, so it does not matter really |
08:38:07 | FromDiscord | <Elegant Beef> for instance |
08:38:16 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:38:17 | FromDiscord | <Elegant Beef> !eval echo (a: 12).typeOf |
08:38:20 | NimBot | tuple[a: int] |
08:38:21 | FromDiscord | <haxscramper> !eval echo (12,) |
08:38:24 | NimBot | (12,) |
08:38:45 | FromDiscord | <haxscramper> !eval echo typeof (12,), (12,) |
08:38:48 | NimBot | (int)(12,) |
08:38:51 | FromDiscord | <Elegant Beef> The spacing does matter for some things, but the single int is not one of them |
08:39:36 | FromDiscord | <Elegant Beef> !eval echo(12, 10); echo (10, 11) |
08:39:38 | FromDiscord | <haxscramper> !eval echo typeof ((((((((((((((((((12)))))))))))))))))) |
08:39:39 | NimBot | 1210↵(10, 11) |
08:39:41 | NimBot | int |
08:40:03 | FromDiscord | <haxscramper> From now on I will write ((((((((((((((constant))))))))))))) everywhere |
08:40:04 | FromDiscord | <Elegant Beef> It doesnt care about the `()` around a single value |
08:40:12 | FromDiscord | <Elegant Beef> Have fun! 😛 |
08:42:06 | FromDiscord | <Yardanico> !eval echo ((((())))) |
08:42:09 | NimBot | () |
08:42:14 | FromDiscord | <Yardanico> () |
08:42:34 | FromDiscord | <Yardanico> !eval echo typeof () |
08:42:37 | NimBot | tuple[] |
08:42:51 | FromDiscord | <Elegant Beef> Lol |
08:43:17 | FromDiscord | <Yardanico> !eval echo {} |
08:43:19 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: type mismatch: got <set[empty]> |
08:43:35 | FromDiscord | <Yardanico> !eval echo typeof {} |
08:43:38 | NimBot | set[empty] |
08:43:44 | FromDiscord | <Elegant Beef> TIL nim allows you have empty tuples |
08:43:53 | FromDiscord | <Yardanico> Well it's logical |
08:43:57 | FromDiscord | <Yardanico> You can have empty objects as well |
08:44:23 | FromDiscord | <Elegant Beef> Not very useful but yea makes sense |
08:44:47 | idf | what happens if i make a long loop spamming something |
08:44:58 | FromDiscord | <Elegant Beef> !eval echo @[(),(),(),(),(),(),()] |
08:45:02 | NimBot | @[(), (), (), (), (), (), ()] |
08:45:17 | FromDiscord | <Yardanico> !eval echo for x in..500: echo x |
08:45:19 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: type mismatch: got <void> |
08:45:30 | FromDiscord | <Yardanico> !eval echo for x in ..10: echo x |
08:45:32 | NimBot | Compile failed: /usercode/in.nim(1, 1) Error: type mismatch: got <void> |
08:45:36 | FromDiscord | <Yardanico> ah |
08:45:44 | FromDiscord | <Yardanico> !eval for x in..10: echo x |
08:45:47 | NimBot | 0↵1↵2↵3↵4↵5↵6↵7↵8↵9↵10 |
08:46:02 | idf | nice CR character |
08:46:11 | FromDiscord | <Yardanico> btw yes the space after "in" here is optional |
08:46:21 | FromDiscord | <Yardanico> also there's unary .. |
08:46:42 | FromDiscord | <Elegant Beef> unary is cool |
08:46:43 | idf | 1eval for x in..100: echo x |
08:46:51 | idf | gottem |
08:47:41 | FromDiscord | <Yardanico> I shared some simple code golfing Nim tips in https://forum.nim-lang.org/t/5858 |
08:47:42 | FromDiscord | <Elegant Beef> Unary is more unreadable, but cool |
08:47:48 | FromDiscord | <haxscramper> Need to make wiki page for "nim features you didn't know and don't need to" and put things like that in it |
08:48:25 | FromDiscord | <haxscramper> For prefix `..` unicode names, stropping etc. |
08:48:49 | FromDiscord | <Yardanico> wdym "make" |
08:48:50 | FromDiscord | <Elegant Beef> Stropping is useful |
08:48:54 | FromDiscord | <Yardanico> It's already there |
08:49:08 | FromDiscord | <haxscramper> cidn't know and **don't need to** |
08:49:16 | Oddmonger | don't you have problem with nimpretty and vim ? i've removed it, it was cutting my lines (import for example), and worst, it was indenting proc declarations (but not all, that's the mystery) |
08:49:21 | FromDiscord | <Yardanico> !eval let b = proc (x:int):int=(result=5;(if x>5:(if x<3:(if x==0:(echo x;echo x-1)))elif x==0:(echo 0;echo 5)else:return 5)); echo b(5) |
08:49:23 | NimBot | Compile failed: /usercode/in.nim(1, 127) Error: undeclared identifier: 'b' |
08:49:42 | idf | nice code |
08:49:43 | FromDiscord | <Elegant Beef> Stropping is used in the stdlib! |
08:50:42 | FromDiscord | <Yardanico> One sec |
08:50:45 | FromDiscord | <Elegant Beef> @haxscramper how dare you say you dont need this rare feature! |
08:50:48 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/htmlgen.html#div.m%2Cvarargs%5Buntyped%5D |
08:52:04 | FromDiscord | <Yardanico> He was talking to me :) |
08:52:36 | FromDiscord | <haxscramper> I mean stropping in situations where you can write `` `ыыыыыы ы жж하는 것을 몰랐던 Nim 기능жжж` `` and this is a valid identifier |
08:52:38 | FromDiscord | <Elegant Beef> I mean seems he indicated stropping wasnot needed |
08:52:47 | FromDiscord | <Elegant Beef> Anywho |
08:52:52 | FromDiscord | <Elegant Beef> I sleep now, good day |
08:53:02 | FromDiscord | <Yardanico> @idf watch this |
08:53:07 | FromDiscord | <Yardanico> @Elegant Beef wait a sec |
08:53:21 | FromDiscord | <Yardanico> !eval let b = (proc (x:int):int=(result=5;(if x>5:(if x<3:(if x==0:(echo x;echo x-1)))elif x==0:(echo 0;echo 5)else:return 5)));echo b(0) |
08:53:24 | NimBot | 0↵5↵5 |
08:53:52 | FromDiscord | <Elegant Beef> Your golfing doesnt even mention using `()` for procs |
08:53:58 | FromDiscord | <Yardanico> single line proc with a call |
08:54:05 | FromDiscord | <Elegant Beef> TIHI |
08:54:49 | FromDiscord | <Elegant Beef> Think you could manage to make this work for an entire nim file, just so i can laugh at people that say "You should be able to put all your code on one line!"? |
08:54:55 | FromDiscord | <Yardanico> You can't |
08:54:59 | FromDiscord | <Yardanico> type sections |
08:55:10 | FromDiscord | <Elegant Beef> I mean you can, just store it in a string and feed it to a macro |
08:55:16 | FromDiscord | <Yardanico> lmao |
08:55:19 | FromDiscord | <Yardanico> Nice idea |
08:55:39 | FromDiscord | <Yardanico> this indeed makes one line nim files possible |
08:55:43 | FromDiscord | <Elegant Beef> Lol |
08:56:00 | FromDiscord | <Elegant Beef> I best not wakeup to a ping of "Look i started on it" |
08:56:59 | FromDiscord | <Elegant Beef> Tomorrow my arcade cabinet parts should be in, so can i impatiently go to sleep now mom? |
08:57:45 | FromDiscord | <Yardanico> yes i allow |
09:03:35 | FromDiscord | <haxscramper> Just added whatever I could find right now, will add more later - https://gist.github.com/haxscramper/04cab2f6abc410d2e5b5df950415fb81 |
09:03:35 | nature | Is it possible to read the nimble value defined for the package like version etc.. from nim ? |
09:04:04 | FromDiscord | <haxscramper> Yes, see https://gist.github.com/haxscramper/04cab2f6abc410d2e5b5df950415fb81 |
09:04:12 | FromDiscord | <haxscramper> Oh, wrong link https://nim-lang.org/docs/nimscript.html#version |
09:04:22 | nature | Thanks |
09:05:06 | * | letto quit (Quit: Konversation terminated!) |
09:05:33 | nature | Do I have to do something like `import myNimbleFile` in order to access version ? |
09:06:03 | * | livcd quit (Changing host) |
09:06:03 | * | livcd joined #nim |
09:06:58 | * | letto joined #nim |
09:07:01 | nature | Because my question was more on how to access those values from my nim code directly |
09:07:33 | nature | I want for instance to display the version in the "help" of the cli |
09:08:28 | FromDiscord | <haxscramper> From your nim package code? Then you probably need to run `nimble dump` at compile-time to get information for package and then can try to use `parsecfg` for the output. |
09:09:04 | nature | Ok thanks :) |
09:09:53 | * | luis quit (Ping timeout: 272 seconds) |
09:11:48 | FromDiscord | <haxscramper> Or just `staticExec("nimble dump ..").split("\n")[1].split(":")[1][2..^1]` |
09:12:38 | nature | Yes perfect, was gonna ask about that! |
09:12:54 | FromDiscord | <haxscramper> Because parsecfg uses streams, so it might not work at compile-time |
09:14:11 | nature | ah crap, let me try, or maybe try to do this staticExec in a custom nimble build step ? |
09:17:01 | FromDiscord | <haxscramper> `const version = staticExec("nimble dump ..").split("\n")[1].split(":")[1][2..^2]` you need to get something in **your nim package code** and simply `version` (already defined) for custom build tasks. If you have build task partially in separate file (e.g. not everything is in `.nimble`) I would recommend just passing version as argument if necessary |
09:18:46 | nature | ok I won't need a special build task then, thanks for your help |
09:23:11 | * | tdc joined #nim |
09:29:36 | * | luis joined #nim |
09:44:38 | nature | is it possible to get a set of keys from a tuple ? |
09:46:11 | FromDiscord | <haxscramper> Can use `fieldPairs` iterator https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CT to "iterate" over all fields |
09:48:07 | nature | Thanks, I find it quite hard to find this kind of info from the doc, I am quite new to nim, any advice on how to search the docs ? |
09:50:19 | FromDiscord | <dom96> mornin' |
09:57:23 | * | luis quit (Quit: luis) |
09:57:30 | * | luis joined #nim |
10:04:32 | idf | hehe i defeated yardanico in fizzbuzz codegolf |
10:05:43 | * | Trustable joined #nim |
10:15:45 | * | luis quit (Read error: Connection reset by peer) |
10:17:50 | * | narimiran quit (Ping timeout: 258 seconds) |
10:24:59 | * | luis joined #nim |
10:30:29 | * | luis quit (Quit: luis) |
10:40:25 | * | luis joined #nim |
10:50:28 | * | luis quit (Quit: luis) |
10:50:43 | * | luis joined #nim |
11:14:01 | * | luis quit (Ping timeout: 272 seconds) |
11:20:58 | * | letto quit (Ping timeout: 256 seconds) |
11:34:34 | * | luis joined #nim |
11:43:29 | * | luis quit (Quit: luis) |
11:59:36 | * | fredrikhr1 joined #nim |
12:02:10 | * | fredrikhr quit (Ping timeout: 246 seconds) |
12:02:11 | * | fredrikhr1 is now known as fredrikhr |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:45 | * | supakeen joined #nim |
12:09:43 | * | luis joined #nim |
12:17:20 | FromDiscord | <Yardanico> so what |
12:17:24 | FromDiscord | <Yardanico> You had my code |
12:31:11 | FromDiscord | <brainproxy> does the compiler apply the `config.nims` of my project only or also the `config.nims` of packages I'm importing? |
12:32:05 | * | letto joined #nim |
12:33:22 | FromDiscord | <hobbledehoy> It does what you're importing as well |
12:34:54 | FromDiscord | <brainproxy> thanks |
12:53:23 | * | vesper11 quit (Ping timeout: 240 seconds) |
12:56:18 | * | arecacea1 quit (Remote host closed the connection) |
12:58:02 | * | arecacea1 joined #nim |
13:09:00 | FromDiscord | <Craft_space_ryan> E |
13:09:42 | * | arecacea1 quit (Remote host closed the connection) |
13:09:58 | * | luis quit (Read error: Connection reset by peer) |
13:10:40 | FromDiscord | <Rika> hello |
13:11:22 | * | arecacea1 joined #nim |
13:16:48 | Yardanico | @hobbledehoy no :) |
13:16:50 | Yardanico | it doesn't |
13:17:07 | Yardanico | nim.cfg and config.nims files of imported packages are not applied, that's why a package for example can't set -d:ssl for you |
13:17:19 | Yardanico | you still have to enable it in your own app config or via a command-line switch |
13:17:44 | Yardanico | @brainproxy ^ |
13:17:59 | FromDiscord | <lqdev> inb4 {.define.} |
13:18:08 | FromDiscord | <brainproxy> thanks for clarifying! |
13:22:27 | Yardanico | also you can't set -d:danger or -d:release in configs either (for now) :) |
13:22:43 | Yardanico | well you can, but it will not work the way you want |
13:33:11 | FromDiscord | <neow> hello |
13:33:17 | FromDiscord | <lqdev> hi |
13:33:20 | FromDiscord | <neow> I need a bit of help, I'm encountering a strange error |
13:33:26 | FromDiscord | <lqdev> what's the error? |
13:33:37 | FromDiscord | <neow> so, first of all, I have this one object using discriminants |
13:34:32 | FromDiscord | <Rika> discriminants? you mean object variants? |
13:35:06 | FromDiscord | <neow> sent a code paste, see https://play.nim-lang.org/#ix=2AiH |
13:35:10 | FromDiscord | <neow> and then, at some point later |
13:35:28 | FromDiscord | <lqdev> `type` is a keyword. |
13:35:34 | FromDiscord | <lqdev> we use `kind` here |
13:35:36 | FromDiscord | <Rika> use kind |
13:35:40 | FromDiscord | <Rika> or typ |
13:35:41 | FromDiscord | <neow> no |
13:35:49 | FromDiscord | <neow> I renamed them when typing into discord |
13:35:52 | FromDiscord | <neow> didn't notice sorry |
13:35:53 | FromDiscord | <Rika> okay |
13:36:04 | FromDiscord | <neow> and then |
13:36:21 | FromDiscord | <neow> I have two instances of Value, each NUM (checked with echo), each have assigned n_val (correctly) |
13:36:52 | FromDiscord | <neow> yet `a.n_val > b.n_val` crashes, and `b.n_val < a.n_val` gives the correct answer |
13:37:02 | FromDiscord | <Rika> crashes with what? |
13:37:16 | FromDiscord | <neow> ```/usr/lib/nim/system/fatal.nim(49) sysFatal↵Error: unhandled exception: 'n_val' is not accessible using discriminant 'valuetype' of type 'Value' [FieldError]↵``` |
13:38:31 | FromDiscord | <Rika> can you give more full code |
13:38:36 | FromDiscord | <Rika> something that can be run |
13:38:47 | FromDiscord | <neow> sure, I'm doing a nim run of craftinginterpreters.com |
13:38:54 | FromDiscord | <neow> I'll upload the whole thing and link it |
13:39:43 | FromDiscord | <neow> or actually |
13:39:46 | FromDiscord | <neow> https://media.discordapp.net/attachments/371759389889003532/764482310803423262/noxlang.zip |
13:40:11 | FromDiscord | <neow> the type definition is in `noxvalue.nim`, while the erroring line is `interpreter.nim` line 80 |
13:40:48 | FromDiscord | <neow> (edit) '80' => '80ish' |
13:41:21 | FromDiscord | <Rika> interpreter compiles for me |
13:41:26 | FromDiscord | <Rika> what version of nim are you on |
13:41:27 | FromDiscord | <neow> it's not a compile errror |
13:41:37 | FromDiscord | <neow> Nim Compiler Version 1.2.6 [Linux: amd64]↵Compiled at 2020-08-24 |
13:41:39 | FromDiscord | <Rika> it alsop runs |
13:41:41 | FromDiscord | <neow> active boot switches: -d:release -d:nativeStackTrace |
13:41:50 | FromDiscord | <neow> it runs, but it errors when you try to trigger the given code |
13:41:51 | FromDiscord | <Rika> what am i supposed to compile |
13:41:53 | FromDiscord | <neow> type "5>5" |
13:41:59 | FromDiscord | <neow> or "5<5" |
13:42:15 | FromDiscord | <neow> > what am i supposed to compile↵@Rika make |
13:42:37 | FromDiscord | <neow> ```make↵./noxlang↵> 5>5``` |
13:42:42 | FromDiscord | <neow> (edit) '```make↵./noxlang↵>' => '```↵make↵./noxlang↵>' |
13:42:43 | FromDiscord | <Rika> let me see |
13:44:29 | FromDiscord | <Rika> ah hm |
13:44:47 | FromDiscord | <neow> did you reproduce the error? |
13:46:08 | FromDiscord | <neow> maybe should I try to clone the entire codebase, reduce complexity while keeping the crash condition in tact? |
13:46:19 | FromDiscord | <Rika> i think its because its setting ans before the condition is assigned |
13:46:59 | FromDiscord | <Rika> works if i offload what b_val is assigned to another variable |
13:47:23 | FromDiscord | <neow> hmm |
13:47:30 | FromDiscord | <Rika> not sure if thats a bug |
13:47:38 | FromDiscord | <neow> but isn't the order of operations supposed to be, evaluate first? |
13:48:03 | FromDiscord | <neow> and if you switch the direction of the comparison up, it works |
13:48:35 | FromDiscord | <neow> but thanks for the help |
13:49:13 | FromDiscord | <Rika> i have no clue why because b > a is just a template that reverses into a < b |
13:50:15 | FromDiscord | <neow> do you think it is a bug in nim? I don't want to appear stupid by reporting a user error |
13:52:38 | FromDiscord | <neow> I reproduced it in a considerable smaller code |
13:52:39 | FromDiscord | <neow> wait |
13:54:03 | * | opal quit (Ping timeout: 240 seconds) |
13:54:34 | FromDiscord | <neow> this crashes as well |
13:54:38 | FromDiscord | <neow> sent a code paste, see https://play.nim-lang.org/#ix=2AiP |
13:54:49 | FromDiscord | <neow> with ```Error: unhandled exception: 'num' is not accessible using discriminant 'state' of type 'multitype' [FieldError]↵``` |
13:54:50 | * | nyd joined #nim |
13:55:02 | * | abm joined #nim |
13:55:08 | FromDiscord | <Rika> best advice i can give you is to use an initializer proc |
13:55:22 | FromDiscord | <Rika> instead of object construction syntax |
13:55:27 | FromDiscord | <Rika> it might be a bug though, i dont know really |
13:55:48 | FromDiscord | <neow> I'll report it, the worst thing that can happen is that someone wastes their time looking at a user error |
13:55:57 | FromDiscord | <neow> I'll look up initialization procs |
13:56:46 | FromDiscord | <Rika> its just a proc called `initType` that uh returns the type |
13:57:16 | FromDiscord | <Rika> so something like `proc initMultiType(): multitype = discard` or so |
13:58:19 | FromDiscord | <neow> why is that useful? |
13:58:53 | FromDiscord | <Rika> depends on the user, but sometimes you want to make default calculations instead of rewriting them all the time |
13:59:28 | FromDiscord | <Rika> so if i have a circle, and it contains the bounding box, instead of writing coordinates for the bounding box, maybe i can supply the center and radius instead |
13:59:32 | FromDiscord | <Rika> and calculate that in the proc instead |
14:00:08 | FromDiscord | <haxscramper> This is just procedural alternative to constructors, nothing special |
14:00:49 | FromDiscord | <neow> I see, so this is a valid example for it, for example: |
14:01:23 | FromDiscord | <neow> ```proc initMultiTypeBool(val : bool) : multitype =↵ multitype(state: BOOL, bool: val)``` |
14:01:30 | FromDiscord | <neow> right? |
14:02:02 | FromDiscord | <haxscramper> Yes, that is correct |
14:03:08 | FromDiscord | <haxscramper> But shorter would be to do `func initMultiType(val : bool) : multitype = multitype(state: BOOL, bool: val)` and provide similarly-named overloads - e.g. convention is to use `init<TypeName>` functions for this kind of things |
14:03:41 | FromDiscord | <haxscramper> Because of overload resolution there is no need to add suffix for concrete kind |
14:04:22 | FromDiscord | <neow> I see, thank you for the help |
14:12:25 | * | FromDiscord quit (Remote host closed the connection) |
14:12:40 | * | FromDiscord joined #nim |
14:24:16 | FromDiscord | <neow> also, fun fact, I tried the js backend, and it never crashes |
14:24:24 | FromDiscord | <neow> bug report submitted |
14:26:33 | FromDiscord | <neow> now I'll fix it in my code with an init procedure |
14:26:47 | FromDiscord | <neow> a few init procedures for each type, using overloading |
14:26:51 | FromDiscord | <neow> my code's gonna be so clean |
15:00:16 | * | waleee-cl joined #nim |
15:03:48 | FromDiscord | <neow> why does nil have the type typeof(nil) |
15:04:05 | FromDiscord | <neow> does it not have a pretty type name? |
15:05:50 | Yardanico | isn't that pretty enough? :P |
15:06:11 | FromDiscord | <haxscramper> `nil` literal has separate type, defined using `` `nil` {.magic: "Nil".} `` in system, for regular types you have `ref Whatewher` |
15:14:13 | FromDiscord | <neow> I just realized you can deref using `[]` and assign ref using `[]=`, I should really read the whole nim manual soon |
15:14:35 | FromDiscord | <neow> I didn't realize ref object's `.` has auto deref |
15:15:48 | * | nyd quit (Quit: nyd) |
15:35:34 | * | tane joined #nim |
15:38:04 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
15:38:51 | * | ehmry joined #nim |
15:38:56 | * | ehmry quit (Client Quit) |
15:41:10 | * | ehmry joined #nim |
15:41:35 | * | ehmry quit (Client Quit) |
15:42:44 | * | ehmry joined #nim |
15:44:09 | * | NimBot joined #nim |
15:53:59 | * | a_chou joined #nim |
16:06:04 | * | hnOsmium0001 joined #nim |
16:10:00 | * | dv-^_^61939232 joined #nim |
16:13:29 | * | sealmove quit (Quit: WeeChat 2.9) |
16:13:42 | * | dv-^_^6193923 quit (Ping timeout: 256 seconds) |
16:21:25 | * | abm quit (Ping timeout: 240 seconds) |
16:23:43 | * | luis joined #nim |
16:28:53 | * | luis quit (Quit: luis) |
16:29:52 | * | drdee joined #nim |
16:30:03 | * | drdee quit (Remote host closed the connection) |
16:34:45 | * | a_chou quit (Ping timeout: 240 seconds) |
16:35:13 | * | narimiran joined #nim |
16:35:46 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2Ajn |
16:36:27 | FromDiscord | <haxscramper> `NnkStrNodes` is just `const NnkStrNodes* = { nnkStrLit .. nnkTripleStrLit }` |
16:37:29 | FromDiscord | <Rika> i have no idea what the hell that thing does |
16:37:36 | FromDiscord | <Recruit_main707> ^ |
16:38:48 | FromDiscord | <haxscramper> `StmtList([all {+NnkStrNodes}(strVal: @msgLines)])` matches `nnkStmtList`↵`all {+NnkStrNodes}(strVal: @msgLines)` matches all subnodes↵`{+NnkStrNodes}(strVal: @msgLines)` all nodes with kind in `NnkStrNodes`↵`strVal: @msgLines` adds all string values to `msgLines` variable |
16:39:13 | FromDiscord | <Rika> it is too confusing with all the symbols |
16:39:24 | FromDiscord | <Rika> REUSED symbols, even |
16:39:44 | FromDiscord | <Vindaar> just chiming in for a quick comment @haxscramper: looks really foreign to me. Would have to learn that syntax and then potentially I might appreciate it. |
16:40:26 | FromDiscord | <Vindaar> (I say that as someone having written DSLs which look foreign to other Nim users too I imagine) |
16:41:06 | FromDiscord | <haxscramper> `StmtList([all {+NnkStrNodes}(strVal: @msgLines)]) ?= body` can be rewritten as `body.matches StmtList([all {+NnkStrNodes}(strVal: @msgLines)])` (maybe also replace `+NnkStrNodes` with `set NnkStrNodes`). |
16:41:49 | FromDiscord | <haxscramper> So now only one symbol `@` |
16:42:49 | FromDiscord | <Rika> alias with `capture` 😛 |
16:43:12 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2Ajs |
16:43:49 | FromDiscord | <haxscramper> Looks better? |
16:43:51 | FromDiscord | <Rika> does the [] need to be there |
16:44:40 | FromDiscord | <haxscramper> Yes, because I need to iterate over all subnodes for `nnkStmtList` in this case so I need separate syntax for this |
16:44:48 | * | superbia joined #nim |
16:45:19 | FromDiscord | <Rika> what the heck is that unary `in`? |
16:46:01 | FromDiscord | <haxscramper> `field: in Set` - /technically/ it is unary, yes |
16:46:22 | FromDiscord | <Rika> still dont get it |
16:46:57 | FromDiscord | <haxscramper> Check if `kind` value is in set - e.g. `body.kind in NnkStrNodes` |
16:47:00 | FromDiscord | <Rika> why is `NnkStrNodes` written like a type if it is a set of kinds? |
16:49:14 | FromDiscord | <haxscramper> No particular reason, just preference mostly. It was intended to be used with `{+NnkStrNodes}` . Looks out of place with `kind: in` though, so I will probably rename it |
16:49:38 | FromDiscord | <haxscramper> And remove `{+ .. }` thing, since you can do `kind: in Set` |
16:50:03 | * | luis joined #nim |
16:54:41 | lbart | test |
16:54:48 | Yardanico | pong |
16:54:55 | idf | dong |
16:54:55 | FromDiscord | <neow> pong |
16:55:03 | FromDiscord | <lbart> Ok it's me :) |
16:55:15 | Yardanico | I think I talked with you in #freebsd on freenode :) |
16:55:23 | Yardanico | when I was doing linux and freebsd dualboot from the same ZFS volume for fun |
16:55:50 | lbart | there is too many chan for nim :p |
16:55:59 | Yardanico | in irc? nowadays yeah |
16:56:02 | idf | make a #nim-idf channel |
16:56:04 | Yardanico | those discord zoomers :P |
16:56:20 | lbart | Yardanico: I don't remember, but you help me with nim :p |
16:57:51 | lbart | so, you use freebsd? |
16:58:44 | Yardanico | no, I had problems with GUI freezing on my rx 570 |
16:59:15 | Yardanico | but freebsd is nice |
17:00:24 | lbart | sure :p |
17:00:24 | lbart | I'm working on some nim pkg for freebsd |
17:01:49 | * | a_chou joined #nim |
17:04:18 | * | luis quit (Read error: Connection reset by peer) |
17:05:31 | * | inamiyar[m] joined #nim |
17:09:02 | inamiyar[m] | > those discord zoomers :P |
17:09:02 | inamiyar[m] | <del>matrix zoomer pride</del> |
17:09:06 | * | manjaroi3_ joined #nim |
17:09:09 | inamiyar[m] | * > |
17:09:09 | inamiyar[m] | those discord zoomers :P<del>matrix zoomer pride</del> |
17:09:13 | inamiyar[m] | * |
17:09:13 | inamiyar[m] | those discord zoomers :P |
17:09:14 | inamiyar[m] | <del>matrix zoomer pride</del> |
17:10:02 | inamiyar[m] | ...you know considering how I think that went through the bridge I take it back |
17:11:29 | FromDiscord | <Rika> it went through really horribly |
17:11:34 | * | manjaroi3_ is now known as TomDotTom |
17:12:11 | inamiyar[m] | Nice, good start for my first message |
17:12:24 | FromDiscord | <Rika> welcome if it is your first messag |
17:12:25 | FromDiscord | <Rika> e |
17:13:42 | inamiyar[m] | thank |
17:13:59 | FromDiscord | <Rika> "geez, just one thank? cant i get more?" /s |
17:14:28 | inamiyar[m] | You can have two thank, as a treat |
17:14:37 | FromDiscord | <Rika> thank |
17:15:14 | TomDotTom | Hey, does anyone have any recommended resources with respect to "Testing in Nim"? |
17:15:48 | disruptek | have you played with my testes? |
17:16:23 | FromDiscord | <haxscramper> ^ this, or `import unittest` https://nim-lang.org/docs/unittest.html |
17:16:51 | FromDiscord | <haxscramper> !repo testes |
17:16:53 | disbot | https://github.com/disruptek/testes -- 9testes: 11a small unittest framework with decent support 🔴🟡🟢 15 16⭐ 0🍴 7& 29 more... |
17:16:56 | FromDiscord | <Rika> disruptek is 1/2 serious, he has a library called testes |
17:16:57 | FromDiscord | <Rika> yeah |
17:16:59 | FromDiscord | <Rika> tere |
17:16:59 | FromDiscord | <Rika> there* |
17:17:00 | TomDotTom | Not heard of the testes package. Hell of a name for a package. |
17:17:17 | disruptek | my package has many names. |
17:18:15 | FromDiscord | <Rika> tomdottom: only the best from disruptek |
17:18:20 | TomDotTom | I took a quick look at the unittest module. But right at the top of the module documentation it seems to argue against using it. Instead it directs users to look into the testamet tool |
17:18:58 | FromDiscord | <Rika> tomdottom: its a bad warning, IMO i wouldnt heed it, testament is still anemically documented and people say its aimed more at compiler testing |
17:19:11 | FromDiscord | <Rika> the first point should be enough for someone to not use it |
17:19:17 | TomDotTom | disruptek: How often do you get to use that line about playing with your testes :D |
17:19:54 | disruptek | i don't think my testes are getting enough use, if that's what you're asking. |
17:20:24 | TomDotTom | disriptek: you really only have yourself to blame for neglecting them |
17:21:25 | TomDotTom | rika: I really did stuggle to find much on the testament tool hence. |
17:21:25 | Prestige | wb disruptek |
17:21:30 | FromDiscord | <haxscramper> `unittest` is very good if you want to test code on block-by-block basis, and I would `testes` if you usually put tons of asserts in tests anyway (because testes treats every line as separate test AFAIK) |
17:22:27 | FromDiscord | <haxscramper> testament is more for compiler-related things (technically) and if you want to use it you can look into compiler test suite or https://dev.to/xflywind/how-to-use-testament-in-nim-1l0h |
17:24:48 | TomDotTom | thanks haxscramper |
17:27:26 | FromDiscord | <Clyybber> > there is too many chan for nim :p↵agreed |
17:27:30 | disruptek | TomDotTom: https://github.com/disruptek/skiplists/blob/master/tests/test.nim |
17:27:32 | FromDiscord | <Clyybber> we need #nim-chan |
17:27:35 | FromDiscord | <Clyybber> :p |
17:27:40 | FromDiscord | <Clyybber> disruptek: ayy |
17:29:13 | FromDiscord | <shashlick> @disruptek re https://github.com/disruptek/gittyup/pull/10#issuecomment-706581447 |
17:29:14 | disbot | ➥ Fix cert issue with JBB on Linux |
17:29:52 | FromDiscord | <shashlick> Is it possible to do a global init |
17:30:19 | disruptek | i would just use once: |
17:30:24 | disruptek | that's exactly what it's for. |
17:30:33 | disruptek | it should go into init(). |
17:30:54 | disruptek | other than that, it looks good to me, but i'm curious if something similar is needed for windows. |
17:30:59 | * | TomDotTom quit (Ping timeout: 240 seconds) |
17:31:13 | disruptek | i haven't read the gist you linked to. |
17:32:01 | FromDiscord | <lqdev> @Clyybber i imagine nim-chan being a chibi anime girl with dark blue hair, a nim crown, and a king's robe |
17:32:06 | * | luis joined #nim |
17:32:08 | FromDiscord | <lqdev> ~~could be nim's mascot lol~~ |
17:32:17 | FromDiscord | <haxscramper> https://media.discordapp.net/attachments/371759389889003532/764540822346924112/unknown.png |
17:32:20 | FromDiscord | <Clyybber> I imagine :nimrawr: |
17:32:29 | FromDiscord | <Clyybber> @haxscramper lol, perfect |
17:32:30 | FromDiscord | <Recruit_main707> Ono |
17:32:31 | FromDiscord | <Rika> doesnt look like a chibi anime girl to me |
17:32:39 | FromDiscord | <Clyybber> but it captures the honeybadger |
17:32:43 | FromDiscord | <Recruit_main707> Banime attacks |
17:34:08 | * | vicfred quit (Remote host closed the connection) |
17:37:47 | disruptek | i'm gonna write a vm on stream. not today, but in a few months once i sort out my living situation. |
17:38:32 | * | luis quit (Read error: Connection reset by peer) |
17:38:53 | FromDiscord | <shashlick> @disruptek only need on Linux |
17:38:58 | FromDiscord | <shashlick> Other tests pass |
17:39:21 | disruptek | what do you make of the failures of 1.2+? |
17:41:10 | * | arecacea1 quit (Remote host closed the connection) |
17:41:29 | * | arecacea1 joined #nim |
17:53:39 | * | vicfred joined #nim |
17:58:15 | * | abm joined #nim |
17:58:42 | * | leorize joined #nim |
18:03:38 | disruptek | Zevv: did you end up trying skiplists? |
18:03:59 | Zevv | nah, didn't need them yet |
18:04:16 | Zevv | I have this think that I come back to every few years |
18:04:29 | disruptek | oh yeah? |
18:04:43 | Zevv | I want to display waveforms in an "analogue" fashion. |
18:04:51 | Zevv | You have experience with old fashioned oscilloscopes? |
18:05:03 | disruptek | i mean, i don't own one, but yes. |
18:05:36 | * | krux02 joined #nim |
18:05:57 | disruptek | how do the current scopes do this? |
18:06:33 | Zevv | everything under 2K is just plain crap |
18:06:46 | Zevv | http://zevv.nl/div/wave1.png |
18:06:46 | disruptek | i have one of those new chinese dc power supplies; that's about the extent of my traveling electronics hardware. |
18:06:50 | Zevv | http://zevv.nl/div/wave2.png |
18:07:08 | Zevv | I do not know of any DAW software that does this |
18:07:53 | disruptek | weird, seems like a very common requirement. |
18:08:01 | Zevv | I'm working on this event visualizer, it's a bit like a digital analyzer. I got tons and tons of events, which are basically things with a time, or with a time and a duration |
18:08:19 | Zevv | When I zoom out, there is so much info hidden that I could encode in the brightness |
18:08:24 | disruptek | i see where you're going with this. |
18:08:29 | Zevv | but the problem is that drawing is waaay more expensive |
18:08:34 | disruptek | but it's like peep again, right? can't we listen to it? |
18:08:56 | disruptek | even if you just let me listen to it while scrubbing, i think it'd be useful. |
18:09:10 | Zevv | I'm not even doing audio now |
18:09:32 | disruptek | i know, but you have no excuse now. |
18:09:52 | Zevv | I now have a algo that is very fast because I just draw 1 thing for the current pixel, then I can skip until I find the thing that is at least one pixel ahead. |
18:10:12 | Zevv | If I want to encode all my events in the density of the pixels, I really need to go visit them all |
18:10:35 | disruptek | well, you can have the concept of distance. |
18:10:57 | disruptek | skiplists was going to grow this eventually, but you can impl it cheaply yourself. |
18:11:00 | Zevv | the problem is that I have millions of things, and I'd rather not visit them all for every frame |
18:11:07 | disruptek | of course. |
18:11:17 | disruptek | but if you know the distance, you can choose whether to skip. |
18:11:29 | Zevv | but I think I'm good for now for the digital stuff. I can show that "something" is happening at that position, and you can zoom in for info. |
18:11:45 | disruptek | you could also use the distance to alias the pixel. |
18:11:45 | Zevv | The other thing are graphs, for these it's a mess now because I get huge sampling artifacts |
18:12:03 | disruptek | ie. if the distance is far, more alpha. |
18:12:17 | Zevv | yeah something like that |
18:13:07 | * | luis joined #nim |
18:13:47 | Zevv | I'll squash my repo and open up |
18:13:55 | Zevv | maybe someone else might find this stuff useful |
18:15:31 | disruptek | it seems like a good basis for a graphical optimization tool. |
18:16:34 | Zevv | I've discovered amazing things over the last few days |
18:16:43 | Zevv | I should have done this years ago |
18:17:07 | disruptek | you started shaving your balls, huh. |
18:17:57 | Zevv | nevermore |
18:18:00 | Zevv | the itch |
18:19:00 | disruptek | it takes some dedication. |
18:19:50 | disruptek | skiplists do seem kinda perfect for this application. |
18:21:05 | Zevv | yeah but actually I don't want to skip |
18:21:59 | disruptek | i'm thinking about zoom. |
18:22:09 | disruptek | it can just happen on each layer. |
18:22:12 | Zevv | https://github.com/zevv/bitline |
18:22:37 | Zevv | I can think of all kind of optmizations later; do a dirty render when moving and then improve once it's idle for a few frames |
18:22:40 | Zevv | stuff like that |
18:24:23 | disruptek | i wonder if frosty works at compile-time. |
18:24:42 | Zevv | should it? |
18:25:14 | disruptek | it would require StringStream afaik; that's about it. |
18:27:08 | disruptek | i'm just thinking that you can serialize an arbitrary structure into a constant and deserialize it at runtime. just seems a little easier for some applications than having to read an asset off the fs. |
18:28:02 | disruptek | btw, if you want to compress frosty, use supersnappy. |
18:28:05 | disruptek | !repo supersnappy |
18:28:06 | disbot | https://github.com/guzba/supersnappy -- 9supersnappy: 11Dependency-free and performant Nim Snappy implementation. 15 13⭐ 0🍴 |
18:31:20 | disruptek | i also want to promote nestedtext. will probably write an npeg grammar for it and use it as my default config format: https://nestedtext.org/en/latest/ |
18:33:44 | Zevv | yeah that's whats what the world needs right |
18:33:53 | disruptek | yep, more formats. |
18:35:27 | disruptek | the philosophy makes sense, though, and i think it can beget some really elegant nim interfacing. |
18:37:20 | Zevv | it looks sane |
18:37:31 | Zevv | does it type properly? |
18:37:35 | Zevv | not like yaml |
18:37:41 | disruptek | they leave the impl up to the user. |
18:38:03 | disruptek | so basically, we can do that ourselves, expertly, at compile-time using our existing access to our types, etc. |
18:38:10 | leorize[m]1 | is it whitespace-significant? |
18:38:17 | disruptek | yes. |
18:38:29 | disruptek | well, i believe so. i haven't actually read everything. |
18:38:33 | leorize[m]1 | looks like I won't be able to use a dumb editor to edit configs then :P |
18:38:37 | * | luis quit (Ping timeout: 272 seconds) |
18:38:55 | disruptek | what? |
18:40:43 | FromDiscord | <Avatarfighter> yoooo disruptek you're alive!! |
18:41:09 | disruptek | indentation is specified at each top-level indent: /Any increase in the number of spaces in the indentation represents an indent and the number of spaces need only be consistent over the length of the nested object./ -- interesting. |
18:43:02 | disruptek | fighter: what's happenin'? |
18:43:18 | FromDiscord | <Avatarfighter> I thought you died tbh |
18:43:38 | * | tane_ joined #nim |
18:43:45 | disruptek | reports of my death have been greatly exaggerated. |
18:44:13 | Zevv | what licenses do prohibit commercial use? |
18:44:51 | disruptek | https://choosealicense.com/ |
18:44:57 | Zevv | yeah |
18:45:13 | FromDiscord | <lqdev> GPLv3? |
18:45:17 | disruptek | another property worth promoting. |
18:45:37 | Zevv | nah, not gplv3 |
18:45:53 | Zevv | I'm hacking this as a private project, but I use it at this $customer |
18:46:04 | Zevv | I don't want them to use it, if they want it they can buy a license |
18:46:25 | FromDiscord | <Rika> doesnt gplv3 do that tho? |
18:46:39 | FromDiscord | <lqdev> just write your own license |
18:46:42 | FromDiscord | <Rika> gplv3 + offer purchasing w/ separate license |
18:46:49 | FromDiscord | <Rika> not a good idea, needs to go through legal rigor |
18:46:54 | Zevv | seems like it. https://choosealicense.com/appendix/ shows all commercial use |
18:47:19 | disruptek | i see that, too. |
18:47:29 | FromDiscord | <Rika> dont put a license 😉 |
18:47:38 | disruptek | you could write a very simply license yourself. |
18:47:38 | FromDiscord | <Rika> copyright |
18:47:43 | disruptek | simple, even. |
18:48:19 | disruptek | DENY ALL; PERMIT SOME |
18:48:36 | disruptek | i need something similar for my vm project. |
18:51:18 | leorize[m]1 | Zevv: gpl is fine, you can do it like Qt |
18:51:53 | leorize[m]1 | basically slap gpl on it then offers an alternative license when requested |
18:52:00 | leorize[m]1 | most companies certainly don't wanna link with gpl code :p |
18:52:08 | Zevv | it's not about linking. it's about using |
18:52:17 | FromDiscord | <Rika> agpl then |
18:52:27 | * | tane_ quit (Quit: Leaving) |
18:52:29 | supakeen | Making your own license is also a bad idea generally; some licenses have been tested or people are already familiar with them. |
18:52:31 | FromDiscord | <Rika> ah wait this is a program right? |
18:52:31 | FromDiscord | <Rika> hm |
18:52:34 | disruptek | it's about sharing the source but preventing commercial use. |
18:52:39 | leorize[m]1 | agpl is just gpl but stricter on the networking side |
18:52:50 | FromDiscord | <Rika> yeah i was thinking about server stuff |
18:53:18 | Zevv | basically i want to probihbit commercial use |
18:53:19 | FromDiscord | <Rika> https://opensource.stackexchange.com/questions/9805/can-i-license-my-project-with-an-open-source-license-but-disallow-commercial-use |
18:53:22 | FromDiscord | <Rika> just searching |
18:53:56 | * | gmaggior joined #nim |
18:54:30 | Zevv | https://creativecommons.org/licenses/by-nc/3.0/ |
18:55:10 | FromDiscord | <Inam> Be careful with creative commons licenses |
18:55:20 | * | luis joined #nim |
18:55:20 | FromDiscord | <Inam> They dont have the patent stuff you'd normally want for software |
18:56:04 | leorize[m]1 | most licenses don't cover the patent stuff |
18:56:33 | FromDiscord | <Inam> Troo |
18:57:24 | FromDiscord | <Inam> Licensing is a mess |
18:59:21 | FromDiscord | <Inam> Why are so many nim projects one really long file? Is there a technically reason or just culture |
18:59:47 | leorize[m]1 | because people are lazy :P |
18:59:49 | disruptek | it's a culture of simplicity. |
18:59:56 | leorize[m]1 | so culture I guess |
19:00:07 | * | superbia left #nim ("WeeChat 2.9") |
19:00:11 | FromDiscord | <Inam> Gotcha |
19:00:25 | FromDiscord | <Inam> "Simplicity" is so subjective imo :p |
19:00:28 | leorize[m]1 | Yardanico you awake? |
19:01:07 | FromDiscord | <Inam> Though I will say browsing the one large file projects has been easier than expected, idk how I feel about it ig |
19:01:45 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> Compared to java this is certainly better, but for the most part it is just simpler to put everything in one file |
19:01:58 | leorize[m]1 | browsing large projects in nim is always easy |
19:02:20 | FromDiscord | <Avatarfighter> Zevv: Creative Commons should have a non-commercial license that allows others to build upon what you made |
19:02:23 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> And since it is just list functions basically you just scan everything from top to bottom when reading |
19:02:33 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> most of the time* |
19:02:35 | FromDiscord | <Inam> Yeah that's true |
19:02:46 | FromDiscord | <Avatarfighter> Zevv: this one might be good for you `Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)` |
19:02:54 | FromDiscord | <Rika> > https://creativecommons.org/licenses/by-nc/3.0/↵@Zevv[IRC]#0000 |
19:02:59 | FromDiscord | <Rika> oops, i pinged em |
19:03:07 | FromDiscord | <Rika> but someone already linked a similar one |
19:03:19 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> Although 4k+ lines in one files is probably the reasonable limit |
19:03:29 | leorize[m]1 | @lnam at least until people start using `{.experimental: "codeReordering".}` |
19:04:10 | FromDiscord | <Avatarfighter> @Rika whatchu working on |
19:04:15 | FromDiscord | <Rika> still nothing |
19:04:34 | FromDiscord | <Rika> but i was considering working on my comic reader application again |
19:04:35 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> Why everyone wants to remove forward declarations? It is just extremely mild annoyance really. And code reordering too |
19:04:45 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> Or there is a particular reason that I just don''t know |
19:04:50 | FromDiscord | <Avatarfighter> Wanna help me write a bot for something @Rika |
19:05:03 | FromDiscord | <Rika> if its "help you" sure, if its "do this for me" no |
19:05:07 | FromDiscord | <Avatarfighter> We'd be emulating a mobile app |
19:05:12 | FromDiscord | <Rika> uh |
19:05:13 | FromDiscord | <Rika> :MonkaS: |
19:05:17 | FromDiscord | <Avatarfighter> Its easy dw |
19:05:24 | FromDiscord | <Inam> Is forward declarations just...having to declare function before called? |
19:05:24 | FromDiscord | <Avatarfighter> I already reverse engineered the whole app lol |
19:05:27 | FromDiscord | <Rika> what kinda bot is this |
19:05:45 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> > Is forward declarations just...having to declare function before called?↵@Inam yes, but only for mutually recursive\ |
19:06:26 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> So this is like relatively rare case. Maybe a little more often if you are writing parser/something that works with trees (macros) but that's all probably |
19:06:58 | FromDiscord | <Inam> Hmm 🤷 |
19:13:52 | nature | Does somebody know how to silence diagnostics with nimlsp/nimsuggest ? |
19:19:31 | leorize[m]1 | wdym silence diagnostics? |
19:22:20 | Zevv | rika: yeah, that seems more or less what I need |
19:23:08 | FromDiscord | <Rika> well you sent it did you not |
19:23:22 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> !eval import sequtils, strutils; join @["eee"].mapIt(it & "ee").filterIt(it.len == 1).mapIt(it.parseInt()) |
19:23:24 | NimBot | Compile failed: /usercode/in.nim(1, 33) Error: expression 'join |
19:26:15 | FromDiscord | <Rika> join needs a 2nd argument |
19:29:28 | FromDiscord | <𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> No https://nim-lang.org/docs/strutils.html#join%2CopenArray%5Bstring%5D%2Cstring , and I was expecting something different anyway |
19:36:15 | * | luis quit (Ping timeout: 272 seconds) |
19:40:27 | * | luis joined #nim |
19:43:15 | FromDiscord | <dom96> yay https://github.com/dom96/choosenim/pull/228 |
19:43:16 | disbot | ➥ Fix #123 - add remove command |
19:46:50 | FromDiscord | <lqdev> 123 |
19:47:23 | FromDiscord | <Avatarfighter> 456 |
19:49:26 | idf | 789 |
19:54:48 | Zevv | base-how-many? |
19:55:19 | Yardanico | there are better |
19:55:19 | Yardanico | https://github.com/nim-lang/nim/issues/6666 |
19:56:33 | Yardanico | btw, found my first message in nim irc https://irclogs.nim-lang.org/22-03-2017.html#23:17:17 |
19:57:09 | * | luis quit (Ping timeout: 272 seconds) |
19:57:24 | * | luis joined #nim |
19:59:04 | FromDiscord | <lqdev> holy shit 2017 |
19:59:16 | Yardanico | yes |
19:59:23 | Yardanico | and my first PR was apr 2 2017 :P |
19:59:28 | Yardanico | to nim |
19:59:31 | Yardanico | and first issue too |
20:00:02 | Yardanico | https://github.com/nim-lang/Nim/issues/5611 |
20:00:02 | disbot | ➥ http client respects only one "Set-Cookie" header |
20:00:09 | Yardanico | opened march 26 actually |
20:02:17 | Yardanico | it's really such a coincedence |
20:02:24 | Yardanico | our life is full of them and they decide our future's path |
20:02:40 | Yardanico | i vaguely remember looking at nim homepage in 2014-2015 but didn't try it out |
20:03:01 | Yardanico | and then in a random discussion about programming languages in a social network with some guy he randomly mentioned Nim in one message |
20:03:04 | Yardanico | and the rest is history |
20:09:41 | FromDiscord | <dom96> 8 years ago https://irclogs.nim-lang.org/30-05-2012.html 😄 |
20:10:19 | Yardanico | well you are out of the question :) |
20:10:20 | FromDiscord | <Avatarfighter> wow |
20:13:25 | * | narimiran quit (Quit: leaving) |
20:13:47 | Yardanico | @Avatar yeah dom knew about nim much earlier than all of us |
20:13:53 | Yardanico | this is his first commit if I'm not wrong: |
20:14:08 | disruptek | so what you're saying is, he has no excuse. |
20:14:36 | FromDiscord | <Avatarfighter> Can we get a webdev channel |
20:14:38 | FromDiscord | <Avatarfighter> please |
20:14:42 | FromDiscord | <Avatarfighter> I'll buy you a coffee com |
20:14:42 | FromDiscord | <dom96> NimBot has been running in prod for 8+ years 😄 |
20:14:45 | FromDiscord | <Avatarfighter> (edit) 'com' => 'dom' |
20:14:47 | Yardanico | https://github.com/nim-lang/Nim/commit/d68782cd38142be328e4df41e782654cebafc8b7 |
20:15:13 | Yardanico | git log --reverse and PgDown go brr |
20:15:34 | FromDiscord | <dom96> Pretty sure my first commit was adding the uri module |
20:15:59 | FromDiscord | <dom96> But maybe not |
20:16:27 | FromDiscord | <Avatarfighter> I wish the irc library for nim support XDCC |
20:16:29 | FromDiscord | <Avatarfighter> (edit) 'support' => 'supported' |
20:16:35 | Yardanico | ah yeah |
20:16:40 | Yardanico | @dom96 https://github.com/nim-lang/Nim/commit/c6b4d0e5ccd45ed3ac2414161b567e0135b277f4 |
20:17:10 | Yardanico | don't have anything with your nickname in the git log before |
20:17:16 | Yardanico | maybe 4raq manually imported your changes? :P |
20:17:33 | FromDiscord | <dom96> Yeah. Possibly |
20:17:59 | Yardanico | there was a module urls apparently :P |
20:17:59 | Yardanico | https://github.com/nim-lang/Nim/commit/a6a621d8701c7b9caa4f03476563525138e5a802 |
20:18:04 | FromDiscord | <Avatarfighter> Why do you say 4raq btw |
20:18:07 | FromDiscord | <Avatarfighter> to stop pings? |
20:18:11 | Yardanico | yes |
20:18:17 | Yardanico | IRC has client-side pings you zoomer |
20:18:24 | FromDiscord | <Avatarfighter> 😓 |
20:18:27 | Yardanico | /s if it wasn't obvious |
20:18:31 | FromDiscord | <dom96> Lol yeah. That’s mine |
20:18:34 | FromDiscord | <Avatarfighter> no i know 😛 |
20:18:39 | FromDiscord | <dom96> You can see my nick at the bottom lol |
20:18:52 | Yardanico | haha |
20:18:55 | Yardanico | oh no stolen PRs |
20:19:31 | FromDiscord | <Recruit_main707> I thought 4raq disabled the pings though |
20:19:44 | Yardanico | why would he |
20:19:57 | * | luis quit (Ping timeout: 272 seconds) |
20:32:45 | * | luis joined #nim |
20:37:03 | * | TomDotTom joined #nim |
20:40:17 | * | abm quit (Read error: Connection reset by peer) |
20:40:45 | * | abm joined #nim |
20:52:15 | * | luis quit (Read error: Connection reset by peer) |
20:52:22 | * | tdc quit (Ping timeout: 272 seconds) |
20:52:52 | * | opal joined #nim |
21:01:34 | * | Kaivo quit (Quit: WeeChat 2.9) |
21:02:44 | * | luis joined #nim |
21:11:05 | * | pbb quit (Remote host closed the connection) |
21:12:19 | * | pbb joined #nim |
21:14:29 | * | solitudesf quit (Ping timeout: 260 seconds) |
21:15:31 | FromDiscord | <hobbledehoy> Yardanico: Ah, I misread the question |
21:16:57 | FromDiscord | <Recruit_main707> Idk, I think I read that a while ago |
21:17:25 | * | luis quit (Quit: luis) |
21:17:39 | * | luis joined #nim |
21:30:10 | disruptek | Prestige: good news, bad news; we got another cream of bacon night. |
21:31:37 | * | natrys quit (Ping timeout: 246 seconds) |
21:32:03 | * | natrys joined #nim |
21:32:03 | * | natrys quit (Client Quit) |
21:33:06 | Prestige | disruptek: soup? |
21:34:57 | disruptek | spermicide. |
21:36:06 | Prestige | Gross |
21:36:37 | disruptek | not my finest work. |
21:44:01 | * | TomDotTom quit (Ping timeout: 264 seconds) |
21:49:28 | FromDiscord | <Avatarfighter> hmmm |
22:02:37 | FromDiscord | <Inam> ...uh |
22:03:10 | FromDiscord | <Rika> huh. |
22:07:39 | * | Vladar quit (Remote host closed the connection) |
22:09:38 | * | nature quit (Ping timeout: 272 seconds) |
22:13:55 | * | a_chou quit (Ping timeout: 258 seconds) |
22:15:28 | * | tane quit (Quit: Leaving) |
22:18:33 | * | NimBot joined #nim |
22:20:51 | * | justsomeguy joined #nim |
22:32:05 | * | gmaggior quit (Quit: Leaving) |
22:51:15 | FromDiscord | <Inam> sent a code paste, see https://play.nim-lang.org/#ix=2Ali |
22:51:46 | FromDiscord | <Inam> ...I hope that didn't end up too garbled on the irc side |
22:53:52 | FromDiscord | <Rika> `nil` |
22:55:17 | FromDiscord | <Rika> `SDL_QueryTexture(source, nil, nil, addr w, addr h)` |
22:55:31 | FromDiscord | <Rika> also `var w, h: int` forgot |
22:56:13 | * | astronavt joined #nim |
22:57:03 | justsomeguy | Inam: It was automatically turned into a link .. https://play.nim-lang.org/#ix=2Ali |
22:57:50 | FromDiscord | <Inam> Oh nice, that's super neat |
22:57:55 | astronavt | hi, does anyone know why i might be getting an error about <limits.h> missing when compiling the `greetings.nim` program from the tutorial docs? i'm using debian testing, and i installed nim with `apt install nim` -- should i use choosenim instead? |
22:58:19 | astronavt | i found one closed forum thread about it that didn't provide a solution, and i found one answer on stackoverflow suggesting i needed to install glibc, which i already have |
22:58:38 | FromDiscord | <Inam> Also gotcha, I tried nil but had other errors so it was giving me an `expected ptr uin32 got typeof(nil)`, my bad there, thanks for the help |
22:58:46 | FromDiscord | <Rika> post what `nim --version` says, if its not `1.0.0` or above, yes use choosenim |
22:58:57 | astronavt | @Rika 1.2.6 |
22:59:04 | FromDiscord | <Rika> odd |
22:59:16 | astronavt | should i try to reinstall glibc or something? |
22:59:38 | FromDiscord | <Inam> ~~seems drastic but idk how nim works~~ |
22:59:45 | FromDiscord | <Rika> maybe? i dont know anymore |
22:59:53 | astronavt | same, that's why i'm asking :) i want to try nim but i can't compile anything... |
23:00:06 | FromDiscord | <Rika> try compiling to cpp lol |
23:00:06 | FromDiscord | <Inam> do you have a more specific error? |
23:00:13 | FromDiscord | <Inam> oh yeah that's a good one too |
23:00:26 | astronavt | what's the compiler flag for that @Rika? |
23:00:33 | FromDiscord | <Rika> nim cpp instead of nim c |
23:00:49 | astronavt | The error is really just: /usr/lib/gcc/x86_64-linux-gnu/10/include/limits.h:195:15: fatal error: limits.h: No such file or directory |
23:00:59 | astronavt | along with a bunch of related info about where exactly the error occurred |
23:01:15 | astronavt | and the "Error: execution of an external compiler program ... failed with exit code 1" error at the end |
23:01:36 | astronavt | the tutorial says to use "nim compile --run" -- should i not use that? |
23:02:02 | astronavt | oh i might indeed have a broken dependency |
23:02:04 | FromDiscord | <Inam> that should be equivalent to "nim c <file> && ./<executable>" |
23:02:07 | astronavt | i see |
23:02:20 | * | justsomeguy left #nim (#nim) |
23:02:28 | FromDiscord | <Inam> well, roughly, might be doing some other magic I don't know about |
23:02:29 | FromDiscord | <Rika> you can use `-r | --run` with `nim cpp` |
23:03:04 | astronavt | something does appear to be messed up w/ my packages in APT. i'll investigate there before trying to debug further in nim. |
23:03:07 | astronavt | thanks all |
23:30:35 | * | Trustable quit (Remote host closed the connection) |
23:31:07 | * | giaco quit (Ping timeout: 244 seconds) |
23:35:39 | * | luis quit (Ping timeout: 272 seconds) |
23:36:56 | * | luis joined #nim |
23:47:07 | FromDiscord | <shashlick> You probably need the build-essentials package |
23:49:31 | * | a_chou joined #nim |
23:53:02 | * | luis quit (Quit: luis) |