00:14:21 | * | shashlick quit (Quit: Connection closed for inactivity) |
00:30:43 | FromGitter | <Alan-FGR> made a concept, just a thing that crossed my mind, thought it'd be a waste not to share |
00:30:52 | FromGitter | <Alan-FGR> (https://files.gitter.im/nim-lang/Nim/Oykh/image.png) |
00:31:12 | FromGitter | <Alan-FGR> kinda cringey but whatever :P |
00:39:23 | * | xet7 quit (Ping timeout: 260 seconds) |
00:39:27 | * | jsgrant joined #nim |
00:41:43 | FromGitter | <ephja> it became more clear once I turned my head to the left a little :p |
00:42:52 | * | PMunch quit (Quit: leaving) |
00:43:45 | FromGitter | <Alan-FGR> yeah, it's just an idea ... thought maybe somebody could find it interesting, maybe iterate or something |
00:43:51 | FromGitter | <Alan-FGR> or not :P |
00:44:15 | FromGitter | <ephja> sure |
00:46:10 | FromGitter | <ephja> you know what would help? lens flares |
00:47:37 | FromGitter | <Alan-FGR> lens flares in the logo? =/ |
00:54:00 | FromGitter | <ephja> when in doubt ;) |
01:12:08 | * | chemist69_ quit (Ping timeout: 255 seconds) |
01:26:02 | * | chemist69 joined #nim |
01:27:30 | FromGitter | <Alan-FGR> man, lens flare wouldn't fit that logo |
01:28:19 | FromGitter | <Alan-FGR> you could add some color, standardize sizes, etc... could be better for sure, but I'm certainly not holding my breath |
01:28:53 | FromGitter | <Alan-FGR> say this |
01:29:02 | FromGitter | <Alan-FGR> (https://files.gitter.im/nim-lang/Nim/u2Le/image.png) |
01:30:25 | FromGitter | <Alan-FGR> std dists |
01:30:33 | FromGitter | <Alan-FGR> (https://files.gitter.im/nim-lang/Nim/HQYr/image.png) |
01:30:56 | * | endragor joined #nim |
01:31:15 | FromGitter | <Alan-FGR> anyway, just something for you guys to play around when you're bored... or just bury it, don't care :P |
01:33:19 | FromGitter | <ephja> I think it can be made more readable if just a few parts are vertical |
01:34:58 | FromGitter | <Alan-FGR> well, then iterate :P... how would you preserve the crown shape? I personally don't think it's gonna be easy, but anyway, just wanted to drop that here |
01:35:23 | * | endragor quit (Ping timeout: 260 seconds) |
01:43:34 | * | smt quit (Ping timeout: 276 seconds) |
01:43:45 | * | Serenitor joined #nim |
01:48:12 | FromGitter | <Varriount> @watzon Look at the `fields ` iterator in the system module. |
01:48:58 | * | yingjun_ joined #nim |
01:49:05 | * | skrylar joined #nim |
02:06:16 | * | Syneh__ joined #nim |
02:07:44 | * | mal``` joined #nim |
02:08:42 | * | LyndsySimon_ joined #nim |
02:08:49 | * | der joined #nim |
02:09:10 | * | alxf_ joined #nim |
02:10:13 | * | RushPL joined #nim |
02:12:56 | * | Araq_ joined #nim |
02:13:56 | * | Syneh_ quit (*.net *.split) |
02:13:57 | * | derlafff quit (*.net *.split) |
02:13:57 | * | mal`` quit (*.net *.split) |
02:13:57 | * | alxf quit (*.net *.split) |
02:13:59 | * | Araq quit (*.net *.split) |
02:13:59 | * | LyndsySimon quit (*.net *.split) |
02:13:59 | * | Rush_ quit (*.net *.split) |
02:13:59 | * | Syneh__ is now known as Syneh_ |
02:14:31 | * | LyndsySimon_ is now known as LyndsySimon |
02:20:01 | * | pilne quit (Quit: Quitting!) |
03:14:24 | * | def-pri-pub joined #nim |
03:15:51 | def-pri-pub | Raylib bindings on the way: https://github.com/raysan5/raylib/issues/328#issuecomment-315945282 |
03:17:21 | def-pri-pub | (still working on them though) |
03:21:44 | * | vivus quit (Quit: Leaving) |
03:21:57 | * | Serenitor quit (Quit: Leaving) |
03:37:46 | * | endragor joined #nim |
03:41:06 | * | endragor quit (Remote host closed the connection) |
03:41:13 | * | endragor joined #nim |
04:09:13 | * | yingjun_ quit (Remote host closed the connection) |
04:09:36 | * | yingjun_ joined #nim |
04:10:48 | * | yingjun_ quit (Remote host closed the connection) |
04:19:51 | * | def-pri-pub quit (Quit: leaving) |
05:07:15 | * | yingjun_ joined #nim |
05:09:42 | * | skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
05:22:51 | * | rauss quit (Quit: WeeChat 1.9) |
05:29:31 | * | jsgrant quit (Quit: Peace Peeps. o/ If you need me asap, message me at msg[(at)]jsgrant.io & I'll try to get back to you within 24-36 hours.) |
06:20:55 | * | xet7 joined #nim |
06:45:15 | * | nsf joined #nim |
06:48:09 | * | yglukhov joined #nim |
07:20:50 | * | alxf_ is now known as alxf |
07:34:50 | * | tankfeeder joined #nim |
07:43:51 | * | yingjun_ quit (Remote host closed the connection) |
07:48:50 | * | Snircle quit (Ping timeout: 258 seconds) |
07:50:53 | * | yingjun_ joined #nim |
07:51:51 | * | ShalokShalom quit (Quit: No Ping reply in 180 seconds.) |
07:53:28 | * | ShalokShalom joined #nim |
07:58:05 | * | ShalokShalom quit (Ping timeout: 240 seconds) |
07:58:54 | * | ShalokShalom joined #nim |
08:00:10 | * | arnetheduck joined #nim |
08:04:33 | * | yingjun_ quit (Remote host closed the connection) |
08:10:40 | * | yingjun_ joined #nim |
08:30:35 | * | arnetheduck quit (Ping timeout: 240 seconds) |
08:36:37 | * | xet7 quit (Read error: Connection reset by peer) |
08:38:08 | * | yingjun_ quit (Remote host closed the connection) |
08:39:28 | * | yingjun_ joined #nim |
08:39:31 | * | yingjun_ quit (Remote host closed the connection) |
08:39:58 | * | yingjun_ joined #nim |
08:41:07 | * | Arrrr joined #nim |
08:41:07 | * | Arrrr quit (Changing host) |
08:41:07 | * | Arrrr joined #nim |
08:46:24 | * | couven92 joined #nim |
08:54:00 | * | xet7 joined #nim |
08:55:43 | FromGitter | <zacharycarter> morning |
09:01:10 | FromGitter | <zacharycarter> @Alan-FGR I like the logo :) |
09:06:58 | FromGitter | <cyberlis> I have a question |
09:07:23 | FromGitter | <zacharycarter> shoot |
09:07:34 | FromGitter | <cyberlis> Is overloading of `.` depricated |
09:07:37 | FromGitter | <zacharycarter> I have one as well but I'll try to answer yours first |
09:07:53 | FromGitter | <zacharycarter> that I cannot answer, I don't see why it would be though |
09:08:08 | FromGitter | <cyberlis> i some times getting this message overloaded '.' and '()' operators are now .experimental; . is deprecated [Deprecated] |
09:09:08 | FromGitter | <zacharycarter> then maybe it is |
09:09:15 | FromGitter | <zacharycarter> you may need to use backticks to escape the operator |
09:09:29 | FromGitter | <zacharycarter> try throwing an {.experimental.} pragma at the top of the file |
09:09:31 | FromGitter | <zacharycarter> see what happens |
09:09:46 | FromGitter | <cyberlis> no :) |
09:09:53 | FromGitter | <cyberlis> everything works fine |
09:09:59 | FromGitter | <zacharycarter> oh okay |
09:10:10 | FromGitter | <cyberlis> but if this is depricated i dont heve to use it |
09:11:08 | FromGitter | <cyberlis> it will be sad if i use ``` `.` ``` and then it will be removed from language |
09:12:39 | Arrrr | Is not that these operators are deprecated, but that they are now required to use the experimental pragma, and in the future they won't work without it. |
09:12:56 | Arrrr | For now they are allowed without the pragma for a smoother transition |
09:14:33 | FromGitter | <zacharycarter> if I'm reading a file line by line, how can I reset the cursor position of the file |
09:14:38 | FromGitter | <zacharycarter> so I can re-read it again |
09:14:54 | FromGitter | <cyberlis> seek ? |
09:15:00 | FromGitter | <zacharycarter> probably thank you |
09:15:32 | FromGitter | <cyberlis> but why the marked experimental pragma. May be you have plans to remove them in the future |
09:15:32 | FromGitter | <zacharycarter> setFilePos looks like it will work thanks I didn't know what to search for |
09:16:21 | FromGitter | <zacharycarter> @cyberlis there are quite a few features in the stdlib that are marked experimental but aren't planned for removal |
09:16:26 | FromGitter | <zacharycarter> like auto dereferencing etc |
09:17:02 | FromGitter | <zacharycarter> I believe the thought is these features aren't fully baked into the language / tested yet so they're marked as experimental |
09:17:11 | FromGitter | <zacharycarter> but once they are that pragma will no longer be required |
09:17:41 | FromGitter | <zacharycarter> and as Arrrr explained for now you can get away without that pragma but at some point it will be enforced |
09:17:47 | FromGitter | <zacharycarter> until the feature is no longer expiermental |
09:18:19 | FromGitter | <cyberlis> thanks |
09:18:25 | FromGitter | <zacharycarter> I wouldn't count on much being totally stable in Nim until it hits 1.0, but the contributors and Araq / Dom96 are generally pretty good about making sure new changes don't totally screw existing code |
09:21:25 | * | rokups joined #nim |
09:42:03 | * | Sembei joined #nim |
09:44:54 | * | skrylar joined #nim |
09:45:18 | * | PMunch joined #nim |
09:45:34 | skrylar | morning |
09:47:06 | * | Vladar joined #nim |
09:50:21 | FromGitter | <zacharycarter> morning |
09:53:28 | skrylar | 1) successfully did a thing with nim javascript 2) the docs are a little mmmm |
09:53:47 | skrylar | Saw a japanese post where they were using innerhtml with nim js, but innerhtml isn't listed in the docs |
09:53:50 | skrylar | troubling |
09:56:12 | FromGitter | <zacharycarter> hrm |
09:57:01 | FromGitter | <zacharycarter> skrylar: https://github.com/zacharycarter/nim-playground-frontend/blob/5520eb165f9fc9a8bb3022071f9f2d81e32033f5/src/app.nim |
09:57:44 | * | Arrrr quit (Ping timeout: 260 seconds) |
09:57:56 | skrylar | neat? |
09:58:01 | * | PMunch quit (Quit: leaving) |
09:58:12 | FromGitter | <zacharycarter> I use innerhtml a few places in there |
09:58:18 | FromGitter | <zacharycarter> pretty sure it comes from the dom module |
09:58:29 | FromGitter | <zacharycarter> but yeah I don't think it's documented |
10:14:28 | skrylar | its in the dom module and it is undocumented, correct |
10:14:40 | skrylar | there might be some compiler magic creating it, not sure |
10:18:39 | FromGitter | <zacharycarter> mmhmm |
10:20:54 | * | krux02 joined #nim |
10:21:06 | FromGitter | <krux02> @zacharycarter hi there |
10:21:22 | FromGitter | <krux02> how is your project going? |
10:24:57 | * | Snircle joined #nim |
10:39:48 | * | yingjun_ quit (Remote host closed the connection) |
10:39:58 | * | yingjun joined #nim |
10:41:28 | * | yingjun quit (Remote host closed the connection) |
10:45:29 | * | dom96|w joined #nim |
10:45:59 | * | yingjun joined #nim |
10:46:59 | * | smt joined #nim |
10:49:02 | * | yingjun quit (Remote host closed the connection) |
10:49:11 | * | yingjun joined #nim |
10:50:09 | * | yingjun quit (Remote host closed the connection) |
10:57:50 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
11:03:45 | * | yingjun joined #nim |
11:06:59 | * | Snircle joined #nim |
11:11:38 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:39:30 | * | yingjun quit (Remote host closed the connection) |
11:45:00 | FromGitter | <mratsim> @Araq, I suppose you already saw that, here is a benchmark of 6 Python strings concatenation proc: https://waymoot.org/home/python_string/ (from 2004) |
11:49:43 | * | dom96|w joined #nim |
11:51:19 | * | skrylar quit (Ping timeout: 276 seconds) |
12:00:57 | Araq_ | mratsim: I tried word counting instead |
12:01:04 | Araq_ | no difference :-/ |
12:04:36 | * | gggs joined #nim |
12:14:41 | * | skrylar joined #nim |
12:27:02 | FromGitter | <AnorakTech_twitter> Good day! Quick question. How can I define the float precision for a certain variable? I need two or three digits after the . |
12:31:30 | * | skrylar quit (Ping timeout: 240 seconds) |
12:36:55 | * | skrylar joined #nim |
12:38:08 | * | salewski joined #nim |
12:38:51 | salewski | AnorakTech_twitter, see https://nim-lang.org/docs/strutils.html#formatFloat,float,FloatFormatMode,range[],Char |
12:40:04 | * | yingjun joined #nim |
12:41:00 | * | salewski quit (Client Quit) |
12:44:31 | * | yingjun quit (Ping timeout: 240 seconds) |
12:46:55 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
12:54:56 | * | dom96|w joined #nim |
12:58:49 | * | salewski joined #nim |
13:00:13 | salewski | dom96, a few of us got that strange message from manning that the final book is available. But it is not, see |
13:00:19 | salewski | https://forums.manning.com/posts/list/41203.page;jsessionid=98D504ACFB46FB3B4CE1E46EF17EFB75 |
13:01:15 | salewski | And gintro is not yet in nimble package list. Is the yes tag the problem still? |
13:04:45 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
13:06:35 | FromGitter | <zacharycarter> @krux02 good bud |
13:07:46 | FromGitter | <zacharycarter> https://github.com/zacharycarter/zengine |
13:07:50 | FromGitter | <zacharycarter> how about you? |
13:08:53 | * | salewski quit (Quit: WeeChat 1.4) |
13:17:58 | krux02 | zacharycartey, good as well |
13:18:03 | krux02 | I am fixing nim-mode for emacs |
13:18:28 | krux02 | this project root stuff for nim mode is too complicated |
13:18:30 | krux02 | I don't like ti |
13:19:19 | krux02 | Araq_: in nim.cfg I put --verbosity:0 but then I get the error /home/arne/.config/nim.cfg(4, 14) Error: identifier expected, but found '0' |
13:19:22 | krux02 | why? |
13:19:52 | Araq_ | the config parser is a bit limited :P |
13:19:59 | Araq_ | use "0" with double quotes |
13:20:17 | krux02 | ok |
13:20:38 | krux02 | the config parser should at least be ablet to parse what is possible on the command line |
13:20:50 | krux02 | but anyway |
13:20:56 | krux02 | it works for me like this |
13:21:13 | FromGitter | <zacharycarter> krux02: sounds like hell, but then again I consider emacs to be hel |
13:21:15 | FromGitter | <zacharycarter> hell |
13:21:27 | krux02 | well emacs is hell |
13:21:30 | krux02 | at least at the beginning |
13:21:42 | krux02 | and then it some point in time the dust settles and things become clear |
13:21:48 | krux02 | and then it is not so bad after all |
13:21:57 | krux02 | still a huge hack for everything |
13:22:02 | krux02 | but a lot of nice things in there |
13:22:38 | FromGitter | <zacharycarter> yeah that's what I've heard |
13:23:00 | krux02 | I kind of like the customization and the self awareness of everything |
13:23:14 | krux02 | when I ask about a variable I don't just get the value |
13:23:41 | krux02 | emacs knows the documentation, the value, wheder it is declared where it has been set and how it has been set |
13:24:00 | krux02 | s/wheder/where/ |
13:24:10 | krux02 | but I still think I am on a sinking boat |
13:24:16 | krux02 | very slowly sinking, but still sinking |
13:25:01 | krux02 | https://trends.google.com/trends/explore?date=all&q=emacs,vim |
13:25:07 | * | dom96|w joined #nim |
13:26:42 | krux02 | chine and japan still seem to really like emacs |
13:26:53 | krux02 | china |
13:26:56 | krux02 | i can't type |
13:30:32 | krux02 | zacharycarter: I see you added primitives to your engine like cube etc |
13:31:29 | krux02 | well it would be nice to have a few more people on my side using emacs |
13:31:38 | krux02 | it feels like i am the only nim developer using emacs |
13:33:33 | FromGitter | <zacharycarter> krux02: this is a brand new from scratch engine |
13:33:34 | * | rauss joined #nim |
13:33:37 | FromGitter | <zacharycarter> no more bgfx, just opengl |
13:33:44 | krux02 | interesting |
13:33:47 | FromGitter | <zacharycarter> I stopped work onf rag |
13:33:53 | FromGitter | <zacharycarter> on frag* |
13:34:03 | krux02 | can I ask why? |
13:34:07 | FromGitter | <zacharycarter> was too tough for new users to get going with |
13:34:09 | krux02 | I thought bgfx is so cool? |
13:34:29 | FromGitter | <zacharycarter> it is cool, but it adds another dependency that needs to be linked to and people were having trouble getting it compiled etc |
13:34:33 | rauss | It's cool but difficult to work with. |
13:35:03 | rauss | It's great once you get it set up |
13:35:10 | krux02 | that's sad |
13:35:19 | krux02 | I hate difficult setups |
13:35:33 | FromGitter | <zacharycarter> yea this new engine has no dependencies other than sdl2 |
13:35:36 | FromGitter | <zacharycarter> like your project :) |
13:35:40 | rauss | It's the kind of thing I would use in a heartbeat for a one-off game, but not necessarily for a game framework. |
13:36:28 | FromGitter | <zacharycarter> I'd even use it in a game engine but your audience needs to be comfortable with compiling C++ libraries and cross compiling too |
13:37:03 | FromGitter | <zacharycarter> the new library is geared towards easy prototyping |
13:37:08 | FromGitter | <zacharycarter> I may add another bgfx backend to it eventually |
13:37:21 | krux02 | it feels a lot like processing and blitz basic |
13:37:21 | rauss | Yeah depends on the goals. It's a higher ceiling, so worth it for more ambitious scopes. |
13:37:32 | krux02 | simple immediate primitives to render |
13:37:37 | krux02 | and global settings |
13:37:38 | rauss | krux02: Isn't processing a joke language? |
13:37:52 | krux02 | enabling lines setting line color fill color |
13:38:01 | krux02 | processing is java |
13:38:03 | rauss | joke here meaning meant for learning, not for doing |
13:38:09 | krux02 | i don't see it as another language |
13:38:16 | rauss | Oh, there's actually a language called Processing, too |
13:38:20 | krux02 | but I really do like it for it's simplicity |
13:38:38 | krux02 | give someone processing and they will give you interesting results instantly without a lot of knowledge |
13:38:49 | rauss | Ah. So it's just a java-clone or java-lite thing? |
13:39:02 | krux02 | no it is java |
13:39:19 | krux02 | all the processing compiler does it to prepend a bit of boilerplate |
13:39:38 | rauss | Okay |
13:39:42 | krux02 | it scans the document to see what code needs to be generated, but generally it is just java |
13:39:50 | krux02 | it is not another languae |
13:40:17 | * | skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
13:41:17 | * | rauss quit (Quit: WeeChat 1.9) |
13:41:21 | krux02 | processing does the jar management, so you don't need to hassle with the overly complicated java toolchain |
13:41:27 | * | rauss joined #nim |
13:41:35 | krux02 | it makes things just work |
13:42:33 | krux02 | you use zengray? |
13:42:58 | krux02 | zacherycarter, did you think about supporting the colors module from the nim standard library? |
13:46:39 | * | skrylar joined #nim |
13:47:44 | skrylar | i don't know that floats work that way |
13:47:53 | skrylar | if they do it requires some weird assembly flags iirc |
13:48:29 | krux02 | skrylar: that floats work what way? |
13:48:40 | skrylar | someone was asking how to set the precision of a float to two digits |
13:48:43 | rauss | krux02: At one point in Frag's history I had supported the std colors module. In a rewrite we shifted away from it, and I added "use my old colors module" as an issue we never got to |
13:48:55 | rauss | so... yes? lol |
13:49:06 | FromGitter | <zacharycarter> krux02: I could probably swap it in instead of this ZColor thing i created |
13:49:22 | rauss | Oh you're talking about zEngine now, my bad |
13:49:26 | krux02 | well I don't really care |
13:49:56 | krux02 | it is just that it is in the standard library, and less duplication is always good |
13:50:03 | FromGitter | <zacharycarter> agreed |
13:50:10 | FromGitter | <zacharycarter> I'll look at that tonight |
13:50:11 | krux02 | well not always, but generally I would agree |
13:50:38 | skrylar | stdlib does not equal good |
13:50:49 | * | skrylar has pretend ptsd from D's libphobos |
13:51:27 | krux02 | ptsd? |
13:52:02 | krux02 | well there are also people who disagree on the c++ standard library |
13:52:11 | FromGitter | <zacharycarter> post traumatic stress disorder haha |
13:52:13 | krux02 | anevery standard library is flawed somehow |
13:52:25 | krux02 | and I agree that the nim standard library has flaws |
13:52:32 | krux02 | not just a few |
13:53:00 | skrylar | standard libraries are silly concepts but meh |
13:53:06 | krux02 | well I stayed away from D while I was always peeking to the language |
13:53:14 | skrylar | "just compile code and i'll pick a platform library that works" |
13:53:40 | skrylar | well i mean they might not be so bad but non-nim languages tend to do things like say this is the hash implementation we used and if you want another too bad |
13:53:45 | krux02 | and a funny thing is that I did play the game "Empire" from the Developer of D, before the language was a thing |
13:53:45 | skrylar | you lose all the syntax niceties |
13:53:54 | skrylar | anyway |
13:54:05 | skrylar | D1 was great. then they let the C++ ~~morons~~ fellows ruin it |
13:54:08 | krux02 | I just did not understand it, because I could not read yet, nor did I speak english |
13:54:27 | krux02 | that are two problems when you play a game with english screen texts |
13:54:38 | skrylar | the solution is sierra adventure games |
13:54:48 | skrylar | how everyone in europe learned english |
13:54:49 | skrylar | lol |
13:55:47 | skrylar | bleh. wonder how difficult it would be to port re2c to a nim macro |
13:55:50 | krux02 | skrylar: what did ruin D? |
13:55:52 | skrylar | we need parsing tools in our lives |
13:56:50 | skrylar | krux02, basically they let modern c++ people in who started caring more about selling hundred page spec books rather than implementation and tidiness. so the website became "obsolete" and you were expected to buy Andrei's book. Who in turn added all sorts of C++-esque barf |
13:57:08 | skrylar | Then they realized libphobos was broken without the GC, so instead of fixing phobos they made the gc a hard requirement |
13:57:24 | skrylar | even though a major selling point of D1 is you could always throw it away if you needed to do very tight coding |
13:57:25 | krux02 | Andrei has great c++ talks |
13:57:46 | skrylar | well. i could barely crash walter's d1 |
13:57:53 | skrylar | i crashed andrei's d2 regularly |
13:58:22 | skrylar | they're basically dead now |
13:58:37 | skrylar | there's a couple zombies in the irc and forums but he killed that language |
13:58:42 | ehmry | krux02: he does, but they do get heavy into template madness |
13:58:58 | skrylar | i'm just going to say this and then i'm done ranting about andrei et all |
13:59:12 | skrylar | can someone explain to my how template madness makes more sense than lisp macros |
13:59:44 | krux02 | skrylar: well c++ templates are basically what nim generics are |
13:59:53 | ehmry | idk, GNU turned me off of lisp from the start |
13:59:55 | krux02 | not very powerful |
14:00:08 | skrylar | "i drop to an interpreter, output some code, and the compiler eats the code like pancakes." vs "i concoct 500 lines of algebraic voodoo which only works on some compilers and is guaranteed to give the most mortifying error messages on a whim" |
14:00:48 | krux02 | but with a lot of horrible syntax c++templates can do a lot of things |
14:00:54 | skrylar | true |
14:01:00 | skrylar | but lisp can do it with nice syntax? |
14:01:49 | krux02 | well in Nim I can put my own error messages :) |
14:01:57 | skrylar | nim also has macros though :3 |
14:02:00 | krux02 | macros.error |
14:02:01 | krux02 | very nice |
14:02:10 | skrylar | though i mostly abuse templates |
14:02:23 | krux02 | I mostly abuse macros |
14:02:25 | skrylar | its nice to know that if someone did the leg work we could just have re2c lexers native though |
14:02:35 | krux02 | a lot of result.add quote do: |
14:03:01 | skrylar | technically we could have glsl-esque stuff too but why static compile that |
14:03:26 | skrylar | if only nim looked good on my resume ._. |
14:03:33 | krux02 | glsl stuff? what do you mean? |
14:04:05 | skrylar | glsl = gl shader language |
14:04:18 | krux02 | skrylar: do you think "some scientific topic nobody understands the title" looks better on a resume |
14:04:29 | krux02 | skrylar: I know glsl, but what do you want from it? |
14:04:36 | skrylar | krux02, doesn't matter what i think, matters what some hr drone thinks |
14:05:11 | krux02 | well I know it's best when you can talk to responsible people directly |
14:05:21 | skrylar | it is, but thats not how the usa works :( |
14:05:28 | skrylar | unless you meet the team people at parties or cons |
14:05:28 | krux02 | don't tak to "staff people" who have no idea of the real stuff |
14:05:45 | krux02 | well I don't live in the US |
14:05:54 | skrylar | i've implemented a healthy dose of deepmind whitepapers in C# and ported about half of that to nim, doesn't help me get a job tho |
14:06:11 | skrylar | other than i can say i have baby neural nets in nim |
14:06:24 | krux02 | I am invited to foundation of digital games in the US, but I can't afford the ticket :( |
14:06:31 | skrylar | sadface |
14:06:53 | krux02 | flying over to the US is expensive |
14:07:08 | skrylar | used the example earlier of "it will decide to rob banks and convenience stores because that's the fastest way to get the money" as an example of how one has to be careful defining optimization scores lol |
14:07:55 | ehmry | yea, conferences in europe are a lot more convenient |
14:08:13 | krux02 | not really, but for me they are at least closer by |
14:08:19 | skrylar | i wouldn't mind going to conferences. though a lot of AI talks get posted online |
14:08:23 | ehmry | within the US its hard to travel to everything |
14:08:31 | krux02 | conference in Cologne, and yay I can travel for free |
14:09:48 | krux02 | what I have heared is that realways are very spares and even within cities everything is so spread that walking is not really an option |
14:10:07 | skrylar | in the usa? |
14:10:15 | skrylar | we don't have commuter rail like europe does, no |
14:10:42 | skrylar | every time people try to put it in some derf spends a ton of money on political stuff so we don't get it |
14:12:12 | krux02 | what is derf? |
14:14:50 | skrylar | it's a non-word |
14:15:29 | skrylar | people get less offended if you use non-words instead of the normal set of diminutizing phrases |
14:15:31 | krux02 | I think it's funny and sad to watch american politics |
14:15:58 | krux02 | a moroon is talking nonsense and then people are cheering his name. |
14:15:58 | ehmry | just let us be an example of what not to do |
14:16:12 | skrylar | if you say someone had an idiot moment they feel bad/upset but if you say they had a derpy moment then its like "oh yea i did" |
14:16:48 | krux02 | I mean in Germany politicians are also talking nonsense that is no difference, but at least people are not cheering about it they just fall asleep |
14:17:12 | skrylar | they don't cheer but they are still putting up with the laws |
14:17:58 | skrylar | anyway thats the last i'm going to say on politics :x |
14:21:24 | * | xet7 quit (Quit: Leaving) |
14:21:49 | * | xet7 joined #nim |
14:23:52 | FromGitter | <cyberlis> Guys. I want make API calls to server. ⏎ ⏎ I want call it like this: ⏎ ⏎ ``` ⏎ ⏎ And get this calls ⏎ ``` ... [https://gitter.im/nim-lang/Nim?at=596e19f8329651f46e9c2357] |
14:25:27 | skrylar | you might need to use a template with variable arguments for your dot overload |
14:25:41 | skrylar | i think the dot method is the same call for every .something |
14:29:04 | * | couven92 quit (Read error: Connection reset by peer) |
14:31:23 | FromGitter | <cyberlis> ```code paste, see link``` ⏎ ⏎ Error: type mismatch: got (string, int literal(23), int literal(34), int literal(45)) ⏎ but expected one of: ⏎ proc reprT (x: T): string [https://gitter.im/nim-lang/Nim?at=596e1bbb2723db8d5e22122d] |
14:34:10 | FromGitter | <cyberlis> how can i access method name and it's args |
14:39:22 | * | v17d joined #nim |
14:42:29 | * | yingjun joined #nim |
14:47:28 | * | yingjun quit (Ping timeout: 276 seconds) |
15:03:52 | FromGitter | <janjaapbos> Just would like to share a pointer to my project, embedding ZeroTier in Nim. This would enable direct and secure messaging for Nim apps. ⏎ https://github.com/janjaapbos/zerotiercore/tree/master/ztcore/ztnim |
15:04:30 | FromGitter | <janjaapbos> Since I am new at Nim, feedback / help is always appreciated! |
15:13:15 | FromGitter | <andreaferretti> what is zerotier? |
15:17:10 | ehmry | andreaferretti: its a virtual ethernet engine with end-to-end discovery and NAT penetration |
15:17:35 | ehmry | I've been using it for a few years now, I like it |
15:30:53 | * | couven92 joined #nim |
15:32:23 | krux02 | Araq_: you could my life a lot easier, if nimsuggest could find out the project root on it's own |
15:32:54 | krux02 | flycheck isn't working ... again |
15:36:09 | * | tankfeeder quit (Quit: Connection closed for inactivity) |
15:38:41 | Araq_ | I'm working on a new feature ... nimsuggest should be able to make breakfast |
15:42:44 | krux02 | yay breakfast for dinner |
15:43:02 | krux02 | no seriously what is the problem that nimsuggest can't find the project root on it's own? |
15:44:05 | krux02 | it it wrong to implement it as a recursive serach upwards the directory tree to find a project definition file? |
15:47:50 | Araq_ | oh so that's what you mean |
15:47:56 | Araq_ | PR it? |
15:48:00 | * | Arrrr joined #nim |
15:48:00 | * | Arrrr quit (Changing host) |
15:48:00 | * | Arrrr joined #nim |
15:48:18 | Araq_ | if a directory, it can go up and downwards and inside out to find out what you tell the compiler all the time |
15:58:17 | * | Trustable joined #nim |
15:58:49 | FromGitter | <Varriount> @janjaapbos Any particular reason for using the commands module over the subprocess module? |
15:59:23 | FromGitter | <janjaapbos> I am just used to it. |
16:03:34 | FromGitter | <Varriount> Ah, because it's been deprecated since 2.6, and removed in 3.0+ |
16:04:05 | krux02 | Araq_: I have in nimsuggest the following error |
16:04:09 | krux02 | "invalid module name: \'\'" |
16:04:12 | krux02 | with no location |
16:04:15 | krux02 | what does it mean? |
16:06:12 | * | yglukhov quit (Remote host closed the connection) |
16:06:12 | Araq_ | you pass it an invalid filename? |
16:08:40 | krux02 | well when I pass it random crap, then I get no message at all |
16:11:05 | FromGitter | <janjaapbos> @Varriount Thanks, I'll revise the project to support python 3. I am just so used to 2. ;-) |
16:11:08 | krux02 | I want to test nimsuggest on the command line to find out how it works |
16:11:49 | krux02 | so the filename I pass to 'chk' is that relative to the project root, or is it relative to the current buffer |
16:11:53 | krux02 | sorry |
16:12:15 | krux02 | relative to where the project has been started |
16:14:06 | krux02 | nope I wont't get any suggestions in my examples folder |
16:14:08 | krux02 | that sucks |
16:16:11 | FromGitter | <Varriount> @Araq @dom96 Do we have any documentation on compiling Nim code as a DLL? |
16:16:15 | krux02 | janjaapbos: that is so weird in the python world. Python 3 is out for 10 years but still everybody is using python 2 |
16:21:19 | * | Tiberium joined #nim |
16:24:11 | FromGitter | <shalabhc> python 3 has been picking up quite a bit in the last 1-2 years |
16:36:27 | * | Arrrr quit (Ping timeout: 240 seconds) |
16:42:51 | FromGitter | <krux02> I think it's interesting how long it takes for a language to change something |
16:43:16 | * | couven92 quit (Ping timeout: 255 seconds) |
16:43:38 | * | yingjun joined #nim |
16:47:19 | * | yglukhov joined #nim |
16:47:44 | skrylar | its why you should make the smallest language possible and do everything as macros and libs |
16:48:18 | * | yingjun quit (Ping timeout: 260 seconds) |
16:48:41 | skrylar | the mind boggles why cpython has so many lines and is so huge yet is also so slow |
16:49:22 | FromGitter | <Piripant> Well the developers were always honest about how little they cared for performance |
16:49:30 | * | Sembei quit (Ping timeout: 240 seconds) |
16:51:00 | FromGitter | <Piripant> It's not a goal of the cpython project |
16:51:45 | FromGitter | <Piripant> Python is intended to be productive and easy to learn not well performant |
16:51:50 | * | yglukhov quit (Ping timeout: 268 seconds) |
16:58:32 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:11:51 | * | yglukhov joined #nim |
17:12:03 | FromGitter | <shalabhc> cpython is huge? i'd say it's still small. |
17:12:26 | FromGitter | <shalabhc> e.g. compare to c++ or java. try compiling one of those languages, then compile cpython. |
17:12:59 | FromGitter | <shalabhc> but yeah, not super fast |
17:13:28 | FromGitter | <shalabhc> and cpython exposes too many internals so it's hard to optimize - all extensions are tightly coupled to the implementation |
17:17:14 | * | rauss quit (Quit: WeeChat 1.9) |
17:24:35 | * | Tiberium quit (Remote host closed the connection) |
17:32:46 | * | skrylar quit (Quit: Leaving) |
17:38:00 | * | couven92 joined #nim |
17:51:05 | * | rokups quit (Quit: Connection closed for inactivity) |
17:51:49 | * | rauss joined #nim |
18:15:14 | * | deep-book-gk_ joined #nim |
18:15:43 | * | deep-book-gk_ left #nim (#nim) |
18:26:27 | * | ShalokShalom quit (Ping timeout: 240 seconds) |
18:26:54 | * | ShalokShalom joined #nim |
18:34:49 | krux02 | I don't like cpython very much |
18:35:05 | krux02 | but that has to do with the fact that I don't like python in general |
18:35:07 | krux02 | :P |
18:39:47 | FromGitter | <Varriount> *gasp* |
18:40:27 | FromGitter | <Varriount> krux02: You and I must fight to the death now, for you have insulted something dear to me. |
18:41:18 | krux02 | don't worry I don't like any programming language they are all horrible |
18:41:35 | krux02 | nim is the least horrible of them for me right now |
18:41:45 | krux02 | but it is still far from a perfect language |
18:45:23 | * | yingjun joined #nim |
18:50:13 | * | yingjun quit (Ping timeout: 260 seconds) |
18:50:51 | FromGitter | <mratsim> That’s where someone should say “Don’t feed the troll” :P |
18:54:41 | * | yglukhov quit (Read error: Connection reset by peer) |
18:55:15 | * | yglukhov joined #nim |
18:56:03 | * | dom96|w joined #nim |
18:58:08 | krux02 | well sometimes I can totally understand why Trolls are trolling. Because people let themself being trolled. |
18:58:44 | * | vivus joined #nim |
19:02:09 | * | rauss quit (Quit: WeeChat 1.9) |
19:03:08 | * | rauss joined #nim |
19:12:01 | * | Matthias247 joined #nim |
19:12:05 | * | Vladar quit (Quit: Leaving) |
19:20:14 | * | rosshadden joined #nim |
19:32:23 | FromGitter | <shalabhc> nim borrows a few things from python |
19:33:47 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:50:08 | krux02 | well it doesn't borrow the type system, and that's a good thing |
19:52:39 | Zevv | How do I echo the value of a pointer? |
19:53:26 | Zevv | oh cast[int] |
19:53:31 | Zevv | sorry again for asking too soon |
19:54:01 | krux02 | I would cast to uint |
19:54:34 | Zevv | true :) |
19:57:29 | ehmry | Zevv: or ``ByteAddress`` |
19:57:45 | * | Trioxin joined #nim |
19:58:16 | Zevv | So, what I was trying to do is to see how seqs are allocated, and grown |
19:58:29 | Zevv | what does a seq look like on the heap? |
19:58:47 | Zevv | what is the underlying data structure, is it just a linear block that is realloc()ed? |
20:05:31 | FromGitter | <mratsim> No it’s a length + an unchecked array, the definition is somewhere in the source code |
20:06:12 | Zevv | I was just halfway incrSeqV2 |
20:09:58 | Zevv | seems to be a block that's grown in powers of two when needed |
20:12:22 | FromGitter | <mratsim> Probably this: https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L387 |
20:15:35 | * | Sentreen quit (Ping timeout: 240 seconds) |
20:15:40 | krux02 | Znvv: a seq is a pointer to this C thing struct{size_t size,capacity; T data[]}; |
20:15:50 | krux02 | meaning the data is directly after the size and capacity |
20:16:06 | krux02 | and it is doubling in size after reallocation |
20:16:14 | krux02 | semantically identical to std::vector |
20:16:26 | krux02 | even though std::vector (c++) is allocated differently |
20:16:48 | * | krux02 quit (Remote host closed the connection) |
20:17:02 | Zevv | yah, that explains, theres regular memcpys happening |
20:17:03 | Zevv | thanks |
20:28:27 | * | Sentreen joined #nim |
20:30:41 | dom96 | Araq_: This seems like nuget is failing not that our tester takes too long https://ci.appveyor.com/project/Araq/nim/build/1347#L13 |
20:39:46 | * | Trioxin left #nim ("Konversation terminated!") |
20:42:09 | * | xet7 quit (Ping timeout: 248 seconds) |
20:47:53 | * | yingjun joined #nim |
20:49:56 | * | endragor quit (Remote host closed the connection) |
20:50:49 | FromGitter | <zacharycarter> o/ evening all |
20:51:04 | * | rauss quit (Quit: WeeChat 1.9) |
20:52:28 | * | yingjun quit (Ping timeout: 260 seconds) |
20:58:05 | * | xet7 joined #nim |
21:00:48 | * | rosshadden quit (Quit: WeeChat 1.9) |
21:03:23 | * | pilne joined #nim |
21:03:49 | * | endragor joined #nim |
21:08:05 | * | endragor quit (Ping timeout: 240 seconds) |
21:15:37 | * | arnetheduck joined #nim |
21:29:03 | * | Trustable quit (Remote host closed the connection) |
21:37:37 | * | couven92 quit (Ping timeout: 276 seconds) |
21:47:42 | * | xet7 quit (Remote host closed the connection) |
21:49:39 | * | rauss joined #nim |
21:51:39 | FromGitter | <krux02> @Araq Are you there? |
21:53:12 | FromGitter | <Varriount> @zacharycarter Evening. |
21:53:24 | FromGitter | <krux02> good evening |
21:54:09 | FromGitter | <krux02> I just found out that $ on a nil seq returns "nil" |
21:54:17 | FromGitter | <krux02> but $ on a nil string returns nil |
21:54:31 | FromGitter | <krux02> the difference is the "" |
21:54:36 | FromGitter | <krux02> do you think that's right? |
21:55:06 | FromGitter | <Varriount> I think strings and sequences need to be automatically initialized. |
21:55:14 | FromGitter | <krux02> http://ix.io/yz0 |
21:55:19 | FromGitter | <krux02> I think so, too |
21:55:41 | FromGitter | <krux02> and it would not be a problem at all, if the seq would interally be the same as std::vector in c++ |
21:55:49 | FromGitter | <krux02> std::vector is three pointers |
21:56:09 | FromGitter | <krux02> begin end end-of-capacity |
21:56:21 | FromGitter | <krux02> set them all to nullptr and the seq is empty |
21:57:37 | Araq_ | that's not what std::vector is |
21:57:52 | Araq_ | that's what you think it is. it can have different implementations |
21:58:13 | * | couven92 joined #nim |
21:58:38 | FromGitter | <krux02> yes you are right it can have different implementations |
21:58:59 | dom96 | Araq_: fix yo nick |
21:59:12 | FromGitter | <krux02> echo nilstring; # prints "nil" |
21:59:17 | * | Araq_ is now known as araq |
21:59:25 | FromGitter | <krux02> $nilstring == "nil" fails |
21:59:33 | FromGitter | <krux02> I think that is a bit inconsistent |
22:00:10 | FromGitter | <krux02> but when the nil value of string becomes a non issue, this will be fixed I hope |
22:00:11 | araq | IMO $nil should crash but some fool patched the stdlib to be "nice" |
22:00:19 | * | yglukhov quit (Remote host closed the connection) |
22:00:34 | FromGitter | <krux02> well I disagree that $nil should crash |
22:00:47 | * | araq is now known as Araq |
22:00:49 | FromGitter | <Varriount> araq: I thought it was you who made '$' and 'len' automatically initialize the stdlib. |
22:01:51 | FromGitter | <krux02> I don't like crashes in the "just dump it to some string form" function |
22:02:10 | FromGitter | <krux02> I think no functionality should rely on the implementation of $ |
22:02:22 | FromGitter | <krux02> (I mean parsing related) |
22:05:26 | Araq | krux02: so what do you suggest |
22:09:39 | * | krux02 joined #nim |
22:10:10 | FromGitter | <krux02> well when the string and the seq type don't have the nil value anymore this problem is automatically solved |
22:10:54 | FromGitter | <krux02> The problem here is not too big, so I can just live with how it is until nim behaves like I think it will behave in the future |
22:11:56 | FromGitter | <krux02> @Araq one last question, shoul isNil[string] and isNil[seq] be deprecated? I think no code should be written anymore that relies on that functionality |
22:14:19 | FromGitter | <Varriount> @krux02 Shouldn't those procedures be kept until strings and sequences actually initialize automatically? |
22:15:13 | FromGitter | <Varriount> @krux02 The thing is, how would one prevent automatic initialization (for optimization purposes? |
22:17:16 | * | yglukhov joined #nim |
22:17:53 | * | couven92 quit (Ping timeout: 260 seconds) |
22:18:10 | FromGitter | <krux02> well I don't say those procedures should be removed. I just say that they should be deprecated, just to prevent people using the nil state of those type for some logic |
22:19:39 | FromGitter | <krux02> and automatic initialization should not be prevented |
22:21:08 | * | Jesin quit (Quit: Leaving) |
22:21:33 | FromGitter | <krux02> I think a seq should be implemented like in gcc with the three pointers |
22:21:55 | FromGitter | <krux02> preventing automatic initialization could really confuse the GC (I think) |
22:23:24 | FromGitter | <krux02> but with the three pointer the empty seq would be implemented without allocation |
22:23:51 | FromGitter | <krux02> and if strings are implemented similarly, they could have small string optimizations |
22:24:00 | FromGitter | <krux02> or strings become immutable |
22:25:03 | FromGitter | <Varriount> @krux02 Araq has a personal experimental branch with an immutable string type. He couldn't find a benchmark/scenario where immutable strings won. |
22:25:50 | Araq | the branch is on github btw |
22:26:07 | Araq | compile with -d:nimImmutableStrings and see the results for yourself |
22:27:55 | * | ShalokShalom quit (Ping timeout: 268 seconds) |
22:30:22 | FromGitter | <watzon> Working on my first big nim project, a (hopefully) fully featured Nunjucks parser |
22:30:31 | FromGitter | <watzon> So far I have the Lexer https://gitlab.com/watzon/nunchaku/blob/master/src/nunchaku/lexer.nim |
22:32:26 | * | chemist69 quit (Ping timeout: 246 seconds) |
22:32:40 | * | rauss quit (Quit: WeeChat 1.9) |
22:33:27 | * | yglukhov quit (Remote host closed the connection) |
22:33:39 | FromGitter | <Varriount> @watzon Nitpicking - if you want to follow convention, procedures that initialize object types should be named "initXXX", where "XXX" is the type name. |
22:34:10 | FromGitter | <watzon> @Varriount rather than newXXX? |
22:34:21 | FromGitter | <Varriount> newXXX is for reference types. |
22:34:32 | FromGitter | <Varriount> WHITESPACE_CHARS et al. can be character sets. |
22:35:20 | * | chemist69 joined #nim |
22:36:04 | FromGitter | <Varriount> I find using the command notation on procedures that take no arguments confusing (I prefer `t.forward()` or `forward(t)` over `t.forward`. |
22:36:08 | FromGitter | <watzon> How do character sets work? Really I'm taking the javascript implementation of nunjucks and reverse engineering it into nim, so I know things aren't going to be perfect right off the bat |
22:36:11 | FromGitter | <Varriount> That's personal taste though. |
22:36:19 | FromGitter | <watzon> That's half the reason I'm sharing it haha |
22:36:29 | FromGitter | <Varriount> Nim sets are bit sets. |
22:36:46 | FromGitter | <Varriount> https://en.wikipedia.org/wiki/Bit_array |
22:37:45 | FromGitter | <Varriount> https://nim-lang.org/docs/manual.html#types-set-type |
22:37:56 | FromGitter | <watzon> So as an example how would I turn `const WHITESPACE_CHARS* = "\n\t\r\u00A0\u0020\u200B"` into a bit set? I don't see any references to bit sets in the docs |
22:38:08 | FromGitter | <watzon> Nevermind lol |
22:39:03 | FromGitter | <Varriount> Also, keep in mind that in Nim, the character escape '\n' is transformed into the target newline sequence. |
22:39:56 | FromGitter | <krux02> well I think immutable strings have potential for optimizations, especially because they don't need copy semantic anymore |
22:40:30 | FromGitter | <Varriount> @krux02 At this point, I'm wondering if string references might not be simpler. |
22:41:07 | FromGitter | <krux02> well I think that strings a parameters could internally be optimized to string references |
22:41:46 | FromGitter | <krux02> so that passing a substring to a function also doesn't need to copy |
22:42:19 | FromGitter | <Varriount> That can be done with an optimization pass though, not a user-provided immutable string type |
22:43:29 | FromGitter | <Varriount> @Araq I can't believe I'm actually arguing against adding an immutable string type now. |
22:45:41 | FromGitter | <watzon> How would you do "u00A0" as a char in nim? |
22:46:51 | FromGitter | <cyberlis> > Guys. I want make API calls to server. ⏎ ⏎ I want call it like this: ⏎ ⏎ ``` ⏎ ⏎ And get this calls ⏎ ``` ... [https://gitter.im/nim-lang/Nim?at=596e8fdbf5b3458e305d7ebf] |
22:47:02 | FromGitter | <Varriount> @watzon Nim characters are 8-bit integers. You need to use https://nim-lang.org/docs/unicode.html |
22:47:02 | FromGitter | <cyberlis> > ``` ⏎ type ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=596e8fe54bcd78af56c2efab] |
22:48:03 | FromGitter | <Varriount> @cyberlis `repr` only takes one argument. |
22:48:37 | FromGitter | <cyberlis> ok. it means i can iterate over data ? |
22:49:26 | FromGitter | <Varriount> Possibly. I haven't used varargs in a '.' procedure before. |
22:49:39 | * | yingjun joined #nim |
22:49:43 | FromGitter | <Varriount> @watzon Nim characters are 8-bit integers. You need to use https://nim-lang.org/docs/unicode.html |
22:54:00 | * | yingjun quit (Ping timeout: 240 seconds) |
22:58:26 | * | PMunch joined #nim |
23:00:11 | FromGitter | <cyberlis> I want ask about `ref` objects |
23:00:35 | FromGitter | <cyberlis> when i have to use `new` and when i don't have to do it |
23:01:44 | FromGitter | <krux02> well I don't use ref objects at all, but if I understand correctly new allocates objects on the GC heap for you |
23:02:02 | FromGitter | <Varriount> @krux02 Never? You never use ref objects? |
23:02:10 | FromGitter | <krux02> never |
23:02:21 | FromGitter | <zacharycarter> I haven't used any ref objects in zengine either |
23:02:23 | FromGitter | <krux02> I don't know for what I would need ref types |
23:02:31 | FromGitter | <zacharycarter> I used them a lot in frag |
23:02:42 | FromGitter | <cyberlis> @Varriount if you are here, please answer my question |
23:02:47 | FromGitter | <cyberlis> please ^^ |
23:03:05 | FromGitter | <krux02> @zacharycarter and then you realized you don't need them? |
23:03:26 | FromGitter | <cyberlis> If i define type with like this ⏎ ⏎ ```type ⏎ MyObject = ref object``` [https://gitter.im/nim-lang/Nim?at=596e93bdbf7e6af22ceffe28] |
23:03:33 | FromGitter | <krux02> well when you have a var of a ref object |
23:03:37 | FromGitter | <cyberlis> then i dont have to use `new` |
23:03:37 | FromGitter | <krux02> you cal call myvar.new |
23:03:46 | FromGitter | <watzon> Is there an easy way to turn a char into a rune? Or turn a string with a single utf-8 character in it into a rune? |
23:03:56 | FromGitter | <cyberlis> because it will work automatically? |
23:03:57 | FromGitter | <krux02> and then myvar is not nil anymore but correctly initialized with an object |
23:04:26 | PMunch | cyberlis, when you have something that is not a ref. For example an int, it is initalised to it's null value (for ints the number ). When you create a new variable of int type it allocates memory on the stack for it and you can use it without new. A ref type is basically as a pointer. So if I say that I want a ref to an array of length 5 it will actually only allocate space for the pointer and not the array. So by doing new you |
23:04:26 | PMunch | basically tell Nim to allocate space for the object that is referenced and then set the reference to the allocated space (which is nulled). |
23:04:33 | FromGitter | <krux02> no it is not magic it is generic in system.nim |
23:04:35 | PMunch | Does that make sense? |
23:04:41 | FromGitter | <krux02> https://nim-lang.org/docs/system.html#new,ref.T |
23:05:15 | FromGitter | <krux02> But I never use ref objects |
23:05:25 | FromGitter | <krux02> and when you think about it you will probably also not need them |
23:05:41 | FromGitter | <Varriount> @watzon If you don't mind a small performance penalty, you can just create a small string. |
23:06:42 | FromGitter | <Varriount> @watzon Why do you need to handle UTF-8 characters? |
23:06:48 | FromGitter | <watzon> @Varriount I love the idea of runes, they have a lot of the features I've been looking for like `runeAt`, but comparing Runes and chars/strings is becoming a pain |
23:07:19 | FromGitter | <watzon> They also make handling newlines a little easier since you can't do `'\n'` |
23:07:22 | FromGitter | <krux02> @watzon well runeAt is the function that you should avoid the most |
23:07:33 | FromGitter | <watzon> @krux02 why is that? |
23:07:48 | FromGitter | <krux02> because indexing a string by rune can only be implemented by scanning through the entire string |
23:08:16 | FromGitter | <watzon> Ahh I see |
23:08:41 | FromGitter | <krux02> meaning when you have a loop for i in ...: str.runeAt(i) ... |
23:08:50 | FromGitter | <krux02> you already have O(N^2) time |
23:08:52 | FromGitter | <krux02> not good |
23:09:21 | FromGitter | <Varriount> @watzon What kind of scenarios require you to use unicode? |
23:09:30 | FromGitter | <krux02> in iterator that gives you all the runes is fine |
23:09:31 | FromGitter | <watzon> Yeah I get what you're saying |
23:11:18 | FromGitter | <zacharycarter> @krux02 pretty much |
23:11:22 | FromGitter | <watzon> @Varriount I don't think I really need unicode, but I'm wondering how I can turn `WHITESPACE_CHARS* = "\n\t\r\u00A0\u0020\u200B"` into a bit set like you were saying |
23:12:01 | FromGitter | <watzon> Even if I take out the unicode characters there, `\n` still can't be a char |
23:12:03 | * | PMunch quit (Quit: leaving) |
23:12:18 | FromGitter | <cyberlis> "\c\l" |
23:12:30 | FromGitter | <watzon> *facepalm* |
23:12:34 | FromGitter | <Varriount> :3 |
23:12:40 | FromGitter | <watzon> I should've thought of that |
23:12:52 | FromGitter | <krux02> @watzon sorry rune it is implemented with a byte offset |
23:12:56 | * | FromGitter * Varriount gives @cyberlis the award of the day |
23:13:15 | FromGitter | <krux02> so it does work without iterating throgh the entire string |
23:13:35 | FromGitter | <krux02> but geting the N'th rune only works in O(N) time, I thought rune at was that function |
23:13:40 | FromGitter | <krux02> sorry for the misinformation |
23:13:52 | FromGitter | <watzon> Ahh ok |
23:14:48 | FromGitter | <cyberlis> > @Varriount gives @cyberlis the award of the day ⏎ what does this mean? it's a joke? or i said something stupid? |
23:15:11 | FromGitter | <watzon> It looks serious |
23:15:15 | FromGitter | <watzon> It's in purple |
23:15:18 | FromGitter | <Varriount> It's a joke. I'm thankful that you gave a helpful, insightful answer |
23:15:53 | FromGitter | <cyberlis> > It looks serious ⏎ -_- |
23:16:17 | FromGitter | <Varriount> It's like Alexander the Great cutting through the Gordian Knot |
23:19:06 | * | nsf quit (Quit: WeeChat 1.9) |
23:26:28 | * | arnetheduck quit (Ping timeout: 255 seconds) |
23:32:01 | * | v17d quit (Ping timeout: 276 seconds) |
23:33:16 | * | kier quit (Remote host closed the connection) |
23:34:50 | * | Jesin joined #nim |
23:35:28 | FromGitter | <zacharycarter> 3d model loading wip |
23:35:31 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/rd6b/Screen-Shot-2017-07-18-at-7.35.11-PM.png) |
23:35:37 | FromGitter | <krux02> well nuget fails to get the dependencies |
23:35:53 | FromGitter | <krux02> The 3D model is the easy part |
23:36:03 | FromGitter | <krux02> wail for the skeletal animation |
23:36:14 | FromGitter | <zacharycarter> oh I've attempted skel animation before |
23:36:20 | FromGitter | <zacharycarter> and I know it's not fun :) |
23:36:27 | FromGitter | <krux02> ok then it might be easier |
23:36:42 | FromGitter | <krux02> I am very proud of my iqm model loader |
23:36:50 | FromGitter | <krux02> it has skeletal animation |
23:37:01 | FromGitter | <zacharycarter> is this available on github? |
23:37:09 | FromGitter | <zacharycarter> I've just written an obj loader so far |
23:37:33 | krux02 | yes |
23:37:40 | krux02 | https://camo.githubusercontent.com/9e797343b82d379a3eb5c9fcca5c0013bb13882d/687474703a2f2f692e696d6775722e636f6d2f59454e707362512e706e67 |
23:38:19 | krux02 | https://github.com/krux02/opengl-sandbox/blob/master/examples/mesh_loading_tiny.nim |
23:39:45 | krux02 | https://github.com/krux02/opengl-sandbox/blob/master/fancyglpkg/iqm.nim |
23:41:12 | krux02 | well obj does not have skeletal animations |
23:41:26 | krux02 | iqm is a mesh format that seemed logicalt to implement |
23:43:46 | FromGitter | <krux02> @zacharycarter your renderer looks so low res |
23:43:46 | * | user0 quit (Read error: Connection reset by peer) |
23:43:49 | FromGitter | <krux02> is that inteded? |
23:44:01 | * | user0 joined #nim |
23:45:17 | FromGitter | <zacharycarter> yeah |
23:45:45 | FromGitter | <zacharycarter> at least for the primtive drawing |
23:50:19 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:52:12 | FromGitter | <zacharycarter> @krux02 I was thinking about leveraging assimp, but it's a third party lib which would require users to compile it |
23:52:20 | FromGitter | <zacharycarter> skeletal animation becomes much simpler with assimp I believe |
23:54:15 | * | dave24 quit (Ping timeout: 268 seconds) |
23:54:35 | * | heinrich5991 quit (Ping timeout: 240 seconds) |
23:56:01 | * | dave24 joined #nim |
23:56:32 | krux02 | well iqm is a very easy mesh format that does everything you need |
23:56:50 | krux02 | it is binany so there is no parsing just pointer casting :P |
23:57:01 | FromGitter | <zacharycarter> gotcha |
23:57:25 | krux02 | well in theory the is still endianness |