00:10:06 | * | vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:13:58 | * | vosper joined #nim |
00:22:56 | * | ftsf joined #nim |
00:45:08 | * | wildlander quit (Quit: Konversation terminated!) |
00:56:23 | * | vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:59:10 | * | clyybber joined #nim |
01:01:57 | * | vosper joined #nim |
01:07:39 | * | clyybber quit (Quit: good night) |
01:09:20 | * | hooo_ quit (Quit: Page closed) |
01:13:31 | * | Guest23877 joined #nim |
01:17:05 | * | vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:18:24 | * | Guest23877 quit (Ping timeout: 272 seconds) |
02:56:29 | * | smt quit (Ping timeout: 260 seconds) |
03:06:22 | * | endragor joined #nim |
03:14:37 | FromGitter | <Varriount> krux02: For your AST pattern matching library, is there a way to store the pattern matching expression in an ident, so that it can be referenced from multiple places within code? |
03:21:19 | * | PrimHelios quit (Quit: Leaving) |
03:29:58 | * | dddddd quit (Remote host closed the connection) |
03:33:25 | * | e-mail joined #nim |
03:33:25 | * | e-mail quit (K-Lined) |
03:43:50 | * | leorize quit (Ping timeout: 276 seconds) |
03:56:49 | * | leorize joined #nim |
03:57:18 | * | endragor quit (Remote host closed the connection) |
04:03:20 | * | endragor joined #nim |
04:04:15 | * | endragor quit (Remote host closed the connection) |
04:13:31 | * | HYP3RBOR3A joined #nim |
04:26:15 | * | arecaceae quit (Remote host closed the connection) |
04:26:33 | * | arecaceae joined #nim |
04:49:27 | * | data-man quit (Ping timeout: 240 seconds) |
05:00:36 | * | ftsf quit (Ping timeout: 244 seconds) |
05:29:52 | * | nsf joined #nim |
05:55:17 | * | miran joined #nim |
06:20:47 | * | vosper joined #nim |
06:33:48 | * | girvo quit (Quit: Catch you later! - https://jgirvin.com) |
06:44:00 | * | ftsf joined #nim |
06:48:49 | FromGitter | <ozturkberkay> hi. Is it possible to use tab instead of space for indentation |
06:50:10 | * | alehander42_ joined #nim |
06:54:00 | * | kungtotte joined #nim |
06:59:30 | * | vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:02:12 | Araq | no. change your editor's config |
07:05:07 | FromGitter | <ozturkberkay> In VS Code, i have editor.insertSpaces enabled. is it enough? @Araq |
07:06:28 | miran | also add `editor.tabSize: 2` |
07:07:35 | miran | to do it only for nim files, do: `"[nim]": {"editor.tabSize": 2}` |
07:08:05 | FromGitter | <ozturkberkay> this is bad :/ I loved to write with tab indentation with tab size of 44 |
07:08:10 | FromGitter | <ozturkberkay> 4* |
07:08:38 | miran | you'll get used to it, and then 4 spaces will seem like a lot |
07:09:03 | FromGitter | <ozturkberkay> > *<miran>* to do it only for nim files, do: `"[nim]": {"editor.tabSize": 2}` ⏎ Thanks a lot for this! |
07:09:27 | miran | you're welcome :) |
07:17:55 | * | ng0 joined #nim |
07:41:39 | * | yglukhov[i] joined #nim |
07:45:52 | * | vosper joined #nim |
07:56:57 | * | Vladar joined #nim |
08:03:20 | * | gmpreussner joined #nim |
08:03:57 | * | gmpreussner_ quit (Ping timeout: 240 seconds) |
08:14:03 | * | kungtotte quit (Quit: leaving) |
08:14:59 | * | krux02 joined #nim |
08:17:41 | * | krux02 quit (Remote host closed the connection) |
08:18:08 | * | krux02 joined #nim |
08:22:16 | * | HYP3RBOR3A quit (Quit: Leaving) |
08:25:53 | krux02 | ping. Is my client working? |
08:26:22 | miran | krux02: pong |
08:40:45 | * | data-man joined #nim |
08:42:11 | krux02 | thanks |
09:15:41 | * | vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:18:22 | * | ^MillerBoss joined #nim |
09:24:04 | * | ^MillerBoss quit (Ping timeout: 265 seconds) |
09:36:57 | * | krux02 quit (Remote host closed the connection) |
09:43:14 | * | NimBot joined #nim |
09:45:14 | FromGitter | <ozturkberkay> ```foo = "abc" ⏎ bar1 = "defDEF" ⏎ baz = "ghi" ⏎ baz1 = "jklm"``` ⏎ ⏎ Is aligning code with space like the example above a bad practice? Am I'm the only one who does this? :) [https://gitter.im/nim-lang/Nim?at=5b7001aa5b07ae730aa923b5] |
09:51:40 | miran | no, there are others who do that, but it is still bad practice :) |
09:57:38 | * | alehander42_ quit (Remote host closed the connection) |
10:05:38 | FromGitter | <ozturkberkay> It seems like we cannot call a procedure before it is declared. Is it planned to change this in the future updates or is there a reason behind this rule? |
10:06:17 | miran | you can forward-declare if you need that |
10:06:47 | miran | and here is the example and short explanation why it won't ve changed: https://nim-lang.org/docs/tut1.html#procedures-forward-declarations |
10:12:14 | FromGitter | <dom96> Actually it might still be changed |
10:12:20 | FromGitter | <dom96> But probably not for 1.0 |
10:13:01 | FromGitter | <Clyybber> Will newruntime be default in 1.0? |
10:13:43 | FromGitter | <ozturkberkay> ```code paste, see link``` ⏎ ⏎ It feels redundant because you write the decleration part twice [https://gitter.im/nim-lang/Nim?at=5b700857637ee66082dc8c3a] |
10:14:35 | miran | why don't you just put the last line on the top? |
10:15:22 | FromGitter | <ozturkberkay> I don't know how OOP works on Nim but i'm used to call methods inside the constructor function and then define the methods afterwards |
10:15:28 | FromGitter | <ozturkberkay> thats probably the main reason |
10:16:03 | miran | you can change the order, but even better it might be to ditch OOP ;) |
10:17:29 | FromGitter | <ozturkberkay> Maybe :) Nim pushes me to try out new things, thats why I love it so far. |
10:18:32 | miran | i think there was some blog-post where it was explained how to do OOP nim-way, i'll try to find it |
10:21:29 | miran | i think this is it (in the first sentence there are three links to the three previous parts): http://goran.krampe.se/2014/11/30/nim-and-oo-part-iv/ |
10:22:20 | miran | it was a long time ago that i have read it, i don't remember how good it is, and how someting from 2014 is applicable to nim in 2018 |
10:23:07 | FromGitter | <ozturkberkay> thanks! I'll have a look at it |
10:26:52 | miran | see also the official tutorial: https://nim-lang.org/docs/tut2.html#object-oriented-programming |
10:26:57 | * | cspar quit (Ping timeout: 240 seconds) |
10:29:20 | * | gangstacat quit (Ping timeout: 256 seconds) |
10:31:56 | * | miran quit (Ping timeout: 272 seconds) |
10:33:40 | * | nsf quit (Quit: WeeChat 2.2) |
10:37:43 | * | xet7 joined #nim |
10:42:19 | * | gangstacat joined #nim |
10:45:18 | * | alehander42_ joined #nim |
10:45:52 | * | alehander42_ quit (Remote host closed the connection) |
10:46:39 | * | data-man quit (Ping timeout: 268 seconds) |
10:47:28 | * | alehander42_ joined #nim |
10:59:29 | FromGitter | <Bennyelg> Hello all, anyone here can asist with Javascript ? I am writing to frontend of my nim website and Im struggling with pagination. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b701311937eee2423086dbe] |
11:04:33 | * | data-man joined #nim |
11:14:20 | alehander42_ | what's the problem tho |
11:19:26 | * | data-man quit (Ping timeout: 272 seconds) |
11:20:02 | * | smt joined #nim |
11:21:20 | zacharycarter[m] | looking for help on how to rewrite this macro using `varargs[untyped]` instead of `callsite` as I don't think callsite is working |
11:22:09 | * | data-man joined #nim |
11:22:41 | zacharycarter[m] | https://github.com/zacharycarter/allegro5/blob/master/src/al.nim#L360-L404 |
11:24:53 | zacharycarter[m] | I've made a bit of progress but I keep stumbling on how to process pairs of idents / type definitions vs several idents and then a type definition |
11:29:49 | * | data-man quit (Ping timeout: 268 seconds) |
11:31:49 | * | data-man joined #nim |
11:42:02 | * | seni joined #nim |
11:42:14 | seni | hey, how do I convert a int to string? |
11:42:35 | FromGitter | <Clyybber> you shouldn't normally |
11:42:40 | FromGitter | <Clyybber> AH |
11:42:43 | FromGitter | <Clyybber> use $ |
11:42:47 | FromGitter | <Clyybber> nvrmind what i said |
11:42:50 | FromGitter | <Clyybber> but use $ |
11:43:11 | FromGitter | <Clyybber> stringything = $someint |
11:45:12 | seni | thanks |
11:45:24 | * | data-man quit (Ping timeout: 256 seconds) |
11:48:11 | seni | im confused about declaring functions. if it has a return type then I declare `): bool =` for example. but if it doesn't I write `) =` ? |
11:48:16 | seni | why the inconsistency? |
12:00:02 | * | data-man joined #nim |
12:01:58 | zacharycarter[m] | it's not an inconsistency - the void return type is implicit |
12:02:13 | zacharycarter[m] | it prevents you from having to type out `: void` after every proc that returns void |
12:04:38 | * | data-man quit (Remote host closed the connection) |
12:05:20 | zacharycarter[m] | I think anyway |
12:06:03 | * | data-man joined #nim |
12:07:51 | FromGitter | <ozturkberkay> I think it's a useful feature. You can even skip the parantheses if there are no parameters |
12:11:27 | * | alehander42_ quit (Remote host closed the connection) |
12:12:21 | * | data-man quit (Ping timeout: 240 seconds) |
12:13:10 | * | elrood joined #nim |
12:15:02 | seni | it's not about not writing void, it's about the missing colon |
12:16:18 | * | data-man joined #nim |
12:17:50 | seni | I just wasted a bunch of time because I didn't realize that and was getting some undeclared var error, the docs do not mention this section when introducing procs |
12:20:32 | seni | *this syntax when |
12:20:45 | FromGitter | <tim-st> I had these problems too, when I started developing in nim, you just have to keep in mind the rule to end with `) =` |
12:21:05 | seni | okay |
12:21:38 | FromGitter | <tim-st> and it makes sense, since `): =` looks uncool |
12:22:07 | FromGitter | <Clyybber> It makes sense because it works the same way for variables |
12:23:09 | FromGitter | <tim-st> also I had probems with empty seqs like `var x = @[]` here the type is missing. The compiler could find out the type looking at the later code, but I just used `newSeqOfCapT (cap)` then |
12:23:40 | FromGitter | <ozturkberkay> @Clyybber +1. You use `:`to declare the data type. Putting that without writing the data type wouldnt make sense ⏎ ⏎ > It makes sense because it works the same way for variables |
12:25:34 | seni | okay, I hadn't thought of it that way |
12:25:39 | * | alehander42 joined #nim |
12:27:45 | * | ftsf quit (Remote host closed the connection) |
12:28:06 | FromGitter | <Clyybber> Whats the use of newSacOfCap ? |
12:28:08 | * | ftsf joined #nim |
12:28:28 | FromGitter | <Clyybber> Wouldn't it in most cases make more sense to use newSeqUninitialised |
12:28:30 | FromGitter | <Clyybber> ? |
12:31:50 | FromGitter | <tim-st> In all cases newSeqOfCap should be the same as newSeqUninitialized but afaik this is only done, if you add the `{.noInit.}` pragma... |
12:32:09 | FromGitter | <tim-st> newSeqOfCap is just more famous I would say |
12:34:53 | FromGitter | <Clyybber> I see, newSeqUninitalized is basically the same as newSeqOfCap, but with the length set, so you don't have to add entries, but can overwrite existing(albeit unitialised) ones |
12:37:12 | FromGitter | <tim-st> I think they are the very same, but newSeqOfCap is (for unknown reason) initialzed although it's not indexable |
12:37:42 | FromGitter | <Clyybber> It is actually not initialized. |
12:38:01 | FromGitter | <Clyybber> It's length is just set to 0 |
12:38:10 | FromGitter | <tim-st> 2 weeks ago I looked at the source code... |
12:38:13 | FromGitter | <Clyybber> Hmm |
12:38:33 | FromGitter | <Clyybber> Okay maybe I misunderstood the source |
12:38:51 | FromGitter | <tim-st> it's in `sysstr.nim` |
12:39:27 | FromGitter | <Clyybber> https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L744 |
12:39:36 | FromGitter | <Clyybber> There it is, I think |
12:39:42 | FromGitter | <tim-st> what I meant was for string, but is the same I think |
12:40:16 | FromGitter | <tim-st> yes, it says magic: `NewSeqOfCap` |
12:40:23 | FromGitter | <Clyybber> If you look at newSeqUninitialized you see it calls newSeqOfCap |
12:40:49 | FromGitter | <Clyybber> So it doesn't make much sense that newSeqOfCap would be initialized |
12:49:15 | FromGitter | <tim-st> I cannot find the code definition of the `magic` procs now..., I'm pretty sure I've seen it work different :\ |
12:58:59 | FromGitter | <Clyybber> It uses compiler *magic* |
13:01:39 | FromGitter | <Clyybber> aka intrinsics |
13:03:01 | FromGitter | <tim-st> for example `newString` magic is defined here: https://github.com/nim-lang/Nim/blob/c57e320c9486248a82c19d13e03178745d8eb53f/lib/system/sysstr.nim#L92 |
13:03:19 | * | data-man quit (Ping timeout: 272 seconds) |
13:03:56 | FromGitter | <tim-st> there was also a place for newSeqOfCap but I cant find it anymore |
13:04:05 | * | elrood quit (Quit: Leaving) |
13:04:15 | FromGitter | <Clyybber> I cant find it either |
13:04:26 | FromGitter | <tim-st> maybe deleted :( |
13:05:38 | FromGitter | <Clyybber> https://github.com/search?utf8=%E2%9C%93&q=repo%3Anim-lang%2FNim+NewSeqOfCap+in%3Afile&type=Code |
13:05:46 | FromGitter | <Clyybber> Can't find the implementation there. |
13:09:42 | * | alehander42 quit (Ping timeout: 256 seconds) |
13:10:41 | * | krux02 joined #nim |
13:12:15 | krux02 | Araq: what is there a reason, why every NimNode has a comment field? |
13:12:27 | FromGitter | <tim-st> I think the implementation of `newSeqUninitialized` was changed recently to what you linked directly inside `system.nim`. But still itwould be interesting to see the difference to `newSeqOfCap` |
13:15:07 | FromGitter | <stisa> @tim-st this one ? https://github.com/nim-lang/Nim/blob/89dd1e3592e5f869bd2845c587ddec9c749d4d7b/lib/system/mmdisp.nim#L364 |
13:18:55 | FromGitter | <tim-st> thanks, looks good, although the name is different, but seems implemented similiar |
13:23:21 | FromGitter | <stisa> that's the proc the c backend generates. Search for `mNewSeqOfCap`, most magics are implemented in a `case` using `m`+`procname`for the enum |
13:25:43 | FromGitter | <tim-st> yes, you're right, thanks: https://github.com/nim-lang/Nim/search?utf8=%E2%9C%93&q=mNewSeqOfCap&type=Code |
13:27:16 | FromGitter | <stisa> Or maybe it's this one, I think the other is specific to gogc |
13:27:20 | FromGitter | <stisa> https://github.com/nim-lang/Nim/blob/89dd1e3592e5f869bd2845c587ddec9c749d4d7b/lib/system/mmdisp.nim#L562 |
13:28:22 | * | data-man joined #nim |
13:29:23 | FromGitter | <tim-st> ok, thanks, at least I was wrong about the place of implementation, maybe I switched it with newStringOfCap :\ |
13:34:11 | * | todevil joined #nim |
13:34:31 | * | data-man quit (Remote host closed the connection) |
13:35:57 | * | todevil quit (Remote host closed the connection) |
13:41:48 | * | jrabe23 joined #nim |
13:43:17 | * | jrabe23 quit (Remote host closed the connection) |
13:49:35 | * | MyMind quit (Ping timeout: 240 seconds) |
13:53:38 | * | yglukhov_ joined #nim |
13:54:48 | * | miran joined #nim |
13:56:27 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
13:57:03 | zacharycarter[m] | Hrmmmm |
13:59:04 | zacharycarter[m] | is this right? - https://gist.github.com/zacharycarter/f61be4127da3ec6efc9f3c2348b6469a |
14:11:23 | * | krux02 quit (Ping timeout: 268 seconds) |
14:28:27 | * | dddddd joined #nim |
14:30:42 | * | BitPuffin joined #nim |
14:31:09 | * | yglukhov_ quit (Remote host closed the connection) |
14:35:00 | * | Kronuz10 joined #nim |
14:35:03 | * | Kronuz10 quit (Remote host closed the connection) |
14:35:21 | * | data-man joined #nim |
14:41:06 | * | EdSaperia0 joined #nim |
14:45:58 | * | EdSaperia0 quit (Ping timeout: 265 seconds) |
14:47:41 | * | leorize quit (Quit: WeeChat 2.2) |
14:52:40 | * | stefanos82 joined #nim |
15:16:57 | * | noonien joined #nim |
15:17:04 | * | data-man quit (Read error: Connection reset by peer) |
15:20:04 | * | yglukhov[i] joined #nim |
15:37:35 | * | C0c0dril015 joined #nim |
15:38:36 | * | C0c0dril015 quit (Remote host closed the connection) |
15:41:32 | * | edcragg quit (Read error: Connection reset by peer) |
15:42:35 | * | edcragg joined #nim |
16:07:45 | FromDiscord_ | <treeform> Adding an ability, to my typography library to typeset text independent of drawing it: |
16:07:48 | FromDiscord_ | <treeform> |
16:07:48 | FromDiscord_ | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/478233144235917335/layoutNoText.png |
16:08:05 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
16:08:26 | FromDiscord_ | <treeform> You can then fill it with glyphs how you want say in openGL or even HTML. |
16:08:31 | FromDiscord_ | <treeform> Or you can use my method: |
16:08:33 | FromDiscord_ | <treeform> |
16:08:33 | FromDiscord_ | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/478233336066736128/layout.png |
16:09:15 | FromGitter | <kayabaNerve> Or just do tab size 4 @ozturkberkay Miran |
16:10:02 | miran | the official stuff is written with 2 spaces, so i guess this would be the official way |
16:11:28 | FromGitter | <kayabaNerve> The compiler has a style guide saying that; Nim projects are, at a guess, 60-70% 2 spaces; the language itself doesn't. |
16:11:53 | * | PMunch joined #nim |
16:12:49 | FromGitter | <kayabaNerve> Point is, if he wanted to use 4 spaces, just let him use 4 |
16:13:01 | FromGitter | <kayabaNerve> Maybe make a comment most Nim code is 2 |
16:13:39 | FromGitter | <ozturkberkay> To be honest, I really don't like 2 space tab size. But I can continue like this if the majority of the community using 2 spaces, not a big deal |
16:14:07 | FromGitter | <kayabaNerve> Idea. Get a copy of every nimble package and write a tool to see how many spaces it uses. |
16:15:01 | FromGitter | <kayabaNerve> I personally use 4 :p I'm not saying you just continue using 2 and can't adapt. I'm trying to say it's up to you to either continue what you like(d) or adapt. |
16:15:50 | FromGitter | <ozturkberkay> Yeah, I get it :) |
16:20:47 | miran | when i started i didn't like 2 spaces (also didn't like the imports, (partial) case/style insensitivity, etc.), but it has grown on me over time |
16:24:26 | * | xet7 quit (Quit: Leaving) |
16:24:37 | stefanos82 | I didn't like 2 spaces either, but it lasted about 15 to 20 minutes; then for some inexplicable reason it felt right and natural to use 2 spaces instead of 4 |
16:30:45 | * | ftsf quit (Ping timeout: 268 seconds) |
16:40:34 | * | enthus1ast joined #nim |
16:41:13 | FromGitter | <tim-st> are there any server capacities left to create nightly builds for nim? |
16:41:33 | FromGitter | <kayabaNerve> imports are freaking amazing IMO. I do wish Nim was case sensitive though... |
16:41:50 | FromGitter | <kayabaNerve> My main issue is that some aspects are case sensitive and it isn't defined which aspects those are. |
16:42:53 | * | enthus1ast quit (Client Quit) |
16:44:17 | * | drazan quit (Read error: Connection reset by peer) |
16:45:51 | * | lutki_ joined #nim |
16:46:58 | * | drazan joined #nim |
16:47:17 | * | lutki_ quit (Remote host closed the connection) |
16:48:13 | * | e-mail joined #nim |
16:50:53 | FromGitter | <tim-st> is it correct that `koch tools` doesnt get `-d:release`? |
16:54:07 | * | e-mail quit (Ping timeout: 244 seconds) |
16:59:54 | FromGitter | <kayabaNerve> If I have to store an... array of bytes, that could have a length of 0 or a MAX of 128, should I use OpenArray or seq? |
17:00:03 | FromGitter | <kayabaNerve> Once the length is set it never changes |
17:00:23 | miran | openArray is only used in proc declarations, no? |
17:00:59 | miran | and you cannot even return openArray from a proc, IIRC |
17:01:16 | FromGitter | <kayabaNerve> Yep. |
17:01:30 | FromGitter | <kayabaNerve> Sorry. So I guess I'm forced to use a ptr array[0] or a seq. |
17:06:23 | FromDiscord_ | <exelotl> hey, I followed the macros section of the nim book and now I'm messing around with the code some more |
17:07:02 | FromDiscord_ | <exelotl> I ran into this while trying to swap out a template with a `quote do` https://gist.github.com/geckojsc/5f5d70fa4126ce51669a351043c1dffc |
17:07:39 | FromDiscord_ | <exelotl> is the backtick notation not the same here? |
17:13:21 | FromGitter | <Varriount> @kayabaNerve Sequences are your friend. |
17:14:18 | FromGitter | <Varriount> exelotl: backticks are used for variable substitution in quote |
17:15:43 | FromGitter | <kayabaNerve> @Varriount Yeah... C++ Vectors have scarred me pretty badly though. |
17:15:49 | FromGitter | <kayabaNerve> I'm using them but still... |
17:24:06 | * | fluter joined #nim |
17:24:35 | FromGitter | <tim-st> @kayabaNerve are they known at compile time? |
17:26:33 | FromGitter | <tim-st> if so, you can use one array/seq and store the elements as sequences -> the next element belongs to the previous unless a flag marks the last element. then you can store one array of start indices that links to the sequences array/list |
17:28:08 | FromGitter | <kayabaNerve> @tim-st I'm storing data. You can have 0 bytes to 128 bytes. |
17:28:33 | FromGitter | <tim-st> yes. the question is, if your data is known at compile time |
17:28:37 | FromGitter | <kayabaNerve> No. |
17:28:43 | * | alehander42 joined #nim |
17:28:44 | FromGitter | <kayabaNerve> You is the user. |
17:28:47 | FromGitter | <kayabaNerve> As they use it. |
17:28:51 | FromGitter | <tim-st> ok, then it doesnt work |
17:28:53 | FromGitter | <kayabaNerve> And 0ing it out would not work at all. |
17:29:15 | * | fluter quit (Ping timeout: 244 seconds) |
17:29:15 | FromGitter | <tim-st> what do you mean by 0ing out? |
17:31:24 | FromGitter | <kayabaNerve> I can't create 128 bytes of 0. |
17:33:08 | FromGitter | <tim-st> the idea was (only compile time): seq[tuple[data: byte, isLast: bool]]; then you yould create sequences of len 0..128 |
17:36:11 | * | epictek[m] joined #nim |
17:40:04 | * | enthus1ast joined #nim |
17:40:18 | * | enthus1ast quit (Client Quit) |
17:40:53 | * | enthus1ast joined #nim |
17:41:12 | * | enthus1ast quit (Client Quit) |
17:41:59 | * | enthus1ast joined #nim |
17:46:05 | * | PMunch quit (Quit: leaving) |
17:47:16 | * | PMunch joined #nim |
17:55:35 | * | nsf joined #nim |
18:01:41 | * | enthus1ast quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
18:01:57 | * | enthus1ast joined #nim |
18:01:58 | * | alehander42 quit (Remote host closed the connection) |
18:03:06 | * | enthus1ast quit (Client Quit) |
18:03:20 | * | enthus1ast joined #nim |
18:05:03 | * | enthus1ast quit (Client Quit) |
18:05:18 | * | enthus1ast joined #nim |
18:06:06 | * | enthus1ast quit (Client Quit) |
18:08:47 | FromGitter | <kayabaNerve> krux02 had something humorous for you |
18:10:03 | FromGitter | <kayabaNerve> I actually just used sequtils.mapLiterals to converted a OrderedSet[int] to OrderedSet[char] (I need every single character except 0. Not 0-9, A-Z, a-z; 1-255 but in char form). |
18:10:33 | FromGitter | <kayabaNerve> Annoying thing About Gitter -> IRC is I have no idea if he's online. I don't think he's here right now 0_o I do think he may have a bouncer... |
18:12:19 | * | phao joined #nim |
18:16:47 | * | ng0 joined #nim |
18:17:35 | * | thomasross__ quit (Remote host closed the connection) |
18:17:57 | subsetpark | Could I use `pegs` to implement a simple parser, in its current form? |
18:18:04 | * | thomasross__ joined #nim |
18:19:01 | Araq | subsetpark: I can't rmember if I merged the PR that allows you to do that |
18:19:56 | subsetpark | :) I see |
18:20:17 | subsetpark | Is there an alternative? A native yacc-alike? |
18:21:50 | Araq | you can try to revive my 'lexim' project but that's only lexer generation |
18:22:20 | Araq | 'scanp' is the beginning of a parser generator but its DSL became too cryptic too fast |
18:22:41 | Araq | this stuff is hard to design :-) |
18:25:00 | stefanos82 | language / compiler design might be a tough job, but darn it, is so amazing to keep your head spinning all the time! |
18:25:41 | subsetpark | understood :) |
18:25:52 | subsetpark | have people just been hand-rolling parsers for now? |
18:26:05 | subsetpark | or hand-rolling them with a strscans core? |
18:27:33 | * | phao left #nim ("Leaving") |
18:29:42 | stefanos82 | more and more interpreted languages that get released nowadays they use custom-made parsers |
18:35:01 | * | Trustable joined #nim |
18:39:10 | * | phao joined #nim |
18:44:29 | FromGitter | <ozturkberkay> can someone give a me practical use example for repr? |
18:44:41 | FromGitter | <ozturkberkay> give me a* |
18:53:08 | AlexMax | man, getting compiler stuff set up on windows is so inconvenient |
18:54:49 | AlexMax | "please use our magic batch file to set up your environment" |
18:55:00 | AlexMax | "Oh...you wanted to use an editor? Oh....." |
18:57:00 | * | Trustable quit (Remote host closed the connection) |
19:00:25 | seni | any particular reason why nim went with the syntax of types coming after the variable? just out of curiosity |
19:02:35 | * | stefanos82 quit (Quit: Quitting for now...) |
19:05:46 | * | phao quit (Quit: Leaving) |
19:06:27 | FromGitter | <zetashift> @seni probably because of Pascal, Nim hass a lot of influences of pascal |
19:06:30 | FromDiscord_ | <awr> in a variant is there a way to properly change the discriminator after it's been assigned? |
19:06:55 | FromDiscord_ | <awr> also if i had to guess @seni probably wirth influence |
19:10:44 | FromGitter | <drslump> @seni a technical reason is that with type inference the type becomes optional in many cases, and as a rule of thumb optional tokens are easier to parse if the come after since it reduces the required amount of look ahead for a grammar |
19:13:25 | * | thomasross__ is now known as thomasross |
19:13:32 | FromDiscord_ | <awr> if you make function header syntax consistent with variable type syntax (as nim does) it looks substantially cleaner than C |
19:14:32 | FromDiscord_ | <awr> `ReturnType functionName()` vs. `proc functionName(): ReturnType` |
19:47:24 | * | vosper joined #nim |
19:48:48 | FromDiscord_ | <awr> https://forum.nim-lang.org/t/3515#22005 |
19:48:52 | FromDiscord_ | <awr> :/ |
19:49:47 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
19:50:04 | * | Vladar quit (Remote host closed the connection) |
19:50:34 | FromDiscord_ | <awr> see I want something like reset() but my problem I have fields outside of my object variant that I don't want to reset |
19:50:40 | * | data-man joined #nim |
19:51:25 | FromDiscord_ | <awr> what I wish I could do is call reset() against the discriminator which would reset() *just* the case section |
19:55:27 | * | data-man quit (Ping timeout: 240 seconds) |
19:56:12 | * | data-man joined #nim |
19:59:03 | * | vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:02:15 | * | vosper joined #nim |
20:05:26 | Araq | awr: oooh, tough nut |
20:06:02 | Araq | create an RFC for that, it's possible but some work |
20:11:28 | Araq | but it would solve the problem I'm having in making this 100% memory-safe ... |
20:12:42 | zacharycarter[m] | wondering if anyone can provide any insight on whether this is expected behavior or not - https://gist.github.com/zacharycarter/f61be4127da3ec6efc9f3c2348b6469a |
20:14:13 | FromGitter | <kayabaNerve> zacharycarter[m]: What it does when you compile it = expected behavior |
20:14:24 | FromGitter | <kayabaNerve> 🤔 |
20:14:27 | Araq | temp8.nim(16, 41) Error: invalid indentation |
20:14:53 | Araq | zacharycarter[m]: the parser changed I guess |
20:15:43 | zacharycarter[m] | Araq: issue then? |
20:17:00 | zacharycarter[m] | kayabaNerve: heh, most of the time I'd say you're right |
20:18:00 | FromGitter | <kayabaNerve> It's really annoying to ask that. I wanted to ask if converters should work in nested types. ⏎ A) Bug ⏎ B) Unimplemented Feature ⏎ C) I'm using the feature wrong ⏎ D) Not a feature, screw off [https://gitter.im/nim-lang/Nim?at=5b7095f7196bc60b6bbde55f] |
20:18:37 | FromGitter | <kayabaNerve> Ara_q said the stdlib supported it via sequtils.mapLiterals so I said: Not supposed to be in the lang, is in the stdlib, and closed the issue. |
20:19:15 | FromGitter | <kayabaNerve> zacharycarter[m] What's the expected behavior when I call `echo 2`? |
20:19:42 | * | data-man quit (Read error: Connection reset by peer) |
20:19:43 | FromGitter | <kayabaNerve> https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/ac/ac9cf656c310fc500ebb845c8f6bb1f4cdfbe00d_full.jpg |
20:20:04 | zacharycarter[m] | so are you taking a jab at how I asked my question or how the question is answered? |
20:20:15 | FromGitter | <kayabaNerve> I just wanted to send Hyperthink :( Anyways. I have to go for a bit... See y'all later. |
20:20:33 | FromGitter | <kayabaNerve> A jab at the question itself because of how hard it is to ask/answer but it's a valid question. |
20:20:56 | zacharycarter[m] | ah okay - gotcha |
20:21:08 | FromGitter | <kayabaNerve> Then I made a joke about how asking about expected behavior can be 'abused' when you ask the expected behavior of really really simple things. |
20:21:20 | zacharycarter[m] | I gotcha |
20:21:26 | FromGitter | <kayabaNerve> Then I tried to send Hyperthink to symbolize it |
20:22:00 | zacharycarter[m] | yeah - I see what you mean, it is a thin line |
20:22:07 | zacharycarter[m] | either way - hope you enjoy the rest of your day / evening/ whatever it is where you are 😄 |
20:22:14 | * | seni quit (Quit: Leaving) |
20:22:59 | FromGitter | <kayabaNerve> Movie + Dinner with my mother who went out of town for a week. That said, she took my sister with her and I got peace and quiet for a week. I think it balanced out pretty well... |
20:23:07 | zacharycarter[m] | Araq: I figure you should be able to send in multiple pairs of idents|types |
20:24:03 | zacharycarter[m] | :) |
20:37:55 | FromGitter | <drslump> I'm a newbie trying to hack on compiler/semgnrc.nim to fix https://github.com/nim-lang/Nim/issues/8603, what's an agile flow to work on the compiler internals? `./koch boot -d:debug` speed is not bad but I hope there is some trick that can be used when doing minor changes to a module :) |
20:38:49 | FromDiscord_ | <exelotl> say I want to use this from inside a macro (e.g. call getAst on the result) |
20:39:11 | FromDiscord_ | <exelotl> template callMethod(name:untyped):untyped = obj.`name`() |
20:39:46 | FromDiscord_ | <exelotl> template callMethod(name:untyped):untyped = obj.\`name\`() |
20:40:10 | FromDiscord_ | <exelotl> how would I pass a name of my choosing? |
20:40:32 | FromGitter | <GULPF> @drslump `koch temp <args>` compiles the compiler in debug mode and sends <args> to it, don't think there's a faster way |
20:41:20 | FromDiscord_ | <exelotl> I've tried getAst callMethod(ident("doThing")) |
20:41:44 | FromGitter | <tim-st> @drslump I had a quick look at this, from what zah said, I would assume https://github.com/nim-lang/Nim/blob/a45faf2dd60f6474aa01b7cddd35d09ce329d6ce/compiler/semgnrc.nim#L325 should be replaced by `n.sons[i] = semGenericStmtScope(c, n.sons[i], flags+{withinMixin}, ctx)` but that's only a guess |
20:42:08 | FromGitter | <tim-st> otherwise I wouldnt consider it as beeing `easy` |
20:42:46 | FromGitter | <drslump> thanks @GULPF, I'll try with it |
20:44:14 | FromDiscord_ | <awr> https://github.com/nim-lang/Nim/issues/8623 |
20:46:59 | * | cspar joined #nim |
20:48:14 | FromGitter | <drslump> @tim-st thanks, I tried the `semGenericStmtScope` but it breaks the stdlib, it seems that bindings in`when` blocks are not scoped (makes sense). I'm going down the rabbit hole and I think I see some light but it's indeed not an easy task for a beginner in Nim :) |
20:48:30 | zacharycarter[m] | drslump: https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler |
20:48:56 | zacharycarter[m] | not sure if you've already read that or not |
20:49:26 | FromGitter | <tim-st> @drslump Thanks, it was also my impression that's not easy. Especially when I realized, that `when` is maybe not the problem, because `openArray[int]` works as parameter |
20:50:28 | FromGitter | <drslump> @zacharycarter thanks mate, I totally missed that wiki somehow 😳 |
20:51:40 | zacharycarter[m] | np |
20:57:19 | * | wildlander joined #nim |
21:02:48 | * | nsf quit (Quit: WeeChat 2.2) |
21:10:44 | * | yglukhov[i] quit (Remote host closed the connection) |
21:13:15 | FromGitter | <timotheecour> @ Araq or @dom96 any chance we can merge https://github.com/nim-lang/Nim/pull/8584 ? it was already approved |
21:14:27 | FromGitter | <tim-st> what is the default way to parse an int32 from string at start index? |
21:14:56 | FromGitter | <tim-st> (with good/best peformance) |
21:16:07 | FromDiscord_ | <awr> parseInt()? |
21:17:39 | FromGitter | <tim-st> I think parseInt looks at the string and try to parse at much as possible which fits in int64; I think I would need to wrap the string into StringStream and use `readInt32` |
21:17:56 | FromGitter | <tim-st> but dont know how much overhead StringStream has... |
21:21:08 | * | data-man joined #nim |
21:28:11 | * | ng0 joined #nim |
21:28:15 | * | vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:31:05 | * | miran quit (Ping timeout: 240 seconds) |
21:31:24 | * | yglukhov[i] joined #nim |
21:33:11 | * | vosper joined #nim |
21:36:18 | * | yglukhov[i] quit (Ping timeout: 272 seconds) |
21:39:44 | * | rockcavera joined #nim |
21:44:03 | * | data-man quit (Ping timeout: 260 seconds) |
21:59:01 | * | PMunch quit (Quit: leaving) |
22:04:44 | * | vosper quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:04:56 | Araq | Timothee: It's not that clean, why is it urgent? |
22:14:12 | * | data-man joined #nim |
22:29:17 | * | data-man quit (Read error: Connection reset by peer) |
22:30:16 | FromGitter | <timotheecour> which part is not clean? there is no more feedback on that review; it’s urgent because I have other upcoming PR’s that depend on it, and because it fixes pre-existing bugs. |
22:36:36 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
22:45:18 | * | vosper joined #nim |
22:48:16 | * | ftsf joined #nim |
22:49:00 | * | data-man joined #nim |
22:52:54 | * | PrimHelios joined #nim |
22:56:11 | FromGitter | <Clyybber> How would I convert an "ptr cstring" (an array of strings) to a seq? |
22:57:15 | FromGitter | <Clyybber> Provided I know the length of course |
23:06:15 | * | krux02 joined #nim |
23:16:06 | * | cloe12 joined #nim |
23:17:58 | * | cloe12 quit (Remote host closed the connection) |
23:28:25 | FromGitter | <Clyybber> Nevermind |
23:28:29 | FromGitter | <Clyybber> figured it out |
23:32:28 | * | data-man quit (Ping timeout: 244 seconds) |
23:39:50 | * | noonien quit (Quit: Connection closed for inactivity) |
23:42:46 | * | krux02 quit (Remote host closed the connection) |
23:48:23 | FromDiscord_ | <exelotl> so, it's not possible to turn a passed identifier into a string in a template? |
23:49:42 | vosper | Has anyone tried to use libsodium for encrypting a message with a key (crypto_secretbox_easy)? I feel like I'm missing something, because the password hashing functions from libsodium docs don't seem to be available, so I can't go from password string -> key of the correct length. I see that nimcrypto has pbkdf2 implemented, but I don't know how to use that with libsodium. |
23:49:52 | vosper | I am weak on crypto stuff... |