00:00:35 | * | smitop joined #nim |
00:03:38 | * | noeontheend quit (Ping timeout: 255 seconds) |
00:16:23 | FromGitter | <Varriount> @iffy I'm curious - what are you trying to achieve? |
00:35:25 | * | noeontheend joined #nim |
00:37:52 | * | abm joined #nim |
00:50:04 | smitop | how do i convert a `seq[byte]` to a pointer to a carray? |
00:51:24 | * | oculux quit (Ping timeout: 250 seconds) |
00:55:26 | * | aguspiza quit (Ping timeout: 272 seconds) |
00:58:32 | * | rockcavera quit (Remote host closed the connection) |
01:07:08 | * | rockcavera joined #nim |
01:08:37 | FromDiscord | <demotomohiro> @smitop, var s = @[1]; addr s[0] |
01:08:40 | * | oculux joined #nim |
01:13:08 | * | oculux quit (Ping timeout: 246 seconds) |
01:14:44 | * | noeontheend quit (Ping timeout: 255 seconds) |
01:18:37 | FromDiscord | <demotomohiro> vccexe is a program to Nim can call cl.exe even if it is not running on Visual Studio Command Prompt. |
01:18:37 | FromDiscord | <demotomohiro> But it doesn't support msvc 2017. |
01:22:45 | * | oculux joined #nim |
01:30:38 | * | oculux quit (Ping timeout: 246 seconds) |
01:32:30 | * | oculux joined #nim |
02:04:16 | * | oculuxe joined #nim |
02:04:35 | * | oculux quit (Ping timeout: 246 seconds) |
02:16:09 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:30:00 | * | rnrwashere quit (Remote host closed the connection) |
02:30:41 | * | rnrwashere joined #nim |
02:31:42 | * | rnrwashere quit (Remote host closed the connection) |
02:40:14 | * | abm quit (Ping timeout: 255 seconds) |
02:52:11 | * | vlad1777d quit (Ping timeout: 246 seconds) |
02:55:33 | * | noeontheend joined #nim |
03:02:33 | * | banc quit (Quit: Bye) |
03:09:47 | * | rnrwashere joined #nim |
03:10:52 | * | zachk quit (Quit: have a good evening) |
03:23:27 | * | banc joined #nim |
03:52:58 | * | rockcavera quit (Ping timeout: 245 seconds) |
04:04:17 | * | rockcavera joined #nim |
04:15:20 | * | rnrwashere quit (Remote host closed the connection) |
04:22:09 | * | rnrwashere joined #nim |
04:29:14 | * | smitop quit (Quit: Connection closed for inactivity) |
04:35:26 | * | rnrwashere quit (Remote host closed the connection) |
04:38:06 | * | rnrwashere joined #nim |
05:09:23 | * | noeontheend quit (Ping timeout: 246 seconds) |
05:49:16 | * | Marumto joined #nim |
05:51:56 | * | Marumoto quit (Ping timeout: 255 seconds) |
06:21:32 | * | narimiran_ joined #nim |
06:27:18 | * | rnrwashere quit (Remote host closed the connection) |
07:19:44 | * | Vladar joined #nim |
07:23:55 | * | nsf joined #nim |
07:26:42 | * | Marumoto joined #nim |
07:27:35 | * | miran__ joined #nim |
07:28:24 | * | nif_ joined #nim |
07:30:19 | * | stratact_ joined #nim |
07:31:00 | * | kali_ joined #nim |
07:34:59 | * | miran__ is now known as narimiran |
07:40:36 | * | Vladar quit (Excess Flood) |
07:40:36 | * | nif quit (Quit: ...) |
07:40:37 | * | stratact quit (Quit: No Ping reply in 180 seconds.) |
07:40:37 | * | cornfeedhobo quit (Quit: ZNC - https://znc.in) |
07:40:37 | * | Marumto quit (Remote host closed the connection) |
07:40:40 | * | narimiran_ quit (Remote host closed the connection) |
07:40:40 | * | kaliy quit (Remote host closed the connection) |
07:41:05 | * | Vladar joined #nim |
07:47:51 | * | dddddd joined #nim |
07:53:50 | * | cornfeedhobo joined #nim |
07:56:36 | * | federico3 quit (Ping timeout: 272 seconds) |
07:56:47 | * | federico3 joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:03:26 | * | MyMind quit (Ping timeout: 250 seconds) |
08:03:30 | * | Pisuke joined #nim |
08:04:50 | * | gmpreussner joined #nim |
08:25:57 | * | Arlenx joined #nim |
08:51:28 | * | vlad1777d joined #nim |
08:59:41 | * | vlad1777d quit (Ping timeout: 246 seconds) |
09:04:22 | * | vlad1777d joined #nim |
09:05:44 | * | aguspiza joined #nim |
09:11:22 | * | Trustable joined #nim |
09:20:56 | * | vlad1777d quit (Ping timeout: 244 seconds) |
09:49:54 | * | krux02 joined #nim |
09:52:31 | * | dddddd quit (Remote host closed the connection) |
10:04:21 | * | neceve joined #nim |
10:09:22 | krux02 | dom96, are you there? |
10:14:00 | * | vlad1777d joined #nim |
10:18:39 | * | stratact_ left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.") |
10:24:18 | bashbjorn | dumb question of the day: how do I get a seq[int] from a range? |
10:24:33 | bashbjorn | `cast[seq[int]](0..10) doesn't seem to work |
10:25:23 | narimiran | bashbjorn: import sequtils; toSeq(0..10) |
10:27:52 | bashbjorn | thanks π° |
10:28:42 | * | NimBot joined #nim |
10:56:14 | * | hoijui joined #nim |
10:56:44 | * | hoijui quit (Remote host closed the connection) |
11:20:23 | * | Sembei joined #nim |
11:21:10 | * | Pisuke quit (Ping timeout: 272 seconds) |
11:27:45 | * | aguspiza quit (Ping timeout: 246 seconds) |
11:40:13 | dom96 | krux02: I am now |
11:40:26 | krux02 | ok |
11:40:47 | krux02 | do wrote most of nimble didn't you? |
11:41:01 | krux02 | I was hoping you might be able to help me with my problem with nimble |
11:41:17 | dom96 | I did yes |
11:43:30 | dom96 | Related to #615? |
11:43:56 | dom96 | I do need to go in a second, but I will be back later on |
11:59:23 | krux02 | dom96, des exactly that issue |
12:01:25 | dom96 | krux02: tried with `--debug` switch? |
12:01:38 | dom96 | `nimble install fancygl --debug` |
12:01:41 | dom96 | bbs |
12:01:52 | krux02 | nono that is not what I mean with debug |
12:02:10 | krux02 | I mean to run nimble with debug information |
12:02:33 | krux02 | bin/nim c -o:bin/nimble --noNimblePath --nilseqs:on --debugger:native dist/nimble/src/nimble.nim |
12:02:40 | krux02 | that is what I mean |
12:02:50 | krux02 | so that I can run nimble under gdb |
12:02:54 | krux02 | I just did |
12:03:00 | krux02 | it crashes in parseVersionRange |
12:05:51 | krux02 | result.ver = parseVersionRange(req[i .. req.len-1]) |
12:06:09 | krux02 | "nim", ' ' <repeats 18 times>, ">= 0.19.9 " |
12:15:38 | krux02 | "nim >= 0.19.9 " |
12:15:57 | krux02 | that <repeats 18 times> is gdb logic |
12:23:15 | * | Snircle joined #nim |
12:39:38 | * | lritter joined #nim |
12:43:29 | * | sz0 joined #nim |
13:02:47 | Araq | dom96: please review https://github.com/nim-lang/Nim/pull/10715 |
13:05:32 | dom96 | krux02: is dist/nimble/ Nimble HEAD? |
13:06:55 | krux02 | dom96, yes it is |
13:12:48 | dom96 | I believe the crash happens thanks to the wonderful breaking change that means s[s.len] fails with an exception instead of returning '\0' |
13:13:18 | dom96 | https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/version.nim#L193 |
13:14:12 | dom96 | and in release mode that behaviour remains :/ |
13:22:13 | Araq | that was a year ago and something and you could have tested your version parser by now |
13:22:53 | Araq | i < s.len should be i+1 < s.len |
13:23:37 | Zevv | hehe, that one bit me more then once :) |
13:24:03 | Araq | with Zevv's help we can check array indexing at compile-time |
13:24:08 | Zevv | yeah sure |
13:24:30 | Zevv | funny how a double positive can make a negative :) |
13:25:08 | Zevv | I'll get back to you as soon as I find out how to prove unbounded loops |
13:25:54 | Araq | you wrapped Z3 for Nim |
13:26:54 | Zevv | that's like saying "you built a bike" and assuming I'm winning the tour the france |
13:27:28 | Araq | I can make the compiler output the formulas that Z3 needs to prove for us |
13:28:00 | Zevv | well, drop me an example snippet if you find some time, that'd be interesting |
13:28:00 | Araq | but you need to tell me the output format |
13:28:19 | Araq | I can give you: |
13:28:26 | Araq | precondition: i >= 0 |
13:28:36 | Araq | precondition: i <= len(a) |
13:29:03 | Araq | please prove: i <= len(a) + 4 |
13:29:09 | Zevv | one sec |
13:30:19 | dom96 | Araq: Seems my test suite just didn't catch this |
13:30:32 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
13:30:49 | * | dddddd joined #nim |
13:30:51 | Zevv | Araq: that one is easy |
13:30:52 | dom96 | I don't really want to spend time looking at my old indexing code closely |
13:32:21 | * | nsf quit (Quit: WeeChat 2.3) |
13:32:57 | Araq | Zevv: take your time, I gotta go anyway. |
13:32:59 | Araq | see you later. |
13:33:32 | Zevv | Araq: ok, cool. This one is trivial with Z3, so if you have anything more concrete, let me know |
13:33:48 | Araq | huh? more concrete? |
13:33:55 | Araq | I'm asking about the Z3 syntax |
13:34:08 | Zevv | http://paste.debian.net/1069827/ |
13:34:16 | Zevv | It's just Nim syntax |
13:34:20 | Araq | the only thing that will change in production is that I will give the tool many more preconditions |
13:35:03 | Araq | aoh!!! |
13:35:10 | Zevv | this snippet uses uint32 for i and len(a), and I'm assuming I can't know what a is |
13:35:42 | Araq | sweet, just 'import z3' |
13:36:28 | Zevv | I was trying to implement a {.prove.} pragma the other day, this will just convert the AST from a Nim function into Z3 ast |
13:36:46 | Zevv | the problem is that I do not know how to "generate" the questions I should ask Z3 about the generated statements |
13:36:59 | Araq | s.assert i <= len_a + 4 |
13:36:59 | Araq | s.check_model |
13:37:09 | Araq | ^ this is a bit bad |
13:37:22 | Araq | is this the only way? one assert is unlike the others |
13:37:37 | Araq | since it is the sentence we need to prove |
13:37:38 | Zevv | No its not the only way, it is just a close mapping to the Z3 nomenclature |
13:37:51 | Zevv | Pythin uses the 'add()' method on a solver instead, which feels nicer |
13:38:00 | Araq | not my point |
13:38:06 | Zevv | sorry, again |
13:38:14 | * | aguspiza joined #nim |
13:38:31 | Araq | I prefer something like s.check(i <= len_a + 4) |
13:38:52 | Araq | but it shouldn't matter really. |
13:39:18 | Zevv | yeah, so it *is* the naming you mean. Basically, you feed a solver a bunch of 'assertions', and in the end you ask "will this hold" |
13:39:38 | Zevv | the respons being, "Yes, under these constraints:", and a set of values which make all statements true |
13:39:43 | Zevv | or "no can do" |
13:39:51 | Araq | hmm |
13:40:06 | Araq | "under these constraints" should be 'true' |
13:40:13 | Zevv | It is true |
13:40:28 | Zevv | but it also tells you *which values make* it true |
13:40:41 | Araq | yeah, don't care about that |
13:40:48 | Araq | array indexing is very simple |
13:40:51 | Zevv | then the answer is simply "yes" or "no" |
13:41:02 | Zevv | and you throw away the rest of the info |
13:41:28 | Araq | it also supports separation logic, right? |
13:42:04 | Zevv | I'd have to look into that, sorry |
14:01:27 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:04:33 | krux02 | dom96, and there is already a pull request to fix that bug: https://github.com/nim-lang/nimble/pull/613/files |
14:04:38 | krux02 | last change |
14:10:43 | Zevv | Araq: if you find some time, drop me a real snippet together with the things youd like to see proved, syntax does not matter, but would be nice if it was a practical example with "real" types and context |
14:10:48 | * | Zevv afk |
14:11:28 | krux02 | dom96: I also reported that issue 4 months ago: https://github.com/nim-lang/nimble/issues/563 |
14:12:57 | * | neceve quit (Ping timeout: 246 seconds) |
14:13:43 | Araq | lol |
14:14:10 | * | vlad1777d quit (Remote host closed the connection) |
14:15:14 | * | vlad1777d joined #nim |
14:16:30 | * | neceve joined #nim |
14:18:52 | * | vlad1777d quit (Remote host closed the connection) |
14:20:55 | * | vlad1777d joined #nim |
14:30:51 | dom96 | Yeah... if only I got a separate PR for each of those issues, most of them would be fixed already :/ |
14:39:50 | * | volkov joined #nim |
14:45:08 | krux02 | if you ask me, you can just merge the pr |
14:45:35 | dom96 | Sure, I can. But I don't want some of these changes |
14:45:41 | krux02 | better than keeping it around unmerged |
14:46:09 | krux02 | Then merge it manually. |
14:46:40 | dom96 | That's as much, if not more effort than just fixing the issues myself |
14:47:11 | krux02 | then fix the issues |
14:49:56 | * | volkov quit (Quit: volkov) |
14:52:21 | * | xace_ quit (Read error: Connection reset by peer) |
14:52:43 | * | xace joined #nim |
14:55:53 | * | krux02 quit (Remote host closed the connection) |
15:02:37 | * | noeontheend joined #nim |
15:11:56 | Zevv | Araq: z3 might support speration logic, but after reading some papers I decided that I don't - it hurts my brain |
15:12:41 | Zevv | it feels like reading "GΓΆdel Escher Bach", which took me over a decade I think |
15:29:25 | * | dom96_w joined #nim |
15:35:36 | narimiran | finally! tuple unpacking in for loops is here: https://github.com/nim-lang/Nim/pull/10152 |
15:37:56 | * | dom96_w quit (Ping timeout: 257 seconds) |
15:48:24 | * | Cthalupa quit (Ping timeout: 250 seconds) |
15:49:32 | * | arecaceae quit (Read error: Connection reset by peer) |
15:49:50 | * | arecaceae joined #nim |
15:50:41 | * | Cthalupa joined #nim |
16:02:58 | * | vlad1777d quit (Ping timeout: 245 seconds) |
16:04:42 | * | leorize quit (Ping timeout: 264 seconds) |
16:09:53 | * | stefanos82 joined #nim |
16:15:16 | * | noeontheend quit (Ping timeout: 250 seconds) |
16:18:40 | * | abm joined #nim |
16:23:30 | * | banc quit (Ping timeout: 250 seconds) |
16:29:20 | * | rockcavera quit (Remote host closed the connection) |
16:30:56 | * | banc joined #nim |
16:35:10 | * | noeontheend joined #nim |
16:48:53 | * | nsf joined #nim |
16:54:47 | * | Arlenx quit (Ping timeout: 255 seconds) |
17:02:30 | * | Cthalupa quit (Ping timeout: 250 seconds) |
17:04:49 | * | Cthalupa joined #nim |
17:16:07 | federico3 | for (a, b, c) in s: echo a, b, c \o/ |
17:30:21 | * | Cthalupa quit (Ping timeout: 246 seconds) |
17:31:24 | * | Cthalupa joined #nim |
17:42:23 | * | nsf quit (Quit: WeeChat 2.3) |
17:45:04 | FromGitter | <deech> @Araq: why does it warn when more than 3 identifiers are assigned to a `let`/`var` with a tuple constructor (https://github.com/nim-lang/Nim/blob/devel/compiler/semstmts.nim#L499), for example in this case: β β ```let a,b,c,d = (1,2,3)``` β β Is there something special about going over 3? [https://gitter.im/nim-lang/Nim?at=5c7186a01f146304210b3647] |
17:45:55 | * | vlad1777d joined #nim |
17:49:14 | * | Marumto joined #nim |
17:51:42 | * | Marumoto quit (Ping timeout: 245 seconds) |
18:00:24 | FromGitter | <deech> Also is there a runtime memory allocation cost to doing `let (x,y,z) = (1,"hello world",@[])` vs doing it individually like: β β ```let x = 1 β let y = "hello world" β let z = @[]``` [https://gitter.im/nim-lang/Nim?at=5c718a38e5eeec0d9bb446f1] |
18:10:27 | * | nc-x joined #nim |
18:11:41 | nc-x | no runtime cost iirc |
18:11:41 | nc-x | the compiler unpacks the tuple and the code is generated as normal variable assignments |
18:18:55 | * | nc-x quit (Ping timeout: 256 seconds) |
18:20:45 | * | nc-x joined #nim |
18:21:41 | nc-x | And regarding the first question, the warning is given for `let a, b = (1,2)` as well. I assume the warning may be so that people do not mistakenly consider it to be doing tuple unpacking. |
18:21:55 | nc-x | @deech ^^^ |
18:23:26 | FromGitter | <deech> @nc-x Thanks! |
18:23:31 | nc-x | BTW if the warning is for the reason I said, then the warning message isn't really great IMO and should be improved |
18:23:32 | * | nsf joined #nim |
18:23:53 | FromGitter | <deech> I'm working on that bit of the compiler now and suggestions are welcome. |
18:23:53 | nc-x | @Araq ^^^ |
18:24:22 | nc-x | what exactly are you working on? |
18:25:06 | FromGitter | <deech> Making https://github.com/nim-lang/Nim/pull/10642 less hacky. |
18:36:59 | nc-x | Araq's comment `evaluate the value of the sym later after we evaluated its pragmas?` doesn't seem much different to me than your patch. That would also prettify one part of the code and uglify some other part. |
18:37:34 | nc-x | (unless I am missing something, bcos I only gave the code a very brief look) |
18:40:24 | FromGitter | <dandevelo> How can I use a template parameter inside of a string? |
18:40:45 | FromGitter | <dandevelo> Escaping it with backtick doesn't seem to work |
18:41:18 | * | nc-x quit (Quit: Page closed) |
18:46:11 | FromGitter | <deech> @nc-x: The PR itself while, working on a subset of cases falls over when doing something like: β β ```let (x {.compileTime.}, y) = (1,2) β static: β echo x``` [https://gitter.im/nim-lang/Nim?at=5c7194f3a378ef11f62aa532] |
18:47:54 | FromGitter | <deech> In the medium term the `compileTime` pragma really needs to go away as it can always be replaced by `static` AFAICT. |
18:49:19 | FromGitter | <deech> In fact if the plan is to phase out `compileTime` I don't see much reason to continue working on the PR as the problem doesn't happen if `static` blocks are used instead. |
18:52:12 | * | Arlenx joined #nim |
18:55:21 | FromGitter | <greenfork> @dandevelo you mean like this? β β ```template n(r: string): string = β "my string: " & r & ";" β β echo n("hello")``` [https://gitter.im/nim-lang/Nim?at=5c719719a378ef11f62ab2b5] |
18:57:10 | * | zachk joined #nim |
18:58:07 | * | zachk quit (Read error: Connection reset by peer) |
18:58:32 | * | zachk joined #nim |
18:58:45 | FromGitter | <dandevelo> @greenfork I need r to be untyped as I am using it to generate a proc name |
18:59:12 | * | zachk quit (Changing host) |
18:59:12 | * | zachk joined #nim |
19:00:02 | FromGitter | <greenfork> @dandevelo this still works with `r: untyped` |
19:04:38 | FromGitter | <dandevelo> @greenfork How would you use r for a proc name in that template? |
19:07:22 | FromGitter | <greenfork> @dandevelo I don't know this, maybe someone else could answer |
19:08:10 | * | noeontheend quit (Ping timeout: 250 seconds) |
19:19:54 | * | junk[m] joined #nim |
19:24:27 | * | abm quit (Ping timeout: 246 seconds) |
19:34:42 | Araq | nc-x: you are right about the warning's purpose |
19:51:12 | * | rnrwashere joined #nim |
19:55:27 | * | rnrwashere quit (Ping timeout: 250 seconds) |
20:06:21 | * | lritter quit (Quit: Leaving) |
20:08:05 | * | rnrwashere joined #nim |
20:20:38 | * | noeontheend joined #nim |
20:22:00 | FromGitter | <alehander42> @Zevv @Araq |
20:22:31 | FromGitter | <alehander42> @zah was also very interested in ysing something like z3 for Nim guarantees |
20:22:42 | FromGitter | <alehander42> Have you exchanged ideas |
20:22:59 | ryukoposting | video 2 is out http://ryuk.ooo/videos.html |
20:25:03 | ryukoposting | I was able to get the text to look a lot nicer than in the last one, first vid had some weird artifacting around the text since OBS had to scale it to 1080p. Was able to fix that for video 2. Still working on general production quality stuff, and I'm not 100% happy with this video, but I think it's overall an improvement over video 1 |
20:25:21 | Araq | alehander42, no, we only talked about memory safety without a GC (SOLVED! maybe) |
20:34:44 | * | nsf quit (Quit: WeeChat 2.3) |
20:35:35 | Zevv | alehander42: no, not me |
20:38:54 | ldlework | ryukoposting: what editor are you using in that video? |
20:39:43 | Zevv | FAQ :) |
20:40:04 | Zevv | 2019/02/14 00:44 #nim: < ryukoposting> that's Kat |
20:40:10 | Zevv | Kate, sorry :) |
20:41:02 | ryukoposting | huh |
20:41:10 | ldlework | gotcha |
20:41:13 | ryukoposting | sorry, yeah it's kate |
20:41:57 | Araq | I use Sawyer |
20:43:30 | Zevv | ? |
20:44:00 | Araq | Kate, Sawyer, Jack, ... got it? |
20:44:05 | Zevv | oooh |
20:44:18 | ryukoposting | badump-tss |
20:45:14 | Zevv | I had to look that up :/ |
20:46:32 | * | vlad1777d quit (Ping timeout: 255 seconds) |
20:52:35 | ryukoposting | should I make an FAQ for that kind of thing |
20:53:11 | Zevv | $ grep -ir ryukoposting irc/2019/ | grep -i editor | grep -i what | wc -l |
20:53:11 | Zevv | 3 |
20:53:17 | Zevv | If '3' is 'frequently', then yes |
20:55:08 | FromGitter | <Clyybber> @nc-x I'm getting "Error: illformed AST: (p) =" when trying to use tuple for vars |
20:57:56 | FromGitter | <Clyybber> I'll try to extract a test case |
21:04:30 | * | Arlenx quit (Read error: Connection reset by peer) |
21:06:56 | * | abm joined #nim |
21:17:54 | * | Vladar quit (Remote host closed the connection) |
21:41:15 | * | Trustable quit (Remote host closed the connection) |
22:19:45 | * | ng0 joined #nim |
22:23:00 | FromGitter | <Clyybber> ```func test[n: static int](s: seq[(int, int)]) = β for (a, b) in s: β discard``` β β This is the most minimal I could come up with [https://gitter.im/nim-lang/Nim?at=5c71c7c3ddaa310c89dd87e9] |
22:23:19 | FromGitter | <Clyybber> Removing the static parameter fixes the error |
22:36:57 | FromGitter | <Clyybber> nc-x: Opened issue #10727 for the above issue. |
22:53:35 | * | smitop joined #nim |
22:53:58 | smitop | Is there a difference between `uint(x)`and `cast[uint](x)`? |
22:57:53 | FromGitter | <Clyybber> I think uint(x) will error for a negative x, while `castuint (x)` will just reinterpret the bytes as a uint (so if x was negative, the result is probably gonna be a big number) |
23:14:48 | * | bobby joined #nim |
23:47:13 | * | stefanos82 quit (Remote host closed the connection) |