00:02:22 | skrylar_ | Araq this is an API situation though |
00:02:41 | skrylar_ | in the case of GL you have to decide when you make the wrapper (though don't we already have one?) |
00:07:36 | * | WhiskyRyan joined #nim |
00:15:15 | * | NimBot joined #nim |
00:15:18 | * | enthus1ast quit (Write error: Broken pipe) |
00:15:19 | * | niv quit (Quit: Ping timeout (120 seconds)) |
00:15:24 | * | smt_ quit (Remote host closed the connection) |
00:15:24 | * | jackv quit (Remote host closed the connection) |
00:15:24 | * | aerx_ quit (Remote host closed the connection) |
00:15:34 | * | shmup quit (Write error: Broken pipe) |
00:15:44 | * | gsingh93 quit (Excess Flood) |
00:15:44 | * | jonesz quit (Write error: Broken pipe) |
00:15:45 | * | SianaGearz quit (Write error: Broken pipe) |
00:15:45 | * | dexterk_ quit (Write error: Broken pipe) |
00:15:51 | * | Nobabs27 quit (Remote host closed the connection) |
00:15:56 | * | pleiosaur quit (Remote host closed the connection) |
00:16:11 | * | gsingh93 joined #nim |
00:16:24 | * | niv joined #nim |
00:16:31 | * | Pisuke joined #nim |
00:17:00 | * | niv quit (*.net *.split) |
00:17:00 | * | Calinou quit (*.net *.split) |
00:17:01 | * | d10n quit (*.net *.split) |
00:17:01 | * | joebo quit (*.net *.split) |
00:17:01 | * | shodan45 quit (*.net *.split) |
00:17:01 | * | askatasuna quit (*.net *.split) |
00:17:06 | * | shodan45 joined #nim |
00:17:07 | * | d10n joined #nim |
00:17:07 | * | d10n quit (Changing host) |
00:17:07 | * | d10n joined #nim |
00:17:13 | * | Calinou joined #nim |
00:17:25 | * | niv joined #nim |
00:18:28 | * | shmup joined #nim |
00:18:45 | * | suswombat__ quit (Ping timeout: 276 seconds) |
00:19:07 | * | askatasuna joined #nim |
00:19:47 | * | myp joined #nim |
00:20:08 | * | cjh` quit (Ping timeout: 260 seconds) |
00:23:33 | * | mal`` quit (Quit: Leaving) |
00:24:35 | * | joebo joined #nim |
00:28:54 | * | aerx quit (Quit: WeeChat 1.8) |
00:32:58 | * | mal`` joined #nim |
00:35:39 | * | Trioxin joined #nim |
00:43:01 | * | SusWombat joined #nim |
00:49:34 | libman | https://www.reddit.com/r/openwrt/comments/6iao8x/crosscompiling_for_openwrt_with_various/ |
00:50:56 | libman | Encore: https://www.quora.com/What-is-a-good-alternative-to-C++/answer/Alex-Libman-2 |
00:52:51 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:53:28 | * | WhiskyRyan joined #nim |
01:04:39 | * | Jesin joined #nim |
01:08:15 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:13:00 | Trioxin | want to make graphics engine |
01:19:58 | skrylar_ | needs a lot of math and patience. |
01:20:07 | skrylar_ | unless its 2d in which case not as much math but still patience |
01:21:11 | Trioxin | what extra maths? |
01:22:17 | * | chemist69 quit (Ping timeout: 258 seconds) |
01:22:23 | * | WhiskyRyan joined #nim |
01:22:50 | Trioxin | https://gamedevelopment.tutsplus.com/tutorials/lets-build-a-3d-graphics-engine-points-vectors-and-basic-concepts--gamedev-8143 |
01:22:56 | Trioxin | just algebra. no big deal |
01:25:02 | Trioxin | will probably take forever but will be fun. first things first though. need to draw |
01:28:30 | Trioxin | start with IUP? |
01:31:54 | Trioxin | should what I use to draw meet any specific criteria? |
01:32:32 | Trioxin | I wouldn't think I'd need to code that since it's already been done. |
01:34:38 | * | chemist69 joined #nim |
01:36:33 | * | demi- quit (Ping timeout: 255 seconds) |
01:36:52 | * | demi- joined #nim |
02:08:41 | Trioxin | nimx isn't working. I posted an issue |
02:12:09 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
02:21:34 | * | WhiskyRyan joined #nim |
02:44:29 | * | rauss quit (Quit: WeeChat 1.8) |
02:49:52 | * | xet7 quit (Ping timeout: 255 seconds) |
02:50:58 | * | pilne quit (Quit: Quitting!) |
03:04:35 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
03:06:18 | * | xet7 joined #nim |
03:17:17 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:54:19 | * | Trioxin2 joined #nim |
03:54:32 | * | Trioxin quit (Ping timeout: 240 seconds) |
04:03:18 | * | def- quit (Quit: -) |
04:08:20 | * | libman quit (Quit: Connection closed for inactivity) |
04:16:52 | * | def-pri-pub quit (Quit: leaving) |
04:21:25 | * | def- joined #nim |
05:18:28 | * | yglukhov joined #nim |
05:21:33 | * | Trioxin2 quit (Ping timeout: 255 seconds) |
05:22:32 | * | yglukhov quit (Ping timeout: 240 seconds) |
05:48:33 | * | Vladar joined #nim |
05:51:39 | * | Vi- joined #nim |
06:11:25 | * | xet7 quit (Remote host closed the connection) |
06:14:36 | * | xet7 joined #nim |
06:15:57 | * | couven92 joined #nim |
06:16:20 | FromGitter | <ephja> nimx is great. I just couldn't bother to use the latest compiler revision that it works with at this point in time :-p |
06:30:03 | FromGitter | <ephja> I wonder how relevant the vulkan validator layer is with the presence of moderm metaprogramming features |
06:42:39 | * | Arrrr joined #nim |
06:49:52 | * | skrylar_ quit (Quit: Textual IRC Client: www.textualapp.com) |
06:53:29 | * | nsf joined #nim |
07:08:09 | Vi- | Can I somehow get a __declspec(dllimport) on a variable? After some headaches I managed to get the opengl wrapper to use glew so I can do this now: |
07:08:14 | Vi- | var GLEW_KHR_debug {.importc: "__imp____GLEW_KHR_debug"}: GLboolean |
07:08:20 | Vi- | but the __imp__ prefix bothers me a bit |
07:11:51 | Araq | you can use Nim's dynlib module for this but it has no compiler support |
07:13:01 | Vi- | Oh I did try this: var GLEW_KHR_debug {.dynlib: "glew32.dll", importc: "__GLEW_KHR_debug"}: GLboolean |
07:13:32 | Vi- | but still getting a linker error |
07:13:58 | FromGitter | <ephja> do dll's really support variables? |
07:14:03 | Vi- | yes they do |
07:15:45 | Vi- | msvc adds the dllimport for functions automatically but not for variables, I guess thats why this is not working here... |
07:15:47 | FromGitter | <ephja> why are you using GLEW? for conditional loading? |
07:16:04 | Vi- | yea |
07:17:13 | Vi- | Suppose I'll just write a macro for these... I was just wondering if I could add the __declspec(dllimport) instead of typing the __imp__ prefix myself |
07:19:56 | FromGitter | <ephja> I dunno if you can. isn't this flag exposed through a function? |
07:20:28 | Vi- | Not that I know of, thats why I'm asking ^^ |
07:26:52 | Araq | you can also play with the .codegenDecl pragma for variables |
07:30:43 | * | yglukhov joined #nim |
07:32:23 | * | chrishel_ joined #nim |
07:34:56 | * | chrisheller quit (Ping timeout: 260 seconds) |
07:36:19 | * | Vi- quit (Ping timeout: 246 seconds) |
07:37:06 | FromGitter | <andreaferretti> We are again over 1000 issues! :-D |
07:37:24 | FromGitter | <andreaferretti> I tried this filter to figure out which ones are actually language issues |
07:37:32 | FromGitter | <ephja> do we need to declare function pointers instead in order to implement conditional extension loading? |
07:37:39 | FromGitter | <andreaferretti> `is:issue is:open -label:"Error messages" -label:"Feature" -label:"question" -label:"Tools" -label:"Stdlib" -label:"Documentation" -label:"postponed" ` |
07:37:57 | FromGitter | <andreaferretti> currently it returns 594 issues |
07:38:20 | FromGitter | <andreaferretti> more than I would think, but many issues still do not have labels, so there may be many false positives |
07:39:27 | Arrrr | Add crash and high priority |
07:40:27 | FromGitter | <ephja> but aren't these label exlusions? |
07:40:59 | FromGitter | <andreaferretti> yep |
07:41:13 | FromGitter | <andreaferretti> there are 29 `Crash` and 19 `High priority` |
07:41:35 | FromGitter | <ephja> I'm still annoyed by the inability to track relevant threads on the forum |
07:41:59 | FromGitter | <andreaferretti> I would like to help by adding some labels, but I do not have rights to do so |
07:42:10 | FromGitter | <ephja> we are funding one more dev now though IIRC, so that's nice |
07:42:22 | FromGitter | <andreaferretti> is there a way to grant such right on github without giving full access? |
07:48:45 | Araq | andreaferretti: I can give you access rights, I trust you enough |
07:52:23 | FromGitter | <ephja> Vi-: I'm thinking about ways to implement conditional loading again |
07:52:57 | FromGitter | <ephja> Araq: should we migrate to proc pointers in order to support this? |
07:54:34 | Araq | ephja: I'm not a fan, can't we do avaliable(openglProc): bool somehow instead? |
07:55:06 | Araq | the compiler produces the proc vars for us, that's quite a nice thing |
07:56:12 | FromGitter | <andreaferretti> @Araq thank you, I would appreciate it. I will just add labels for now :-) |
07:57:37 | FromGitter | <ephja> would it be necessary to modify the compiler? if so, where do I look? |
08:00:09 | FromGitter | <ephja> people are busy, and I can never find what I want in the compiler source |
08:00:31 | Araq | ephja: it's in compiler/cgen.nim |
08:00:45 | Araq | and a bit complex :-/ |
08:02:56 | * | ldleworker quit (Excess Flood) |
08:03:04 | * | ldlework joined #nim |
08:03:04 | * | ldlework quit (Changing host) |
08:03:04 | * | ldlework joined #nim |
08:03:51 | Araq | ephja: but does it require a codegen change? I think 'avaliable' could get away with an .emit |
08:05:25 | FromGitter | <ephja> I did suggest adding support from the user side before, which currently requires writing to a file at compile time and then reading it at run time if I'm not mistaken |
08:05:31 | FromGitter | <ephja> ok |
08:42:28 | * | sakalli joined #nim |
08:49:31 | * | irrequietus joined #nim |
08:52:56 | * | PMunch joined #nim |
08:59:18 | FromGitter | <TiberiumN> @andreaferretti also in your list of not-language issues (labels) you forgot RFC |
08:59:42 | FromGitter | <TiberiumN> without RFC it return 573 issues |
09:06:58 | * | literal_ is now known as literal |
09:29:19 | FromGitter | <andreaferretti> 568 with `is:issue is:open -label:"Error messages" -label:"Feature" -label:"question" -label:"Tools" -label:"Stdlib" -label:"Documentation" -label:"postponed" -label:"S: Waiting on author" -label:"RFC" ` |
09:29:27 | FromGitter | <andreaferretti> still a lot, though |
09:30:21 | Araq | I fixed 26 bugs by merging zahary's branch :P |
09:32:40 | FromGitter | <TiberiumN> ohh |
09:32:43 | FromGitter | <TiberiumN> so many fixes |
09:32:52 | FromGitter | <TiberiumN> love it |
09:32:59 | FromGitter | <TiberiumN> (https://files.gitter.im/nim-lang/Nim/u0WP/image.png) |
09:40:41 | FromGitter | <andreaferretti> great! :_D |
09:49:05 | Arrrr | Does it exist a shortcut for 'del seq, find(seq, element)' that i'm no aware of? |
09:52:49 | Araq | Arrrr: nah |
09:52:49 | * | gangstacat quit (Ping timeout: 246 seconds) |
09:55:26 | * | gangstacat joined #nim |
09:59:08 | * | smt__ quit (Read error: Connection reset by peer) |
10:02:26 | * | smt joined #nim |
10:10:57 | * | smt quit (Read error: Connection reset by peer) |
10:14:26 | * | rokups joined #nim |
10:27:31 | FromGitter | <ephja> `````` |
10:28:09 | * | smt joined #nim |
10:29:08 | FromGitter | <ephja> couldn't you do inline highlighting? |
10:30:24 | * | PMunch quit (Ping timeout: 260 seconds) |
10:34:18 | * | kunev quit (Ping timeout: 255 seconds) |
10:34:59 | FromGitter | <ephja> now, was there something else that didn't work for typedescs? |
10:36:17 | * | PMunch joined #nim |
10:36:29 | * | kunev joined #nim |
10:38:46 | * | chemist69 quit (Ping timeout: 255 seconds) |
10:39:10 | * | chemist69 joined #nim |
10:59:29 | PMunch | Hmm, I'm trying to use the Gtk/Gdk bindings |
10:59:35 | PMunch | And I need to set a color |
10:59:57 | PMunch | They are defined as 0-65536 guint16 |
11:00:28 | PMunch | This guint16 is set as equal to int16 in the bindings for some reason, so I can't set it to 65536 |
11:02:22 | * | Snircle joined #nim |
11:02:58 | Araq | PMunch: fix the bindings please |
11:03:19 | Araq | probably a holdover from the times where Nim lacked unsigned integer types |
11:03:33 | PMunch | Ah |
11:04:12 | euantor | had a minor success story with Nim this week. An old third party service we use at work refuses to work on Windows Server 2012 R2 for whatever reason. I replicated what it did in ~200 lines of Nim and it uses 25% of the memory of the old version (down from 4.2MB to ~920KB) :) |
11:15:17 | Araq | euantor: yay, cool :D |
11:17:48 | PMunch | Man, Gtk is full of guints... |
11:29:53 | * | sakalli quit (Quit: leaving) |
11:30:18 | FromGitter | <dandevelop> Taking a look here: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma can anyone shed more light on how the format strings work in that example -> $# $#$# ? |
11:31:59 | FromGitter | <andreaferretti> @Araq I have tagged a few issues. Would it be a problem to add a couple of labels, such as `macros` or `effect system`? |
11:32:40 | Araq | no, of course not |
11:33:25 | Araq | dandevelop: for vars $1 is the type and $2 is the name, for procs it's return type, name, parameter list |
11:33:29 | Araq | in that order. |
11:36:15 | FromGitter | <dandevelop> @Araq: so this: ----> a {.codegenDecl: "$# progmem $#".}: int <---- would generate this: int progmem a ? |
11:36:31 | Araq | yes |
11:37:22 | FromGitter | <dandevelop> Thank you, is this specified anywhere in the docs? (for vars $1 is the type and $2 is the name, for procs it's return type, name, parameter list) |
11:38:52 | dave24 | how can I convert a BiggestInt to a uint8? |
11:39:46 | Araq | dandevelop, no a PR would be nice |
11:40:04 | Araq | dave24: uint8(...)? |
11:41:32 | dave24 | oh, well that was easy |
11:41:35 | dave24 | thanks |
11:43:49 | dave24 | is there documentation for that? how does it behave in case of overflow? |
11:48:44 | FromGitter | <dandevelop> @Araq: should I do the PR on this file? https://github.com/nim-lang/Nim/blob/9303a02d6bf68ac6e64e3ee0c4a018ab54c7ee99/doc/manual/pragmas.txt#L1008 |
11:52:24 | Araq | yes |
11:52:44 | Araq | dave24: I don't know :-) it should raise a RangeError |
11:56:10 | dave24 | ok, thanks |
11:58:09 | * | stefan2 joined #nim |
11:58:17 | * | stefan2 is now known as Guest58895 |
11:59:47 | Guest58895 | PMunch, in the GTK3 bindings the color values are just uint16, that should be OK. |
12:00:03 | PMunch | These are the gtk2 bindings though |
12:01:35 | Guest58895 | Than you have to fix it :-) |
12:03:59 | Guest58895 | Bye, salewski. (no idea why WeeChat calls me guest...) |
12:04:02 | * | Guest58895 quit (Quit: WeeChat 1.4) |
12:15:15 | FromGitter | <dandevelop> @Araq: will this: --> proc myinterrupt() {.codegenDecl: "__interrupt $# $#$#".} <-- generate this: __interrupt void myinterrupt() ? |
12:15:58 | PMunch | Finally! |
12:22:52 | PMunch | https://github.com/nim-lang/gtk2/pull/22 |
12:23:15 | PMunch | 1145 lines changed :S |
12:29:48 | * | Amun_Ra quit (Quit: さよなら) |
12:31:06 | FromGitter | <dandevelop> @Araq: not sure if this is ok but I submitted a PR here: https://github.com/nim-lang/Nim/pull/6006 |
12:31:14 | * | Amun_Ra joined #nim |
12:31:46 | koppeh | Mhh.. question about enums. |
12:31:56 | koppeh | I have defined an enum like so: |
12:32:05 | koppeh | ShaderType* = enum GLenum |
12:32:14 | koppeh | FragmentShader = GL_FRAGMENT_SHADER |
12:32:39 | koppeh | And so on. I can not convert from ShaderType to GLenum, apparently? |
12:32:45 | koppeh | But if I add {.pure.}, it works? |
12:33:13 | * | couven92 quit (Quit: Client disconnecting) |
12:43:34 | koppeh | Out of curiosity, why can enums be marked as {.pure.} but not procs? |
12:45:12 | koppeh | I suppose this is to avoid forcing a specific typing style on a user of a lib for example, but.. |
12:45:47 | koppeh | shader.compile() vs shader.compileShader() ... or compile(shader) vs compileShader(shader) |
12:47:51 | Arrrr | you can use this: `from module import nil` |
12:52:09 | FromGitter | <andreaferretti> @Araq Does the `tools` label apply to `nim doc` and `nim suggest` or should I use different ones? |
12:56:07 | PMunch | Hmm, why is gtk_entry_set_alignment not in the wrapping? |
13:08:04 | * | vlad1777d joined #nim |
13:14:58 | * | salewski joined #nim |
13:16:15 | salewski | PMunch, that one is also in the GTK3 wrapper! |
13:16:36 | salewski | Are you using GTK2 because of Windows or Mac? |
13:17:18 | PMunch | No |
13:18:15 | PMunch | I'm using Gtk2 partially because it is what I had installed, partially because it's what I've used before, and I prefer the look of Gtk2. |
13:19:25 | salewski | For Linux there may exist GTK3 themes that look like GTK2. |
13:20:06 | salewski | I think the Nim GTK2 wrapper has some missing stuff and some bugs. |
13:20:43 | salewski | It is very old, and Dom was the only real user and tester with Aporia. |
13:21:09 | PMunch | Hmm, guess I should switch to Gtk3 then.. |
13:21:16 | PMunch | That's the second UI switch now.. |
13:22:03 | PMunch | Wait, which bindings are there for Gtk3? |
13:22:06 | salewski | Now, beside the GTK3 wrapper we even have a GObject introspection based high level wrapper. |
13:22:49 | salewski | GTK3 low level is at github.com/ngtk3 |
13:23:18 | salewski | High level wrapper is at github.com/stefansalewski |
13:23:59 | salewski | But the later is nearly untested still. |
13:25:00 | PMunch | Hmm |
13:26:03 | salewski | The low level one should be fine! It is for GTK 3.20 created with c2nim. |
13:26:39 | salewski | It is used with my NEd Nim editor and with the chess game. |
13:27:07 | * | rauss joined #nim |
13:27:21 | salewski | The gobject introspection based bindings will need much testing unfortunately. |
13:27:52 | PMunch | It's not in Nimble? |
13:28:11 | salewski | No, due to name conflicts. |
13:28:27 | salewski | And due to no one interested in using it at all. |
13:29:15 | salewski | See https://github.com/StefanSalewski/nim-chess3 for install instructions. |
13:30:38 | * | rauss quit (Client Quit) |
13:31:34 | * | user0 joined #nim |
13:31:44 | FromGitter | <andreaferretti> what name conflict? |
13:32:04 | salewski | cairo, pango, glib2... |
13:33:49 | salewski | The Nim GTK3 bindings have many modules, more than 12... |
13:34:19 | salewski | And using names like cairo3 or glib3 makes no sense for these... |
13:34:29 | FromGitter | <andreaferretti> I see |
13:35:38 | salewski | I have never tried to resolve the name conflicts, as there are still no people really inteested in it. |
13:36:22 | salewski | And for the high level wrapper it is better, name is nim-gi, so no toplevel name conflict. |
13:37:28 | salewski | When Manning finally releases Doms's book, I will read the nimble chapter and make nimble nim-gi package. |
13:37:41 | * | couven92 joined #nim |
13:38:10 | FromGitter | <TiberiumN> Manning is too slow for some reason |
13:39:00 | FromGitter | <TiberiumN> Can someone help me with this crash (latest devel): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59492573a44c60fa4c4497db] |
13:39:40 | FromGitter | <TiberiumN> from github nim issue issue |
13:39:46 | * | vlad1777d quit (Quit: Leaving) |
13:39:56 | FromGitter | <TiberiumN> Windows 10 x64 Creators Update |
13:41:17 | salewski | Bye... |
13:41:20 | * | salewski quit (Quit: WeeChat 1.4) |
13:41:24 | FromGitter | <TiberiumN> ? |
13:41:50 | * | vlad1777d joined #nim |
13:43:15 | FromGitter | <qqtop> linux says 2208987402 |
13:45:24 | FromGitter | <TiberiumN> let me google this issue |
13:45:55 | FromGitter | <TiberiumN> This - ttps://github.com/nim-lang/Nim/issues/5704 |
13:46:25 | FromGitter | <andreaferretti> uh? For me it works and prints `2208988800` |
13:46:36 | FromGitter | <TiberiumN> platform-specific bugs, yay |
13:46:37 | FromGitter | <andreaferretti> Ubuntu 16.04 with latest devel |
13:46:44 | FromGitter | <TiberiumN> It crashes for me on Win... |
13:47:07 | vlad1777d | Hello to all =) Can I somewhere see old design of "nim-lang.org" website? |
13:47:16 | FromGitter | <TiberiumN> yes, probably |
13:47:22 | vlad1777d | Maybe somebody has screenshots? |
13:47:43 | FromGitter | <TiberiumN> Here you are - http://web.archive.org/web/20161201001409/https://nim-lang.org |
13:47:51 | FromGitter | <TiberiumN> There's a lot of snapshots at web archive |
13:50:40 | FromGitter | <TiberiumN> hmm, on Win it fails with getLocalTime failed assert |
13:51:04 | koppeh | Arrrr: Still doesn't quite answer my question. Naming a proc "link" without a {.pure.} equivalent means it'll show up in auto completion where I really only intend it to be called as program.link(). |
13:52:18 | koppeh | Oh wait you're saying program.link() would still work if I don't import anything? |
13:53:36 | koppeh | But then I feel like I'd want to do "import foo except <all of the procs I would want to be called with member syntax>" |
14:01:25 | * | smt quit (Read error: Connection reset by peer) |
14:01:37 | * | smt joined #nim |
14:08:11 | * | krux02 joined #nim |
14:13:30 | PMunch | Hmm, so all of the modules are split.. |
14:25:16 | * | rauss joined #nim |
14:31:06 | * | rauss quit (Ping timeout: 268 seconds) |
14:31:34 | * | rauss joined #nim |
14:39:28 | * | couven92 quit (Ping timeout: 240 seconds) |
14:43:42 | FromGitter | <krux02> Hello people, how are you? |
14:47:09 | * | chemist69 quit (Ping timeout: 276 seconds) |
14:49:15 | * | chemist69 joined #nim |
14:50:57 | jmkr | b/uffer 38 |
14:51:05 | jmkr | sorry :X |
14:56:14 | LyndsySimon | Is there any interest here in creating a Nim meetup in Virginia? I'm in Charlottesville, but wouldn't mind driving to NoVA or Richmond if there are more users there. |
15:03:07 | * | yglukhov quit (Remote host closed the connection) |
15:08:43 | koppeh | Is it possible to attach constant values to types? |
15:09:37 | koppeh | I currently have some generic code that does a when check for each valid type. |
15:09:51 | koppeh | when T is Program: const getiv = glGetProgramiv |
15:10:05 | koppeh | But I'm wondering if I could get rid of that and just do T.getiv ..? |
15:13:58 | * | yglukhov joined #nim |
15:15:31 | * | yglukhov quit (Remote host closed the connection) |
15:16:55 | Arrrr | You can do `proc id*(t: typedesc[MyType]): int = 5` |
15:17:57 | koppeh | Hmm, yes, I saw that before. |
15:18:32 | koppeh | And with a macro or template one could make this even smaller. |
15:27:49 | * | couven92 joined #nim |
15:47:55 | * | ofelas joined #nim |
16:25:56 | FromGitter | <ephja> I recall suggestions for creating proc aliases a long time ago |
16:26:08 | FromGitter | <ephja> no one thought of using 'const' for that apparently |
16:27:09 | * | yglukhov joined #nim |
16:28:59 | * | yglukhov quit (Remote host closed the connection) |
16:29:39 | * | yglukhov joined #nim |
16:34:02 | * | yglukhov quit (Ping timeout: 246 seconds) |
16:39:58 | * | yglukhov joined #nim |
16:42:16 | * | pilne joined #nim |
16:52:51 | FromGitter | <TiberiumN> How can I split string into chunks of 2 characters? |
16:53:05 | FromGitter | <TiberiumN> Like convert "HRHDDT" to @["HR", "HD", "DT"] |
16:58:31 | FromGitter | <TiberiumN> This is my naive solution: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59495436bf1bfe6770d007d7] |
17:02:14 | FromGitter | <ephja> define an iterator if you want to reuse it |
17:03:10 | Vladar | yep, iterator is the way to go |
17:03:46 | Vladar | something like that https://pastebin.com/FjaBtTuS |
17:06:53 | * | jsgrant- joined #nim |
17:09:10 | * | yglukhov quit (Remote host closed the connection) |
17:10:33 | * | yglukhov joined #nim |
17:13:12 | FromGitter | <TiberiumN> Vladar: big thanks! |
17:17:23 | Vladar | np |
17:26:01 | * | yglukhov quit (Remote host closed the connection) |
17:29:17 | * | 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.) |
17:32:00 | * | jsgrant- joined #nim |
17:33:50 | * | jsgrant- quit (Remote host closed the connection) |
17:35:04 | * | smt quit (Read error: Connection reset by peer) |
17:35:16 | * | smt joined #nim |
17:36:22 | * | chemist69 quit (Ping timeout: 255 seconds) |
17:36:33 | * | jsgrant- joined #nim |
17:46:10 | * | aerx joined #nim |
17:48:46 | * | aerx quit (Read error: Connection reset by peer) |
17:50:15 | * | aerx joined #nim |
17:54:56 | * | chemist69 joined #nim |
18:01:57 | * | Vi- joined #nim |
18:03:35 | * | yglukhov joined #nim |
18:14:25 | * | WhiskyRyan joined #nim |
18:21:31 | PMunch | Man, I need to write genui for gtk.. |
18:38:06 | * | smt quit (Read error: Connection reset by peer) |
18:38:11 | * | smt_ joined #nim |
18:44:20 | * | 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.) |
18:46:41 | * | jsgrant- joined #nim |
18:47:07 | * | rusua joined #nim |
18:48:50 | * | jsgrant- quit (Remote host closed the connection) |
18:51:18 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:51:19 | subsetpark | a) Does anyone have personal experience with einheit? b) is there a way to only run a certain test or suit in unittest? |
18:52:36 | * | WhiskyRyan joined #nim |
18:53:59 | * | WhiskyRyan quit (Client Quit) |
18:56:06 | * | WhiskyRyan joined #nim |
18:57:52 | * | WhiskyRyan quit (Client Quit) |
19:00:41 | * | couven92 quit (Ping timeout: 246 seconds) |
19:00:46 | PMunch | Is there way to get the reference of an object? |
19:01:06 | * | jsgrant- joined #nim |
19:01:06 | PMunch | I want to have one sequence of packed structures, and one sequence of references to these structures |
19:01:12 | PMunch | To avoid copying the data |
19:01:15 | * | Arrrr quit (Read error: Connection reset by peer) |
19:02:47 | Araq | PMunch: addr operator? |
19:03:04 | PMunch | Hmm, an untracked pointer? |
19:03:13 | PMunch | Wouldn't that be a bad idea? |
19:03:50 | * | jsgrant- quit (Remote host closed the connection) |
19:04:00 | * | dddddd joined #nim |
19:04:22 | Araq | part the 'colony' data structure to Nim and don't use a 'seq' |
19:04:27 | Araq | and then 'addr' is safe |
19:04:47 | PMunch | colony? |
19:04:57 | Araq | look it up |
19:06:31 | * | jsgrant- joined #nim |
19:10:28 | * | WhiskyRyan joined #nim |
19:10:44 | * | yglukhov quit (Remote host closed the connection) |
19:11:27 | * | yglukhov joined #nim |
19:15:00 | * | WhiskyRyan quit (Client Quit) |
19:15:46 | * | yglukhov quit (Remote host closed the connection) |
19:16:28 | * | WhiskyRyan joined #nim |
19:17:47 | * | yglukhov joined #nim |
19:19:35 | PMunch | Hmm, cstring to string? |
19:19:46 | def- | PMunch: $? |
19:19:51 | PMunch | Dur |
19:20:06 | Araq | def-: can you please review the makefile change |
19:20:09 | PMunch | I'm working with Gtk, so I forgot there exists nice things |
19:20:14 | def- | Araq: sure, link? |
19:21:05 | def- | I guess it's this one? https://github.com/nim-lang/Nim/pull/5830 |
19:21:12 | Araq | https://github.com/nim-lang/Nim/pull/5830/files |
19:21:28 | def- | Oh, you wrote my name there. I should set up notifications |
19:24:20 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:26:51 | * | WhiskyRyan joined #nim |
19:29:27 | * | WhiskyRyan quit (Client Quit) |
19:34:30 | FromGitter | <Varriount> PMunch: GTK has no nice things? |
19:34:45 | PMunch | Just kidding :P |
19:34:55 | PMunch | It's actually fairly easy to work with |
19:35:07 | PMunch | But it is very C++ like, which is weird when working with Nim |
19:36:30 | FromGitter | <Varriount> Even though it's written in C? |
19:39:00 | * | WhiskyRyan joined #nim |
19:40:10 | * | WhiskyRyan quit (Client Quit) |
19:40:35 | * | rokups quit (Quit: Connection closed for inactivity) |
19:42:52 | PMunch | Err, I meant Cish |
19:42:53 | PMunch | :P |
19:42:59 | PMunch | I was doing wxWidgets earlier |
19:43:03 | PMunch | Which is C++ |
19:54:13 | * | yglukhov quit (Remote host closed the connection) |
20:01:29 | * | yglukhov joined #nim |
20:03:41 | * | kier quit (Remote host closed the connection) |
20:04:17 | * | 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.) |
20:04:55 | * | kier joined #nim |
20:06:22 | * | jsgrant- joined #nim |
20:07:31 | * | Vi- quit (Ping timeout: 240 seconds) |
20:13:48 | * | 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.) |
20:15:31 | PMunch | I really need to create genui for Gtk... |
20:15:39 | PMunch | It's so much nicer to use :P |
20:16:28 | * | jsgrant- joined #nim |
20:17:33 | Araq | Gtk >> wxWidgets? |
20:17:53 | PMunch | Well wxWidgets uses native controls across all platform |
20:18:15 | PMunch | So it uses Gtk on Linux, MSW (or whatever it's called) on Windows, and Cocoa on Mac I believe |
20:19:36 | PMunch | But since the toolkits aren't exactly 1:1 on features some things don't work properly, and other things work on some platforms and not all. |
20:19:38 | * | Vladar quit (Quit: Leaving) |
20:20:17 | PMunch | So for what I was working on it just didn't work out |
20:21:48 | Araq | what problems did you encounter? |
20:26:34 | PMunch | I wanted to change the background colour of textviews |
20:27:26 | PMunch | And various issues with scrollbars |
20:29:17 | * | 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.) |
20:31:49 | * | jsgrant- joined #nim |
20:33:50 | * | jsgrant- quit (Remote host closed the connection) |
20:36:22 | * | jsgrant- joined #nim |
20:42:11 | subsetpark | Is dom96 around? |
20:42:35 | dom96 | I is here |
20:43:30 | subsetpark | I am in nimble hell :( |
20:44:33 | * | rauss quit (Quit: WeeChat 1.8) |
20:44:55 | subsetpark | I have one binary package that relies on two library packages - i cannot for the life of me organize them such that a) nimble dump raises no errors; b) the binary package is able to import all the modules from the two library packages |
20:45:54 | * | couven92 joined #nim |
20:46:01 | dom96 | subsetpark: D: |
20:46:07 | dom96 | What's the layout of your packages? |
20:46:24 | dom96 | I assume the errors you're getting aren't errors but namespacing warnings? |
20:46:36 | subsetpark | correct |
20:48:33 | subsetpark | https://www.irccloud.com/pastebin/arzn9vYs/ |
20:49:43 | subsetpark | That produces no warnings - but when the binary package, which includes that as a dependency, tries to import 'syphus' it fails |
20:50:47 | dom96 | You can either "import syphus/syphus" |
20:50:54 | dom96 | or get rid of that 'syphus' directory |
20:51:05 | dom96 | just have syphus.nim at the top-level |
20:51:16 | dom96 | other suphus modules would still need to be in a 'syphus' directory though |
20:54:25 | PMunch | Ah, finally got my little notes application working as I wanted :) |
20:59:39 | subsetpark | dom96: I see - so the purpose of the 'module-name' directory is for all OTHER modules... |
21:00:08 | subsetpark | so if I have syphus.nim at top-level, and (eg) syphus_support.nim in the 'syphus' directory - can i still 'import syphus_support' inside of syphus.nim ? |
21:00:09 | FromGitter | <dandevelop> Is there any way to make a nim file automatically compile as objective C? |
21:00:34 | dom96 | subsetpark: nope, you'd also need to specify the directory. |
21:00:46 | dom96 | For modules that are in the same directory you don't need to specify the directory |
21:01:45 | subsetpark | hm i see |
21:02:14 | FromGitter | <TiberiumN> @dandevelop I think you can't compile only one file as ObjC, and others as another languages |
21:02:21 | FromGitter | <dandevelop> I can rephrase that: is there any way to make the nim compiler automatically translate a file to objective-C instead of C? |
21:02:33 | FromGitter | <TiberiumN> yes |
21:02:42 | FromGitter | <TiberiumN> "nim c file.nim" |
21:02:45 | FromGitter | <TiberiumN> c is not a command |
21:02:53 | FromGitter | <TiberiumN> c means C language |
21:02:57 | FromGitter | <TiberiumN> so just do "nim objc file.nim" |
21:03:03 | FromGitter | <dandevelop> What if I have multiple files in the project? |
21:03:21 | FromGitter | <dandevelop> And some of those should be translated to C and others to objective-c ? |
21:03:27 | FromGitter | <TiberiumN> oh, then I don't know |
21:03:34 | FromGitter | <TiberiumN> why do you want that? |
21:04:33 | subsetpark | dom96: in general, for larger projects, is that how you'd recommend it? projectname.nim and projectname/ at the top level, and all imports in projectname.nim are namespaced: import projectname.support1, projectname.support2 |
21:04:36 | subsetpark | ? |
21:04:40 | FromGitter | <dandevelop> I thought of using an existing C library and somehow my head thought that I should specify C as a translation target for the nim compiler. But maybe those C libraries would also work fine if I do nim objc |
21:04:53 | FromGitter | <TiberiumN> yes, they probably would |
21:04:57 | FromGitter | <TiberiumN> just try it yourself :) |
21:05:03 | dom96 | subsetpark: yep. |
21:05:29 | subsetpark | ok, very good to know... that's been a real source of confusion for a while D: |
21:05:47 | PMunch | http://serv.peterme.net/uploads/note-example2.png |
21:05:54 | PMunch | That's what I was trying to do Araq |
21:05:56 | dom96 | subsetpark: Hrm, any ideas how we can make that easier to understand? :) |
21:06:17 | dom96 | Maybe I should create a simple barebones Nimble package. |
21:06:27 | subsetpark | dom96: I think it's just a matter of giving the readme and the warnings emitted by nimble a once-over. |
21:06:30 | PMunch | That would be great dom96 |
21:06:40 | dom96 | subsetpark: PRs welcome :) |
21:06:54 | subsetpark | yes, now i've got two features to add! |
21:07:51 | PMunch | All the text is selectable so I can easily copy it. The top left buttons changes sort order, the first combobox selects if it should sort by Time or Source, the second combobox selects a source (to only view one), and the text entry below is a search bar for the current selection. |
21:08:24 | PMunch | It also allows images |
21:11:24 | PMunch | And Nim is brilliant, all this is under 250 lines of code :) |
21:11:38 | PMunch | Even factoring in the horrible mess that is GUI code... |
21:13:54 | subsetpark | dom96: I think in general the play will simply to be more prescriptive - there are too many options now |
21:14:18 | * | 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.) |
21:14:35 | PMunch | At least a minimal example would be nice :) |
21:16:26 | * | couven92 quit (Quit: Client Disconnecting) |
21:16:40 | dom96 | subsetpark: Hrm, you mean we should tell people what they should do instead of saying "You can either do this or this?" |
21:16:46 | subsetpark | Exactly |
21:16:55 | * | jsgrant- joined #nim |
21:17:15 | PMunch | At least for me when I get to package creating I just want to get it done |
21:17:28 | PMunch | So having a sample layout to copy, at least for simple packages, would be great |
21:18:51 | * | jsgrant- quit (Remote host closed the connection) |
21:19:20 | subsetpark | "You should have a single .nim file with the same name as the nimble file at the top level. You should have any other project source files in the source directory, (which also has the same name by default, but can be specified in the case of hybrid packages). Any modules you import in your top-level .nim module will need to be namespaced with the source directory name." |
21:19:55 | subsetpark | Clarity is reassuring :) |
21:23:02 | FromGitter | <TiberiumN> what, what srcDir is for? |
21:23:55 | subsetpark | srcDir is for specifying the name of the directory that contains all secondary source files required by the project .nim file |
21:24:11 | subsetpark | if the directory doesn't share the same name as the project file |
21:27:58 | subsetpark | Acctually - I'm wrong about that |
21:28:13 | subsetpark | It's not even necessary then, because the secondary source dir will be namespaced in the top-level imports |
21:28:24 | dom96 | Ideally 'nimble init' should create a directory layout as well |
21:28:32 | subsetpark | So it's only necessary when the "top-level" directory is not actually at the top-level |
21:40:33 | * | yglukhov quit (Remote host closed the connection) |
21:45:38 | * | fox2 joined #nim |
21:45:56 | fox2 | wow this ought to be a cool channel |
21:47:40 | dom96 | hey fox2 :) |
21:48:45 | * | xet7 quit (Quit: Leaving) |
21:49:08 | fox2 | yo hey guys |
21:49:11 | fox2 | :-) |
21:49:48 | subsetpark | So - when diagnosing "not thread-safe" warnings, the topmost warning says "Foo is not GC-safe as it calls 'Bar'" - but how do I know what global variables are accessed in Bar, especially if I can't tell by reading the proc code? |
21:51:01 | fox2 | tricky... |
21:56:10 | dom96 | subsetpark: You ask Araq nicely to improve the error messages :P |
21:56:57 | subsetpark | :/ |
21:59:10 | fox2 | how about a reeducation - in that error messages are a real nice cool thing and you don't wanna live without "errors" anymore ? |
21:59:54 | PMunch | Oh hi fox2 :) |
22:01:10 | fox2 | greetz out to ya, PMunch ! |
22:02:19 | * | nsf quit (Quit: WeeChat 1.7.1) |
22:02:26 | subsetpark | Ok, now I think I'm just doing something wrong... Even marking Bar as {.gcsafe.} doesn't get rid of those errors |
22:03:22 | subsetpark | Ah - I was. I needed to mark the forward declaration with a pragma :) |
22:06:24 | subsetpark | So now it's just the original mystery... |
22:10:49 | subsetpark | Whoa. Weird - if I move the proc up so it doesn't need a forward declaration, the error goes away. dom96 is that supposed to happen? |
22:20:36 | * | NimBot joined #nim |
22:22:45 | * | ofelas quit (Quit: shutdown -h now) |
22:22:51 | * | fox2 quit (Quit: Konversation terminated!) |
22:24:38 | * | pleiosaur joined #nim |
22:32:10 | PMunch | Ah, added in highlighting of hits now :) |
22:58:02 | FromGitter | <philip-wernersbach> Hey everyone, what's the Nim-y way to specify a return type that can be null, when the underlying type doesn't support null? |
22:58:38 | FromGitter | <philip-wernersbach> For instance, a string can be null, so that's easy, but an int cannot be null |
22:58:54 | FromGitter | <philip-wernersbach> So I need a way to signal "absence of value" |
22:59:21 | subsetpark | philip-wernersbach - generally you are advised to use setinel values or options, as is appropriate |
22:59:32 | subsetpark | I like options, though they can be a bit heavy for really low-level stuff |
22:59:38 | FromGitter | <philip-wernersbach> sentinel values? |
23:00:04 | subsetpark | yeah, like - function and caller both agree that -1 actually means "not present" |
23:00:30 | subsetpark | then you can declare a const NOT_PRESENT* = -1 and check for that instead |
23:01:20 | FromGitter | <philip-wernersbach> Oh I see, that's not possible here. Normally I would do that, but I need the full range of int data types. |
23:01:21 | * | irrequietus quit () |
23:01:45 | FromGitter | <philip-wernersbach> That would also present an issue for boolean values |
23:01:52 | subsetpark | For one-off things you could also use tuples to create tagged values - have an enum {ok, error} - and return a tuple (error, 0) or (ok, <insert value here>) |
23:02:28 | subsetpark | but i would recommend you look into options first - they're in the standard lib and work quite well |
23:02:48 | FromGitter | <philip-wernersbach> That's a good idea, but I might as well use options like you say. |
23:03:04 | subsetpark | yeah, I use them all over the place |
23:03:23 | FromGitter | <philip-wernersbach> Are there examples of Nim projects using options? I know how they work, but I don't really know "best practices" so to speak |
23:03:24 | subsetpark | They're particularly good if you want to start using them as a poor man's monad |
23:04:09 | subsetpark | Here's an example from a program of mine: https://github.com/subsetpark/ad/blob/master/src/parse.nim |
23:10:04 | * | dexterk_ joined #nim |
23:11:32 | * | dexterk quit (Ping timeout: 260 seconds) |
23:14:34 | FromGitter | <philip-wernersbach> Thanks! |
23:14:40 | FromGitter | <philip-wernersbach> Interesting |
23:18:20 | * | PMunch quit (Quit: leaving) |
23:20:26 | * | Trioxin joined #nim |
23:34:56 | * | Trioxin2 joined #nim |
23:35:01 | * | Trioxin quit (Ping timeout: 255 seconds) |
23:36:40 | * | rusua quit (Quit: Connection closed for inactivity) |
23:51:01 | * | dddddd quit (Ping timeout: 240 seconds) |
23:52:50 | * | krux02 quit (Remote host closed the connection) |