00:02:27 | * | couven92 quit (Quit: Client Disconnecting) |
00:12:02 | * | Nobabs27 joined #nim |
00:14:22 | * | chemist69 quit (Ping timeout: 259 seconds) |
00:16:58 | * | chemist69 joined #nim |
00:26:49 | * | brson quit (Ping timeout: 260 seconds) |
00:27:22 | * | brson joined #nim |
00:37:14 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:52:36 | * | rauss joined #nim |
01:16:49 | * | krux02 quit (Remote host closed the connection) |
01:23:17 | * | synshroud quit (Quit: ZNC 1.6.4 - http://znc.in) |
01:25:06 | * | synshroud joined #nim |
01:46:15 | * | zachcarter joined #nim |
02:20:11 | * | chemist69 quit (Ping timeout: 255 seconds) |
02:24:51 | * | chemist69 joined #nim |
02:30:57 | zachcarter | If i’m going to be writing and parsing configuration data in Nim, what’s the preferred format for doing so / best supported format? |
02:30:59 | zachcarter | JSON? |
02:31:26 | zachcarter | rst? |
02:44:27 | demi- | cfg i believe |
02:51:14 | * | chemist69 quit (Ping timeout: 255 seconds) |
02:51:39 | zachcarter | thank you |
03:03:02 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:04:54 | * | chemist69 joined #nim |
03:13:54 | * | gmpreussner_ quit (Ping timeout: 268 seconds) |
03:15:25 | * | gmpreussner joined #nim |
03:21:24 | FromGitter | <Varriount> zachcarter: What kind of configuration data? |
03:21:41 | zachcarter | I’m going to write a texture packer I think for creating texture atlasas |
03:21:46 | zachcarter | I think cfg will work perfectly |
03:21:59 | FromGitter | <Varriount> JSON is nice because it's easily machine readable and writable, and cfg is nice, but nonstandard. |
03:22:07 | zachcarter | yeah |
03:22:26 | FromGitter | <Varriount> There's also NimYAML, which is (in my opinion) a shining example of a proper Nim library. |
03:23:01 | zachcarter | hmm NimYaml does sound interesting |
03:23:16 | zachcarter | pure nim yaml implementation |
03:23:52 | zachcarter | looking at the demos now |
03:29:23 | demi- | yeah i've used that for a bunch of configs, it is pretty nice |
04:52:02 | * | chemist69 quit (Ping timeout: 240 seconds) |
05:00:53 | * | rauss quit (Quit: WeeChat 1.7) |
05:05:28 | * | brson quit (Quit: leaving) |
05:08:41 | zachcarter | what’s the best way to ensure an object doesn’t get garbage collected? |
05:09:08 | zachcarter | the gc is ref counted right so as long as I keep a reference alive it shouldn’t get gc'd? |
05:15:36 | zachcarter | nevermind I was doing something stupid |
05:19:06 | * | chemist69 joined #nim |
05:59:17 | * | gokr joined #nim |
06:03:53 | zachcarter | can someone remind me how to create a string of a specified size? |
06:12:24 | FromGitter | <nigredo-tori> @zachcarter https://nim-lang.org/docs/system.html#newString,Natural |
06:12:37 | * | yglukhov joined #nim |
06:12:39 | zachcarter | thank you |
06:39:11 | * | nsf joined #nim |
06:56:29 | * | chemist69 quit (Ping timeout: 255 seconds) |
06:58:50 | * | chemist69 joined #nim |
07:04:56 | * | Nobabs27 quit (Quit: Leaving) |
07:29:27 | * | zachcarter quit (Quit: zachcarter) |
07:49:43 | * | Andris_zbx joined #nim |
08:36:24 | * | Vladar joined #nim |
08:42:25 | * | gokr quit (Ping timeout: 260 seconds) |
08:50:27 | * | yglukhov quit (Remote host closed the connection) |
09:02:02 | * | chemist69 quit (Ping timeout: 255 seconds) |
09:06:43 | * | yglukhov joined #nim |
09:06:44 | * | chemist69 joined #nim |
09:10:13 | * | couven92 joined #nim |
09:50:33 | * | gokr joined #nim |
10:07:09 | * | Arrrr joined #nim |
10:07:09 | * | Arrrr quit (Changing host) |
10:07:09 | * | Arrrr joined #nim |
10:38:47 | * | gokr quit (Ping timeout: 255 seconds) |
10:54:57 | * | gokr joined #nim |
11:01:09 | * | yglukhov quit (Remote host closed the connection) |
11:04:50 | * | yglukhov joined #nim |
11:09:22 | * | chemist69 quit (Ping timeout: 240 seconds) |
11:13:08 | * | yglukhov quit (Remote host closed the connection) |
11:13:35 | * | yglukhov joined #nim |
11:17:57 | * | FACILITY_GUY joined #nim |
11:22:01 | * | shashlick quit (Ping timeout: 260 seconds) |
11:23:11 | * | yglukhov quit (Remote host closed the connection) |
11:24:37 | * | shashlick joined #nim |
11:27:14 | * | yglukhov joined #nim |
11:31:49 | * | yglukhov quit (Ping timeout: 260 seconds) |
11:36:45 | * | chemist69 joined #nim |
11:42:56 | * | bjz joined #nim |
11:44:22 | * | krux02 joined #nim |
12:01:40 | * | zachcarter joined #nim |
12:02:29 | * | Snircle joined #nim |
12:03:42 | * | PMunch joined #nim |
12:05:10 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
12:06:56 | * | bjz joined #nim |
12:11:35 | * | bjz_ joined #nim |
12:11:40 | * | chemist69 quit (Quit: WeeChat 1.7) |
12:14:17 | * | bjz quit (Ping timeout: 260 seconds) |
12:16:39 | * | yglukhov joined #nim |
12:23:02 | * | chemist69 joined #nim |
12:25:47 | FromGitter | <Varriount> zachcarter: If you want to ensure that an object isn't freed by the garbage collector, you can use the increment/decrement reference functions |
12:34:47 | niv | dom96: thanks for giving me that link the other day. i was pretty busy and i forgot to respond but it was useful |
13:00:18 | * | vlad1777d joined #nim |
13:00:21 | * | gokr quit (Ping timeout: 268 seconds) |
13:04:45 | * | Salewski joined #nim |
13:05:31 | Salewski | I have a seq of items, and I want to process each item. Only if that processing is successful, that item should be removed from seq. |
13:06:09 | Salewski | Is there a very easy solution, or have I to do it with a counter and push() and pop() operations? |
13:10:40 | Salewski | Well, maybe push all unsuccesfully processed items to new empty list, and finally copy that new list back. |
13:10:45 | * | rosshadden quit (Ping timeout: 260 seconds) |
13:11:10 | Salewski | Bye. |
13:11:15 | * | Salewski left #nim (#nim) |
13:15:40 | * | bjz joined #nim |
13:16:22 | * | bjz_ quit (Ping timeout: 240 seconds) |
13:16:42 | * | zachcarter quit (Quit: zachcarter) |
13:17:31 | * | rosshadden joined #nim |
13:20:44 | stisa | Salewski: maybe sequtils.keepif ? https://nim-lang.org/docs/sequtils.html#keepIf,seq[T],proc(T) |
13:40:08 | * | UxerUospr joined #nim |
13:45:45 | * | vlad1777d quit (Ping timeout: 260 seconds) |
13:50:08 | * | Salewski joined #nim |
13:51:01 | Salewski | Yes, keepIf was what I need, thanks! |
13:52:47 | * | Salewski left #nim (#nim) |
14:03:36 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:06:06 | * | yglukhov quit (Remote host closed the connection) |
14:06:44 | * | yglukhov joined #nim |
14:10:28 | * | zachcarter joined #nim |
14:15:13 | Arrrr | We need a {.public.} that defaults every field access to public. Useful for big case objects |
14:19:10 | * | yglukhov quit (Remote host closed the connection) |
14:19:23 | * | xet7 quit (Quit: Leaving) |
14:23:29 | * | gokr joined #nim |
14:27:29 | * | rokups joined #nim |
14:39:40 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:48:17 | * | rauss joined #nim |
14:49:35 | * | joequery joined #nim |
14:57:32 | * | zachcarter_ joined #nim |
14:59:22 | * | zachcarter quit (Ping timeout: 268 seconds) |
14:59:23 | * | zachcarter_ is now known as zachcarter |
15:06:17 | * | zachcarter quit (Quit: zachcarter) |
15:06:56 | * | FACILITY_GUY quit (Read error: Connection reset by peer) |
15:07:01 | * | nsf quit (Quit: WeeChat 1.7) |
15:07:21 | * | zachcarter joined #nim |
15:10:26 | * | smt quit (Read error: Connection reset by peer) |
15:10:57 | * | smt joined #nim |
15:19:39 | * | yglukhov joined #nim |
15:24:13 | * | yglukhov quit (Ping timeout: 260 seconds) |
15:44:40 | * | xet7 joined #nim |
15:47:28 | * | arnetheduck quit (Ping timeout: 240 seconds) |
16:45:28 | * | ThisAsYou joined #nim |
16:48:21 | * | yglukhov joined #nim |
16:52:53 | * | yglukhov quit (Ping timeout: 260 seconds) |
17:11:07 | * | surge-protect joined #nim |
17:11:17 | surge-protect | Hello |
17:12:19 | surge-protect | How do I use multi-threading in asynchttpserver ? |
17:15:33 | dom96 | surge-protect: You can't right now, or at least not easily. |
17:17:57 | surge-protect | a colleague of mine ran the demo asynchttpserver and was getting 10k rq/s . I was wondering how much more I could crank out |
17:18:13 | * | yglukhov joined #nim |
17:19:22 | dom96 | If you're using Linux then you can set reusePort to true and run multiple processes. |
17:20:01 | dom96 | Also make sure you're compiling with -d:release |
17:20:16 | surge-protect | dom96: are there more/better examples of using the server lib? I want to try implementing a server transporting actual JSON data |
17:20:45 | * | AckZ joined #nim |
17:20:46 | surge-protect | oh yes, I am currently compiling like this: nim c file.nim . would a different compilation improve performance? |
17:20:58 | dom96 | yes: nim c -d:release file.nim |
17:21:29 | dom96 | You likely want a web framework, if so check out Jester. |
17:22:07 | FromGitter | <andreaferretti> also https://github.com/andreaferretti/rosencrantz |
17:22:30 | surge-protect | dom96: is there a problem using the raw http lib? |
17:23:02 | dom96 | surge-protect: you'll need to implement many things yourself like routing. |
17:23:08 | FromGitter | <andreaferretti> no problem, it is just that jester and rosencrantz should be more convenient |
17:23:45 | surge-protect | based on the example from here: https://nim-lang.org/docs/asynchttpserver.html |
17:23:49 | dom96 | Whether you should use a web framework or not depends on what you intend to do. |
17:24:00 | surge-protect | do I use a single proc for all my URL paths? |
17:25:19 | dom96 | asynchttpserver does no routing, it just calls your callback for every request. |
17:26:03 | surge-protect | would adding routing bloat the lib or make it better? |
17:30:00 | FromGitter | <andreaferretti> routing and a few more things is what jester and rosencrantz add on top of asynchttpserver |
17:30:15 | FromGitter | <andreaferretti> really, they are not that heavyweight |
17:30:57 | * | UxerUospr quit (Ping timeout: 260 seconds) |
17:31:05 | surge-protect | andreaferretti if I use your DSL, how do I implement things like interaction with databases? |
17:31:07 | dom96 | yeah, and you can easily write your own if you really want. |
17:31:33 | FromGitter | <andreaferretti> the same way you would do with asynchttpserver or jester |
17:31:35 | FromGitter | <andreaferretti> :-) |
17:31:43 | FromGitter | <andreaferretti> with a library to talk to databases |
17:31:52 | FromGitter | <andreaferretti> these frameworks are pretty minimal |
17:31:59 | FromGitter | <andreaferretti> think sinatra, not rails or django |
17:32:12 | surge-protect | so the DSL will not impact speaking to a DB in that I need to use the DSL? |
17:32:19 | * | mal`` quit (Quit: Leaving) |
17:32:23 | FromGitter | <andreaferretti> I hope not! :-D |
17:32:50 | FromGitter | <andreaferretti> but if you run into any issues, please let me know |
17:33:30 | surge-protect | have you tried it yourself? andreaferretti |
17:34:33 | * | couven92 quit (Quit: Client disconnecting) |
17:35:11 | FromGitter | <andreaferretti> not really, no |
17:35:30 | FromGitter | <andreaferretti> but I don't see how the two things should relate at all |
17:35:58 | surge-protect | I would hope you would have used your DSL for a real-world scenario :P |
17:36:56 | * | mal`` joined #nim |
17:38:24 | demi- | dom96: does nim-lang.org run off of one of these? |
17:38:49 | FromGitter | <andreaferretti> I think Jester |
17:39:14 | dom96 | forum.nim-lang.org does |
17:39:27 | * | joequery quit (Remote host closed the connection) |
17:40:48 | * | yglukhov quit (Remote host closed the connection) |
17:41:14 | demi- | neat! |
17:42:52 | demi- | wow this is the first time i've looked at jester and this DSL seems really good |
17:43:52 | demi- | could easily replace my use of apache and such in terms of functionality, but not sure about the other bits like multiple hosts and ssl certs |
17:44:20 | * | Andris_zbx quit (Remote host closed the connection) |
17:45:09 | zachcarter | http://imgur.com/a/yqKj1 |
17:46:26 | dom96 | well currently I would recommend placing it behind a reverse proxy like nginx |
17:46:49 | demi- | for security? |
17:47:36 | * | Vladar quit (Remote host closed the connection) |
17:49:09 | federico3 | that, and also you can offload serving static contents |
17:50:09 | dom96 | yeah |
17:55:20 | demi- | and presumably there is no guide for doing this kind of setup |
17:55:33 | federico3 | demi-: what kind exactly? |
17:56:09 | demi- | doing webserver setup using jester as the thing serving content |
17:56:11 | dom96 | Yeah, docs for jester can definitely use improvement. |
17:56:19 | dom96 | But it's a basic reverse proxy |
17:56:28 | dom96 | if you search "reverse proxy nginx" you should find a guide |
17:56:42 | dom96 | it's basically `proxy_pass localhost:port` |
17:56:43 | federico3 | demi-: I can put a little nginx example at the bottom of https://github.com/nim-lang/Nim/wiki/Tutorial:-Creating-a-(micro)-service |
17:58:10 | demi- | that would be helpful, i've written a tool for generating my website's content using nim (ported from python) and now seeing this -- makes me more likely to want to use something to generate jester DSL for it than having to maintain what i have in place now |
18:00:15 | * | yglukhov joined #nim |
18:01:49 | * | zachcarter_ joined #nim |
18:04:28 | * | zachcarter quit (Ping timeout: 240 seconds) |
18:04:28 | * | zachcarter_ is now known as zachcarter |
18:04:39 | federico3 | demi-: done |
18:06:13 | demi- | oooh, i see; so you would be using nginx for the hostname resolution/ssl certs/etc and would just forward the requests onto the jester port locally and then hand back the responses |
18:09:53 | federico3 | that also allows running multiple domains behind the same instance and gathering metrics from Nginx |
18:10:20 | demi- | yeah |
18:10:38 | demi- | interesting, thank you for that! |
18:10:47 | * | zachcarter quit (Quit: zachcarter) |
18:11:27 | * | zachcarter joined #nim |
18:13:17 | federico3 | anytime :) |
18:15:08 | * | nsf joined #nim |
18:20:19 | * | surge-protect quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
18:20:56 | * | surge-protect joined #nim |
18:22:19 | surge-protect | federico3: do you have more guides/tutorials? |
18:23:21 | cheatfate | demi-, do not use `jester` as frontend server, its not ready for production, even for homepage |
18:24:03 | federico3 | surge-protect: on what topics? |
18:24:19 | surge-protect | federico3: web-based stuff |
18:24:42 | federico3 | surge-protect: can you be more specific please? :) |
18:24:55 | demi- | cheatfate: gotcha |
18:25:30 | surge-protect | federico3: any demos/tutorials/examples for building small/medium sized web services/applications |
18:26:13 | * | Vladar joined #nim |
18:26:52 | dom96 | cheatfate: hrm, what do you mean by "frontend server"? Do you consider jester ready for production when run behind nginx? |
18:27:47 | surge-protect | dom96: i think he might be referring to nginx being battle-tested for security-threats, whereas jester isn't |
18:29:02 | dom96 | surge-protect: btw my book has a chapter on writing a web app |
18:29:18 | dom96 | Although it does cost money unfortunately :) |
18:30:05 | surge-protect | I want to know "just-enough" before I buy a book I may never read (if I don't know "enough") dom96 :) |
18:30:39 | surge-protect | has jester been rewritten to use asynchttp, etc. ? I see it is in active development |
18:31:06 | dom96 | Here is the code for that chapter in case you wanna learn by example: https://github.com/dom96/nim-in-action-code/tree/master/Chapter7/Tweeter |
18:31:13 | dom96 | I still need to document the code more though |
18:31:23 | dom96 | Yes, Jester uses asynchttpserver. |
18:36:03 | cheatfate | in your case dom96, nginx - fronted server, jester - backend server |
18:36:17 | cheatfate | frontend |
18:39:49 | * | Jesin quit (Quit: Leaving) |
18:40:32 | * | Arrrr1 joined #nim |
18:40:50 | * | Arrrr quit (Disconnected by services) |
18:42:19 | * | Arrrr1 quit (Client Quit) |
18:42:20 | Calinou | when deploying to production, you probably should always use nginx as a reverse-proxy anyway, it's easier to offer HTTPS or HTTP/2 this way, and many other things |
18:42:31 | Calinou | be it Python, Node.js, Nim, anything |
18:42:39 | Calinou | PHP is an exception, because it can be run directly :) |
18:42:51 | * | Arrrr joined #nim |
18:42:51 | * | Arrrr quit (Changing host) |
18:42:51 | * | Arrrr joined #nim |
18:44:32 | cheatfate | PHP is absolutely same, because to run it effectively you need fcgi executor |
18:45:27 | Calinou | yes, in nginx you need php-fpm |
18:45:33 | Calinou | but no reverse proxy is needed |
18:47:44 | cheatfate | Calinou, its the same shit, just using unix sockets by default |
18:47:59 | cheatfate | and i think nginx can handle unix sockets for other backends too |
18:49:25 | cheatfate | upstream upstream_name { |
18:49:26 | cheatfate | server unix:/path/to/socket fail_timeout=0; |
18:49:26 | cheatfate | } |
18:55:58 | * | joequery joined #nim |
18:59:02 | * | yglukhov quit (Remote host closed the connection) |
19:04:35 | * | zachcarter quit (Ping timeout: 255 seconds) |
19:18:43 | * | Matthias247 joined #nim |
19:23:02 | * | yglukhov joined #nim |
19:26:23 | niv | a bit late to the party, but "caddy" is pretty easy to use and has a well-working transparent letsencrypt ssl thing |
19:39:58 | * | yglukhov quit (Remote host closed the connection) |
19:44:29 | * | UxerUospr joined #nim |
19:46:14 | * | yglukhov joined #nim |
19:46:31 | Calinou | yep, I've been watching it |
19:46:40 | Calinou | it's not ideal for PHP applications (hardly any documentation, unlike nginx) though |
19:46:45 | Calinou | and since I primarily do PHP work... |
19:47:18 | * | bjz joined #nim |
19:49:37 | * | zachcarter joined #nim |
20:03:57 | * | yglukhov quit (Remote host closed the connection) |
20:05:37 | * | krux02 quit (Ping timeout: 260 seconds) |
20:09:00 | * | yglukhov joined #nim |
20:13:33 | * | yglukhov quit (Ping timeout: 260 seconds) |
20:19:17 | * | smt quit (Read error: Connection reset by peer) |
20:20:05 | * | smt joined #nim |
20:20:30 | * | krux02 joined #nim |
20:22:55 | * | Jesin joined #nim |
20:24:29 | * | UxerUospr quit (Quit: Lost terminal) |
20:40:36 | * | ofelas joined #nim |
20:41:31 | surge-protect | dom96: with the rewrite of jester, does that mean it has better performance than 12 months ago? |
20:41:50 | dom96 | 12 months ago? |
20:42:10 | * | rokups quit (Quit: Connection closed for inactivity) |
20:42:42 | surge-protect | before the rewrite, which I am not sure of exactly when |
20:43:31 | * | Jesin quit (Quit: Leaving) |
20:44:53 | dom96 | sure |
20:44:59 | dom96 | But I don't know by how much |
20:46:01 | surge-protect | based on my current tests using wrk, if jester is just a thin wrapper over asynchttp, it should be quite good at handling things |
20:46:23 | dom96 | there is still lots of room for optimisation in jester |
20:46:55 | dom96 | but why are you so interested in the performance? |
20:48:53 | surge-protect | I consider my time-investment in learning/using Nim to be able to handle loads on smaller servers better than ruby/python/php could |
20:52:20 | * | Jesin joined #nim |
20:52:22 | dom96 | It can definitely handle loads better than those three |
20:52:55 | dom96 | And the speed will continue to improve. |
20:56:05 | krux02 | has anyone here experience with using a debugger in Nim? |
20:56:43 | krux02 | I mean showing content of variables and stepping through code |
20:58:08 | krux02 | and inspect variable under cursor |
21:00:19 | * | Arrrr quit (Remote host closed the connection) |
21:02:13 | cheatfate | krux02, its possible, but with current nim version is not comfortable at all |
21:02:51 | cheatfate | as Araq said to me earlier, use `echo` and `getStackTrace()` |
21:02:52 | FromGitter | <Varriount> I've heard that the Nim VS plugin does debugging rather well |
21:03:43 | krux02 | so with the nim programming language I am stuck at printf debugging |
21:03:59 | krux02 | or echo debugging |
21:04:32 | Araq | I can use gdb with Nim it's just that traditional debuggers don't work for me |
21:05:14 | cheatfate | Varriount: nim vs plugin don't do anything with debugging... |
21:05:32 | cheatfate | it has debug support in TODO |
21:05:44 | cheatfate | i think you are talking about vs code gdb plugin |
21:06:42 | cheatfate | so with latest changes made to name mangling its comfort ability is equal to plaing gdb debugging |
21:07:36 | * | huonw quit (Ping timeout: 276 seconds) |
21:09:08 | * | huonw joined #nim |
21:09:34 | cheatfate | Araq, you are only one person who can use traditional debugger with nim, and it not working for you too :) I think something must be made in this direction... |
21:09:39 | * | Trustable joined #nim |
21:10:00 | Araq | cheatfate: my coworkers can use Nim with a debugger too |
21:11:00 | krux02 | Araq: nobody in the community has any idea how to debug Nim code |
21:11:05 | cheatfate | Araq, ask them is it so comfortable as debugging plain C code? |
21:11:37 | Araq | --debugger:native |
21:11:42 | Araq | gdb myexe |
21:11:48 | Araq | br foo.nim:34 |
21:11:50 | Araq | run |
21:11:52 | * | Vladar quit (Remote host closed the connection) |
21:11:53 | Araq | bt |
21:11:57 | krux02 | yes, so far so good |
21:12:14 | krux02 | how do you visualize enums, strings and sequences? |
21:12:48 | * | Nobabs27 joined #nim |
21:13:55 | cheatfate | This is long story, what happens if code generated by macro? or generic template? |
21:14:10 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:15:03 | krux02 | cheatfate: as long as you don't generate you ast with newTree, you can still see where in the template you are |
21:15:11 | krux02 | a bit like c++ template debugging |
21:16:42 | krux02 | There I really like the JAI approach, where macros always generate strings that then get's compiled. All generated strings are actually stored in a file that is then used as locations for the debugger |
21:16:55 | * | aziz joined #nim |
21:16:57 | krux02 | JAI is another programming language |
21:17:43 | cheatfate | krux02, yeah bug this generated string is not stored inside of nim's source code, so current approach with marking c code with #line directive could not find any positions inside of nim source code... |
21:18:04 | cheatfate | bug* = but |
21:18:34 | krux02 | I am not sure what you want to say |
21:19:08 | cheatfate | krux02, ok |
21:19:29 | krux02 | What I just said was about another programming language, wher the generated code from macros is stored in a real file. |
21:19:43 | cheatfate | krux02, nim -> c -> executable with (DWARF/MSCOFF/PDB debugging information) |
21:20:10 | cheatfate | DWARF/MSCOFF/PDB know nothing about Nim |
21:20:15 | cheatfate | but they know C |
21:20:44 | cheatfate | before name mangling happens it was possible to just debug C code |
21:20:53 | cheatfate | it was hard but still possible |
21:21:01 | krux02 | codewithmacros.jai -> codewithmacros.jai, expandedmacros.jai -> codewithmacros.c, expandedmacros.c -> binary |
21:21:34 | cheatfate | yeah but nim don't generate `expandedmacros.nim` :) which will be very good to have inside of `nimcache` directory |
21:22:08 | Araq | print *x |
21:22:08 | Araq | (NimStringDesc) $10 = { |
21:22:08 | Araq | Sup = (len = 6, reserved = 7) |
21:22:10 | Araq | data = {} |
21:22:12 | Araq | } |
21:22:31 | Araq | print (char*)x->data |
21:22:31 | Araq | (char *) $11 = 0x000000010050f068 "foobar" |
21:23:37 | Araq | the rest of the discussion is equally mysterious. C doesn't have macros? give me a break |
21:23:39 | krux02 | print x->data |
21:25:56 | krux02 | it would be interesing to know what would happen, if every macro in nim would print it's result.repr into an expandedmacros.nim file, that is then used for debug locations |
21:27:37 | krux02 | Araq: the problem is, that terminal debugging is a much higher obstacle to take than visual debugging in e.g. visual-studio-code |
21:28:04 | krux02 | and in visual studio code, everything you just don't see the content of strings when you use gdb |
21:28:31 | krux02 | that's all solvable with gdb scripts that tell gdb how to understand nim cdoe |
21:28:51 | krux02 | the seqences can be opened like a tree |
21:29:46 | krux02 | and each element can be inspected individually |
21:36:58 | * | yglukhov joined #nim |
21:37:00 | zachcarter | hrm… if I remove this echo from my code things break - https://gist.github.com/zacharycarter/3d513223fec92b2bb6cecc9b08e3d46a#file-help-nim-L48 |
21:37:04 | zachcarter | I’m guessing something is getting GC'd |
21:37:08 | zachcarter | not sure why though |
21:41:47 | * | yglukhov quit (Ping timeout: 260 seconds) |
21:43:08 | * | Snircle joined #nim |
21:45:25 | zachcarter | okay I think I get why |
21:47:47 | krux02 | zachcarter: good, because I looked at it, and I have no idea |
21:47:54 | zachcarter | :D |
21:47:57 | zachcarter | thank you for looking |
21:48:05 | zachcarter | had to do with allocating on the heap vs stack |
21:48:08 | krux02 | yea that's basically all I did |
21:48:22 | krux02 | all I saw was unrelated to that bug |
21:48:32 | zachcarter | yeah |
21:48:45 | krux02 | when your code is full of discard, then you are probably better of setting the result as discardable |
21:49:13 | zachcarter | ah yeah - those discards are going to go away |
21:49:20 | zachcarter | I’m just avoiding writing a bunch of checks atm |
21:49:24 | krux02 | I thought so too |
21:49:27 | krux02 | it's temporary code |
21:49:33 | krux02 | all WIP |
21:49:53 | zachcarter | yup |
21:50:11 | zachcarter | I’m writing a texture packer to learn Nuklear / more of bgfx |
21:51:54 | * | yay joined #nim |
21:52:09 | krux02 | what do you main with a texture packer? |
21:52:25 | krux02 | you mean make a big texture atlas, or texture compression? |
21:52:49 | zachcarter | former |
21:53:12 | zachcarter | so rect bin packing |
21:53:42 | krux02 | yes that's a good idea I guess |
21:54:08 | krux02 | I think it's good as soon as you start to have a lot of assets |
21:54:29 | krux02 | then you could also start to have sparse textures, and only stream in the part of the texture, that is important |
21:55:10 | zachcarter | yup |
22:01:30 | krux02 | Just looked it up, ARB_spares_texture, not on a mac |
22:01:36 | krux02 | sorry |
22:02:31 | * | rauss quit (Quit: WeeChat 1.7) |
22:03:30 | Calinou | I found a project to do |
22:03:42 | Calinou | 1) buy domain "isthisopenglextensiononmacos.com" |
22:03:53 | Calinou | 2) set up a Jester project, replying "<h1>No</h1>" to every route |
22:03:59 | Calinou | :) |
22:05:23 | krux02 | they have some extensions |
22:05:31 | krux02 | for example ATI_texture_mirror_once |
22:06:16 | krux02 | or ARB_shading_language_include |
22:07:19 | demi- | https://developer.apple.com/opengl/capabilities/ and https://support.apple.com/en-us/HT202823 are what you want |
22:11:04 | krux02 | http://www.g-truc.net/doc/OpenGL%204%20Hardware%20Matrix.pdf |
22:12:24 | krux02 | demi: interesting is that the newest version of OpenGL for Apple is 4.1 |
22:12:34 | krux02 | that is 7 years ago since that was released |
22:13:15 | zachcarter | I heard Apple is not keeping up with new OpenGL stuffs - they’re focusing on Metal and their Metal / Vulkan integration |
22:13:20 | krux02 | so better said apple is 7 years behind |
22:13:39 | zachcarter | they basically gave Khronos a big FU |
22:14:39 | krux02 | they can do that, if they want to, but for me it means I don't support apple |
22:15:15 | krux02 | but yea we already had that |
22:18:33 | * | zachcarter quit (Read error: Connection reset by peer) |
22:18:58 | * | zachcarter joined #nim |
22:21:37 | * | krux02 quit (Quit: Leaving) |
22:25:53 | * | Trustable quit (Remote host closed the connection) |
22:39:16 | * | yglukhov joined #nim |
22:40:42 | * | yay quit (Quit: ZZZzzz…) |
22:43:43 | * | yglukhov quit (Ping timeout: 268 seconds) |
22:45:58 | * | cjbest joined #nim |
22:51:48 | * | Nobabs27 quit (Quit: Leaving) |
22:52:04 | * | Nobabs27 joined #nim |
22:55:57 | * | gokr quit (Ping timeout: 260 seconds) |
23:04:57 | FromGitter | <Varriount> Do the executives at apple really believe that people are going to go to the trouble of using Metal on anything but iOS? |
23:10:34 | * | nsf quit (Quit: WeeChat 1.7) |
23:16:33 | * | joequery quit (Remote host closed the connection) |
23:20:47 | * | aziz quit (Quit: Ex-Chat) |
23:21:11 | * | yay joined #nim |
23:25:53 | * | Jesin quit (Quit: Leaving) |
23:26:17 | zachcarter | I don’t know |
23:26:20 | zachcarter | they’re definitely smoking something |
23:26:36 | zachcarter | the think people are going to use their Metal bridge to Vulkan |
23:30:26 | FromGitter | <Varriount> Smells like Objective C again. |
23:30:50 | FromGitter | <Varriount> zachcarter: How is your project going? |
23:31:23 | zachcarter | mmm alright I guess - I’m working on building some tooling for the engine. I decided I’m going to focus on 2D for now so I’m working on a texture packer to learn Nuklear / BGFX |
23:31:36 | zachcarter | right now I’m having trouble getting BGFX and Nuklear to play nice with texture binding |
23:32:37 | * | cjbest quit (Ping timeout: 260 seconds) |
23:38:43 | FromGitter | <Varriount> BGFX doesn't handle texture binding? |
23:49:39 | * | yay quit (Quit: ZZZzzz…) |
23:59:10 | * | jabb joined #nim |
23:59:28 | jabb | hey, is there a way i can do the similar of "var int" in proc, but not in a proc |
23:59:43 | jabb | example: http://ideone.com/2ONGKZ |