00:09:30 | * | yingjun joined #nim |
00:09:45 | * | smt joined #nim |
00:13:27 | * | yingjun quit (Ping timeout: 240 seconds) |
00:16:50 | * | PMunch quit (Quit: leaving) |
00:32:09 | * | smt quit (Read error: Connection reset by peer) |
00:34:32 | * | smt joined #nim |
01:14:07 | * | chemist69 quit (Ping timeout: 246 seconds) |
01:27:43 | * | chemist69 joined #nim |
01:47:34 | * | skrylar joined #nim |
01:54:27 | * | yglukhov joined #nim |
01:58:05 | FromGitter | <zacharycarter> 3d musings in frag today so far http://imgur.com/a/iLQbw |
01:58:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:59:47 | * | Hekaton joined #nim |
02:02:08 | * | Hekatonkiros quit (Ping timeout: 258 seconds) |
02:11:56 | * | yingjun joined #nim |
02:16:27 | * | yingjun quit (Ping timeout: 240 seconds) |
02:22:21 | skrylar | are those actual mac borders or a weird linux skin |
02:22:40 | ftsf | \o/ 3d! |
02:22:45 | skrylar | although i think their new ui guy flattened all the buttons so, meh |
02:22:47 | skrylar | \o/ 3d |
02:22:53 | ftsf | def-pri-pub, looks good, i'll give it a test |
02:23:12 | skrylar | need to update my opengl skillset actually :< |
02:23:22 | skrylar | only ever did a small amount of gl2. sadly GL2 is still relevant |
02:24:00 | FromGitter | <zacharycarter> those are actual mac borders |
02:24:09 | skrylar | shiny |
02:24:54 | def-pri-pub | ftsf: Please do it quick if you can. I'd like to get the new version of the package out within the next 20 minutes |
02:28:06 | * | daaf joined #nim |
02:30:12 | ftsf | trying to figure out how to get a patch out of gitlab |
02:32:06 | ftsf | def-pri-pub, cool, looks good. raises the exception on missing image, works correctly when the image is present. |
02:32:10 | ftsf | definitely an improvement. |
02:32:33 | skrylar | oh. poop. i finally realized why people don't always do hardware skinning |
02:32:44 | skrylar | works great for the gpu. doesn't work at all for the collision detector |
02:34:28 | ftsf | do you use skinning in your collision detection? |
02:35:09 | skrylar | well i don't do any of that 'cause i don't sell games. |
02:35:15 | skrylar | but yes a lot of people do |
02:35:58 | ftsf | hmm Shadow of the Colossus I guess |
02:36:38 | skrylar | fps games and action rpgs |
02:36:55 | ftsf | hmm mostly they use bounding box style hitboxes for collision detection. |
02:36:58 | skrylar | they animate hitboxes yeah |
02:37:03 | ftsf | and the animation skinning is just for show |
02:37:18 | skrylar | well you might have a cube attached to the limbs |
02:37:26 | skrylar | you'd still have to cpu skin *those* |
02:37:31 | skrylar | unless you have compute shaders |
02:37:39 | skrylar | which 8 year old computers don't iirc |
02:37:40 | ftsf | yeah you can get the output of the shader |
02:37:46 | ftsf | don't need compute shaders |
02:38:00 | ftsf | you can fake it with fragment shaders |
02:38:17 | ftsf | but on 8 year old computers you'd do software skinning anyway |
02:51:44 | def-pri-pub | ftsf: v1.3 should be on nimble now |
03:01:33 | * | daaf quit (Ping timeout: 258 seconds) |
03:03:53 | * | LeNsTR quit (Ping timeout: 246 seconds) |
03:13:19 | * | yingjun joined #nim |
03:14:44 | * | chemist69 quit (Ping timeout: 240 seconds) |
03:15:23 | ftsf | def-pri-pub, awesome, thanks |
03:17:25 | * | yingjun quit (Ping timeout: 240 seconds) |
03:19:41 | * | chemist69 joined #nim |
03:42:46 | * | pilne quit (Quit: Quitting!) |
03:56:23 | * | yglukhov joined #nim |
04:00:35 | * | yglukhov quit (Ping timeout: 246 seconds) |
04:16:39 | * | def-pri-pub quit (Quit: leaving) |
04:47:52 | * | vlad1777d joined #nim |
05:02:29 | * | Parashurama joined #nim |
05:18:49 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:43:45 | ftsf | seems nim syntax parsers all fail at 100'u32 type expressions. |
05:43:49 | ftsf | err highlighters |
05:44:01 | ftsf | noticed it on github too |
05:50:44 | * | yingjun joined #nim |
05:54:57 | * | yingjun quit (Ping timeout: 240 seconds) |
05:58:28 | * | yglukhov joined #nim |
06:03:27 | * | yglukhov quit (Ping timeout: 272 seconds) |
06:12:19 | * | Hekaton quit (Ping timeout: 272 seconds) |
06:29:09 | * | rauss quit (Quit: WeeChat 1.8) |
06:41:48 | ftsf | hmm nim-lang/sdl2 appears to be mostly autogenerated, would be good to include the code/commands to autogenerate it in the repo for updating. |
06:53:33 | skrylar | might just be c2nim |
06:54:06 | skrylar | i have a hand binding of nanovg. although i don't know if its better than fowl's |
06:54:18 | skrylar | also one of jack. but well. |
06:54:22 | skrylar | dunno how to get things in to nimble |
06:54:41 | skrylar | looks like we need gtk3 too ._. |
06:55:04 | ftsf | nimble publish |
06:55:08 | * | yingjun joined #nim |
06:57:47 | * | rokups joined #nim |
06:59:23 | * | yingjun quit (Ping timeout: 240 seconds) |
07:12:43 | * | arnetheduck joined #nim |
07:19:56 | * | Arrrr joined #nim |
07:19:56 | * | Arrrr quit (Changing host) |
07:19:56 | * | Arrrr joined #nim |
07:23:06 | * | yglukhov joined #nim |
07:24:30 | * | yglukhov quit (Remote host closed the connection) |
07:24:46 | * | yglukhov joined #nim |
07:27:02 | skrylar | alright, put the jack bindings on nimble |
07:27:30 | * | Andris_zbx joined #nim |
07:28:56 | * | couven92 joined #nim |
07:37:32 | * | yglukhov quit (Remote host closed the connection) |
07:45:55 | * | yglukhov joined #nim |
07:46:47 | rokups | best of both worlds constructors: https://gist.github.com/rokups/19f82c6ed8c55780e1c39837bd416182 |
07:57:41 | * | yglukhov quit (Remote host closed the connection) |
07:59:54 | * | yglukhov joined #nim |
08:01:15 | * | yglukhov quit (Remote host closed the connection) |
08:15:02 | skrylar | hmm. i don't see .ctor. in the nim docs |
08:15:59 | skrylar | oh. nvm. |
08:16:01 | skrylar | macro as a pragma. |
08:17:00 | * | benny_ joined #nim |
08:17:23 | rokups | be nice if it was in docs and in stdlib yeah.. |
08:17:43 | skrylar | i didn't read it very closely the first time |
08:20:12 | * | skrylar reads over the plist binding |
08:20:32 | skrylar | i know why people do this, but i wish they dropped the type prefixes on procs |
08:21:11 | rokups | you mean first typedesc parameter..? |
08:21:17 | skrylar | no i mean |
08:21:25 | skrylar | proc plist_dict_get_item*(node: plist_t...) |
08:21:44 | rokups | oh totally |
08:22:00 | skrylar | when i do them i drop the prefix because then nim will happilly do node.dict_get_item |
08:22:13 | skrylar | which you can then templatize with an operator, because nim is awesome |
08:22:16 | skrylar | *to an |
08:22:45 | skrylar | i've heard the case made you should keep bindings as close to C as possible so that the original docs and examples hold |
08:23:45 | rokups | also it kind of makes sense when its called like plist_dict_get_item(node, ...). Not so much in case of node.plist_dict_get_item(...). So one or the other suffers |
08:24:24 | skrylar | i guess one could always just put templates over them as aliases |
08:25:18 | skrylar | ported my cruddy tensors to nim finally. was happy that template was powerful enough to create some of the filler functions i was using m4 in c with |
08:27:23 | * | xet7 quit (Ping timeout: 240 seconds) |
08:38:14 | FromGitter | <Varriount> Hrm. The JSON module treats all object keys as strings... This is something of a deficiency |
08:40:37 | * | xet7 joined #nim |
08:46:26 | * | yglukhov joined #nim |
08:48:11 | * | yglukhov_ joined #nim |
08:48:11 | * | yglukhov quit (Read error: Connection reset by peer) |
08:52:41 | * | yglukhov_ quit (Read error: Connection reset by peer) |
08:53:14 | * | yglukhov joined #nim |
08:53:35 | * | yglukhov quit (Read error: Connection reset by peer) |
08:54:00 | * | gokr joined #nim |
08:54:06 | * | yglukhov joined #nim |
08:54:44 | * | yglukhov_ joined #nim |
08:56:55 | * | yingjun joined #nim |
08:57:01 | * | krux02 joined #nim |
08:58:53 | * | yglukhov quit (Ping timeout: 272 seconds) |
09:01:26 | * | krux02 quit (Remote host closed the connection) |
09:02:03 | * | yingjun quit (Ping timeout: 272 seconds) |
09:14:15 | * | Vladar joined #nim |
09:15:37 | * | krux02 joined #nim |
09:18:32 | * | krux02 quit (Remote host closed the connection) |
09:25:56 | * | krux02 joined #nim |
09:27:28 | * | athie quit (*.net *.split) |
09:27:29 | * | skrylar quit (*.net *.split) |
09:27:29 | * | dom96 quit (*.net *.split) |
09:27:30 | * | htnjns quit (*.net *.split) |
09:27:30 | * | def- quit (*.net *.split) |
09:29:55 | * | jonafato quit (Ping timeout: 240 seconds) |
09:30:35 | * | krux02 quit (Remote host closed the connection) |
09:32:39 | * | jonafato joined #nim |
09:50:04 | * | athie joined #nim |
09:56:54 | * | dom96 joined #nim |
10:13:33 | * | skrylar joined #nim |
10:13:33 | * | htnjns joined #nim |
10:13:33 | * | def- joined #nim |
10:14:01 | * | sh4m3 joined #nim |
10:16:19 | * | sh4m3 quit (Quit: leaving) |
10:21:51 | * | PMunch joined #nim |
10:23:40 | FromGitter | <ephja> ```proc `()`*(T: typedesc[Foo]): T = T(x: 1)``` ⏎ ⏎ ? :p [https://gitter.im/nim-lang/Nim?at=592d482c5e34568d5ea50b15] |
10:26:02 | FromGitter | <ephja> nah that won't work of course |
10:40:22 | FromGitter | <ephja> it would be nice to have a shortcut for something as common as this, but there are more important things to worry about |
10:40:46 | Arrrr | Why don't directly `proc `()`*(t: typedesc[Foo]): Foo = Foo(x: 1)` ? |
10:41:42 | Arrrr | `proc `()`*[T](t: typedesc[T]): T = T(x: 1)` also works, at least for 0.16 |
10:44:28 | FromGitter | <ephja> Arrrr: works, how? T() will still invoke the object constructor |
10:48:04 | Arrrr | Mm, you are right, it is actually calling the default const |
10:48:59 | Arrrr | On the other hand `()`(Foo) ... |
10:50:08 | * | skrylar quit (Ping timeout: 260 seconds) |
10:50:56 | * | Neomex joined #nim |
10:55:15 | FromGitter | <ephja> yes that works, but it's ugly |
11:02:47 | * | Snircle joined #nim |
11:05:50 | Arrrr | Beauty is in the eye of the beholder |
11:06:18 | Arrrr | Good lord, save me from `recursive module dependency` |
11:08:05 | FromGitter | <ephja> "echo ()(T, 1)" for example would not work because of operator precedence |
11:09:52 | FromGitter | <mratsim> You can do `proc xyzT: Foo (t: typedesc[T]): Foo` |
11:12:20 | FromGitter | <ephja> I would prefer that convention over what we have now |
11:13:27 | FromGitter | <mratsim> nothing prevents you from using it ;) |
11:14:16 | FromGitter | <ephja> I'll adhere to the official conventions for now |
11:14:50 | * | aziz joined #nim |
11:16:19 | FromGitter | <ephja> Anyway, that macro could also act as metadata for documentation generators and other things |
11:16:29 | FromGitter | <mratsim> Where did you find them? By the way, you are forced to use my alternative if Foo is an abstract type. You can’t do proc xyz(t: typedesc[int or float]): auto = |
11:28:43 | FromGitter | <ephja> well I've come close. I'm not sure if the limitations I've run into are bugs though |
11:38:31 | FromGitter | <ephja> @mratsim what limitations did you have in mind? how about this pattern: ⏎ ⏎ ```proc init[U](t: typedesc[T[U]], x: U): t = t(x: x)``` ⏎ ⏎ ? [https://gitter.im/nim-lang/Nim?at=592d59b738b37b98283b64e8] |
11:39:48 | FromGitter | <mratsim> I didn’t have any limitations though, you need to declare T as a Generic here by the way. |
11:40:18 | FromGitter | <ephja> T[U] = object |
11:40:19 | FromGitter | <mratsim> It seems like a pattern `classy`could cover |
11:41:23 | FromGitter | <mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=592d5a635e34568d5ea55bae] |
11:41:51 | FromGitter | <ephja> but it gets more complicated if you want to use a macro like the one posted earlier: https://gist.github.com/rokups/19f82c6ed8c55780e1c39837bd416182 |
11:42:40 | FromGitter | <ephja> rokups: do you want to discuss it on the forum? |
11:43:06 | FromGitter | <ephja> or maybe on github |
11:43:15 | * | krux02 joined #nim |
11:43:25 | FromGitter | <rokups> i need to catch up with the discussion |
11:45:35 | FromGitter | <rokups> this must be a continuation of earlier discussion eh? |
11:47:27 | FromGitter | <ephja> you're right |
11:47:51 | FromGitter | <rokups> no wonder i dont quite follow :) i am sure interested in constructor discussion though |
11:48:01 | * | chrisheller quit (Remote host closed the connection) |
11:48:12 | FromGitter | <mratsim> I was pulled in randomly as well ;) |
11:50:58 | FromGitter | <ephja> @rokups I found your post |
11:57:53 | FromGitter | <rokups> btw macro appears to work with `proc init(): int or float {.ctor.} = 1` |
11:59:27 | * | yingjun joined #nim |
12:00:21 | * | couven92 quit (Quit: Client disconnecting) |
12:04:14 | * | yingjun quit (Ping timeout: 268 seconds) |
12:21:35 | * | pilne joined #nim |
12:23:58 | * | xet7 quit (Ping timeout: 268 seconds) |
12:35:21 | * | xet7 joined #nim |
12:36:53 | krux02 | wasn't it that repr at runtime is supposed to be deprecated in the future? |
12:37:15 | * | Neomex quit (Quit: Leaving) |
12:37:48 | * | CcxWrk quit (Ping timeout: 240 seconds) |
13:11:41 | FromGitter | <zacharycarter> no lighting yet but - http://imgur.com/a/uC6Ox |
13:31:50 | SusWombat | zacharycarter lol why is the #fragworks room empty? |
13:32:12 | SusWombat | its on freenode right? |
13:34:45 | * | yglukhov_ quit (Remote host closed the connection) |
13:34:53 | FromGitter | <zacharycarter> We use gitter primarily |
13:35:21 | SusWombat | ah k |
13:35:31 | FromGitter | <zacharycarter> There should be a bot in there at least |
13:36:20 | * | yglukhov joined #nim |
13:39:44 | arnetheduck | Araq, https://github.com/nim-lang/Nim/pull/5818? |
13:40:50 | * | yglukhov quit (Ping timeout: 245 seconds) |
13:50:57 | krux02 | well is a string guaranteed to be 0 terminated? |
13:55:01 | * | yglukhov joined #nim |
13:55:06 | * | BitPuffin joined #nim |
14:02:53 | * | gokr quit (Ping timeout: 272 seconds) |
14:10:18 | * | rauss joined #nim |
14:13:26 | * | chrisheller joined #nim |
14:17:16 | FromGitter | <Varriount> krux02: All Nim strings will be null terminated, unless intentionally removed by unsafe means. |
14:17:37 | FromGitter | <Varriount> Er, unless the terminator is intentionally removed. |
14:23:32 | FromGitter | <krux02> Varriount: are you 100% sure? |
14:24:22 | FromGitter | <krux02> when I create a string with a literal like "abcdef" then it has length 6 but capacity 7 |
14:24:50 | FromGitter | <krux02> the extra capacity I would guess is for the terminating 0 |
14:25:08 | FromGitter | <krux02> put when I append a single character to the string then the length and the capacity is 7 |
14:25:17 | FromGitter | <krux02> that is a hint for a nasty bug |
14:25:25 | FromGitter | <krux02> I created an issue for it just now |
14:28:25 | * | gangstacat quit (Quit: Ĝis!) |
14:34:16 | FromGitter | <ephja> s[s.len] seems to evaluate to '\0' regardless |
14:43:22 | FromGitter | <ephja> the capacity is doubled or something every time it is reached, right? |
14:44:23 | FromGitter | <Varriount> Something like that, yes. |
14:57:20 | def- | ephja: https://github.com/nim-lang/Nim/blob/devel/lib/system/sysstr.nim#L18-L21 |
15:03:40 | FromGitter | <ephja> yeah I heard about that strategy before |
15:10:18 | * | nsf joined #nim |
15:15:45 | * | skrylar joined #nim |
15:17:02 | hohlerde | flyx here? |
15:17:16 | flyx | kinda |
15:17:39 | hohlerde | cool, tried your yaml package with 0.17.0 and got a compilation error |
15:17:56 | flyx | hmm, that's unfortunate. I didn't have time to test with 0.17.0 |
15:18:33 | hohlerde | just want to let you know. will try to prepare a small test app |
15:18:42 | hohlerde | with 0.16.1 it works |
15:23:03 | * | Etheco joined #nim |
15:23:08 | * | chemist69 quit (Ping timeout: 240 seconds) |
15:24:33 | shmup | ftsf: what do you think about this wrapper? seems pretty well done https://vladar4.github.io/sdl2_nim/ |
15:27:51 | ftsf | hey shmup i haven't tried that one. looks reasonably similar. |
15:28:20 | ftsf | looks like it's been updated with more recent functions at least |
15:28:24 | hohlerde | flyx: issue filed |
15:29:35 | ftsf | wonder how much effort it would be to port to that one |
15:33:06 | * | yglukhov quit (Remote host closed the connection) |
15:33:13 | flyx | hohlerde: hmm, seems like macros changed a bit. no trivial to fix. |
15:34:14 | flyx | I don't see any remark about that change in the release notes |
15:35:40 | * | gangstacat joined #nim |
15:35:52 | hohlerde | flyx: yeah, for now I am using 0.16.1, no big deal |
15:36:27 | hohlerde | flyx: btw, awesome lib |
15:36:38 | * | CcxWrk joined #nim |
15:41:16 | * | aziz quit (Quit: Ex-Chat) |
15:47:34 | * | Andris_zbx quit (Remote host closed the connection) |
15:50:17 | * | chemist69 joined #nim |
15:53:17 | * | yglukhov joined #nim |
15:58:13 | * | krux02 quit (Remote host closed the connection) |
16:02:37 | * | yingjun joined #nim |
16:05:01 | * | yglukhov quit (Remote host closed the connection) |
16:07:28 | * | yingjun quit (Ping timeout: 260 seconds) |
16:08:29 | shmup | ftsf: it seems to me like people should put effort into getting nim-lang/sdl2 more caught up? |
16:08:48 | FromGitter | <zacharycarter> I use nim-lang/sdl2 for frag |
16:08:49 | FromGitter | <zacharycarter> it's fine IMO |
16:09:17 | shmup | the reason ftsf forked nim-lang's is because of a missing feature I think |
16:09:27 | shmup | and the reason vladar4's port exists is because nim-lang didn't have sdl2 at the time |
16:09:42 | shmup | and now here we are |
16:09:45 | def- | shmup: yeah, would be really nice to merge them all so that people don't duplicate work |
16:09:46 | FromGitter | <ephja> both are quite low level, right? |
16:09:53 | FromGitter | <ephja> <shameless nim-glfw plug> |
16:10:34 | FromGitter | <zacharycarter> glfw has pretty poor mobile support |
16:10:42 | FromGitter | <ephja> I see |
16:11:28 | FromGitter | <zacharycarter> I don't think they need to be merged - it's advisable IMO to use the official bindings unless you have a strong reason not to |
16:11:52 | FromGitter | <zacharycarter> and if something is missing from them PR it |
16:12:40 | shmup | ftsf: yeah, about that, did you make pull requests to nim-lang for your sdl2 changes? |
16:12:57 | shmup | https://github.com/nim-lang/sdl2/pull/92 |
16:12:58 | shmup | ok yes you did |
16:13:45 | shmup | I really like Vladar4's work in this area though. he is very efficient: https://github.com/Vladar4/sdl2_nim/tree/master/examples |
16:14:02 | shmup | not to mention he included a buncha extra sdl stuff |
16:14:27 | FromGitter | <zacharycarter> would be nice if he PR'd it to the official bindings but I also understand his reulctance to |
16:14:30 | FromGitter | <zacharycarter> reluctance* |
16:15:07 | shmup | regarding ftsf's PR? isn't it? |
16:15:24 | shmup | or Vladar |
16:15:25 | FromGitter | <zacharycarter> oh I just meant the extra stuff Vladar has exposed / documented / added examples for |
16:15:42 | shmup | ah, yeah |
16:15:47 | FromGitter | <zacharycarter> I use SDL2 but very little of it |
16:15:55 | FromGitter | <zacharycarter> only for windowing / input |
16:16:08 | FromGitter | <zacharycarter> I know a lot of folks use it a lot more heavily than that |
16:16:58 | FromGitter | <zacharycarter> so it makes sense why his bindings are more attractive to the community, but we should probably work to improve the official ones is all I think |
16:17:06 | benny_ | if slicing arrays in nim is expensive, how Do I avoid this? |
16:19:07 | def- | benny_: pass the entire thing by reference and use indices? |
16:19:31 | benny_ | When I slice, I create a different array? |
16:19:52 | benny_ | How do I pass by reference on nim? |
16:23:17 | * | Trustable joined #nim |
16:24:48 | FromGitter | <Varriount> benny_: Parameters pass by reference automatically |
16:24:59 | Arrrr | What do you actually need to solve by using slices? |
16:25:25 | benny_ | Just want to improve my merge sort, I had no time to work on it |
16:25:35 | benny_ | can someone modify my gist and fix my newbies errors? |
16:25:44 | def- | benny_: sure, give me the gist again |
16:25:44 | FromGitter | <Varriount> benny_: For the merge sort, I had a crack at it. |
16:25:45 | benny_ | no "errors" |
16:26:01 | benny_ | https://gist.github.com/Bennyelg/da85a34c535f16d94633f494ed4720c4 |
16:26:30 | FromGitter | <Varriount> benny_: In general, do modifications in-place, pass the entire array in rather than a slice, and use a slice object (created by the `..` operator) as a secondary argument |
16:26:34 | benny_ | this merge_sort is working but I want to improve performance with all the swiss knifes nim has. |
16:27:47 | * | rokups quit (Quit: Connection closed for inactivity) |
16:28:02 | FromGitter | <cooldome> hi |
16:28:18 | FromGitter | <zacharycarter> hi @cooldome |
16:29:57 | FromGitter | <cooldome> Thanks for reply, I am just forced to read the chat from the phone and sometimes miss click buttons |
16:30:18 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
16:32:25 | def- | benny_: if I keep optimizing this it ends up looking like the implementation from Nim's stdlib that Araq pointed you to |
16:32:34 | def- | benny_: not sure at what point inbetween you want to stop |
16:33:22 | * | Lord_Nightmare joined #nim |
16:37:53 | def- | benny_: or this one: https://github.com/def-/nim-unsorted/blob/master/mergesort.nim |
16:37:55 | * | arnetheduck quit (Ping timeout: 240 seconds) |
16:44:25 | * | murych joined #nim |
16:44:27 | shmup | I think I could pr easily do a thing in irssi that turned < FromGitter> <bright white nick> to <bright white nick> |
16:44:37 | shmup | so I don't have to care about where the message came from, but the bright white nick would tell me sorta |
16:45:07 | Arrrr | What's the difference between that version and this one? https://forum.nim-lang.org/t/1071#6550 |
16:45:13 | * | CcxWrk quit (Read error: Connection reset by peer) |
16:45:19 | Arrrr | ups, this one is a quicksort |
16:45:30 | Arrrr | I still keep this sort |
16:45:46 | * | CcxWrk joined #nim |
16:46:38 | * | StarBrilliant quit (Quit: ZNC - http://znc.in) |
16:52:43 | * | yglukhov joined #nim |
16:57:01 | * | yglukhov quit (Ping timeout: 246 seconds) |
17:09:08 | * | PMunch quit (Quit: leaving) |
17:14:38 | * | benny__ joined #nim |
17:16:34 | * | benny_ quit (Ping timeout: 255 seconds) |
17:28:39 | * | chemist69 quit (Ping timeout: 258 seconds) |
17:31:38 | * | chemist69 joined #nim |
17:33:49 | * | rokups joined #nim |
17:52:16 | flyx | the statement macro from tut2 does not compile anymore with 0.17.0 ( https://nim-lang.org/docs/tut2.html#macros-statement-macros ) |
17:57:21 | flyx | created an issue. https://github.com/nim-lang/Nim/issues/5918 |
18:01:15 | * | benny__ quit (Ping timeout: 245 seconds) |
18:03:46 | * | Matthias247 joined #nim |
18:04:21 | * | yingjun joined #nim |
18:05:53 | Lord_Nightmare | flyx: i think the tutorial flaw has been posted before, check open issues |
18:06:31 | Lord_Nightmare | I'm not sure if someone created an issue for it before you though, but people mentioned it or a similar issue with an example somewhere in here a few times over the past week or so |
18:08:27 | * | yingjun quit (Ping timeout: 240 seconds) |
18:14:56 | FromGitter | <dandevelop> Can I specify how my function name will be generated in the C code? Is there anything that I can do using .emit when declaring the function? |
18:16:40 | demi- | `exportc` |
18:17:03 | demi- | that will specify the symbol name the function will generate with |
18:21:45 | * | yglukhov joined #nim |
18:21:54 | FromGitter | <dandevelop> Thank you demi! |
18:23:19 | demi- | be sure to look at the other pragmas defined in the manual too: https://nim-lang.org/docs/manual.html#pragmas |
18:24:46 | FromGitter | <dandevelop> That's helpful. Thanks! |
18:47:12 | * | Arrrr quit (Quit: Leaving.) |
18:54:23 | * | vlad1777d quit (Remote host closed the connection) |
18:57:40 | * | pilne quit (Remote host closed the connection) |
19:02:40 | * | yglukhov quit (Remote host closed the connection) |
19:14:02 | * | yglukhov joined #nim |
19:29:08 | * | SusWombat quit (Remote host closed the connection) |
19:30:33 | * | pilne joined #nim |
19:35:59 | * | chemist69 quit (Ping timeout: 255 seconds) |
19:36:06 | ehmry | what is a clean way to convert a buffer pointer and a len to a string? |
19:40:26 | * | chemist69 joined #nim |
19:42:25 | * | SusWombat joined #nim |
19:48:05 | * | Parashurama quit (Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170509210144]) |
19:48:43 | FromGitter | <ephja> ehmry: ```nim ⏎ let len = 10 ⏎ var p = alloc(10) ⏎ var s = newStringOfCap(len) ⏎ for i in 0 .. <len: s.add castptr array[0xffff, char (p)[i] ... [https://gitter.im/nim-lang/Nim?at=592dcc9b631b8e4e612aa9f1] |
19:49:52 | ehmry | I ended up using ``copyMem`` |
19:49:57 | FromGitter | <ephja> oops. wrong markdown syntax |
19:51:06 | ehmry | meh, we're passing markdown from gitter to matrix and back over IRC |
19:56:52 | skrylar | someone is doing things with matrix? |
19:56:59 | skrylar | i thought that system was a neat idea that was doomed to failure |
19:57:43 | ehmry | skrylar: why do you say that? I can see the history ballooning out of control |
19:59:02 | skrylar | ehmry, because it was neat and simple when i checked it out and people are allergic to neat and simple lol |
19:59:14 | skrylar | they have to have overcomplicated and annoying before they will adopt it XD |
19:59:28 | ehmry | its true |
19:59:50 | FromGitter | <ephja> copyMem might be better in this case. it's not ideal but safer alternatives should be possible with concepts |
20:01:24 | skrylar | would anyone happen to know if nim macros can replace say, type declarations without looking too weird? |
20:01:53 | skrylar | might not have to though. was just pondering a way to introspect structs for something like blender's dna file format or that one abandoned apache thing |
20:03:06 | * | smt quit (Read error: Connection reset by peer) |
20:03:31 | * | smt joined #nim |
20:04:11 | FromGitter | <ephja> you don't need to bundle the introspection with the type creation |
20:05:50 | FromGitter | <ephja> skrylar: https://nim-lang.org/docs/typeinfo.html, https://nim-lang.org/docs/macros.html#getType,NimNode |
20:08:23 | FromGitter | <dandevelop> Is there any way to have properties with getters and setters and Nim? Maybe something with meta programming? Ideally it would be something like: button.Text = "Ok" and this would call a function to do the actual work |
20:09:11 | skrylar | dandevelop, nim will just use functions for it |
20:09:22 | skrylar | proc foo(): bar # i am a getter by default |
20:10:04 | skrylar | proc `foo=`(value: bar) # i am a setter |
20:10:05 | FromGitter | <ephja> don't you need a parameter for it to be considered a getter? |
20:10:13 | skrylar | yes but, well. brevity |
20:10:20 | FromGitter | <ephja> right |
20:10:23 | skrylar | though technically no, nim will let you call that on its own |
20:10:36 | skrylar | change_the_sheets # technically valid? |
20:10:59 | FromGitter | <dandevelop> Not sure I understand it. Sorry about this, I am new to Nim. How would this work to pass the "Ok" parameter to some SetText function when I do button.Text = "Ok" ? |
20:11:10 | FromGitter | <ephja> it doesn't evaluate to a proc? |
20:11:31 | skrylar | proc `text=`(self: var button, value: string) |
20:12:06 | * | rokups quit (Quit: Connection closed for inactivity) |
20:12:06 | skrylar | nim does a lot of syntactic sugar, so when you say foo.bar = baz nim will actually treat it as `bar=`(foo, baz) |
20:16:12 | FromGitter | <dandevelop> Would it be something like this? |
20:16:16 | * | Vladar quit (Quit: Leaving) |
20:16:18 | FromGitter | <dandevelop> type ⏎ ⏎ ```button.theText = value``` [https://gitter.im/nim-lang/Nim?at=592dd31200efc2bb3ebdb692] |
20:19:08 | FromGitter | <dandevelop> This actually doesn't compile, it is just out of the top of my head |
20:22:52 | FromGitter | <dandevelop> skrylar: is there a self keywod in nim? |
20:23:25 | * | benny_ joined #nim |
20:23:27 | skrylar | "yes" |
20:23:45 | skrylar | the long answer is that its whatever the first parameter of your function is. |
20:23:59 | skrylar | you usually name that self (or 'this', i suppose, nim doesn't care.) |
20:24:17 | skrylar | there is a {.this:self.} pragma that sets an implicit self |
20:24:29 | FromGitter | <dandevelop> type ⏎ ⏎ ```self.theText = value``` ⏎ ⏎ var button:TButton ... [https://gitter.im/nim-lang/Nim?at=592dd4fc631b8e4e612ad0dd] |
20:24:37 | FromGitter | <dandevelop> This is what I tried |
20:25:12 | skrylar | i was told we stopped calling things TType |
20:25:26 | skrylar | i think you forgot the backquotes around `text=` |
20:26:03 | FromGitter | <dandevelop> How would that look like? |
20:26:32 | FromGitter | <dandevelop> Again, sorry for asking these dumb questions. I am new to nim. |
20:28:48 | skrylar | i suspect the chatbot is eating the ticks |
20:29:51 | skrylar | there is a backtick before the t and a backtick after the = |
20:29:52 | FromGitter | <dandevelop> Maybe something like https://pastebin.com/ would work for this? |
20:30:41 | demi- | it might be the chatbot or gitter (since it tries to present rendered markdown) |
20:30:42 | * | yglukhov quit (Remote host closed the connection) |
20:31:04 | * | yglukhov joined #nim |
20:31:05 | * | skrylar should do a udemy course on nim >.< |
20:31:46 | * | yglukhov quit (Remote host closed the connection) |
20:32:06 | FromGitter | <dandevelop> skrylar: if you could write the proc definition on something like pastebin or similar, that would be really appreciated |
20:34:40 | * | rauss quit (Quit: WeeChat 1.8) |
20:35:48 | skrylar | dandevelop, http://ix.io/vOm |
20:38:29 | FromGitter | <dandevelop> That's exactly what I wanted! Thanks a lot skrylar! |
20:38:59 | * | gokr joined #nim |
20:39:30 | * | Trustable quit (Remote host closed the connection) |
20:50:52 | skrylar | huh. i didn't know keynote exported animated videos. |
21:14:54 | skrylar | bleh. finally caught up to the neural network porting |
21:24:34 | * | Jesin quit (Quit: Leaving) |
21:43:47 | * | chemist69 quit (Ping timeout: 260 seconds) |
21:45:11 | * | lenstr joined #nim |
21:46:20 | * | Jesin joined #nim |
21:48:06 | * | chemist69 joined #nim |
22:06:06 | * | xet7_ joined #nim |
22:07:14 | * | yingjun joined #nim |
22:08:32 | * | xet7 quit (Ping timeout: 260 seconds) |
22:11:27 | * | yingjun quit (Ping timeout: 240 seconds) |
22:17:58 | * | libman joined #nim |
22:20:06 | libman | Random thought of the day: would it be a good idea to create a second Nim IRC channel for n00bs (and, like myself, n00bs willing to try to help other n00bs)? |
22:20:13 | * | nsf quit (Quit: WeeChat 1.7.1) |
22:30:17 | * | Jesin quit (Quit: Leaving) |
22:32:51 | * | daaf joined #nim |
22:37:06 | * | Etheco quit (Quit: Leaving) |
22:44:22 | * | def-pri-pub joined #nim |
22:44:22 | * | def-pri-pub quit (Changing host) |
22:44:22 | * | def-pri-pub joined #nim |
23:07:06 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:31:16 | * | gokr quit (Quit: Leaving.) |
23:36:45 | * | skrylar quit (Ping timeout: 268 seconds) |
23:47:31 | * | benny__ joined #nim |
23:47:31 | * | benny_ quit (Read error: Connection reset by peer) |
23:49:14 | * | benny_ joined #nim |
23:49:14 | * | benny__ quit (Read error: Connection reset by peer) |
23:51:17 | * | chemist69 quit (Ping timeout: 246 seconds) |
23:53:56 | * | chemist69 joined #nim |