00:04:25 | * | gangstacat quit (Ping timeout: 246 seconds) |
00:26:18 | * | gangstacat joined #nim |
00:27:37 | * | Tyresc quit (Quit: WeeChat 2.4-dev) |
00:29:35 | * | stefanos82 quit (Remote host closed the connection) |
00:32:12 | * | d10n-work quit (Quit: Connection closed for inactivity) |
00:39:01 | * | zachk quit (Quit: Leaving) |
01:17:53 | * | smitop quit (Quit: Connection closed for inactivity) |
01:19:34 | * | disruptek quit (Quit: Bye) |
01:25:14 | * | disruptek joined #nim |
02:31:11 | * | ng0 quit (Ping timeout: 256 seconds) |
02:39:22 | * | smitop joined #nim |
02:41:33 | * | dddddd quit (Remote host closed the connection) |
02:41:56 | smitop | Discarding a multiline string is used a lot throughout the compiler code form what my GitHub searches see |
02:42:00 | smitop | Probably old code |
03:02:26 | * | banc quit (Quit: Bye) |
03:15:23 | * | icebattle quit (Ping timeout: 246 seconds) |
03:23:52 | * | banc joined #nim |
03:45:06 | * | noonien quit (Quit: Connection closed for inactivity) |
03:50:04 | * | volkov joined #nim |
04:03:27 | * | nsf joined #nim |
04:05:20 | Tanger | Hey folks, I'm trying to compile to JS on stable and it keeps throwing me a "OS module not ported to your operating system!" error |
04:05:44 | Tanger | Running ubuntu 18. Would have thought posix would be defined? |
04:05:59 | leorize | well, you're targeting js |
04:06:02 | FromDiscord_ | <juan_carlos> The module you are trying to use does not work on the JS target. |
04:06:03 | leorize | is there posix on js? |
04:06:30 | FromDiscord_ | <juan_carlos> I dont think so. |
04:06:30 | Tanger | Ah, of course, haha |
04:06:35 | Tanger | Thanks and sorry XD |
05:09:02 | * | smitop quit (Quit: Connection closed for inactivity) |
05:31:49 | * | volkov quit (Quit: volkov) |
06:08:44 | * | narimiran joined #nim |
06:32:39 | FromGitter | <Varriount> TheLemonMan: Any chance of doing something similar for XML? |
06:53:43 | * | krux02 joined #nim |
07:15:36 | Zevv | What is the opposite of .inject, if I want to declare a proc inside a template that stays only inside? |
07:19:50 | Araq | .gensym |
07:21:00 | leorize | isn't that the default? |
07:42:49 | * | libman[m] joined #nim |
07:42:52 | Araq | not for templates/procs, read the spec |
07:45:54 | Zevv | thanks. it was in the manual, of course. |
07:51:04 | * | NimBot joined #nim |
07:54:31 | Araq | I still use discard "comment here" for stressing a comment |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:42 | * | gmpreussner joined #nim |
08:14:44 | Araq | if cond: |
08:14:58 | Araq | # in this case we don't have to do anything because blah |
08:15:20 | Araq | discard # nim doesn't like empty sections |
08:15:23 | Araq | ---> |
08:15:36 | Araq | discard "in this case we don't have to do anything because blah" |
08:16:06 | Araq | for me it's more pleasing to write and read it this way |
08:17:08 | * | PMunch joined #nim |
08:33:33 | * | Trustable joined #nim |
09:12:34 | * | volkov joined #nim |
09:31:59 | * | dom96_w joined #nim |
09:33:25 | * | neceve joined #nim |
09:35:16 | * | JustASlacker joined #nim |
09:49:41 | * | kapil____ joined #nim |
10:05:39 | * | volkov quit (Ping timeout: 256 seconds) |
10:08:49 | * | lritter joined #nim |
10:23:49 | * | PMunch quit (Remote host closed the connection) |
10:26:04 | * | PMunch joined #nim |
10:28:53 | * | fjellfras joined #nim |
10:46:10 | * | fjellfras quit (Quit: Changing server) |
10:51:03 | * | abhijat joined #nim |
11:21:04 | * | nsf quit (Quit: WeeChat 2.3) |
11:36:17 | * | dddddd joined #nim |
11:38:26 | * | abhijat quit (Ping timeout: 250 seconds) |
11:53:00 | * | stefanos82 joined #nim |
12:09:58 | * | Trustable quit (Read error: Connection reset by peer) |
12:10:38 | * | Trustable joined #nim |
12:25:40 | * | banc quit (Ping timeout: 250 seconds) |
12:33:09 | * | banc joined #nim |
12:51:10 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:01:45 | * | dom96_w joined #nim |
13:03:59 | * | PMunch quit (Remote host closed the connection) |
13:04:45 | * | nsf joined #nim |
13:04:55 | * | PMunch joined #nim |
13:06:07 | FromDiscord_ | <juan_carlos> If is really important {.hint:"".} for me, has cool colors, actually makes user read it. :P |
13:06:56 | * | Vladar joined #nim |
13:18:25 | * | edcragg_ quit (Ping timeout: 268 seconds) |
13:18:55 | * | matti quit (Ping timeout: 246 seconds) |
13:18:58 | * | federico3 quit (Ping timeout: 250 seconds) |
13:19:06 | * | edcragg quit (Ping timeout: 264 seconds) |
13:20:29 | * | federico3 joined #nim |
13:22:51 | * | matti joined #nim |
13:22:51 | * | matti quit (Changing host) |
13:22:51 | * | matti joined #nim |
13:24:31 | * | Cthalupa quit (Ping timeout: 246 seconds) |
13:25:31 | * | Cthalupa joined #nim |
13:27:24 | * | edcragg joined #nim |
13:29:28 | * | rockcavera quit (Remote host closed the connection) |
13:29:55 | * | rockcavera joined #nim |
13:48:39 | * | kapil____ quit (Quit: Connection closed for inactivity) |
14:09:17 | * | edcragg_ joined #nim |
14:15:53 | * | aguspiza joined #nim |
14:27:52 | * | edcragg_ quit (Ping timeout: 250 seconds) |
14:28:23 | * | edcragg_ joined #nim |
14:33:29 | Zevv | How long does compiling the nim compiler on a 'modern' computer? |
14:33:40 | * | PMunch quit (Remote host closed the connection) |
14:34:07 | * | fanta7531 joined #nim |
14:35:37 | Zevv | /does .. take/ |
14:36:31 | Zevv | I think I saw someone here say it was bootstrapping in 4 seconds or so |
14:36:42 | narimiran | Zevv: that was Araq |
14:36:51 | Zevv | waht kind of machine is that? |
14:36:58 | Zevv | for me it is still 45 seconds, on a 4 core i7 |
14:37:08 | narimiran | for me on my semi-modern i7-970 takes considerably more |
14:39:08 | Zevv | ok s its not just me :) |
14:39:45 | narimiran | Zevv: btw, are we talking about `koch boot` or something else? |
14:40:09 | narimiran | because `koch temp` is reasonably fast for me (but still more than 4 seconds) |
14:40:19 | FromGitter | <Vindaar> On my new PC in my office with a 8700K result of `time` is: ⏎ `./koch boot -d:release 116.59s user 7.20s system 440% cpu 28.083 total` |
14:40:58 | FromGitter | <Vindaar> If I just run it again: ⏎ `./koch boot -d:release 3.54s user 0.22s system 99% cpu 3.777 total` |
14:40:59 | Zevv | kocht temp |
14:41:57 | narimiran | ok, let me measure it |
14:42:04 | Zevv | `koch temp` reports 57 seconds here |
14:42:18 | Zevv | around that value, first time, second time, every time |
14:42:35 | FromGitter | <Vindaar> `./koch temp 28.43s user 4.58s system 346% cpu 9.522 total` |
14:42:51 | narimiran | Zevv: hmm, did you build your koch with -d:release? |
14:42:59 | Zevv | ooooh |
14:43:02 | Zevv | there you have it :) |
14:43:11 | Zevv | of course |
14:43:21 | * | Zevv rebuilts |
14:43:32 | FromGitter | <Vindaar> additional `koch temps` are ~`4.3s` |
14:43:46 | shashlick | Koch boot compiles the compiler three times |
14:44:11 | shashlick | Each stage compiled with the previous binary |
14:44:31 | Zevv | yeah that was it |
14:44:49 | * | edcragg_ quit (Quit: WeeChat 1.6) |
14:44:53 | narimiran | your times now? |
14:44:54 | Zevv | that was amazingly stupid of me |
14:45:01 | Zevv | 6 seconds or zo |
14:45:13 | narimiran | btw, any difference between `koch temp` and `koch temp -d:release` in timings? |
14:45:52 | narimiran | btw, for me `koch temp` takes 74 seconds!! |
14:46:13 | Zevv | narimiran: so you probably have a debugging compiler as well? |
14:46:27 | Zevv | koch temp = 6.5 koch temp -d:release = 28 sec |
14:46:35 | narimiran | i just did `nim c -d:release koch`, and then `./koch temp` |
14:46:51 | Zevv | oh nevermind, second time 6 secodns because of cache. Damn this is all confusing :) |
14:47:09 | narimiran | and the second time was 64 seconds |
14:47:14 | narimiran | now i'm pissed |
14:47:33 | Zevv | what is your last line of `nim -v` |
14:47:43 | narimiran | well fuck |
14:48:04 | * | narimiran is stupid |
14:48:14 | Zevv | Hehe so glad it is not just me |
14:48:24 | Zevv | I was just wondering why my 2 file project was taking *so* long each run |
14:48:28 | Zevv | which made me wonder |
14:48:51 | narimiran | can we just throw this under 'it is friday, it is not us' label |
14:48:59 | FromGitter | <Vindaar> :D |
14:50:08 | Zevv | no, that's for mondays only |
14:52:15 | * | edcragg quit (Remote host closed the connection) |
14:53:21 | narimiran | 14 seconds on the first `koch temp`, 9 seconds on subsequent |
14:53:41 | * | edcragg joined #nim |
14:54:28 | narimiran | conclusions? 1. i'm supid; 2. i have the slowest computer around here |
14:55:18 | Zevv | fast computers make lazy programmers |
14:55:30 | Zevv | you should spend some time with punch cards |
14:55:41 | Zevv | submit today, get your output tomorrow |
14:55:50 | narimiran | @mratsim, are you around? |
14:55:55 | Zevv | that will learn you to sit on your hands and think before you type |
15:01:25 | * | askatasuna left #nim ("WeeChat 2.3") |
15:03:25 | * | solitude_sf quit (Quit: ZNC - https://znc.in) |
15:03:49 | * | solitudesf joined #nim |
15:21:53 | FromGitter | <akavel> Hi! Beginner question: how do I use the `nimble develop` command? I find it hard to understand from the Nimble readme... |
15:22:48 | FromGitter | <akavel> (I want to spin off a helper library from my current project, to be published separately on github) |
15:25:31 | narimiran | @akavel i don't use nimble, but from `nimble --help` it doesn't seem to me like this is what you're after |
15:27:27 | Araq | akavel: in your project's dir run 'nimble develop' |
15:28:04 | Araq | and then this project is also symlinked from $nimbledir so that you can import it more easily in your other projects |
15:28:51 | FromGitter | <akavel> Araq: you mean in the spinoff library's dir? |
15:29:26 | Araq | no, if you have projects A and B and B depends on A, run 'nimble develop' in A's dir |
15:29:28 | FromGitter | <akavel> So, `git init spinoff; cd spinoff; nimble init; nimble develop` ? |
15:29:47 | FromGitter | <akavel> Araq: right, that's what I meant :) |
15:29:51 | Araq | ok |
15:30:37 | FromGitter | <akavel> So IIUC: `cd ~/devel; git init A; cd A; nimble init; nimble develop`, right? |
15:31:39 | FromGitter | <akavel> Then, in project B, just `nimble install A`, and it will automatically know it should use the local A, because it's marked as local somewhere in `$HOME/.nimble/` or something? |
15:32:08 | Araq | no need to do 'nimble install A' |
15:32:21 | narimiran | just `import A` |
15:32:33 | FromGitter | <akavel> oh, wow, ok |
15:32:57 | FromGitter | <akavel> thanks! |
16:03:24 | * | birdspider joined #nim |
16:09:06 | * | icebattle joined #nim |
16:10:27 | FromGitter | <Varriount> Zevv: I tend to build the compiler with `-d:release --stacktrace:on --linetrace:on`. You get nearly the same performance as just `-d:release`, but with information when the compiler crashes. |
16:10:34 | * | birdspider quit (Remote host closed the connection) |
16:31:40 | * | aguspiza quit (Ping timeout: 272 seconds) |
16:37:46 | * | fanta7531 quit (Quit: fanta7531) |
16:40:20 | Araq | who wrote the blog post about using Nim with GDB? |
16:40:41 | Araq | https://forum.nim-lang.org/t/4636 |
16:41:53 | narimiran | https://internet-of-tomohiro.netlify.com/nim/gdb.en.html |
16:42:34 | FromGitter | <kaushalmodi> yup, that blog is a bare bones SSG written in Nim too |
16:42:53 | FromGitter | <kaushalmodi> s/blog is/blog is generated using |
16:43:35 | FromGitter | <kaushalmodi> Copying @demotomohiro |
16:43:52 | Zevv | varriount: good tip, thanks |
16:44:12 | Araq | narimiran: thanks |
16:48:00 | FromGitter | <brentp> would be nice if something like that gdb blog-post was in official docs somewhere. (I didn't know about this blog post and had been using the youtube update as a reference ) |
16:48:36 | * | crem quit (Ping timeout: 252 seconds) |
16:49:08 | FromGitter | <kaushalmodi> There is Nim Planet |
16:49:29 | FromGitter | <kaushalmodi> If @demotomohiro can add his blog to that Planet, it will show up there |
16:49:34 | * | crem joined #nim |
16:58:10 | * | nsf quit (Quit: WeeChat 2.3) |
17:05:21 | * | kapil____ joined #nim |
17:13:54 | * | rockcavera quit (Remote host closed the connection) |
17:14:18 | * | rockcavera joined #nim |
17:19:27 | * | ryukoposting joined #nim |
17:22:05 | ryukoposting | hey all, I'm thinking about doing a series of short screencasts about Nim. I'm curious if any of you all have a cool Nim thing you'd like me to demonstrate in a video. |
17:22:52 | ryukoposting | I'm hoping to make them very simple, i.e. you don't have to have experience with Nim to understand the content. |
17:23:30 | narimiran | ryukoposting: sounds like a great idea! thumbs up from me |
17:24:38 | ryukoposting | I have a few videos about iterators planned, I'm gonna start with the basics of what an iterator is, then dig deeper into why they exist by doing some demonstrations of infinite data structures and a prime number finder |
17:26:36 | narimiran | if this is going to be a series of videos, how about starting with some general intro to nim, where you show the syntax, how to declare stuff, etc? |
17:27:12 | narimiran | so people not familiar with nim can watch that and then easier follow your remaining videos |
17:27:36 | ryukoposting | my goal is to make it less of a "here's nim" video series, and more of a "here's a thing in nim" |
17:28:31 | ryukoposting | the goal is that an experienced programmer will see these things, and see how nim is so good at expressing certain things that other procedural-ish languages can't |
17:28:45 | narimiran | aha |
17:29:29 | ryukoposting | and for less experienced programmers, they'll see it and be like "oh it looks like python with types!" and they'll be able to follow along while learning the language along the way |
17:32:30 | ryukoposting | narimiran any ideas for topics? |
17:32:59 | narimiran | ryukoposting: that depends on your preferences and experience |
17:33:32 | FromGitter | <SolitudeSF> that would be a good question for forum |
17:34:36 | ryukoposting | I'm no master of the language, but I know my way around it well enough to demonstrate some decently sophisticated ideas |
17:35:11 | ryukoposting | SolitudeSF: good idea, I'll have to make an account lol |
17:35:15 | * | smitop joined #nim |
17:35:31 | narimiran | my only advice/hope is that you follow NEP-1 style guide |
17:36:55 | ryukoposting | I haven't read it, but I indent with 2 spaces so I figure that's a start |
17:37:44 | narimiran | yeah, and camelCase for variables and procs, and PascalCase for types. just do that and it's ok |
17:38:32 | narimiran | here's a potential topic: how to do OOP in nim by not doing OOP :) |
17:39:01 | narimiran | people coming from other languages usually try to "translate" 1:1 their OOP code |
17:39:16 | dom96_w | also, please put a newline after `type` in your type sections ;) |
17:39:33 | narimiran | i'm guilty of not following that sometimes :) |
17:41:29 | dom96_w | Yeah... it's a losing battle unfortunately |
18:02:44 | * | lritter quit (Quit: Leaving) |
18:05:44 | ryukoposting | oh, well if camel case, pascal case, and newlines after 'type' are the gist of NEP-1, then I already have it down lol |
18:05:52 | * | ryukoposting quit (Quit: Lost terminal) |
18:06:44 | narimiran | yeah, it's really not that hard :) (and even still, i've seen various monstrosities in some forum posts :P) |
18:21:18 | rayman22201 | I'm bad about camelCase... at work we use snake_case and habits are hard to break. Lol |
18:26:31 | * | TheLemonMan joined #nim |
18:26:57 | * | disruptek_ joined #nim |
18:26:57 | * | disruptek quit (Read error: Connection reset by peer) |
18:27:55 | TheLemonMan | Araq, why the hell does testament default to `nim` in $PATH ? |
18:28:16 | TheLemonMan | I went nuts trying to figure out why the fuck the test suite started erroring out |
18:32:39 | Araq | because it's what I use |
18:32:53 | Araq | and previously it used compiler/nim.exe which is worse |
18:33:05 | Araq | you can argue for nim_temp but it never used that |
18:33:20 | Araq | this is my workflow: |
18:33:30 | Araq | koch temp c foo.nim # develop feature/bugfix |
18:33:46 | Araq | koch boot && koch boot -d:release # test that at least bootstrapping still works |
18:34:05 | Araq | testament/tester cat <category> # uses the new Nim |
18:35:16 | Araq | so, it suits my workflow and was broken before, that's why. |
18:35:33 | Araq | note that tester supports a --nim switch |
18:36:53 | TheLemonMan | a full koch boot takes ~2min here while koch temp is arguably faster |
18:37:36 | Araq | as I said, it never used nim_temp.exe as the default, afaict |
18:39:07 | TheLemonMan | yeah but it did its own build so I never had to worry about what binary should be used |
18:39:42 | Araq | ah so that's the koch.nim logic that I didn't know about |
18:41:08 | TheLemonMan | yeah, see L417 of koch.nim |
18:41:25 | * | neceve quit (Read error: Connection reset by peer) |
18:43:24 | * | ng0 joined #nim |
18:43:32 | Araq | well I don't use 'koch test' and it's for the CIs |
18:43:44 | Araq | so it should use the nim.exe from the PATH |
18:44:03 | Araq | 'koch test' is not for development, at least I never envisioned it for that |
18:44:36 | Araq | I have a shortcut 'tt' for testament/tester |
18:45:41 | * | zachk joined #nim |
18:45:46 | TheLemonMan | holy shit, I've been doing everything wrong for the past year or so and noone told me |
18:48:06 | Araq | it also keeps recompiling 'cc --opt:speed testament/tester' |
18:48:26 | Araq | clearly not for development. |
18:49:24 | TheLemonMan | yeah, no need to twist the knife :P |
18:50:23 | Araq | muhahah, we now have TheLemonMan that is twice as productive as before :-) |
18:50:52 | TheLemonMan | and you should update the `-h` text because it still says the default is compiler/nim |
18:51:07 | Araq | half life 4 confirmed! |
18:51:18 | Araq | yeah, updating koch.nim |
18:51:24 | TheLemonMan | sadly productivity follows a log scale heh |
18:53:30 | * | disruptek_ quit (Ping timeout: 250 seconds) |
18:53:34 | * | zachk quit (Changing host) |
18:53:34 | * | zachk joined #nim |
18:54:13 | TheLemonMan | soo, what test case broke with the tuple-related patch? |
18:54:48 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:57:18 | Araq | tmove_constr.nim or similar |
18:57:44 | Araq | I need to make my move optimizer smarter so that tuple.field counts as its own local variable |
19:00:00 | TheLemonMan | the very same thing should be extended to objects, afair there's a ticket for this |
19:01:32 | FromGitter | <AmberSaber> I found that compiling to c language like nim also has vala, zimbu |
19:02:01 | Araq | TheLemonMan: of course. There, I pushed an improvement. |
19:02:12 | Araq | now testament tells you what it tested |
19:03:40 | Araq | AmberSaber: yeah and ooc, some versions of Lisp... so now you can focus on the language aspects, not its strategy to produce native binaries |
19:05:38 | shashlick | Is there any plan to add koch to the path, and also have choosenim create a shim |
19:06:24 | FromGitter | <AmberSaber> If the program is large, it takes time to compile it into c, and then compile it into binary. Does this process take countless hours? |
19:06:38 | shashlick | It's super fast |
19:06:43 | shashlick | You should try it out |
19:07:27 | * | banc quit (Ping timeout: 268 seconds) |
19:07:53 | TheLemonMan | it's fast enough™ |
19:09:05 | FromGitter | <AmberSaber> Compiling to c may sound like creating a HTML using a template language |
19:11:04 | FromGitter | <SolitudeSF> but whats the problem |
19:11:09 | shashlick | We use Nim because we like great stuff |
19:11:16 | shashlick | Fast stuff |
19:11:30 | TheLemonMan | yes, the codegen phase is basically a glorified templating engine |
19:12:29 | * | banc joined #nim |
19:12:42 | shashlick | Ya we should simply redo everything from scratch since that's obviously better |
19:12:55 | FromGitter | <AmberSaber> I didn't study it in depth, I looked a little bit, I think the syntax is good. |
19:13:15 | Araq | I disagree slightly, a templating engine can usually only append to a single buffer |
19:13:54 | Xe | at a time |
19:14:11 | Araq | and as soon as you need to fill multiple buffers (C typedef sections at the same time as C functions) |
19:14:23 | Araq | a template engine can't do it. |
19:17:36 | narimiran | just reading the above discussion, realizing i've been using `koch test` wrong.... |
19:17:42 | Araq | TheLemonMan: did you see my structured control flow graph? |
19:18:26 | TheLemonMan | hmm, why is the cookie module scheduled for removal? I'd say it should be improved and tied to httpclient |
19:19:09 | TheLemonMan | Araq, not yet, I use a pretty old stable release for developing stuff :) |
19:19:46 | narimiran | TheLemonMan: that's what dom96 and/or Araq decided way back |
19:20:10 | FromGitter | <AmberSaber> koch |
19:20:17 | Araq | TheLemonMan: I keep wondering about a compiler IR that is somehow a unification of the AST and the CFG |
19:20:34 | FromGitter | <AmberSaber> Don't know the word |
19:20:37 | narimiran | btw, TheLemonMan, can you look at this? https://github.com/nim-lang/Nim/pull/7164 |
19:20:57 | Araq | narimiran: iirc I wanted to keep cookies |
19:21:11 | FromGitter | <akavel> Hi! I tried using the `nimble develop` command on a new package, but the package doesn't seem importable by others on my disk |
19:21:51 | FromGitter | <akavel> I can see the develop-ed package in: `%userprofile%\.nimble\pkgs\transcript-#head\` |
19:22:10 | FromGitter | <akavel> (I mean there is the directory, and it has some meta files within) |
19:22:28 | * | nsf joined #nim |
19:22:38 | FromGitter | <akavel> but when I try `import transcript` in a different package, nimble fails to find `transcript` |
19:23:20 | FromGitter | <akavel> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5dd72828c89123cb96f068] |
19:23:46 | FromGitter | <akavel> what am I doing wrong? |
19:23:51 | narimiran | Araq: yeah, now i'm reading it, and you did want to keep it at first, but later you were "fine, whatever" |
19:25:08 | FromGitter | <SolitudeSF> `--noNimblePath` in your command |
19:26:26 | FromGitter | <akavel> @SolitudeSF hm; I didn't do it myself; where can it be coming from? how can I get rid of it? |
19:26:48 | FromGitter | <akavel> I'm doing `nimble test` if that changes anything |
19:27:57 | FromGitter | <akavel> there's a `config.nims` in my tests directory, with `switch("path", "$projectDir/../src")`, could it be this? but it was added by nimble by default... |
19:32:22 | FromGitter | <akavel> I tried commenting the line out, and adding `nim.cfg` with a `--path:"../src/"`, as suggested by the nimble readme, but I'm still getting the same error, and the `--noNimblePath` is still there... :/ |
19:32:52 | Araq | akavel, maybe your transcript.nim is in a subdirectory |
19:33:02 | Araq | and that's why your import fails |
19:33:42 | FromGitter | <akavel> Araq: hmmm, yes, it's in a `src` subdir |
19:33:48 | Araq | also try 'nim c <mainproject>.nim' please, bypassing nimble so that we get some clues |
19:34:10 | Araq | a Nimble must be told about the 'src' subdir |
19:35:17 | FromGitter | <akavel> Araq: the transcript lib is needed only for tests, so I think `nim c <mainproject>.nim` should work OK? |
19:36:01 | FromGitter | <akavel> I'm somewhat confused as to the 'src', as it seemed to be created by nimble by default |
19:36:11 | FromGitter | <akavel> so I thought it'd work out of the box |
19:36:24 | FromGitter | <akavel> I can try moving the files out of the 'src' dir |
19:36:49 | Araq | please do. I don't know yet what's wrong, so I need more clues |
19:37:14 | Araq | don't blame Nimble for anything *yet* ;-) |
19:37:34 | FromGitter | <akavel> Araq: FYI, `nim c src\nixme.nim` (this is the main project) worked OK |
19:38:00 | Araq | and 'nimble build'? |
19:38:58 | FromGitter | <akavel> Araq: also ok |
19:39:05 | FromGitter | <akavel> but I use the `import transcript` only in tests |
19:39:18 | FromGitter | <akavel> `nimble build` works, but `nimble test` fails |
19:39:26 | Araq | well get your tests right, nimble doesn't really write tests for you |
19:39:39 | Araq | it only outlines how they can look like |
19:40:04 | FromGitter | <akavel> right, they fail because they can't find `transcript` :) |
19:40:18 | FromGitter | <akavel> before I added `import transcript`, they worked a-OK :) |
19:40:52 | FromGitter | <akavel> that's what I'm trying to ask: how to make them see the 'transcript' package :) |
19:43:02 | FromGitter | <akavel> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5ddbc57502282258cd7e76] |
19:43:50 | FromGitter | <akavel> ```C:\prog\transcript.nim> grep src transcript.nimble ⏎ srcDir = "src"``` [https://gitter.im/nim-lang/Nim?at=5c5ddbf6d1e3093ab5e92314] |
19:44:55 | * | smitop quit (Quit: Connection closed for inactivity) |
19:46:45 | FromGitter | <akavel> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5ddca55095f6660cbebd28] |
19:47:30 | Araq | import ".." / transcript maybe |
19:47:57 | FromGitter | <akavel> in nixme? |
19:49:10 | FromGitter | <akavel> still the same; I'll try pkg/transcript... |
19:49:46 | FromGitter | <akavel> still the same: `tserve.nim(3, 8) Error: cannot open file: transcript` |
19:52:18 | FromGitter | <akavel> the files in `%userprofile%` look ok to me: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5dddf25095f6660cbec5a9] |
19:56:23 | FromGitter | <akavel> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5ddee7dc3f0523cc80fadb] |
19:58:39 | FromDiscord_ | <moerm> Hello Nimmers |
20:03:13 | TheLemonMan | akavel, do you have a repo somewhere online? seeing the whole directory structure would help us to help you |
20:04:13 | FromGitter | <akavel> TheLemonMan: right; I'll just try to make sure they're fully synced to my current state: |
20:06:35 | FromGitter | <akavel> https://github.com/akavel/transcript.nim |
20:08:17 | TheLemonMan | running `nimble test` or `nim c -r tests/test1.nim` gives no error |
20:09:25 | FromGitter | <akavel> https://github.com/akavel/nixme/blob/4a4e0bc2e79e8d786417164d7b5de3c8aa992ace/tests/tserve.nim |
20:10:20 | FromGitter | <akavel> line 3 in tserve.nim has `import transcript`, and I can't make it work |
20:10:41 | FromGitter | <akavel> with `nimble develop` |
20:16:28 | TheLemonMan | ok, sorry for the long delay, you just forgot to declare your dependecies in the nimble file :) |
20:16:41 | TheLemonMan | just add `requires "transcript"` and you're good to go |
20:17:07 | TheLemonMan | meh, not quite, you have to add `import streams` in the tserve.nim file too |
20:17:27 | TheLemonMan | and I guess `import nixmepkg/local_store` |
20:17:41 | * | disruptek joined #nim |
20:19:06 | FromGitter | <akavel> TheLemonMan: hmh; ok, I can't say forgot, because I don't recall having seen a mention that I should add such declaration anywhere till now :( |
20:20:04 | * | Tyresc joined #nim |
20:20:52 | FromGitter | <akavel> Ok, I see there's a section "Dependencies" in the nimble readme |
20:21:19 | FromGitter | <akavel> I kinda thought Nimble would add to it by itself |
20:22:10 | FromGitter | <akavel> whew, yep, that did it, no more error about the file, thanks! |
20:22:51 | FromGitter | <Clyybber> I feel like `./koch temp` is a convoluted pun setup by Araq years ago :P |
20:22:54 | FromGitter | <akavel> And sorry for troubling you with a dumb question - but I said I'm a newbie up front :) |
20:23:55 | FromGitter | <akavel> Thanks again for helping me! And I assure you, I'll be back with more newbie questions ;) |
20:24:31 | TheLemonMan | np, feel free to ask, we're a friendly bunch |
20:36:32 | narimiran | @Clyybber as in "cooking temperature"? |
20:36:41 | FromGitter | <Clyybber> yeah :D |
20:40:28 | TheLemonMan | quick poll, what pragma name do you prefer, `serializeAs` or `rename` ? |
20:40:49 | TheLemonMan | both are terribly misleading since they also let you control whether the field should be skipped or not |
20:43:11 | narimiran | yay, we're down to just 3 pages of open PRs! |
20:43:26 | narimiran | let's enjoy this moment before somebody opens up a new one |
20:45:59 | Zevv | how about 3 pages of issues :) |
20:46:24 | narimiran | Zevv: that's coming right up when github allows 500 issues per page :P |
20:46:53 | narimiran | but a first step is to have a constant 12xx number of issues |
20:47:26 | TheLemonMan | a lot of old issues are probably fixed by now |
20:47:44 | FromDiscord_ | <moerm> See you soon |
20:48:34 | narimiran | TheLemonMan: couple of months ago i manually tested some of those old issues and closed the ones fixed in the mean time. probably some/lots of them left, but i (or somebody else) needs to go through them again |
20:49:16 | narimiran | and there are also "issues" which are really not a real issues, but just opinions or something that should be transferred to RFCs repo |
20:49:51 | narimiran | so yeah, 12xx goal is realistic, 11xx would be an optimistic one |
20:53:07 | * | banc quit (Ping timeout: 240 seconds) |
20:54:44 | TheLemonMan | the ultimate goal is 0! |
20:54:54 | narimiran | zero factorial? |
20:55:28 | FromGitter | <Clyybber> narimiran: I once made a small script because copypasting was so cumbersome ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5decbfdc3f0523cc816549] |
20:55:33 | FromDiscord_ | <RaycatWhoDat> Hello. |
20:55:42 | TheLemonMan | narimiran, yeah, just a single issue |
20:56:07 | narimiran | nah, zero issues would look like nobody is using nim. we'll do our best not to lower the number too much :P |
20:56:13 | FromGitter | <Clyybber> TheLemonMan: Get ready for philosophical discussion :P |
20:56:41 | TheLemonMan | pff, everybody knows that propularity is measured in github stars! |
20:58:12 | narimiran | @Clyybber why haven't i thought of that? this might be useful. but on other hand, is it really quicker than the additional ctrl+v, ctrl+alt+n? |
20:58:50 | narimiran | (i'm using code-runner plugin which runs your code with that ctrl+alt+n) |
20:59:50 | narimiran | btw, somebody has made a script that went through the issues and run the examples seeing if they still fail (don't compile) |
21:00:00 | FromGitter | <Clyybber> huh, thats awesome |
21:00:14 | * | banc joined #nim |
21:00:18 | FromGitter | <Clyybber> do you have a link? |
21:01:20 | narimiran | i don't, but you can go and manually look through issues until you find it. and while you're at it, test the snippets you find along the way :D |
21:02:14 | FromGitter | <Clyybber> was it a nim script? |
21:02:24 | narimiran | it was |
21:06:17 | * | nsf quit (Quit: WeeChat 2.3) |
21:14:20 | * | kapil____ quit (Quit: Connection closed for inactivity) |
21:15:29 | FromGitter | <kaushalmodi> narimiran: https://forum.nim-lang.org/t/4008 ? |
21:15:39 | narimiran | yup |
21:16:14 | FromGitter | <Clyybber> @kaushalmodi Thanks, thats awesome |
21:17:15 | FromGitter | <Clyybber> shashlick made that, right? |
21:18:33 | FromGitter | <kaushalmodi> yes, I claim no authorship of that |
21:18:35 | FromGitter | <kaushalmodi> :P |
21:19:20 | FromGitter | <Clyybber> I was just looking for confirmation on wether shashlick = genotrance :D |
21:20:09 | narimiran | i'm going to bed. so tomorrow morning when i wake up, i'll see lots of issues marked as fixed? ;) |
21:20:24 | FromGitter | <Clyybber> good night |
21:23:27 | * | xet7 quit (Remote host closed the connection) |
21:25:13 | * | xet7 joined #nim |
21:27:43 | shashlick | what's up |
21:27:45 | * | narimiran quit (Ping timeout: 246 seconds) |
21:29:32 | shashlick | tissue is for lazy people |
21:32:31 | * | dragan quit (Ping timeout: 256 seconds) |
21:35:32 | * | thomasross quit (Remote host closed the connection) |
21:48:18 | TheLemonMan | hook it to a NN and make it fix the issues too |
21:57:40 | * | eduarch joined #nim |
21:57:44 | eduarch | Hi |
21:58:03 | eduarch | Is there a way to change the type of a variable? |
21:58:16 | eduarch | The thing is that im programming with the x11 lib |
21:58:34 | eduarch | and one parameter is asking me for a variable with the type TKeyCode |
21:58:53 | eduarch | But the variable that i need to enter is cuint |
21:59:09 | eduarch | How can i change that var into the type needed? |
21:59:13 | eduarch | thanks |
21:59:23 | FromGitter | <Clyybber> `variable.TKeyCode` |
21:59:33 | FromGitter | <Clyybber> where variable is your, well, variable |
21:59:50 | FromGitter | <Clyybber> ./parameter |
22:00:35 | eduarch | the variable is an XEvent |
22:00:45 | eduarch | with .xkey added |
22:03:13 | FromGitter | <dom96> Araq: keep in mind that nimble expects deps to be specified in the .nimble file. It won't pass the paths to Nim unless they're specified. |
22:04:35 | eduarch | i've been searching on google a lot and haven't found an answer |
22:05:08 | eduarch | Let me send an example in c lang so you guys could see what im trying to achieve |
22:05:10 | eduarch | keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); |
22:05:34 | eduarch | there is a part were ev->keycode is converted into KeyCode type |
22:05:51 | eduarch | and i want to know how to do that in nim |
22:06:04 | eduarch | keysym = XKeycodeToKeysym(display, eve.keycode, 0) |
22:06:15 | eduarch | ^^^ that is nim code |
22:06:35 | eduarch | but it fails since eve.keycode is not in the TKeyCode type |
22:12:37 | eduarch | I JUST FIGURED IT OUT |
22:12:38 | eduarch | YAY |
22:12:49 | eduarch | the cast proc is very useful |
22:12:54 | eduarch | sorry for the spam :) |
22:12:59 | * | eduarch quit (Quit: Leaving) |
22:21:46 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
23:19:47 | * | Vladar quit (Remote host closed the connection) |
23:22:52 | * | krux02 quit (Remote host closed the connection) |
23:24:12 | * | oculux quit (Remote host closed the connection) |
23:59:36 | * | disruptek left #nim (#nim) |