| 00:00:07 | Araq | sorry, read what I just said, range of uint8 would have the same problem as uint8 |
| 00:00:14 | rauss | Just wondering. At this point it's curiosity and not trying to change anything |
| 00:00:23 | rauss | okay, my bad |
| 00:05:10 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 00:17:57 | * | yglukhov joined #nim |
| 00:18:28 | * | IRCFrEAK joined #nim |
| 00:18:29 | * | IRCFrEAK left #nim (#nim) |
| 00:21:58 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 00:32:14 | * | zachcarter joined #nim |
| 00:32:24 | zachcarter | can someone help me re-write this c++ statement in nim? |
| 00:32:31 | zachcarter | auto &textureHandle = *(bgfx::TextureHandle *) cmd->texture.ptr; |
| 00:32:42 | zachcarter | I imagine it would be something like : |
| 00:33:13 | zachcarter | var textureHandle = cast[ptr bgfx.TextureHandle](cmd.texture.`ptr`)[] |
| 00:33:14 | zachcarter | ? |
| 00:33:40 | ftsf | var textureHandle = cast[ptr TextureHandle](cmd.texture.`ptr`) ? |
| 00:34:08 | * | onionhammer quit (Ping timeout: 245 seconds) |
| 00:34:10 | zachcarter | I think the thing is dereferenced |
| 00:34:15 | zachcarter | thus the [] at the end |
| 00:34:18 | ftsf | ahh |
| 00:34:24 | ftsf | yeah |
| 00:34:26 | zachcarter | okay I just wanted a sanity check thank you |
| 00:34:31 | ftsf | well, does it work? =) |
| 00:34:33 | zachcarter | no |
| 00:34:51 | zachcarter | well it compiles |
| 00:34:58 | zachcarter | and that may not be where my problem lies |
| 00:35:05 | zachcarter | but this is what I”m seeing in my bgfx nuklear code - |
| 00:35:26 | zachcarter | http://imgur.com/a/U4BzB |
| 00:35:35 | zachcarter | this is what I see with my glfw3 / opengl3 test - |
| 00:35:52 | zachcarter | http://imgur.com/a/hydHN |
| 00:36:29 | FromGitter | <Varriount> `vra textureHandle = castbgfx.TextureHandle (cmd.texture.ptr);` |
| 00:36:32 | FromGitter | <Varriount> *var |
| 00:37:02 | FromGitter | <Varriount> Although I'm not completely sure. |
| 00:37:23 | ftsf | looks like fromgitter is eating some punctuation |
| 00:37:36 | zachcarter | yeah |
| 00:37:37 | FromGitter | <Varriount> `auto &textureHandle =` assigns to the memory pointed to by textureHandle? |
| 00:37:50 | zachcarter | yeah it creates a reference not a copy |
| 00:37:51 | zachcarter | I believe |
| 00:38:10 | zachcarter | I was confused by that too |
| 00:40:22 | zachcarter | not sure how to account for that |
| 00:44:44 | ftsf | not sure you need to |
| 00:46:07 | zachcarter | hrm |
| 00:50:20 | * | ftsf quit (Ping timeout: 259 seconds) |
| 00:55:40 | * | ftsf joined #nim |
| 01:16:51 | * | PMunch quit (Quit: leaving) |
| 01:17:09 | * | libman left #nim (#nim) |
| 01:27:20 | FromGitter | <Varriount> zachcarter: Unfortunately I'm not too experienced with references. I know enough to use them in function parameters when appropriate, that's it. |
| 01:28:16 | FromGitter | <Varriount> I've no idea what the mechanics are when you assign to a reference a value returned from a function. |
| 01:37:53 | ftsf | it's not a function in this case |
| 01:38:07 | ftsf | it's a structure member |
| 01:46:07 | FromGitter | <Varriount> Hm. Then, would the reference be a pointer to the structure member? |
| 01:46:52 | FromGitter | <Varriount> References are supposed to act like aliases in C and C++, so assigning to a reference would change the structures' memory |
| 02:10:05 | zachcarter | yeah I’m not sure |
| 02:10:37 | zachcarter | I do *think* the cast and assignment is working - as if I repr the result I get the correct bgfx data structure with the right value in the right field |
| 02:10:55 | zachcarter | so I’m guessing my problem lies elsewhere regarding why everything is drawing white |
| 02:13:06 | def-pri-pub | zachcarter: thank you for doing the nuklear bindings |
| 02:13:15 | zachcarter | no problem |
| 02:13:41 | zachcarter | is your blog 16bpp.net? |
| 02:13:42 | def-pri-pub | I was thinking about doin them myself, but I've recently accepted a new job so I felt as I wouldn't be able to dedicate enough time to making them nice. |
| 02:13:49 | def-pri-pub | Yup, that's mine. |
| 02:13:55 | zachcarter | ah cool :) thanks for the star |
| 02:14:12 | def-pri-pub | Are you planning on working on a Nim-Friendly API? |
| 02:14:36 | zachcarter | someone else asked me that earlier, sounds like there is some desire for it |
| 02:14:47 | zachcarter | it’s something I could potentially do |
| 02:14:55 | zachcarter | right now my focus is on getting a backend working with nim-bgfx for my game engine |
| 02:14:55 | def-pri-pub | Yeah, it really sucks right now to have to manually add in the casts for datatypes |
| 02:15:08 | zachcarter | ah that should be fixed now I believe |
| 02:15:13 | zachcarter | I think I removed all the nk data types |
| 02:15:14 | def-pri-pub | orly |
| 02:15:21 | zachcarter | most of them anyway |
| 02:15:28 | zachcarter | they should be replaced with nim-friendly types now |
| 02:15:36 | zachcarter | let me make sure I committed that |
| 02:15:55 | def-pri-pub | Were you able to bind all of the funcitons or at least get a list of what needs bound? I asked the nuklear people if they had a list or some docs and they told me they didn't. |
| 02:16:06 | * | vlad1777d quit (Quit: Leaving) |
| 02:16:11 | zachcarter | everything is bound except for the user data stuff |
| 02:16:13 | zachcarter | I still need to add in that |
| 02:16:28 | def-pri-pub | I'd be intersted in helping, but it sucks that Nuklear doesn't have all of its stuff doc'd. |
| 02:16:34 | zachcarter | yeah there should be no more nk_ specific ints floats etc |
| 02:16:48 | zachcarter | yeah, it could definitely use some docu |
| 02:17:32 | def-pri-pub | Have you been able to test custom skinning? Or porting over some of the examples? I wouldn't mind helping out. |
| 02:18:09 | zachcarter | I haven’t yet but I imagine I will be in the not too distant future, if you want to contribute examples that would be great, I’ve only partially ported over one |
| 02:20:03 | def-pri-pub | Also a suggestion: drop the `nk_` part from the identifiers. Have people include/import it as `import nuklear as nk`. `nk.rgb` looks cleaner than `nk_rgb` |
| 02:20:28 | zachcarter | ah yeah that’s a good idea I’ll do that thank you for the suggestion |
| 02:20:37 | zachcarter | much cleaner I like it a lot |
| 02:21:17 | def-pri-pub | I'll put an issue in the tracker for you. |
| 02:22:22 | zachcarter | thank you! |
| 02:22:59 | * | Redfoxmoon left #nim ("Leaving") |
| 02:24:30 | def-pri-pub | also, the `this test` link in the README is broken |
| 02:24:56 | zachcarter | whoops let me fix that thanks |
| 02:25:00 | zachcarter | do that right now |
| 02:25:39 | zachcarter | should be fixed now |
| 02:25:48 | zachcarter | err maybe not? |
| 02:26:07 | zachcarter | it works for me |
| 02:26:52 | def-pri-pub | it works |
| 02:28:46 | zachcarter | cool thanks |
| 02:29:11 | zachcarter | I wished my bgfx backend worked :P |
| 02:29:21 | zachcarter | getting there though… no longer is everything all white |
| 02:31:00 | def-pri-pub | I'd focus on one backend for now. GLFW seems fine (though there are two GLFW bindings for Nim in the wild). Binding the Nuklear functions is more important right now. |
| 02:31:23 | zachcarter | ah glfw is just for windowing code |
| 02:31:27 | zachcarter | opengl3 would be the backend for that example |
| 02:31:44 | zachcarter | I’m using https://github.com/Halsys/nim-bgfx for my game engine |
| 02:31:49 | zachcarter | which is why I need the bgfx backend |
| 02:41:20 | * | chemist69 quit (Ping timeout: 255 seconds) |
| 02:54:57 | * | chemist69 joined #nim |
| 02:58:31 | * | rauss quit (Quit: WeeChat 1.7) |
| 02:59:40 | * | rauss joined #nim |
| 03:55:08 | shashlick | has anyone wrapped the windows GUI api for Nim? |
| 03:55:39 | shashlick | I don't have VCC to build libui, and the mingw build wants GTK which won't be native |
| 04:06:00 | FromGitter | <vegansk> @shashlick, try libiup, it uses native interface on windows. Here is the example (https://github.com/vegansk/nimtests/blob/master/stdlib/iup/tutorial/ex3_4.nim) from official tutorial (http://webserver2.tecgraf.puc-rio.br/iup/en/tutorial/tutorial3.html#Custom_Dialogs) |
| 04:12:21 | shashlick | vegansk: thank you, I'll check it out |
| 04:12:41 | * | roygbiv joined #nim |
| 04:23:43 | FromGitter | <HeadClot> Hey everyone |
| 04:25:31 | FromGitter | <Varriount> Hi @HeadClot |
| 04:26:44 | FromGitter | <HeadClot> o/ |
| 04:26:52 | FromGitter | <HeadClot> So what is nim? |
| 04:42:56 | shashlick | vegansk: should I use the iup bundled with Nim or the nimble package? |
| 04:45:40 | FromGitter | <vegansk> @shashlick, I used the bundled version |
| 05:20:41 | * | def-pri-pub quit (Quit: leaving) |
| 05:45:52 | FromGitter | <Varriount> @HeadClot It's a programming language. |
| 06:10:54 | * | nsf joined #nim |
| 06:22:42 | FromGitter | <vegansk> @Araq, how can I set the real symbol owner in this line (https://github.com/nim-lang/Nim/blob/devel/compiler/vm.nim#L1447)? For now it's just sets the package as the owner, and that condition fails (https://github.com/nim-lang/Nim/blob/devel/compiler/semstmts.nim#L33). |
| 06:35:04 | * | yglukhov joined #nim |
| 06:45:24 | * | rauss quit (Quit: WeeChat 1.7) |
| 06:52:58 | * | bjz joined #nim |
| 07:01:10 | * | rokups joined #nim |
| 07:18:45 | * | synshroud quit (Quit: ZNC 1.6.4 - http://znc.in) |
| 07:21:40 | * | synshroud joined #nim |
| 07:22:50 | * | ftsf quit (Remote host closed the connection) |
| 07:27:59 | * | dyce quit (Ping timeout: 264 seconds) |
| 07:47:13 | * | arnetheduck joined #nim |
| 07:49:14 | * | Arrrr joined #nim |
| 07:49:14 | * | Arrrr quit (Changing host) |
| 07:49:14 | * | Arrrr joined #nim |
| 07:51:46 | * | bjz_ joined #nim |
| 07:53:09 | * | bjz quit (Ping timeout: 260 seconds) |
| 07:53:43 | * | gokr joined #nim |
| 08:00:48 | * | byte512 quit (Ping timeout: 240 seconds) |
| 08:23:16 | * | peted quit (Quit: WeeChat 1.4) |
| 08:23:39 | * | peted joined #nim |
| 08:38:25 | * | gokr quit (Ping timeout: 260 seconds) |
| 08:40:42 | * | Princess17b29a quit (Quit: Princess17b29a) |
| 08:44:13 | rokups | suppose a foreign thread calls into nim code. would that be a problem for say gc? for example if OS api takes callback and invokes it in other thread, or if nim is used for making inline hooks into running application code. |
| 08:45:02 | zevlg | hey, is it possible to get sizeof external structures at compile time? Here is the problematic code - https://gist.github.com/93e86da78362c0e8735b1fb739f89967 |
| 08:46:21 | zevlg | Can I force sizeof(Elf32_Chdr) just to emit `sizeof(Elf32_Chdr)' C code ? |
| 08:49:34 | FromGitter | <vegansk> @rookups, that's why we have ``setupForeignThreadGc`` and ``tearDownForeignThreadGc`` |
| 08:53:07 | * | abeaumont joined #nim |
| 08:54:04 | FromGitter | <endragor> @zevlg it emits `sizeof(Elf32_Chdr)` for your first case. What you put into `const` variables, or use in static context in general, has to be known *before* C code is generated, at compile time. And it cannot be known, unless you replicate the struct in Nim. |
| 08:56:01 | zevlg | endragor: thanks for the explanation, but what a pity :( |
| 08:57:18 | zevlg | endragor: wait a second, I can just change const to var! |
| 08:57:29 | zevlg | great |
| 09:00:09 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 09:02:13 | * | arnetheduck quit (Ping timeout: 260 seconds) |
| 09:05:30 | * | bjz joined #nim |
| 09:09:47 | rokups | vegansk i suspect it would not work that good |
| 09:10:20 | * | bjz_ joined #nim |
| 09:10:35 | * | bjz quit (Ping timeout: 255 seconds) |
| 09:17:38 | * | rosshadden quit (Ping timeout: 258 seconds) |
| 09:18:47 | * | rosshadden joined #nim |
| 09:18:51 | FromGitter | <vegansk> @rokups , why? |
| 09:20:28 | rokups | hmm idk, well maybe it would work |
| 09:20:56 | * | yglukhov quit (Remote host closed the connection) |
| 09:24:55 | rokups | ah i think in this case most suitable thing would be using {.gcsafe.} |
| 09:28:30 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 09:30:14 | * | abeaumont quit (Ping timeout: 268 seconds) |
| 09:34:05 | * | bjz joined #nim |
| 09:35:12 | * | aziz joined #nim |
| 09:40:41 | * | Vladar joined #nim |
| 09:41:20 | * | bjz_ joined #nim |
| 09:42:01 | * | yglukhov joined #nim |
| 09:43:17 | * | bjz quit (Ping timeout: 260 seconds) |
| 09:45:37 | * | abeaumont joined #nim |
| 10:01:38 | * | xet7 joined #nim |
| 10:14:45 | * | roygbiv left #nim ("™") |
| 10:15:43 | * | bjz joined #nim |
| 10:15:55 | * | bjz_ quit (Ping timeout: 260 seconds) |
| 10:25:23 | cncl | if i use a set[mytype] where mytype is an enum with {.size: sizeof(cint).}, if i pass this set to an imported c procedure, it will work as i expect it to with c bitwise flags, correct? |
| 10:25:46 | cncl | i butchered that sentence, sorry |
| 10:44:19 | * | synshroud quit (Quit: ZNC 1.6.4 - http://znc.in) |
| 10:45:51 | * | synshroud joined #nim |
| 11:14:59 | * | couven92 joined #nim |
| 11:34:13 | * | PMunch joined #nim |
| 11:44:10 | * | yglukhov quit (Remote host closed the connection) |
| 11:44:29 | * | chemist69 quit (Ping timeout: 255 seconds) |
| 11:47:13 | * | chemist69 joined #nim |
| 11:49:48 | * | arnetheduck joined #nim |
| 11:57:09 | * | yglukhov joined #nim |
| 12:22:06 | * | planhths joined #nim |
| 12:38:55 | * | vlad1777d joined #nim |
| 12:40:56 | * | Guest67605 joined #nim |
| 12:41:13 | * | Guest67605 left #nim (#nim) |
| 12:45:21 | * | chemist69 quit (Ping timeout: 240 seconds) |
| 12:48:28 | * | gokr joined #nim |
| 12:48:48 | * | aziz quit (Quit: Ex-Chat) |
| 12:49:56 | Araq | cncl: that's exactly *not* how it works |
| 12:54:55 | cncl | oh, ok. how does it work? |
| 12:56:54 | * | krux02 joined #nim |
| 13:03:42 | Araq | sets make the compiler transform 'val' into '1 << val' |
| 13:03:54 | * | chemist69 joined #nim |
| 13:04:18 | cncl | yeah, i already compensated for that |
| 13:04:28 | * | zachcarter quit (Quit: zachcarter) |
| 13:04:54 | Araq | oh ok, then it has a chance of working |
| 13:04:57 | cncl | original c lib definitions used left shifts, i just removed the 1 and left the shift offset values for the nim enum definition |
| 13:05:51 | cncl | there aren't any gaps, it just goes from 0 to 12 |
| 13:06:03 | Araq | ok then |
| 13:07:30 | cncl | will the sizeof the set[...] be the same? |
| 13:08:05 | cncl | it actually seems to work when i tried it, but i don't know if that is going to be generally true |
| 13:08:40 | Araq | the size of the set is 2 bytes though, not cint |
| 13:08:53 | Araq | works because of little endian machine, I assume |
| 13:09:36 | cncl | ah i was worried about that |
| 13:10:02 | cncl | what determines the size of the set? the highest possible valid flag bit? |
| 13:15:45 | Araq | yes |
| 13:16:18 | Araq | dummyValue = 30 at the end of the enum would make it compatible or a .size annotation |
| 13:16:39 | cncl | oh, it accepts .size? |
| 13:16:45 | * | Vladar quit (Quit: Leaving) |
| 13:16:58 | cncl | i'll do that, then, unless you think it's a bad idea |
| 13:19:46 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 13:35:24 | Araq | better use the dummyValue solution for now |
| 13:39:36 | * | rupil joined #nim |
| 13:46:54 | cncl | ok |
| 13:47:38 | cncl | i didn't want to give it a converter for cint because there are other flags in this library with similar ways which can be combined in confusing ways (nanovg) |
| 13:47:58 | cncl | er, other flags with similar names but incompatible usages |
| 13:51:04 | * | zachcarter joined #nim |
| 14:00:32 | Araq | I never use converters |
| 14:04:08 | cncl | they're also used pretty frequently so i didn't want to make people use explicit cast all of the time |
| 14:07:25 | * | xet7 quit (Ping timeout: 260 seconds) |
| 14:07:48 | * | Vladar joined #nim |
| 14:27:11 | rokups | Araq: im done with all the things i wanted with coroutines. if noone finds any problems it should be ok to merge. now you can guide me how to add support for overriding c++ virtual methods ;) |
| 14:29:03 | krux02 | Araq: is there a reason, why I can't change the kind of a NimNode? |
| 14:30:44 | krux02 | I am doing a lot of tree transformations, and when I could just change the kind of a NimNode, it would make things just simpler |
| 14:39:00 | * | couven92 quit (Quit: Client disconnecting) |
| 14:46:54 | * | rauss joined #nim |
| 14:52:28 | Araq | that doesn't seem wise to allow |
| 14:56:24 | * | nsf quit (Quit: WeeChat 1.7) |
| 15:00:37 | * | shashlick quit (Ping timeout: 260 seconds) |
| 15:02:39 | * | shashlick joined #nim |
| 15:16:56 | * | rosshadden quit (Quit: WeeChat 1.7) |
| 15:19:34 | * | rosshadden joined #nim |
| 15:23:34 | * | byte512 joined #nim |
| 15:34:23 | krux02 | Araq: no matter if it's wise to do so or not, it allows to actually modify the AST at will |
| 15:34:44 | krux02 | when I want to change the kind of the node, I have to copy all children with a for loop |
| 15:34:50 | krux02 | I can't just set the kind |
| 15:35:03 | krux02 | I can't set the sons with result.sons = arg.sons |
| 15:35:14 | krux02 | but don't spent to many thoughts on it |
| 15:36:08 | krux02 | it's not severe at all |
| 15:36:37 | krux02 | but I have currently a problem, is the a debug tool built into nim, that allows me to see the entire replacement of a macro? |
| 15:36:59 | Araq | echo repr result # last stmt in your macro |
| 15:37:25 | krux02 | no that doesn't work, because I have several layers of macro calls |
| 15:37:41 | krux02 | an untyped macro fot the outer facade |
| 15:38:23 | krux02 | and a typed inner macro call |
| 15:38:45 | krux02 | so the outer macro transforms my grammer into something that the nim typechecker can typecheck |
| 15:39:13 | krux02 | it generates symbols and a correctly typed expressen |
| 15:39:29 | krux02 | but the inner macro call then does not know the generated expressions from the outer macro |
| 15:39:37 | krux02 | I would like to see the result of the entire thing |
| 15:39:42 | krux02 | everything expended |
| 15:48:05 | krux02 | Araq: got a solution: http://ix.io/nCv |
| 15:48:34 | * | dexterk_ joined #nim |
| 15:49:09 | * | dexterk quit (Ping timeout: 260 seconds) |
| 15:49:30 | * | yglukhov quit (Remote host closed the connection) |
| 15:59:30 | * | gokr quit (Ping timeout: 260 seconds) |
| 16:06:01 | * | stisa2 joined #nim |
| 16:08:30 | stisa2 | krux02 there's also ``expandMacros`` https://nim-lang.org/docs/macros.html#expandMacros.m,typed |
| 16:15:02 | * | gangstacat quit (Quit: Ĝis) |
| 16:30:42 | FromGitter | <barcharcraz> a macro debugger would be a neat project |
| 16:31:05 | subsetpark | I've been thinking recently about building a property-based testing library for Nim |
| 16:34:30 | * | PMunch quit (Quit: leaving) |
| 16:38:35 | * | brson joined #nim |
| 16:51:31 | * | yglukhov joined #nim |
| 16:55:53 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 17:04:28 | * | UxerUospr joined #nim |
| 17:15:37 | * | dexterk_ quit (Remote host closed the connection) |
| 17:16:02 | * | dexterk_ joined #nim |
| 17:17:53 | * | Trustable joined #nim |
| 17:42:12 | dom96 | I must say, I am fairly proud of my answer here about what makes Nim special: https://news.ycombinator.com/item?id=13694686 |
| 17:52:46 | * | nsf joined #nim |
| 18:09:01 | zachcarter | I need to try to convert this to nim - https://github.com/vurtun/nuklear/blob/master/nuklear.h#L988 |
| 18:09:31 | zachcarter | err that’s no tthe right line |
| 18:09:43 | zachcarter | https://github.com/vurtun/nuklear/blob/master/nuklear.h#L994 |
| 18:10:02 | zachcarter | here’s an example of its use |
| 18:10:24 | zachcarter | https://github.com/vurtun/nuklear/blob/5011a36529c7da111e9ba6195074d6da8be6887f/demo/glfw_opengl3/nuklear_glfw_gl3.h#L275 |
| 18:10:49 | zachcarter | I don’t understand how it takes in a closure |
| 18:11:25 | zachcarter | also the != 0 check is confusing |
| 18:13:03 | zachcarter | dom96: it’s good answer |
| 18:13:05 | Calinou | I agree with that, dom96 :) |
| 18:13:09 | Calinou | by the way, hi |
| 18:13:39 | zachcarter | o/ |
| 18:14:46 | krux02 | zachcarter, that is a macro, that expands the the loop header of a for loop |
| 18:15:07 | krux02 | in other words the closure is not passed from the macro at all |
| 18:15:18 | krux02 | it is expected to be written after |
| 18:15:23 | zachcarter | ah okay |
| 18:15:35 | zachcarter | that makes more sense |
| 18:15:43 | krux02 | for example I once did a fori loop macro |
| 18:16:33 | krux02 | #define fori(N) for(int i=0,max_i=N; i < max_i; ++i) |
| 18:16:41 | * | chemist69 quit (Ping timeout: 240 seconds) |
| 18:17:22 | zachcarter | makes sense |
| 18:17:34 | krux02 | but that's c++ not C |
| 18:18:50 | * | chemist69 joined #nim |
| 18:19:36 | * | Matthias247 joined #nim |
| 18:23:19 | * | vlad1777d_ joined #nim |
| 18:25:23 | dom96 | Thanks guys :) |
| 18:25:29 | * | vlad1777d quit (Ping timeout: 260 seconds) |
| 18:31:25 | rauss | dom96: Great response! |
| 18:33:30 | zachcarter | krux02: so the iterator is simple enough but what is catching me up is the comparison to 0 |
| 18:33:34 | zachcarter | I don’t know how to emulate it |
| 18:33:59 | zachcarter | I guess I’m doing it in the glfw3 example |
| 18:34:28 | dom96 | rauss: thanks :) |
| 18:34:53 | * | Arrrr quit (Ping timeout: 255 seconds) |
| 18:35:05 | dom96 | Calinou: Check out my website branch when you get a chance. I made some changes. |
| 18:35:28 | dom96 | Calinou: Would love to know what you think. Keep in mind that some of it is still in progress though. |
| 18:35:48 | dom96 | My changes to the nav bar are the major changes. |
| 18:36:35 | zachcarter | okay nevermind krux02 I think my code is fine in the example |
| 18:36:42 | zachcarter | don’t really need to emulate that macro |
| 18:39:55 | * | yglukhov joined #nim |
| 18:40:37 | krux02 | zachcarter: you can emulate that macro with a template |
| 18:40:54 | zachcarter | ah yeah I tried but I couldn’t figure out how to do the iterator |
| 18:42:40 | * | rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
| 18:43:10 | krux02 | http://ix.io/nGp |
| 18:43:43 | krux02 | I don't really know anything about the cmd or ctx thing |
| 18:44:06 | zachcarter | ah thank you |
| 18:44:07 | krux02 | I just did it literally |
| 18:44:17 | zachcarter | right |
| 18:44:35 | zachcarter | okay that’s pretty muchw hat I had I just didn’ tknow how to account for the loop body but that makes sense and works thank you |
| 18:45:26 | krux02 | yes you can even call it with a colon and a block like a normal loop in nim |
| 18:45:29 | Calinou | dom96: the frontpage changes look nice, it's much nicer that the navbar blends with the jumbotron now :) |
| 18:45:41 | dom96 | Calinou: Glad you like it :D |
| 18:46:13 | dom96 | I'm going for a "plain and simple" look |
| 18:46:20 | dom96 | so I removed the green bar as well. |
| 18:46:29 | dom96 | People will surely scroll down :) |
| 18:46:35 | Calinou | ok |
| 18:46:53 | krux02 | I didn't even notice the difference, I guess I really are not sensitive for those things |
| 18:47:21 | Calinou | navbar broke on smartphones though, it's offset to the right |
| 18:47:24 | Calinou | I can fix that, I guess |
| 18:47:51 | Calinou | the navbar gradient also scrolls down when the user scrolls down :P |
| 18:47:57 | dom96 | Calinou: Oh yeah, I wasn't sure how to align it to the right so I did it a bit hackishly as a prototype. |
| 18:48:14 | dom96 | Pretty sure there is a TODO in there somewhere :) |
| 18:48:29 | Calinou | dom96: what should I do? commit fixes to your branch, then we merge it into master? |
| 18:49:34 | * | krux02 quit (Remote host closed the connection) |
| 18:50:18 | dom96 | Calinou: sure, feel free. |
| 18:51:07 | dom96 | I was planning on adding more things to that branch but we can merge it into master now after you add your fixes. |
| 18:51:12 | dom96 | Book got me busy again D: |
| 18:51:23 | Calinou | cool |
| 18:51:31 | Calinou | are there plans to put the book on sale again? I might buy it perhaps |
| 18:52:51 | dom96 | No idea I'm afraid. |
| 18:53:05 | dom96 | But I'll let you know when a sale happens |
| 18:53:09 | Calinou | ok, thanks :) |
| 18:54:35 | * | dashed joined #nim |
| 18:54:40 | * | yglukhov quit (Remote host closed the connection) |
| 18:58:19 | * | GustavoLapasta joined #nim |
| 19:16:10 | * | jjido joined #nim |
| 19:17:01 | * | kunev quit (Ping timeout: 240 seconds) |
| 19:19:44 | * | kunev joined #nim |
| 19:19:45 | subsetpark | http://makespace.com is now running Nim in production :) |
| 19:21:45 | Araq | subsetpark: that's awesome :-) |
| 19:22:38 | * | yglukhov joined #nim |
| 19:24:32 | zachcarter | I’m pretty sure my trouble with getting my bgfx backend to work with my nuklear bindings lies at my inability to convert this line of code to Nim properly : https://github.com/VladSerhiienko/FbxPipeline/blob/master/FbxPipeline/FbxViewer/NuklearSdlBgfx.cpp#L222 |
| 19:25:11 | * | yglukhov quit (Remote host closed the connection) |
| 19:25:28 | zachcarter | let textureHandle = cast[ptr TextureHandle](cmd.texture.`ptr`)[] |
| 19:25:31 | zachcarter | is what I’ve come up with |
| 19:25:36 | zachcarter | but I’m pretty sure that’s incorrect |
| 19:25:44 | * | yglukhov joined #nim |
| 19:29:58 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 19:30:44 | zachcarter | subsetpark: is the entire website backend written in Nim? |
| 19:31:39 | subsetpark | No way! It's a Django app, but I've been rewriting our service availability logic as a Python module backed by a Nim DLL |
| 19:32:00 | zachcarter | ah cool :D |
| 19:33:26 | zachcarter | krux02 / araq : if either of you have a sec can you look at that last link I posted and tell me if my conversion looks correct? I don’t think I’m accounting for the &auto |
| 19:33:31 | zachcarter | and I don’t know how to do so :/ |
| 19:34:22 | * | PMunch joined #nim |
| 19:35:40 | * | nsf quit (Quit: WeeChat 1.7) |
| 19:37:00 | * | nsf joined #nim |
| 19:37:23 | Araq | let textureHandle = cast[ptr TextureHandle](cmd.texture.`ptr`) |
| 19:38:34 | zachcarter | I figured I needed to dereference too, okay thanks |
| 19:52:10 | * | rokups quit (Quit: Connection closed for inactivity) |
| 19:52:58 | * | krux02 joined #nim |
| 19:58:11 | dyce[m] | https://glot.io/snippets/encj66obji |
| 19:58:35 | dyce[m] | is having FirstName and LastName as their own types too extreme or a good idea? |
| 20:00:41 | * | jjido quit (Ping timeout: 240 seconds) |
| 20:09:17 | dom96 | dyce[m]: maybe a tad :) |
| 20:10:33 | dyce[m] | dom96: heres an article i read: http://blog.jessitron.com/2012/03/strong-typing-in-java-religious.html |
| 20:11:00 | dyce[m] | maybe it makes sense in more complicated code bases (like what java tends to do) |
| 20:11:25 | dyce[m] | but i don't think anyone should be planning to make their code complicated :P |
| 20:11:34 | dyce[m] | but i suppose it happens over time |
| 20:17:02 | stisa2 | well the way you wrote it is just an alias, so passing it a plain string would still work. You'd need distinct types https://nim-lang.org/docs/manual.html#types-distinct-type to make them really different |
| 20:17:07 | * | rosshadden quit (Ping timeout: 268 seconds) |
| 20:17:26 | * | rosshadden joined #nim |
| 20:19:19 | dyce[m] | stisa2: good point thanks |
| 20:21:59 | * | chemist69 quit (Ping timeout: 255 seconds) |
| 20:25:14 | * | chemist69 joined #nim |
| 20:35:53 | * | gokr joined #nim |
| 20:41:44 | * | smt__ is now known as smt |
| 20:42:21 | * | gokr quit (Ping timeout: 240 seconds) |
| 20:47:20 | * | brson quit (Ping timeout: 268 seconds) |
| 20:47:22 | * | bjz joined #nim |
| 20:51:20 | * | brson joined #nim |
| 21:15:59 | * | zachcarter quit (Ping timeout: 255 seconds) |
| 21:27:34 | * | yglukhov joined #nim |
| 21:27:52 | Araq | dyce[m]: for i18n considerations it's more likely you want a single 'name' field though |
| 21:29:18 | * | irrequietus joined #nim |
| 21:32:41 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 21:34:15 | * | Vladar quit (Quit: Leaving) |
| 21:35:53 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 21:41:39 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 21:42:20 | demi- | for reference dyce[m] http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ |
| 21:42:46 | dyce[m] | Araq: that make sense, do you know what other benefits using a distinct string would have? besides accidentally swapping parameters in a procedure? i suppose it helps you catch things by compiler that you wouldn't if you just used the primitive type |
| 21:43:00 | dyce[m] | i was just using that as an example :) |
| 21:45:17 | demi- | dyce[m]: i think with the example you gave, the solution is more clarity in code intent, not necessary more explicit types |
| 21:46:44 | demi- | you have to draw a line at some point where programmer error occurs due to <whatever reason>, and that is something that just will happen. making more nuanced types isn't necessarily the appropriate solution to that -- as you mentioned it can cause code to be extremely over-complicated to the point where it is not manageable. |
| 21:48:39 | demi- | too much of any one thing is never good, and in this case i think that holds true that just because you can make more explicit types to clarify wrongful entry into a particular field, that is just generating boilerplate rather than expressing the code's intent more clearly. |
| 21:49:30 | dyce[m] | right |
| 21:51:46 | * | jh32 quit (Remote host closed the connection) |
| 21:55:17 | * | UxerUospr quit (Ping timeout: 240 seconds) |
| 22:00:38 | Araq | dyce[m]: in general yes, distinct types improve type safety and arguably also readability |
| 22:03:21 | * | planhths quit (Quit: Konversation terminated!) |
| 22:04:08 | * | kunev quit (Ping timeout: 255 seconds) |
| 22:05:24 | * | kunev joined #nim |
| 22:06:27 | * | rauss quit (Quit: WeeChat 1.7) |
| 22:29:01 | * | chemist69 quit (Ping timeout: 240 seconds) |
| 22:33:42 | * | chemist69 joined #nim |
| 22:39:06 | * | nsf quit (Quit: WeeChat 1.7) |
| 22:41:38 | * | irrequietus quit () |
| 22:49:30 | * | vlad1777d_ quit (Quit: Leaving) |
| 23:18:08 | * | ftsf joined #nim |
| 23:18:57 | * | Trustable quit (Remote host closed the connection) |
| 23:29:21 | * | ftsf quit (Ping timeout: 240 seconds) |
| 23:30:36 | * | yglukhov joined #nim |
| 23:34:55 | * | PMunch quit (Quit: leaving) |
| 23:35:47 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 23:40:15 | * | zachcarter joined #nim |
| 23:42:04 | zachcarter | http://imgur.com/a/25d9m |
| 23:42:10 | zachcarter | bgfx w/ nuklear in Nim :D |
| 23:42:39 | * | ftsf joined #nim |
| 23:55:56 | * | couven92 joined #nim |