<< 30-05-2017 >>

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:05FromGitter<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:21skrylarare those actual mac borders or a weird linux skin
02:22:40ftsf\o/ 3d!
02:22:45skrylaralthough i think their new ui guy flattened all the buttons so, meh
02:22:47skrylar\o/ 3d
02:22:53ftsfdef-pri-pub, looks good, i'll give it a test
02:23:12skrylarneed to update my opengl skillset actually :<
02:23:22skrylaronly ever did a small amount of gl2. sadly GL2 is still relevant
02:24:00FromGitter<zacharycarter> those are actual mac borders
02:24:09skrylarshiny
02:24:54def-pri-pubftsf: 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:12ftsftrying to figure out how to get a patch out of gitlab
02:32:06ftsfdef-pri-pub, cool, looks good. raises the exception on missing image, works correctly when the image is present.
02:32:10ftsfdefinitely an improvement.
02:32:33skrylaroh. poop. i finally realized why people don't always do hardware skinning
02:32:44skrylarworks great for the gpu. doesn't work at all for the collision detector
02:34:28ftsfdo you use skinning in your collision detection?
02:35:09skrylarwell i don't do any of that 'cause i don't sell games.
02:35:15skrylarbut yes a lot of people do
02:35:58ftsfhmm Shadow of the Colossus I guess
02:36:38skrylarfps games and action rpgs
02:36:55ftsfhmm mostly they use bounding box style hitboxes for collision detection.
02:36:58skrylarthey animate hitboxes yeah
02:37:03ftsfand the animation skinning is just for show
02:37:18skrylarwell you might have a cube attached to the limbs
02:37:26skrylaryou'd still have to cpu skin *those*
02:37:31skrylarunless you have compute shaders
02:37:39skrylarwhich 8 year old computers don't iirc
02:37:40ftsfyeah you can get the output of the shader
02:37:46ftsfdon't need compute shaders
02:38:00ftsfyou can fake it with fragment shaders
02:38:17ftsfbut on 8 year old computers you'd do software skinning anyway
02:51:44def-pri-pubftsf: 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:23ftsfdef-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:45ftsfseems nim syntax parsers all fail at 100'u32 type expressions.
05:43:49ftsferr highlighters
05:44:01ftsfnoticed 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:48ftsfhmm 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:33skrylarmight just be c2nim
06:54:06skrylari have a hand binding of nanovg. although i don't know if its better than fowl's
06:54:18skrylaralso one of jack. but well.
06:54:22skrylardunno how to get things in to nimble
06:54:41skrylarlooks like we need gtk3 too ._.
06:55:04ftsfnimble 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:02skrylaralright, 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:47rokupsbest 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:02skrylarhmm. i don't see .ctor. in the nim docs
08:15:59skrylaroh. nvm.
08:16:01skrylarmacro as a pragma.
08:17:00*benny_ joined #nim
08:17:23rokupsbe nice if it was in docs and in stdlib yeah..
08:17:43skrylari didn't read it very closely the first time
08:20:12*skrylar reads over the plist binding
08:20:32skrylari know why people do this, but i wish they dropped the type prefixes on procs
08:21:11rokupsyou mean first typedesc parameter..?
08:21:17skrylarno i mean
08:21:25skrylarproc plist_dict_get_item*(node: plist_t...)
08:21:44rokupsoh totally
08:22:00skrylarwhen i do them i drop the prefix because then nim will happilly do node.dict_get_item
08:22:13skrylarwhich you can then templatize with an operator, because nim is awesome
08:22:16skrylar*to an
08:22:45skrylari'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:45rokupsalso 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:24skrylari guess one could always just put templates over them as aliases
08:25:18skrylarported 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:14FromGitter<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:40FromGitter<ephja> ```proc `()`*(T: typedesc[Foo]): T = T(x: 1)``` ⏎ ⏎ ? :p [https://gitter.im/nim-lang/Nim?at=592d482c5e34568d5ea50b15]
10:26:02FromGitter<ephja> nah that won't work of course
10:40:22FromGitter<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:46ArrrrWhy don't directly `proc `()`*(t: typedesc[Foo]): Foo = Foo(x: 1)` ?
10:41:42Arrrr`proc `()`*[T](t: typedesc[T]): T = T(x: 1)` also works, at least for 0.16
10:44:28FromGitter<ephja> Arrrr: works, how? T() will still invoke the object constructor
10:48:04ArrrrMm, you are right, it is actually calling the default const
10:48:59ArrrrOn the other hand `()`(Foo) ...
10:50:08*skrylar quit (Ping timeout: 260 seconds)
10:50:56*Neomex joined #nim
10:55:15FromGitter<ephja> yes that works, but it's ugly
11:02:47*Snircle joined #nim
11:05:50ArrrrBeauty is in the eye of the beholder
11:06:18ArrrrGood lord, save me from `recursive module dependency`
11:08:05FromGitter<ephja> "echo ()(T, 1)" for example would not work because of operator precedence
11:09:52FromGitter<mratsim> You can do `proc xyzT: Foo (t: typedesc[T]): Foo`
11:12:20FromGitter<ephja> I would prefer that convention over what we have now
11:13:27FromGitter<mratsim> nothing prevents you from using it ;)
11:14:16FromGitter<ephja> I'll adhere to the official conventions for now
11:14:50*aziz joined #nim
11:16:19FromGitter<ephja> Anyway, that macro could also act as metadata for documentation generators and other things
11:16:29FromGitter<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:43FromGitter<ephja> well I've come close. I'm not sure if the limitations I've run into are bugs though
11:38:31FromGitter<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:48FromGitter<mratsim> I didn’t have any limitations though, you need to declare T as a Generic here by the way.
11:40:18FromGitter<ephja> T[U] = object
11:40:19FromGitter<mratsim> It seems like a pattern `classy`could cover
11:41:23FromGitter<mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=592d5a635e34568d5ea55bae]
11:41:51FromGitter<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:40FromGitter<ephja> rokups: do you want to discuss it on the forum?
11:43:06FromGitter<ephja> or maybe on github
11:43:15*krux02 joined #nim
11:43:25FromGitter<rokups> i need to catch up with the discussion
11:45:35FromGitter<rokups> this must be a continuation of earlier discussion eh?
11:47:27FromGitter<ephja> you're right
11:47:51FromGitter<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:12FromGitter<mratsim> I was pulled in randomly as well ;)
11:50:58FromGitter<ephja> @rokups I found your post
11:57:53FromGitter<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:53krux02wasn'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:41FromGitter<zacharycarter> no lighting yet but - http://imgur.com/a/uC6Ox
13:31:50SusWombatzacharycarter lol why is the #fragworks room empty?
13:32:12SusWombatits on freenode right?
13:34:45*yglukhov_ quit (Remote host closed the connection)
13:34:53FromGitter<zacharycarter> We use gitter primarily
13:35:21SusWombatah k
13:35:31FromGitter<zacharycarter> There should be a bot in there at least
13:36:20*yglukhov joined #nim
13:39:44arnetheduckAraq, https://github.com/nim-lang/Nim/pull/5818?
13:40:50*yglukhov quit (Ping timeout: 245 seconds)
13:50:57krux02well 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:16FromGitter<Varriount> krux02: All Nim strings will be null terminated, unless intentionally removed by unsafe means.
14:17:37FromGitter<Varriount> Er, unless the terminator is intentionally removed.
14:23:32FromGitter<krux02> Varriount: are you 100% sure?
14:24:22FromGitter<krux02> when I create a string with a literal like "abcdef" then it has length 6 but capacity 7
14:24:50FromGitter<krux02> the extra capacity I would guess is for the terminating 0
14:25:08FromGitter<krux02> put when I append a single character to the string then the length and the capacity is 7
14:25:17FromGitter<krux02> that is a hint for a nasty bug
14:25:25FromGitter<krux02> I created an issue for it just now
14:28:25*gangstacat quit (Quit: Ĝis!)
14:34:16FromGitter<ephja> s[s.len] seems to evaluate to '\0' regardless
14:43:22FromGitter<ephja> the capacity is doubled or something every time it is reached, right?
14:44:23FromGitter<Varriount> Something like that, yes.
14:57:20def-ephja: https://github.com/nim-lang/Nim/blob/devel/lib/system/sysstr.nim#L18-L21
15:03:40FromGitter<ephja> yeah I heard about that strategy before
15:10:18*nsf joined #nim
15:15:45*skrylar joined #nim
15:17:02hohlerdeflyx here?
15:17:16flyxkinda
15:17:39hohlerdecool, tried your yaml package with 0.17.0 and got a compilation error
15:17:56flyxhmm, that's unfortunate. I didn't have time to test with 0.17.0
15:18:33hohlerdejust want to let you know. will try to prepare a small test app
15:18:42hohlerdewith 0.16.1 it works
15:23:03*Etheco joined #nim
15:23:08*chemist69 quit (Ping timeout: 240 seconds)
15:24:33shmupftsf: what do you think about this wrapper? seems pretty well done https://vladar4.github.io/sdl2_nim/
15:27:51ftsfhey shmup i haven't tried that one. looks reasonably similar.
15:28:20ftsflooks like it's been updated with more recent functions at least
15:28:24hohlerdeflyx: issue filed
15:29:35ftsfwonder how much effort it would be to port to that one
15:33:06*yglukhov quit (Remote host closed the connection)
15:33:13flyxhohlerde: hmm, seems like macros changed a bit. no trivial to fix.
15:34:14flyxI don't see any remark about that change in the release notes
15:35:40*gangstacat joined #nim
15:35:52hohlerdeflyx: yeah, for now I am using 0.16.1, no big deal
15:36:27hohlerdeflyx: 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:29shmupftsf: it seems to me like people should put effort into getting nim-lang/sdl2 more caught up?
16:08:48FromGitter<zacharycarter> I use nim-lang/sdl2 for frag
16:08:49FromGitter<zacharycarter> it's fine IMO
16:09:17shmupthe reason ftsf forked nim-lang's is because of a missing feature I think
16:09:27shmupand the reason vladar4's port exists is because nim-lang didn't have sdl2 at the time
16:09:42shmupand now here we are
16:09:45def-shmup: yeah, would be really nice to merge them all so that people don't duplicate work
16:09:46FromGitter<ephja> both are quite low level, right?
16:09:53FromGitter<ephja> <shameless nim-glfw plug>
16:10:34FromGitter<zacharycarter> glfw has pretty poor mobile support
16:10:42FromGitter<ephja> I see
16:11:28FromGitter<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:52FromGitter<zacharycarter> and if something is missing from them PR it
16:12:40shmupftsf: yeah, about that, did you make pull requests to nim-lang for your sdl2 changes?
16:12:57shmuphttps://github.com/nim-lang/sdl2/pull/92
16:12:58shmupok yes you did
16:13:45shmupI really like Vladar4's work in this area though. he is very efficient: https://github.com/Vladar4/sdl2_nim/tree/master/examples
16:14:02shmupnot to mention he included a buncha extra sdl stuff
16:14:27FromGitter<zacharycarter> would be nice if he PR'd it to the official bindings but I also understand his reulctance to
16:14:30FromGitter<zacharycarter> reluctance*
16:15:07shmupregarding ftsf's PR? isn't it?
16:15:24shmupor Vladar
16:15:25FromGitter<zacharycarter> oh I just meant the extra stuff Vladar has exposed / documented / added examples for
16:15:42shmupah, yeah
16:15:47FromGitter<zacharycarter> I use SDL2 but very little of it
16:15:55FromGitter<zacharycarter> only for windowing / input
16:16:08FromGitter<zacharycarter> I know a lot of folks use it a lot more heavily than that
16:16:58FromGitter<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:06benny_if slicing arrays in nim is expensive, how Do I avoid this?
16:19:07def-benny_: pass the entire thing by reference and use indices?
16:19:31benny_When I slice, I create a different array?
16:19:52benny_How do I pass by reference on nim?
16:23:17*Trustable joined #nim
16:24:48FromGitter<Varriount> benny_: Parameters pass by reference automatically
16:24:59ArrrrWhat do you actually need to solve by using slices?
16:25:25benny_Just want to improve my merge sort, I had no time to work on it
16:25:35benny_can someone modify my gist and fix my newbies errors?
16:25:44def-benny_: sure, give me the gist again
16:25:44FromGitter<Varriount> benny_: For the merge sort, I had a crack at it.
16:25:45benny_no "errors"
16:26:01benny_https://gist.github.com/Bennyelg/da85a34c535f16d94633f494ed4720c4
16:26:30FromGitter<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:34benny_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:02FromGitter<cooldome> hi
16:28:18FromGitter<zacharycarter> hi @cooldome
16:29:57FromGitter<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:25def-benny_: if I keep optimizing this it ends up looking like the implementation from Nim's stdlib that Araq pointed you to
16:32:34def-benny_: not sure at what point inbetween you want to stop
16:33:22*Lord_Nightmare joined #nim
16:37:53def-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:27shmupI think I could pr easily do a thing in irssi that turned < FromGitter> <bright white nick> to <bright white nick>
16:44:37shmupso I don't have to care about where the message came from, but the bright white nick would tell me sorta
16:45:07ArrrrWhat'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:19Arrrrups, this one is a quicksort
16:45:30ArrrrI 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:16flyxthe statement macro from tut2 does not compile anymore with 0.17.0 ( https://nim-lang.org/docs/tut2.html#macros-statement-macros )
17:57:21flyxcreated 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:53Lord_Nightmareflyx: i think the tutorial flaw has been posted before, check open issues
18:06:31Lord_NightmareI'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:56FromGitter<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:40demi-`exportc`
18:17:03demi-that will specify the symbol name the function will generate with
18:21:45*yglukhov joined #nim
18:21:54FromGitter<dandevelop> Thank you demi!
18:23:19demi-be sure to look at the other pragmas defined in the manual too: https://nim-lang.org/docs/manual.html#pragmas
18:24:46FromGitter<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:06ehmrywhat 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:43FromGitter<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:52ehmryI ended up using ``copyMem``
19:49:57FromGitter<ephja> oops. wrong markdown syntax
19:51:06ehmrymeh, we're passing markdown from gitter to matrix and back over IRC
19:56:52skrylarsomeone is doing things with matrix?
19:56:59skrylari thought that system was a neat idea that was doomed to failure
19:57:43ehmryskrylar: why do you say that? I can see the history ballooning out of control
19:59:02skrylarehmry, because it was neat and simple when i checked it out and people are allergic to neat and simple lol
19:59:14skrylarthey have to have overcomplicated and annoying before they will adopt it XD
19:59:28ehmryits true
19:59:50FromGitter<ephja> copyMem might be better in this case. it's not ideal but safer alternatives should be possible with concepts
20:01:24skrylarwould anyone happen to know if nim macros can replace say, type declarations without looking too weird?
20:01:53skrylarmight 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:11FromGitter<ephja> you don't need to bundle the introspection with the type creation
20:05:50FromGitter<ephja> skrylar: https://nim-lang.org/docs/typeinfo.html, https://nim-lang.org/docs/macros.html#getType,NimNode
20:08:23FromGitter<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:11skrylardandevelop, nim will just use functions for it
20:09:22skrylarproc foo(): bar # i am a getter by default
20:10:04skrylarproc `foo=`(value: bar) # i am a setter
20:10:05FromGitter<ephja> don't you need a parameter for it to be considered a getter?
20:10:13skrylaryes but, well. brevity
20:10:20FromGitter<ephja> right
20:10:23skrylarthough technically no, nim will let you call that on its own
20:10:36skrylarchange_the_sheets # technically valid?
20:10:59FromGitter<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:10FromGitter<ephja> it doesn't evaluate to a proc?
20:11:31skrylarproc `text=`(self: var button, value: string)
20:12:06*rokups quit (Quit: Connection closed for inactivity)
20:12:06skrylarnim does a lot of syntactic sugar, so when you say foo.bar = baz nim will actually treat it as `bar=`(foo, baz)
20:16:12FromGitter<dandevelop> Would it be something like this?
20:16:16*Vladar quit (Quit: Leaving)
20:16:18FromGitter<dandevelop> type ⏎ ⏎ ```button.theText = value``` [https://gitter.im/nim-lang/Nim?at=592dd31200efc2bb3ebdb692]
20:19:08FromGitter<dandevelop> This actually doesn't compile, it is just out of the top of my head
20:22:52FromGitter<dandevelop> skrylar: is there a self keywod in nim?
20:23:25*benny_ joined #nim
20:23:27skrylar"yes"
20:23:45skrylarthe long answer is that its whatever the first parameter of your function is.
20:23:59skrylaryou usually name that self (or 'this', i suppose, nim doesn't care.)
20:24:17skrylarthere is a {.this:self.} pragma that sets an implicit self
20:24:29FromGitter<dandevelop> type ⏎ ⏎ ```self.theText = value``` ⏎ ⏎ var button:TButton ... [https://gitter.im/nim-lang/Nim?at=592dd4fc631b8e4e612ad0dd]
20:24:37FromGitter<dandevelop> This is what I tried
20:25:12skrylari was told we stopped calling things TType
20:25:26skrylari think you forgot the backquotes around `text=`
20:26:03FromGitter<dandevelop> How would that look like?
20:26:32FromGitter<dandevelop> Again, sorry for asking these dumb questions. I am new to nim.
20:28:48skrylari suspect the chatbot is eating the ticks
20:29:51skrylarthere is a backtick before the t and a backtick after the =
20:29:52FromGitter<dandevelop> Maybe something like https://pastebin.com/ would work for this?
20:30:41demi-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:06FromGitter<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:48skrylardandevelop, http://ix.io/vOm
20:38:29FromGitter<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:52skrylarhuh. i didn't know keynote exported animated videos.
21:14:54skrylarbleh. 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:06libmanRandom 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