00:00:14 | FromGitter | <zacharycarter> o/ |
00:00:18 | def-pri-pub | zacharycarter: I sent you a response for the timer module. It looks good, but I think there needs to be a few tweaks and some documentation |
00:00:26 | def-pri-pub | Check the issue tracker for more info |
00:01:03 | * | yglukhov quit (Ping timeout: 248 seconds) |
00:01:36 | * | vlad1777d quit (Quit: Leaving) |
00:03:38 | * | vlad1777d joined #nim |
00:06:09 | FromGitter | <zacharycarter> thank you def-pri-pub |
00:06:33 | FromGitter | <zacharycarter> I'm working on a wasm branch but I willl look shortly |
00:23:25 | def-pri-pub | zacharycarter: do you think you'll have the changes in tonight for the timer? |
00:32:04 | * | libman joined #nim |
00:42:52 | FromGitter | <zacharycarter> yup! |
00:43:08 | FromGitter | <zacharycarter> def-pri-pub ^ |
01:00:47 | FromGitter | <zacharycarter> def-pri-pub: changes should be up |
01:04:03 | * | def-pri-pub quit (Ping timeout: 240 seconds) |
01:09:03 | * | Jesin joined #nim |
01:15:07 | * | MyMind quit (Ping timeout: 260 seconds) |
01:20:51 | * | dddddd quit (Quit: Hasta otra..) |
01:22:02 | * | libelulu6 joined #nim |
01:37:23 | * | endragor joined #nim |
01:38:24 | * | chemist69 quit (Ping timeout: 252 seconds) |
01:41:57 | * | endragor quit (Ping timeout: 260 seconds) |
01:42:48 | * | sleepyqt quit (Quit: WeeChat 1.9) |
01:51:31 | * | linsword13 joined #nim |
01:52:03 | * | chemist69 joined #nim |
01:58:14 | * | yglukhov joined #nim |
02:02:27 | * | pilne quit (Quit: Quitting!) |
02:02:36 | * | yglukhov quit (Ping timeout: 252 seconds) |
02:28:45 | * | linsword13 quit (Quit: WeeChat 1.9) |
03:01:28 | * | vlad1777d quit (Remote host closed the connection) |
03:07:30 | * | cspar quit (Ping timeout: 252 seconds) |
03:20:14 | * | Serenit0r joined #nim |
03:21:21 | * | kier quit (Ping timeout: 240 seconds) |
03:23:27 | * | mahmudov quit (Ping timeout: 252 seconds) |
03:24:02 | * | Serenitor quit (Ping timeout: 260 seconds) |
03:32:09 | * | kier joined #nim |
03:35:22 | * | yglukhov joined #nim |
03:39:43 | * | yglukhov quit (Ping timeout: 248 seconds) |
04:09:11 | * | cspar joined #nim |
04:14:58 | * | haha_ joined #nim |
04:17:36 | * | haha_ quit (Client Quit) |
04:17:56 | * | BigEpsilon joined #nim |
04:19:30 | * | def-pri-pub joined #nim |
04:19:40 | * | def-pri-pub quit (Changing host) |
04:19:40 | * | def-pri-pub joined #nim |
04:24:12 | * | endragor joined #nim |
04:24:33 | * | endragor quit (Remote host closed the connection) |
04:26:26 | * | endragor joined #nim |
04:32:51 | def-pri-pub | zacharycarter: I'm not sure if you're here, still up (and I'm going to bed soon), but I saw your commit and left three comments on it. |
04:37:42 | def-pri-pub | zacharycarter: well, it's four now. |
04:41:15 | * | Serenit0r quit (Quit: Leaving) |
04:48:05 | * | MyMind joined #nim |
04:49:29 | * | def-pri-pub quit (Quit: leaving) |
04:51:07 | * | gokr joined #nim |
04:55:04 | * | miran joined #nim |
05:00:21 | * | endragor quit (Remote host closed the connection) |
05:04:18 | * | endragor joined #nim |
05:32:17 | * | miran quit (Ping timeout: 248 seconds) |
05:33:39 | * | mahmudov joined #nim |
05:37:32 | * | yglukhov joined #nim |
05:41:51 | * | yglukhov quit (Ping timeout: 248 seconds) |
05:43:50 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:45:49 | * | miran joined #nim |
06:06:07 | * | JohnNovak quit (Quit: Page closed) |
06:11:53 | * | mahmudov quit (Quit: Leaving) |
06:12:47 | * | nsf joined #nim |
06:18:10 | FromGitter | <Grabli66> Hi. How to make not gcsafe proc gcsafe? |
06:18:21 | * | miran quit (Ping timeout: 252 seconds) |
06:20:40 | FromGitter | <mratsim> @Grabli66 Check what is required in the pragma section of the manual, I think noSideEffect implies gcsafe |
06:25:47 | * | nohusuro joined #nim |
06:26:39 | FromGitter | <Grabli66> I use websocket module, and nim says that readData is not gcsafe "as it performs an indirect call here [GcUnsafe2]" |
06:27:05 | * | endragor quit (Remote host closed the connection) |
06:27:12 | nohusuro | That is a warning without threads and an error with threads. |
06:27:39 | nohusuro | Can anyone explain why I'm getting SSL certificate validation failures when using this code? http://termbin.com/ud7u |
06:28:55 | * | endragor joined #nim |
06:29:00 | * | endragor quit (Remote host closed the connection) |
06:30:49 | * | endragor joined #nim |
06:32:10 | FromGitter | <Grabli66> nohusuro, i do not use threads. Maybe :) |
06:34:44 | nohusuro | but do you compile with --threads:on ? |
06:35:38 | FromGitter | <Grabli66> i compile "nimble build". May be it adds threads support, i dont know. |
06:36:04 | nohusuro | well, do you get an error or a warning for the gcsafe message? |
06:36:41 | FromGitter | <Grabli66> ... lib\pure\asyncmacro.nim(55, 3) Warning: 'readData' is not GC-safe as ⏎ it performs an indirect call here [GcUnsafe2] |
06:38:48 | nohusuro | so your program still compiles |
06:38:55 | nohusuro | and is being compiled without threads |
06:39:01 | FromGitter | <Grabli66> Yes |
06:39:21 | FromGitter | <Grabli66> But maybe, there is a way to fix that warning? |
06:39:33 | FromGitter | <Grabli66> lock, guard, something? :) |
06:51:13 | * | cspar quit (Ping timeout: 248 seconds) |
06:52:15 | FromGitter | <zacharycarter> def-pri-pub: replied, will fix issues in morning |
06:55:01 | FromGitter | <mratsim> I’m trying to run the examples here: https://github.com/jcosborn/cudanim/tree/master/demo1. The is a config.nims that change the compiler to Nvidia nvcc but whatever I do, the config.nims configuration is ignored. Isn’t nim supposed to scan the directory automatically for config.nims? |
06:56:02 | FromGitter | <zacharycarter> I got these running the other day |
06:56:11 | FromGitter | <zacharycarter> I think the problem is demo1 doesn't have the config.nims in it |
06:56:23 | FromGitter | <zacharycarter> oh it does hrm |
07:01:56 | FromGitter | <zacharycarter> they're being picked up for me |
07:02:04 | FromGitter | <zacharycarter> if I run compile in the ex1 dir |
07:02:08 | FromGitter | <zacharycarter> it uses the nvcc compiler |
07:03:11 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/acGE/Screen-Shot-2017-09-08-at-3.02.55-AM.png) |
07:05:18 | * | Vladar joined #nim |
07:05:18 | FromGitter | <mratsim> strange >_> |
07:07:24 | * | PMunch joined #nim |
07:12:43 | * | nattefrost joined #nim |
07:19:36 | * | Zevv joined #nim |
07:20:01 | Zevv | Hi; I'd like to compile a C file into a Nim app; how do I tell the Nim compiler to link in my .o? |
07:21:31 | FromGitter | <mratsim> @Zevv you can use importc pragma to use the C function directly in nim |
07:21:52 | Zevv | That works, but it's about the link phase |
07:22:09 | Zevv | I now add --passL:foo.o to the nim compiler |
07:22:17 | Zevv | works, but not sure if it is the intended way |
07:23:13 | FromGitter | <Grabli66> What todo with whis? I build with "nimble build" ⏎ ⏎ Warning: Package 'BombardoServer' has an incorrect structure. It should conta ⏎ in a single directory hierarchy for source files, named 'BombardoServer', but fi ⏎ le 'limitedStream.nim' is in a directory named 'common' instead. This will be an ... [https://gitter.im/nim-lang/Nim?at=59b24561bac826f054922afc] |
07:23:43 | FromGitter | <mratsim> @Zevv, check what def-pri-pub does there: https://github.com/define-private-public/stb_image-Nim/tree/master/stb_image |
07:24:42 | Zevv | thanks |
07:25:30 | * | claudiuinberlin joined #nim |
07:26:18 | FromGitter | <mratsim> @zacharycarter I changed the config.nims to nim.cfg and managed to call mvcc, though it still doesn’t compile ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59b2461a8f4427b462e53af5] |
07:27:12 | * | yglukhov joined #nim |
07:31:50 | FromGitter | <mratsim> I think my nim install was borked, I had archlinux nim + choosenim doing weird things together |
07:37:20 | FromGitter | <mratsim> Cleanup everything, it works now |
07:42:40 | * | Arrrr joined #nim |
07:50:38 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:56:19 | FromGitter | <Grabli66> dom96, ping :) |
08:05:56 | FromGitter | <mratsim> When was this added/documented: this is awesome - https://nim-lang.org/docs/manual.html#ast-based-overloading-move-optimization |
08:07:18 | FromGitter | <dom96> @Grabli66 I guess that warning still isn't clear :/ |
08:08:47 | Araq | mratsim: that's pretty old |
08:08:53 | FromGitter | <dom96> All your Nim files need to be in a directory named 'BombardoServer' (named after your package) |
08:09:18 | FromGitter | <dom96> So move 'common' into a 'BombardoServer' directory. |
08:09:49 | FromGitter | <Grabli66> @dom96 I dont understand how to write "big" application with nimble. Nimble want that my source directory must be plain, without any other directory. But it will be a mess if there be a lot of files in one directory. |
08:10:05 | FromGitter | <Grabli66> I'll try |
08:10:41 | FromGitter | <dom96> @Grabli66 it won't be. You can put any directories you want in that 'BombardoServer' directory |
08:10:48 | Araq | I think Nimble doesn't mind subdirectories |
08:10:51 | * | claudiuinberlin joined #nim |
08:11:23 | FromGitter | <mratsim> Oh, I didn’t see it before. How does it work with an object that contains a ref type like ⏎ ⏎ ```type similiArray[T] = object ⏎ len: int ⏎ data: ref whatever[T]``` [https://gitter.im/nim-lang/Nim?at=59b250ab4e50cfde2718597c] |
08:12:23 | FromGitter | <mratsim> Does it check if ref field are also unique? |
08:13:48 | * | claudiuinberlin quit (Client Quit) |
08:13:49 | Araq | refs are pointers, what's the point in moving them? |
08:14:00 | Araq | they are not unique pointers |
08:17:10 | * | couven92 joined #nim |
08:17:14 | * | claudiuinberlin joined #nim |
08:17:41 | FromGitter | <Grabli66> Ohhh. I fixed it. No warnings anymore. |
08:20:23 | FromGitter | <mratsim> @Araq, I have an object backed with GPU memory, I want to implement value semantics for it but avoid unnecessary copies if there are only one reference to the GPU memory location: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59b252c74e50cfde271862ec] |
08:27:22 | FromGitter | <Grabli66> Nim will be executed on gpu in future? :) |
08:28:12 | Araq | mratsim: not sure I can help with that. did you check out andrea ferretti's work? |
08:28:23 | * | PMunch quit (Quit: Leaving) |
08:28:33 | * | PMunch joined #nim |
08:29:30 | FromGitter | <mratsim> Yes, but everything is pass by ref. Actually my code is working and compiles. I can do additions on GPU for example |
08:30:17 | yglukhov | mratsim: imo, it would be easier for your tensor to have ref semantics. |
08:30:47 | yglukhov | you'll have a lot less questions regarding raii then =)) |
08:31:15 | FromGitter | <mratsim> @yglukhov, yes but I want to be consistent with Nim default, and my Cpu tensors also have value semantics |
08:32:05 | yglukhov | "Nim default" doesn't say anything about ref vs value semantics. |
08:32:20 | yglukhov | or do you mean seqs? |
08:32:25 | FromGitter | <mratsim> yes seqs |
08:32:43 | * | rokups joined #nim |
08:33:23 | yglukhov | well... as an option you could implement refcounting_smart_ptr through finalizers. but you need to be aware of the implications. |
08:33:40 | * | Zevv left #nim (#nim) |
08:33:49 | FromGitter | <mratsim> So actually what I want is: ⏎ ⏎ 1) value semantics (can be done by overloading `=`) ⏎ 2) shallow-copy if only one ref to GPU memory exists (can be done with the {call} I mentionned before ??) [https://gitter.im/nim-lang/Nim?at=59b255edb16f2646421b273e] |
08:34:15 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:35:24 | FromGitter | <mratsim> I guess my question boils down to how to implement seq-like object without magic. |
08:38:55 | Araq | like you said? by overloading of '=' ? |
08:39:06 | * | Andris_zbx joined #nim |
08:39:40 | Araq | I think you are confused what {call} does. |
08:39:50 | FromGitter | <mratsim> probably |
08:40:07 | yglukhov | Araq: overloading `=` doesn't work for data that ends up to be in parent data structures. how hard is it to fix that? |
08:40:58 | Araq | create a proper issue for it please |
08:41:05 | Araq | I'm not aware of this problem |
08:42:32 | * | BitPuffin|osx quit (Remote host closed the connection) |
08:42:41 | yglukhov | Araq: https://github.com/nim-lang/Nim/issues/6347 looks good? |
08:42:44 | * | BitPuffin|osx joined #nim |
08:43:23 | * | salewski joined #nim |
08:43:27 | Araq | yes. that is supposed to work :-) |
08:43:41 | Araq | that can mean it's rather easy to fix... |
08:46:57 | salewski | I just remembered: let x = "str"; when compiles(GC_ref(x)): gc_ref(x) |
08:47:15 | salewski | The problem was, when x is not allocated on the heap. |
08:47:41 | salewski | Then GC_ref() compiles, but crashes. |
08:48:05 | salewski | I guess this is still the case? |
08:48:09 | Araq | yup |
08:48:33 | salewski | And there is no way to check for that? |
08:48:39 | Araq | proc safeGCref(x: var string) = GC_ref(x) |
08:48:54 | Araq | when compiles(safeGCRef(x)): safeGCref(x) |
08:49:03 | * | nsf quit (Ping timeout: 248 seconds) |
08:49:30 | salewski | Thanks, and bye. |
08:49:51 | * | nsf joined #nim |
08:51:48 | * | libman quit (Quit: Connection closed for inactivity) |
08:56:30 | FromGitter | <Grabli66> How i can create object in constructor with base object constructor? Like call super(someParams) in java class constructor. |
08:58:51 | yglukhov | Araq, mratsim: as far as i see this issue is probably the only one preventing from implementing seq-like types. or am i missing anything? |
09:01:45 | FromGitter | <Grabli66> It works in playground https://play.nim-lang.org/?gist=d1a77e7bbe7b077f020ecf62055a1a08 |
09:03:03 | FromGitter | <Grabli66> But in real programm i get exception "SIGSEGV: Illegal storage access. (Attempt to read from nil?)" |
09:03:19 | yglukhov | Araq: what do you think of adding a cmdline arg to override config file path? |
09:05:02 | FromGitter | <mratsim> @yglukhov, if there is no nesting I guess it works now already. What I have to test is let b = a, move if a is not used anymore (yeah compiler), or if we have to implement our own move optimization |
09:05:22 | yglukhov | Grabli66: that's not supposed to work. |
09:05:29 | * | endragor quit (Remote host closed the connection) |
09:05:59 | * | endragor joined #nim |
09:06:05 | FromGitter | <Grabli66> I just dont copy and paste constructor's code. |
09:06:14 | FromGitter | <Grabli66> dont want* |
09:06:21 | yglukhov | Grabli66: see this https://forum.nim-lang.org/t/2982#18752 |
09:06:28 | yglukhov | https://forum.nim-lang.org/t/2982 |
09:06:32 | yglukhov | all of it =) |
09:07:18 | FromGitter | <Grabli66> It's interesting. Solves the problem. Thanks |
09:09:20 | * | salewski quit (Quit: WeeChat 1.4) |
09:10:12 | yglukhov | mratsim: i think `let b = a` move should be done by compiler automatically |
09:10:28 | yglukhov | * could be |
09:10:34 | * | endragor quit (Ping timeout: 255 seconds) |
09:10:53 | FromGitter | <mratsim> I’m on my way to test it |
09:19:52 | FromGitter | <mratsim> @yglukhov, it doesn’t work. I’m using just this `let u = @[1'f64, 3, -5].toTensor().cuda()` with overloaded `=` but it copies value instead of moving |
09:21:42 | yglukhov | mratsim: i guess you could file a bug/feature-request then. or go fix it yourself ;) |
09:22:08 | yglukhov | second option could be faster =) |
09:22:16 | FromGitter | <mratsim> I’m aiming for 2017 bug master |
09:22:51 | FromGitter | <mratsim> I’ll try with the {call} thing in the manual first to see if that works as a workaround |
09:24:01 | * | endragor joined #nim |
09:27:00 | * | couven92 quit (Ping timeout: 252 seconds) |
09:27:08 | * | chemist69 quit (Ping timeout: 240 seconds) |
09:35:24 | * | endragor quit (Remote host closed the connection) |
09:49:47 | * | couven92 joined #nim |
09:54:04 | * | dom96|w joined #nim |
09:57:55 | FromGitter | <mratsim> I’m not even sure of the title I should use ... |
09:58:03 | FromGitter | <mratsim> for the issue |
10:04:53 | FromGitter | <mratsim> Okay done: https://github.com/nim-lang/Nim/issues/6348 |
10:05:42 | FromGitter | <Grabli66> Why when i pass object to proc, one of it's field becomes nil? |
10:06:26 | * | couven92 quit (Quit: Client Disconnecting) |
10:07:36 | * | cspar joined #nim |
10:08:45 | FromGitter | <mratsim> use object.repr to debug |
10:08:48 | Araq | cause you truncatened it |
10:08:52 | Araq | ? |
10:10:21 | FromGitter | <Grabli66> Oooops. I have my own reset procedure. And then i renamed type. And now nim uses system.reset procedure, that destroys my object :) |
10:12:32 | FromGitter | <mratsim> Strange, the compiler should output ambiguous call, unless you forgot to import your reset proc |
10:12:53 | * | flyx quit (Excess Flood) |
10:13:39 | * | flyx joined #nim |
10:14:30 | Araq | it might not be ambiguous for the compiler ;-) |
10:15:18 | FromGitter | <Grabli66> Strange, nim prefer system.reset, not my reset. :) |
10:15:43 | * | chemist69 joined #nim |
10:17:14 | Arrrr | Use YourModule.reset |
10:18:23 | FromGitter | <Grabli66> I renamed "reset" to "clear". I like call proc like "myObject.clear()" |
10:19:54 | Arrrr | Man, the result variable is really a good idea. That and tuples makes my day. |
10:20:39 | FromGitter | <Grabli66> Araq, what i can do with warning, that procedure in not my module is not gcsafe? How i can make it gcsafe? Maybe lock it, guard? |
10:20:58 | FromGitter | <Grabli66> I dont use threads, only async |
10:22:48 | Araq | make it gcsafe? |
10:23:20 | Araq | https://nim-lang.org/docs/manual.html#threads-gc-safety |
10:24:54 | Araq | the manual kind of misses the point though :-) use .threadvar for your global |
10:25:54 | FromGitter | <Grabli66> It's not my global. It's in websocket module |
10:26:04 | FromGitter | <Grabli66> I must fix that module? :) |
10:26:09 | * | ShalokShalom_ joined #nim |
10:28:40 | Araq | then use the workaround the manual shows |
10:29:19 | * | ShalokShalom quit (Ping timeout: 248 seconds) |
10:33:04 | * | claudiuinberlin joined #nim |
10:35:46 | * | haha_ joined #nim |
10:37:15 | * | mjanssen quit (Quit: leaving) |
10:39:22 | * | dddddd joined #nim |
10:41:13 | * | ShalokShalom_ is now known as ShalokShalom |
10:47:56 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:56:04 | * | couven92 joined #nim |
10:58:41 | * | cspar quit (Ping timeout: 248 seconds) |
11:03:08 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:04:18 | * | Yardanico joined #nim |
11:13:03 | * | dddddd quit (Ping timeout: 248 seconds) |
11:16:52 | * | sleepyqt joined #nim |
11:18:04 | * | haha_ quit (Quit: haha_) |
11:25:19 | * | dddddd joined #nim |
11:26:42 | * | haha_ joined #nim |
11:26:54 | * | vlad1777d joined #nim |
11:27:29 | Yardanico | https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers/_compare/6a80ffc%5E...6a80ffc |
11:27:36 | Yardanico | is this correct ? :) |
11:29:30 | Yardanico | nim's first focus is "efficiency", so it was designed for speed, not for safety only? |
11:30:18 | FromGitter | <mratsim> You should add “The speed of Nim is an unwanted side-effect" |
11:30:22 | FromGitter | <mratsim> :giggle |
11:30:38 | Yardanico | well I don't think Nim was designed for safety as the first goal |
11:30:49 | Yardanico | it was designed to be safer than C/C++ |
11:31:18 | FromGitter | <krux02> well I am not so sure about that |
11:31:27 | FromGitter | <mratsim> For me, I understand “efficiency” as expressing what you want without resorting to convoluted construction |
11:31:34 | FromGitter | <krux02> I don't think Nim is safer than c++ |
11:31:36 | Yardanico | well, about this: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers/_compare/6a80ffc%5E...6a80ffc |
11:31:42 | Yardanico | is this a valid change? |
11:31:54 | Yardanico | e.g. "The key to understanding Nim is that Nim was designed to be as fast as C, but to be much safer." to "The key to understanding Nim is that Nim was not designed to be as fast as C, but to be much safer." |
11:32:05 | Yardanico | was / was not designed to be as fast as C |
11:32:19 | * | dom96|w joined #nim |
11:32:34 | subsetpark | Nim was designed to be as fast as C. |
11:32:43 | FromGitter | <mratsim> It seems strange to me that the second line of a Nim introduction to Python programmer talks about pointers |
11:32:47 | Araq | krux02: you don't think so, but it's true. Nim has a clear memory safe subset, C++ does not. |
11:33:01 | Yardanico | Araq, should I revert this change then? |
11:33:13 | Yardanico | it's a small change, but still :) |
11:33:42 | Araq | I'd reword this completely |
11:34:22 | Araq | it wasn't designed to be "as fast as C" because C++ already beats it easily in the real world, ymmv |
11:34:44 | Yardanico | "it was designed to be fast" maybe? |
11:34:47 | FromGitter | <mratsim> When Python people look for another language is due in my opinion to: ⏎ ⏎ 1) Speed ⏎ 2) Type hell ⏎ 3) Multiprocessing (Global Interpreter Lock …) ... [https://gitter.im/nim-lang/Nim?at=59b28056bc464729740cecb7] |
11:34:53 | Yardanico | yeah |
11:35:00 | FromGitter | <mratsim> so I think Nim for Python should appeal to those |
11:35:12 | FromGitter | <Yardanico> but this page is just a comparasion |
11:35:22 | FromGitter | <Yardanico> types/features of nim/python |
11:36:05 | Araq | what does "fast as C" mean anyway? bad icache usages due to pervasive 'if (errno) goto Error'? bad dcache usage due to void* indirections? (C lacks generics) |
11:36:23 | Araq | bad IO performance because of interpreted format strings? |
11:36:23 | FromGitter | <krux02> well from python perspective, Nim is as fast as C |
11:36:27 | Yardanico | yeah |
11:36:31 | FromGitter | <mratsim> Yeah but IMO a type system is much better example than pointers to illustrate Nim safety compared to Python |
11:36:39 | FromGitter | <krux02> from C perspective, maybe not so much |
11:37:01 | Yardanico | well this page is for python programmers |
11:37:26 | FromGitter | <krux02> then I think as fast as C is correct enoguh |
11:38:01 | FromGitter | <Grabli66> Will be there a page "Nim for C# programmers"? :) |
11:38:16 | FromGitter | <krux02> when you write one, I think so |
11:38:17 | FromGitter | <mratsim> “Nim compiles on MacOS and Linux” —> Done |
11:38:26 | Araq | I would write it as "on par with C++ performance wise" |
11:39:05 | Yardanico | ok |
11:39:07 | Araq | "as fast as Fortran" ... now we're talking :P |
11:39:58 | FromGitter | <mratsim> Yeah right, then try to write a GUI in Fortran :P |
11:40:13 | Araq | try to write a GUI in C :P |
11:40:15 | FromGitter | <krux02> try to write a gui in NIM :P |
11:41:12 | FromGitter | <krux02> writing a general purpose GUI library is a hard problem |
11:41:26 | Yardanico | well I think I will not edit this page at all |
11:41:40 | Yardanico | but I'll revert last change about as fast as C |
11:41:54 | dom96|w | "Hold my beer" -- yglukhov. https://github.com/yglukhov/nimx/ :P |
11:42:26 | Yardanico | well it doesn't work quite well on linux :0 |
11:42:38 | FromGitter | <krux02> yea but like with most other GUI libraries, I don't want to use them |
11:43:11 | FromGitter | <krux02> I use this: https://www.youtube.com/watch?v=OEpsG2PGi-s |
11:43:41 | FromGitter | <krux02> and here is the nim wrapper https://github.com/krux02/nimAntTweakBar/ |
11:43:54 | Yardanico | so something like dear imgui or nuklear? |
11:44:05 | FromGitter | <krux02> nope |
11:44:16 | FromGitter | <krux02> but still very trivial to use |
11:44:40 | Yardanico | well imgui and nuklear can be integrated to opengl/directx too |
11:44:45 | FromGitter | <krux02> and most important it has quaternion as ui elements |
11:45:14 | FromGitter | <mratsim> Now the Haskeller is talking :D |
11:45:37 | FromGitter | <codenoid> https://www.codepolitan.com/nim-si-pesaing-python-yang-baru-59b237d5cbf5c |
11:45:50 | FromGitter | <krux02> well yea, I have to go, have fun with AntTweakBar, it's good and it is ported to Nim |
11:46:05 | Yardanico | codenoid: is there any translations? |
11:46:19 | Yardanico | well I'll hope google translate will do it |
11:46:40 | Yardanico | ah |
11:46:43 | Yardanico | it's not an article |
11:46:48 | Yardanico | more like an short info |
11:46:59 | FromGitter | <codenoid> "nim, the new python contender", that's it |
11:48:40 | FromGitter | <Grabli66> I think nim does not need GUI library and game library. I think nim is like golang, for web services. :) |
11:48:53 | Yardanico | well it's not |
11:48:56 | Yardanico | ppl are writing games in it |
11:49:16 | FromGitter | <mratsim> @codenoid for which kind of applications do you think Nim can contend/replace Python? |
11:49:27 | Yardanico | for any apps which require speed? |
11:49:39 | Yardanico | rewriting python app to nim would be easier than rewriting C/C++ IMO |
11:49:40 | Yardanico | *to |
11:50:10 | FromGitter | <Grabli66> Yardanico, simple 2D games, like snake? |
11:50:16 | Yardanico | well no |
11:50:19 | Yardanico | ask yglukhov :) |
11:50:26 | FromGitter | <mratsim> If speed I would say Nim, the new Cython contender :P |
11:50:31 | Yardanico | and not only yglukhov |
11:50:50 | Yardanico | https://github.com/pragmagic/godot-nim and https://github.com/pragmagic/nimue4, so ask Xored Inc |
11:50:57 | Yardanico | and also ftsf |
11:51:09 | FromGitter | <mratsim> Lots of Nim dev on IRC seem to be game developer. They have the choice between C++, Lisp, C# and Nim so easy choice ;) |
11:51:41 | dom96|w | Nim in Action in ePub and Mobi formats is now out :) |
11:53:23 | FromGitter | <mratsim> You should put a HackerNews discount code (maybe for Cyber Monday) to raise the hype |
11:54:00 | Yardanico | dom96|w, do you really get more sales with promo codes ? :) |
11:54:09 | PMunch | I'm actually going to a game jam later today and plan on using Nim |
11:54:15 | Yardanico | like 50% more or what? |
11:54:17 | dom96|w | Yardanico: no idea. |
11:54:23 | PMunch | Finally get to test out my gamelib :) |
11:54:28 | dom96|w | *Still* waiting on Manning to give me sale data... |
11:54:41 | dom96|w | PMunch: awesome :D |
11:54:43 | Yardanico | dom96|w, hmm |
11:55:08 | PMunch | It will be interesting to see what I have forgotten to implement :P |
11:55:44 | PMunch | Just added rudimentary support for Tiled maps so I can get someone else to design levels for the game while I'm coding :) |
11:56:32 | PMunch | I think I might rewrite the way it loads though |
11:57:30 | PMunch | Currently it adds it depends on the TextureRegion stuff which makes it dependent on SDL. If I want to create a noSDL version in the future I'd have to rewrite that part.. |
11:58:05 | PMunch | And since it parses it into a simple format it means the user will probably reparse it anyways into their own structure, which isn't very nice.. |
11:59:24 | PMunch | What would be the best way to have a parsing function that takes multiple callbacks for each of the entities? That way I could offer default callbacks but you could override them if you wanted to put them into your own stucture right away. |
12:00:02 | * | claudiuinberlin joined #nim |
12:00:10 | PMunch | Maybe a parser type with two callbacks that can be set before you run it? Or is there a way to create a procedure that takes two blocks of code and not just one? |
12:00:16 | * | claudiuinberlin quit (Client Quit) |
12:06:32 | * | claudiuinberlin joined #nim |
12:11:19 | * | haha_ quit (Quit: haha_) |
12:33:39 | Arrrr | a template? |
12:34:17 | Arrrr | https://nim-lang.org/docs/manual.html#procedures-do-notation |
12:34:33 | * | cspar joined #nim |
12:34:33 | Arrrr | Well, now that i look into it, it only works for macros |
12:35:59 | Arrrr | MMm, new version https://nim-lang.org/blog/2017/09/07/version-0172-released.html |
12:36:09 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:39:21 | * | Snircle joined #nim |
12:44:02 | * | claudiuinberlin joined #nim |
12:52:53 | livcd | there is not online "repl" right ? |
12:52:54 | FromGitter | <Grabli66> How i can return iterator of Table from procedure? |
12:53:22 | Arrrr | Thre is a playground https://play.nim-lang.org/ |
12:53:55 | livcd | ahh thanks |
12:54:38 | * | dom96|w_ joined #nim |
12:55:33 | * | dom96|w quit (Ping timeout: 240 seconds) |
12:58:35 | * | gokr quit (Ping timeout: 240 seconds) |
12:58:53 | * | mahmudov joined #nim |
13:00:49 | * | rauss joined #nim |
13:06:11 | * | haha_ joined #nim |
13:07:09 | Yardanico | dom96, was 0.17.2 a first test for choosenim to change release versions ? |
13:07:28 | dom96|w_ | Nope |
13:07:30 | dom96|w_ | second |
13:12:00 | * | haha_ quit (Quit: haha_) |
13:16:17 | * | haha_ joined #nim |
13:22:34 | PMunch | Thanks Arrrr, I went away from the machine for a while but the do notation is pretty much what I was asking for :) |
13:23:06 | * | grape joined #nim |
13:23:19 | grape | Guys why this won't compile |
13:23:59 | grape | type IPv4 = range[0..4294967295] |
13:24:09 | grape | the compiler says |
13:24:20 | grape | type mismatch |
13:25:22 | grape | Error: type mismatch |
13:25:52 | grape | also if i do range[0..high(uint32)] it says the same error |
13:26:13 | * | haha_ quit (Quit: haha_) |
13:26:43 | grape | can someone help me please |
13:26:52 | * | haha_ joined #nim |
13:27:41 | Araq | type IPv4 = uint32 |
13:28:08 | FromGitter | <Grabli66> How to create async timer? |
13:29:20 | grape | Thanks Araq that works :D |
13:29:49 | Araq | and now I have to ban you cause you're the troll... |
13:29:56 | grape | ok |
13:32:00 | PMunch | Haha, what was that Araq? |
13:32:05 | * | grape quit (Quit: Bye) |
13:33:53 | Araq | it was our troll, trolls are not welcomed here. |
13:34:21 | couven92 | How did you know it was a troll? Recognized the nick? |
13:34:53 | Yardanico | well why did he answer "ok" then ? |
13:35:02 | Araq | remembered the nick plus I know his writing style |
13:35:05 | PMunch | Haha, that's what got to me :P |
13:35:17 | PMunch | The lowercase defeatist "ok" |
13:35:35 | PMunch | But I'm off now |
13:35:36 | * | PMunch quit (Quit: Leaving) |
13:35:41 | Araq | could have been wrong but from his reaction it doesn't look like I was. |
13:35:47 | couven92 | :D |
13:37:49 | Yardanico | maybe he realised that nim isn't bad at all? :P |
13:37:56 | Yardanico | and he's writing some software in it |
13:39:24 | * | haha_ quit (Quit: haha_) |
13:40:05 | FromGitter | <Grabli66> If i implement timer like this https://play.nim-lang.org/?gist=08a5bb7d4660e0827a889645de885f95 ? Is it normal? There will not stack overflow? |
13:40:53 | * | skrylar joined #nim |
13:41:10 | Araq | grabli66: no stack overflow, but it might produce an ever growing list... not sure |
13:42:11 | FromGitter | <Grabli66> Maybe there is better timer implementation? I find none, in google :) |
13:42:50 | subsetpark | We're not TCO are we? |
13:45:04 | * | haha_ joined #nim |
13:45:43 | skrylar | timers dunno. i wrote a datetime object |
13:46:18 | FromGitter | <xmonader> Is there a tool like Mix of elixir but for nim? |
13:46:40 | Araq | what does Mix do? |
13:47:26 | FromGitter | <xmonader> @Araq it handles project creation, structure, tests, compilations all that |
13:47:26 | Araq | subsetpark: what does TCO mean? |
13:47:45 | subsetpark | Tail call optimized |
13:47:46 | FromGitter | <xmonader> https://hexdocs.pm/mix/Mix.html |
13:47:50 | Araq | 'nimble init' does something like that |
13:48:09 | Araq | though it doesn't yet setup your directory layout for you |
13:48:18 | Araq | subsetpark: oh ... no, we are not |
13:48:31 | FromGitter | <xmonader> @Araq I'll check nimble thank you |
13:48:36 | Araq | but async doesn't need it, it runs the "tail call" later anyway |
13:48:58 | subsetpark | Oh I know, it just got me curious |
13:49:42 | * | relax joined #nim |
13:51:42 | * | Arrrr quit (Ping timeout: 260 seconds) |
13:52:03 | FromGitter | <xmonader> Do you guys think it's okay to post this in /r/nim https://gist.github.com/xmonader/a3b17a74eab8212cfab6cbc55610f786 ? or even contribute it to the documnetation? |
13:53:35 | dom96|w_ | @Araq awww, he was asking okay questions |
13:54:20 | Araq | I don't punish him for what he wrote, I punish him for what he is. |
13:54:58 | * | gokr joined #nim |
13:55:26 | dom96|w_ | :\ |
13:57:27 | yglukhov | people could change over time... |
14:06:23 | * | gokr quit (Ping timeout: 248 seconds) |
14:08:29 | dom96|w_ | yeah, please unban him |
14:09:03 | Yardanico | well Araq banned him 2 or 3 times before |
14:09:19 | Yardanico | I don't remember exactly |
14:10:11 | FromGitter | <eliezedeck> Hey guys, how do you solve this one: `Error: ambiguous call; both hashes.hash(x: cstring)[declared in lib/pure/hashes.nim(138, 5)] and hashes.hash(x: openarray[A])[declared in lib/pure/hashes.nim(240, 5)] match for: (array[0..5, char])` |
14:10:33 | dom96|w_ | hrm, well, actually Araq muted him |
14:10:35 | dom96|w_ | didn't ban him |
14:10:45 | FromGitter | <eliezedeck> I have: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59b2a4e5162adb6d2e7eed2d] |
14:11:14 | FromGitter | <Yardanico> well, I can't answer about this particular thing |
14:11:18 | FromGitter | <Yardanico> but can't you use UUIDs ? |
14:12:08 | FromGitter | <Yardanico> @eliezedeck oh wait |
14:12:27 | FromGitter | <eliezedeck> @Yardanico UUIDs? how? |
14:12:35 | * | gokr joined #nim |
14:13:02 | FromGitter | <Yardanico> well nvm it's not in stdlib :) |
14:13:05 | FromGitter | <eliezedeck> in fact, whether I case to the array or not, the compiler complains about the same exact problem |
14:13:12 | FromGitter | <Yardanico> is your ClientID a string actually? |
14:13:17 | FromGitter | <Yardanico> or it's really an array of char? |
14:13:28 | FromGitter | <Yardanico> (well I know internally it's almost the same) |
14:13:40 | FromGitter | <eliezedeck> no, it's an array of char, certainly not a readable string; not a NULL terminated string |
14:14:24 | FromGitter | <eliezedeck> (yes, almost ... but hashing these will not be the same result) |
14:14:36 | Yardanico | hmm I think you can report it |
14:14:47 | Yardanico | the issue here - array[0..5, char] is the same as "cstring" |
14:15:08 | FromGitter | <eliezedeck> Ok |
14:16:16 | Yardanico | well just convert it to cstring |
14:16:20 | Yardanico | I think result will be the same |
14:16:34 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:18:45 | * | sz0 joined #nim |
14:19:45 | FromGitter | <eliezedeck> @Yardanico no man... cstring and C arrays are not the same... plus, it's a hashing. This is arbitrary unreadable, quite possibly be some null bytes in there. So, absolutely not a good thing if converted to cstring as that will mean only part of the data will be hashed as soon as the null char is reached. |
14:20:09 | * | Trustable joined #nim |
14:20:33 | * | claudiuinberlin joined #nim |
14:20:38 | FromGitter | <eliezedeck> That would be a recipe for bug |
14:21:39 | * | Arrrr joined #nim |
14:21:39 | * | Arrrr quit (Changing host) |
14:21:39 | * | Arrrr joined #nim |
14:22:02 | FromGitter | <eliezedeck> I reported it: https://github.com/nim-lang/Nim/issues/6350 |
14:22:28 | Yardanico | yeah I saw it |
14:24:32 | FromGitter | <eliezedeck> @dom96 mind giving some help on this one? |
14:26:33 | * | PMunch joined #nim |
14:28:38 | * | cspar quit (Ping timeout: 246 seconds) |
14:29:01 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:30:02 | * | claudiuinberlin joined #nim |
14:32:31 | * | gokr quit (Ping timeout: 248 seconds) |
14:38:25 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:39:50 | * | Andris_zbx quit (Remote host closed the connection) |
14:41:58 | dom96|w_ | well, ClientID = array[0..5, char] |
14:42:06 | dom96|w_ | so it's the same type, not sure why you're defining a hash proc... |
14:42:14 | dom96|w_ | you might want a `distinct` type |
14:42:21 | dom96|w_ | just add the `distinct` keyword |
14:43:04 | * | claudiuinberlin joined #nim |
14:44:01 | Araq | the conversion from arrays to cstring needs to go away, yes |
14:44:09 | Araq | planned for 0.18 |
14:44:53 | Yardanico | Araq, I have a question - will all previosly deprecated stuff be removed in 1.0? e.g. MANY renamings (TFile - File), deprecated procs, etc.. |
14:45:13 | Araq | we can do that, yes |
14:45:44 | skrylar | is there a less annoying way of fixing a nimble publish than just resubmitting it |
14:45:57 | Yardanico | manual PR ? :) |
14:46:13 | skrylar | i didn't make it in the first place, nimble shoved it in some magic folder :\ |
14:46:16 | Yardanico | or editing a PR |
14:46:21 | Yardanico | you did |
14:46:22 | Yardanico | skrylar, https://github.com/nim-lang/packages/pull/576 |
14:46:48 | skrylar | i see you're not understanding what i said |
14:46:58 | Yardanico | you didn't want to make a PR ? |
14:47:17 | * | claudiuinberlin quit (Max SendQ exceeded) |
14:47:17 | * | PMunch quit (Quit: leaving) |
14:47:31 | skrylar | Yardanico: i didn't create the folder nimble made the PR about. as a user, i just said "publish" |
14:47:47 | skrylar | to modify the PR i have to know about the place its doing the changes, but those are magic |
14:48:26 | FromGitter | <zacharycarter> @FridgeSeal I just am reading your message now |
14:51:35 | * | miran joined #nim |
14:51:51 | skrylar | fixed it manually through the github ui |
14:55:42 | yglukhov | dom96: i like the new nimble develop feature a lot, good job! but it needs a bit more polishing and consistency... =) |
14:56:14 | dom96|w_ | yglukhov: Just keep submitting bugs :D |
14:56:18 | dom96|w_ | Glad you like it :) |
14:56:48 | yglukhov | yeah, nimble bugs are trickier to submit that nim's =) |
14:58:04 | dom96|w_ | I can imagine :\ |
15:02:27 | yglukhov | dom96: so do i understand correctly that nimble develop always marks the "installed" pkg version as #head? |
15:02:47 | dom96|w_ | yep |
15:03:42 | yglukhov | ok. while `nimble install` from dir uses the version from nimble file... |
15:04:08 | yglukhov | and then if you consider binaries, it gets flaky |
15:04:59 | yglukhov | i'm not even sure how to formulate the problem, but you should already understand what i mean? |
15:05:30 | dom96|w_ | so `develop` gives up on binary packages |
15:06:20 | dom96|w_ | only supports library packages |
15:06:26 | yglukhov | well. kinda. if you have no packages installed, `develop` will "install" the package without the binary |
15:07:59 | yglukhov | maybe the binaries have to be installed like with "nimble install"? |
15:08:06 | yglukhov | or |
15:08:29 | dom96|w_ | what do you mean when you have no packages installed? |
15:08:30 | yglukhov | maybe some wrapper should be installed, which will recompile the binary every time |
15:08:53 | dom96|w_ | if a package has a 'bin' specified, nimble won't `develop`-install it |
15:08:55 | yglukhov | i mean no versions of my package |
15:09:08 | dom96|w_ | for now at least |
15:09:41 | yglukhov | yup, disregard my "if you have no packages installed" =) |
15:12:00 | * | enthus1ast- joined #nim |
15:12:09 | dom96|w_ | `nimble install` from current directory is indeed a bit inconsistent, but is that really a problem? |
15:13:17 | * | nsf quit (Quit: WeeChat 1.9) |
15:14:21 | yglukhov | well it seems to work for me... but i'm not sure if that's just luck =) |
15:14:38 | FromGitter | <ephja> submit bug reports, not bugs! |
15:14:52 | yglukhov | you know, i like calling "nimble path ..." from my build tools? =) |
15:19:41 | yglukhov | dom96: and if i do "nimble develop" + "nimble install" (for bins), i'm not sure what "nimble path" will return. currently it does return what i want, but like i said.... |
15:22:49 | * | yglukhov quit (Remote host closed the connection) |
15:24:09 | * | yglukhov joined #nim |
15:26:50 | dom96|w_ | and what do you want it to return? |
15:28:31 | * | yglukhov quit (Ping timeout: 248 seconds) |
15:33:52 | * | couven92 quit (Quit: Client disconnecting) |
15:38:43 | * | Jesin quit (Quit: Leaving) |
15:39:11 | FromGitter | <ephja> can a proc parameter be evaluated at compile time? perhaps if proc{constraint} had worked. nothing wrong with templates though |
15:41:50 | Yardanico | static ? |
15:44:36 | FromGitter | <ephja> yeah. it's just not as user friendly |
15:45:05 | FromGitter | <ephja> ```code paste, see link``` ⏎ ⏎ I've always had a thing for long functions [https://gitter.im/nim-lang/Nim?at=59b2bb01b16f2646421cf48d] |
15:45:53 | FromGitter | <Yardanico> make this a converter? |
15:46:07 | FromGitter | <Yardanico> so it would work for any value which can be "nim" |
15:46:10 | FromGitter | <Yardanico> "nil" |
15:46:46 | FromGitter | <Yardanico> converter someNameT (x: T): bool = not x.isNil |
15:46:52 | Yardanico | converter someName[T](x: T): bool = not x.isNil |
15:46:56 | FromGitter | <Yardanico> eh, gitter sucks |
15:47:00 | FromGitter | <Yardanico> ```converter someName[T](x: T): bool = not x.isNil``` |
15:47:59 | Yardanico | it seems this isn't useful for your case |
15:48:01 | Yardanico | hm |
15:48:47 | skrylar | i think templates are what do that tbh |
15:53:53 | nohusuro | Can anyone explain why I'm getting SSL certificate validation failures when using this code? http://termbin.com/ud7u |
15:55:47 | FromGitter | <ephja> I wonder if it will have a significant impact on the compilation speed. I'm going to measure it some time |
15:56:50 | dom96|w_ | nohusuro: I think you need to load a cert store, something which I've never managed to do successfully. Unfortunately to do it you might need to dig into openssl. |
16:01:04 | FromGitter | <ephja> Maybe I should just use this https://www.khronos.org/opengl/wiki/Get_Context_Info#Extension_list |
16:02:43 | FromGitter | <mratsim> @eliezedeck I proposed a solution to your issue https://github.com/nim-lang/Nim/issues/6350. Had the same issue with openarray[T]/seq[T] catching string as openarray[char]/seq[char]. You can use `yourproc[T: not char]` in the declaration to avoid that |
16:03:05 | Yardanico | BigEpsilon: great work! |
16:03:16 | Yardanico | reorder would be a nice nim feature :) |
16:06:00 | FromGitter | <ephja> I wonder if wglGetProcAddress and so on are actually necessary |
16:08:07 | FromGitter | <ephja> they probably are |
16:09:05 | * | relax quit (Ping timeout: 248 seconds) |
16:11:16 | skrylar | dom96|w_: i'm not sure openssl is a good idea these days |
16:11:22 | skrylar | with libressl out and all dunno |
16:12:34 | * | yglukhov joined #nim |
16:13:50 | dom96|w_ | skrylar: happy to accept PRs adding libressl support (pretty sure it's backwards compatible though anyway) |
16:14:31 | * | nsf joined #nim |
16:14:37 | skrylar | it might be |
16:14:50 | skrylar | supposedly theres a libtls now |
16:15:06 | skrylar | which is a subset of {open,libre}ssl that just like, has an easy mode wrapper for the sockets |
16:15:27 | federico3 | there are many competitors but not a clear winner |
16:16:23 | * | endragor joined #nim |
16:17:03 | * | yglukhov quit (Ping timeout: 248 seconds) |
16:17:52 | * | SusWombat_ quit (Remote host closed the connection) |
16:19:42 | skrylar | well personally i don't like tls |
16:19:51 | skrylar | but its necessary to operate with other people -shrug- |
16:20:19 | skrylar | i think mixing your certs with crypto is a horrible idea that only has served to put untrustowrthy companies in charge of trust management and we'd be better off with libsodium but i digress |
16:23:36 | federico3 | FWIW there's a libsodium wrapper for Nim |
16:25:11 | skrylar | probably. |
16:25:16 | skrylar | i meant collectively though |
16:26:03 | skrylar | i think libsodium lets you use some of that shiny ecc stuff too |
16:26:16 | skrylar | openssl does too, although i keep trying and apps keep rejecting ecc certs |
16:26:19 | * | yglukhov joined #nim |
16:26:37 | federico3 | skrylar: libsodium provide crypto primitives, not TLS |
16:26:47 | skrylar | that is correct |
16:26:55 | skrylar | if you read what i said, i said i didn't like TLS in the first place |
16:27:32 | skrylar | trust and crypto concerns are separate and should not have been mixed so rigidly |
16:28:30 | FromGitter | <zacharycarter> pymod-nim is nice! |
16:30:20 | federico3 | skrylar: I red that and I agree. Unfortunately we are stuck with TLS for now (even QUIC uses it) |
16:30:43 | * | gangstacat quit (Quit: Ĝis!) |
16:31:57 | FromGitter | <BigEpsilon> @Yardanico , thanks ! But I think it still need more work and it should not be the default. |
16:32:58 | Yardanico | why? |
16:32:59 | Yardanico | not now |
16:33:10 | Yardanico | but before 1.0 :) |
16:33:52 | FromGitter | <BigEpsilon> Working on the syntax tree is hacky |
16:34:19 | FromGitter | <BigEpsilon> and nim is heavy on macro/template usage |
16:34:37 | FromGitter | <BigEpsilon> which do not play well with the reorder pragma |
16:34:57 | FromGitter | <BigEpsilon> making it the default will introduce more bugs |
16:35:25 | FromGitter | <BigEpsilon> and I think it is the opposite of what nim needs |
16:35:49 | FromGitter | <BigEpsilon> Still it can be very helpful is some cases |
16:36:16 | FromGitter | <BigEpsilon> I initially started working on it in order to compile code generated by c2nim |
16:36:29 | FromGitter | <BigEpsilon> And I'll return to that now :) |
16:41:35 | FromGitter | <zacharycarter> @FridgeSeal if you're around and have a sec I have some questions about nim-pymod you may / may not be able to answer |
16:44:41 | skrylar | i'm not familiar with reorder :b |
16:44:52 | skrylar | although yea. any language with macros is going to be upset with any attempts at an ast change |
16:46:40 | * | sz0 quit (Quit: Connection closed for inactivity) |
16:53:53 | * | couven92 joined #nim |
17:00:06 | * | haha_ quit (Quit: haha_) |
17:01:16 | * | dom96|w_ quit (Ping timeout: 246 seconds) |
17:01:59 | * | haha_ joined #nim |
17:06:25 | * | endragor quit (Remote host closed the connection) |
17:14:36 | Araq | BigEpsilon: did you find a real problem with it? I only know about theoretical issues |
17:16:30 | * | gangstacat joined #nim |
17:17:10 | FromGitter | <BigEpsilon> I can't talk now but yes there are some problems |
17:17:43 | FromGitter | <BigEpsilon> for tried to treat each one as you may see in the code |
17:18:15 | FromGitter | <BigEpsilon> and I tried to privilege not breaking existing code over reordering anything |
17:18:38 | * | claudiuinberlin joined #nim |
17:18:43 | FromGitter | <BigEpsilon> I have to leave now sry and bye |
17:19:12 | Araq | ok bye |
17:20:37 | FromGitter | <zacharycarter> yay got my lambda job working with nim-pymod - no more binaries for lambda, calling Nim from python now! |
17:21:27 | Yardanico | well it's not a better solution :) |
17:22:35 | FromGitter | <zacharycarter> yeah it is |
17:22:54 | FromGitter | <zacharycarter> now I can hook into lambda lifecycle events if need be |
17:22:56 | FromGitter | <zacharycarter> it's a far better solution |
17:24:24 | * | BigEpsilon quit (Ping timeout: 252 seconds) |
17:27:37 | FromGitter | <mratsim> @zacharycarter I see that nim-pymod hasn’t been updated since November, is the author still on it? |
17:27:49 | * | miran quit (Ping timeout: 255 seconds) |
17:29:31 | Yardanico | maybe it just works? |
17:32:41 | FromGitter | <zacharycarter> I doubt the author is but it does apparently just work |
17:32:45 | FromGitter | <zacharycarter> as long as you have numpy |
17:33:04 | FromGitter | <zacharycarter> I'm def going to fork it |
17:35:24 | * | Jesin joined #nim |
17:40:22 | Yardanico | https://github.com/nim-lang/Nim/pull/6351 is it better for "contains" to be a template? |
17:40:29 | Yardanico | in this case |
17:41:46 | FromGitter | <mratsim> or mark it {.inline.} |
17:42:06 | * | Vladar quit (Quit: Leaving) |
17:43:38 | FromGitter | <mratsim> In my case when template/proc are interchangeable, I use proc (least powerful construct possible), except if it’s just returning an object field |
17:44:30 | Yardanico | well strtabs module is made for performance :) |
17:44:36 | Yardanico | but yeah |
17:48:14 | dom96 | so I created #nim-nologs for those that want to discuss Nim without being logged |
17:49:33 | FromGitter | <mratsim> Troll bait? |
17:49:42 | Yardanico | ;p |
17:50:11 | Yardanico | let's talk about viruses in #nim-nologs :D |
17:51:51 | FromGitter | <mratsim> I’m just assuming that the compiler knows better than me whether to inline procs (depending on CPU, cache_line, proc length …) |
17:52:15 | * | relax joined #nim |
17:55:11 | * | vlad1777d quit (Ping timeout: 248 seconds) |
17:57:35 | * | nsf quit (Quit: WeeChat 1.9) |
17:58:23 | dom96 | mratsim: not at all :) |
17:58:30 | dom96 | There are people here who dislike being logged. |
17:58:39 | dom96 | Of course I'd encourage everyone to continue discussion here. |
18:13:08 | skrylar | there's no way to enforce nobody logging |
18:13:59 | skrylar | even if you ask them not to they'll just lie and do it anyway |
18:15:38 | * | smt joined #nim |
18:21:32 | FromGitter | <zacharycarter> grrr my makefile / dockerfile work fine on my machine but blow up on my co-workers |
18:21:55 | Yardanico | skrylar, yeah |
18:21:58 | Yardanico | also thought about this |
18:22:55 | * | Jesin quit (Quit: Leaving) |
18:26:57 | * | Jesin joined #nim |
18:27:11 | * | mahtob joined #nim |
18:27:37 | * | mahmudov quit (Ping timeout: 260 seconds) |
18:29:38 | dom96 | !ping |
18:29:38 | NimBot | pong |
18:32:31 | * | Trustable quit (Remote host closed the connection) |
18:32:59 | * | Calinou quit (Ping timeout: 255 seconds) |
18:38:22 | * | Calinou joined #nim |
18:39:20 | FromGitter | <ephja> "Hint: operation successful (30839 lines compiled; 5.168 sec total; 106.934MiB peakmem; Debug Build) [SuccessX]" damn. bloated opengl module |
18:48:55 | * | SusWombat joined #nim |
18:49:17 | SusWombat | why does randomize() not affect the float random()? |
18:49:54 | Yardanico | really? |
18:50:01 | Yardanico | let me try |
18:50:06 | SusWombat | maybe im wrong |
18:50:14 | SusWombat | Yardanico, would be appreciated |
18:50:28 | Yardanico | well, it outputs different numbers for me |
18:50:34 | Yardanico | with each run |
18:50:49 | Yardanico | e.g. : import random; randomize(); echo random(5.1) |
18:51:07 | SusWombat | lemme recheck i guess i have an error then somewhere |
18:51:24 | Yardanico | maybe you call randomize with some arguments? |
18:51:37 | SusWombat | Yardanico, nah i dont. Thanks for testing :) |
18:51:42 | * | dom96_ joined #nim |
18:54:27 | SusWombat | Yardanico, you are right i wans wrong |
18:55:27 | SusWombat | i tested with random(1.0) and the first number alwas seems to be 0.8478XXXXXX thats why i thought that |
18:55:36 | * | dom96 quit (Quit: Bye.) |
18:55:45 | * | dom96_ is now known as dom96 |
18:55:45 | * | dom96 quit (Changing host) |
18:55:45 | * | dom96 joined #nim |
18:56:06 | SusWombat | is there a reason for that behaviour? |
18:56:42 | Yardanico | well it doesn't seem to be 0.8478 for me |
18:56:52 | Yardanico | it's always different for me |
18:56:53 | SusWombat | weird |
18:57:27 | dom96 | Are you setting a different seed each time via randomize? |
18:57:43 | SusWombat | nah i just use randomize() |
18:58:27 | Yardanico | really weird |
19:00:34 | * | Araq_ joined #nim |
19:01:27 | SusWombat | Well only happens for the first number tho. So its not really a problem |
19:05:50 | * | Yardanico quit (Remote host closed the connection) |
19:08:27 | * | gokr joined #nim |
19:13:46 | dom96 | Araq: Thoughts on this? https://github.com/nim-lang/website/issues/45 |
19:15:44 | * | haha_ quit (Quit: haha_) |
19:21:35 | * | couven92 quit (Ping timeout: 240 seconds) |
19:21:35 | * | haha_ joined #nim |
19:22:32 | * | rauss quit (Quit: WeeChat 1.9) |
19:22:42 | SusWombat | wow totally forgot about devdocs. They improved a lot |
19:24:58 | * | Calinou quit (Ping timeout: 264 seconds) |
19:28:36 | * | nsf joined #nim |
19:29:29 | * | Calinou joined #nim |
19:30:46 | FromGitter | <superfunc> @dom96 just finishing up reading the book, great job dude. |
19:31:05 | dom96 | thanks :D |
19:35:01 | * | Calinou quit (Ping timeout: 240 seconds) |
19:37:43 | * | Calinou joined #nim |
19:40:07 | * | skrylar quit (Ping timeout: 255 seconds) |
19:40:39 | Araq | dom96: looks like devdocs got a decent search, a link cannot hurt but I dunno how they do the indexing etc |
19:42:54 | * | haha_ quit (Quit: haha_) |
19:43:23 | * | cspar joined #nim |
19:46:02 | FromGitter | <superfunc> https://github.com/Thibaut/devdocs/blob/master/lib/docs/scrapers/nim.rb |
19:49:19 | FromGitter | <Yardanico> Hmmm, https://www.python.org/dev/peps/pep-0557/ |
19:53:31 | FromGitter | <Yardanico> *shrug* how do we ask devdocs guys to update docs? |
19:54:01 | FromGitter | <Yardanico> For 0.17.2 |
19:58:18 | * | jsgrant joined #nim |
19:58:40 | jsgrant | Does Nim have an animal mascot? |
19:59:30 | * | xet7 quit (Ping timeout: 252 seconds) |
20:00:14 | gangstacat | jsgrant, https://github.com/nim-lang/assets/blob/master/Art/mascot.svg |
20:00:21 | gangstacat | but certainly deprecated since long ago :p |
20:00:55 | jsgrant | What is that, a honey-badger? |
20:02:06 | jsgrant | I was thinking it was going to be ironic, like a sloth, or something. Slow, clumsy, seen to be dim-witted, etc. |
20:03:08 | * | jsgrant has been trying to mascotify the top-level of his mascot, with stuff he wants to learn/keep-in-mind-day-to-day next year; Nim is on that list. :^) |
20:10:54 | subsetpark | I was never fond of the honey badger... |
20:11:38 | * | vlad1777d joined #nim |
20:13:35 | * | relax quit (Ping timeout: 240 seconds) |
20:13:36 | subsetpark | nake is named after make (obvs), but it doesn't actually do any dependency resolution does it? |
20:14:31 | * | rokups quit (Quit: Connection closed for inactivity) |
20:15:48 | * | relax joined #nim |
20:18:08 | subsetpark | I guess within nim itself the compiler takes care of all that nastiness for you. But it'd be kind of cool to have an all-purpose build tool written in Nim. |
20:20:37 | FromGitter | <mratsim> How about having a King of Heart as Nim mascoot :P |
20:20:54 | relax | What's the recommended postgres library to use? db_postgres? I'd love to use asyncpg for the async-ness but it looks a little rough around the edges. |
20:21:03 | jsgrant | Ha, http://i.imgur.com/xZkJ586.gif is one of the first results when I type "sloth crown". |
20:21:03 | * | Arrrr quit (Read error: Connection reset by peer) |
20:21:42 | jsgrant | Actually visually complements pretty well. |
20:22:36 | * | couven92 joined #nim |
20:23:19 | jsgrant | Since honey-badger as-said seems deprecated & generally doesn't seem like there's too much fan-service there (with my wide-sample of 1) -- probably going to go with Sloth there then. :^) |
20:25:14 | federico3 | jsgrant: people love cats |
20:25:58 | jsgrant | federico3: Yeah, but too ubiquitous to even generic though. :^P |
20:26:05 | jsgrant | Plus, lolcode called it. |
20:29:26 | ipjk_ | That mascot |
20:29:32 | ipjk_ | is way too terrifying |
20:30:17 | federico3 | next: raccoons are clever and quick |
20:31:33 | jivank[m] | hey federico3 , do you think nim is a good match for the freedombox project? |
20:31:41 | jsgrant | federico3: Minix mascot. |
20:32:58 | federico3 | jivank[m]: fbox uses Python for the management UI (Plinth), but most of the stuff shipped with it are 3rd parties applications that come with the distribution and could be written in any language |
20:34:25 | federico3 | jivank[m]: Nim would help on small, low-power hardware |
20:36:34 | jivank[m] | yeah certainly, but that memory leak issue definitely stops some very lowend routers with <32mb ram for jester and downloading files |
20:37:03 | jivank[m] | perhaps thats a bit extreme though, given a raspberry pi is more powerful than most consumer routers |
20:39:09 | federico3 | jivank[m]: I guess it's fixable? I'm running a little bit of Nim on microcontrollers |
20:42:05 | * | xet7 joined #nim |
20:44:06 | * | ShalokShalom quit (Remote host closed the connection) |
20:49:30 | jivank[m] | federico3: nice! is that easy to get going? you just have to disable the GC right |
20:56:25 | * | Pisuke joined #nim |
20:58:42 | * | MyMind quit (Ping timeout: 260 seconds) |
21:01:38 | * | yglukhov quit (Remote host closed the connection) |
21:01:54 | dom96 | I really dislike the idea of a sloth... |
21:01:59 | dom96 | sorry :) |
21:05:53 | jsgrant | dom96: Well it'd be on my bookshelf -- not suggesting it be adopted upstream or anything. Just wondering/shopping around what would be a good mascot that's not already taken. |
21:08:16 | subsetpark | Guys, what about a water bear?? |
21:08:31 | subsetpark | https://apod.nasa.gov/apod/image/1303/tardigrade_eyeofscience_1024.jpg |
21:09:38 | * | yglukhov joined #nim |
21:11:17 | jsgrant | subsetpark: What's the argument to relation (of attributes)? Nim is tiny & indestructible? |
21:12:26 | subsetpark | Hm, I would think of it more as "freakishly featureful" |
21:13:49 | jsgrant | You know, I don't think I've seen any software-project using a 'Axolotl'; That's unique but meme'd enough where I would think that was taken. |
21:14:11 | subsetpark | But I suppose really if I were starting from attributes, I would go with "fast, fun, friendly" |
21:15:51 | jsgrant | Fawn? :^P |
21:16:23 | * | skrylar joined #nim |
21:18:26 | subsetpark | yes, what's an adorable playful creature with really, really sharp teeth? |
21:18:30 | subsetpark | a koala maybe. |
21:18:43 | subsetpark | my understanding is that koalas can do some serious damage. |
21:18:55 | * | relax quit (Ping timeout: 248 seconds) |
21:19:05 | jsgrant | "Drop-bears". |
21:19:16 | couven92 | what do you use in nim.cfg to get the name of the nim main module being compiled? |
21:20:18 | jsgrant | subsetpark: Great, now I want this ... https://www.amazon.com/dp/B00K1W50ZW/ref=twister_B00SY2G5R8?_encoding=UTF8&psc=1 :^) |
21:20:22 | couven92 | i.e. when kompiling koch.nim, I want to pass `/someOpt:koch` to the compiler via `vcc.options` |
21:20:36 | subsetpark | ok, that's my final suggestion: either a koala or a jackalope. |
21:21:16 | dom96 | jsgrant: That looks like a croissant :P |
21:21:32 | jsgrant | dom96: That's sounds like a "dank meme". |
21:21:38 | ipjk_ | https://img1.etsystatic.com/002/0/5376657/il_570xN.405690271_pw8m.jpg |
21:22:25 | subsetpark | A jackalope would look cool with a crown. |
21:24:13 | FromGitter | <Varriount> http://www.istockphoto.com/vector/hand-sketched-jackalope-gm481808919-23018384?esource=SEO_GIS_CDN_Redirect |
21:24:55 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
21:28:02 | FromGitter | <Varriount> Perhaps the next time I go to an art convention, I can commission a jackalope sketche |
21:28:24 | * | jsgrant switches to Pony. X^D |
21:38:14 | jsgrant | I'm going Sloth guys; Sorry. |
21:38:49 | jsgrant | Might bug chat in a few days, after it comes with a pic or something; But besides that will lurking for the most-part till next year. :^) |
21:39:36 | * | miran joined #nim |
21:56:05 | FromGitter | <zacharycarter> o/ |
22:03:29 | subsetpark | jsgrant: to recap, you have like, a vision board of the mascots of projects you want to learn about? |
22:05:03 | * | xet7 quit (Quit: Leaving) |
22:07:14 | * | endragor joined #nim |
22:11:21 | * | endragor quit (Ping timeout: 240 seconds) |
22:11:40 | FromGitter | <zacharycarter> it'd be cool to see an article like this for Nim - http://catswhisker.xyz/log/2017/9/7/a_first_excercise_in_natural_language_processing_with_python_counting_hapaxes/ |
22:11:59 | jsgrant | subsetpark: Yeah, more-or-less. |
22:12:34 | subsetpark | I dig it. |
22:12:54 | * | PMunch joined #nim |
22:13:01 | FromGitter | <adamrezich> random question: why isn't free() documented in the system module docs? |
22:13:42 | skrylar | i suspect one isn't meant to use it |
22:14:09 | PMunch | https://github.com/PMunch/SDLGamelib/blob/master/gamelib/tilemap.nim#L18 Can you do this with booleans? |
22:14:47 | FromGitter | <adamrezich> oh I see, dealloc() is the opposite of alloc(). still, though, "free()" is *mentioned* in the system module docs, but not documented there :\ |
22:15:12 | FromGitter | <zacharycarter> try it out PMunch, not sure |
22:15:38 | * | skrylar quit (Remote host closed the connection) |
22:15:53 | * | xet7 joined #nim |
22:16:14 | couven92 | Do we have overloads for WideCString and cstring stringify with length? |
22:16:18 | * | skrylar joined #nim |
22:16:32 | jsgrant | Is 'Nim In Action' the definitive guide right now, 'cause it's good and/or because it's effectively the only thing out there? Plan on getting that by the end of the year. |
22:16:46 | FromGitter | <zacharycarter> the playground says yes PMunch: https://play.nim-lang.org/?gist=a5a6b32bc160885fd492b54b82dd5a07 |
22:16:56 | couven92 | i.e. a `$`(str: cstring, len: int): string |
22:16:59 | * | skrylar quit (Remote host closed the connection) |
22:17:00 | FromGitter | <zacharycarter> the definitive guide is the language manual |
22:17:13 | PMunch | Hmm |
22:17:16 | FromGitter | <zacharycarter> Nim in Action is a supplement I'd say and offers examples of real world use cases for Nim |
22:17:16 | jsgrant | zach, well yeah; Fair. |
22:17:25 | jsgrant | I mean "printed" though. |
22:17:39 | FromGitter | <zacharycarter> to my knowledge it's the only printed material on Nim |
22:17:46 | FromGitter | <zacharycarter> widely avaialble |
22:18:01 | PMunch | Aah, I was not declaring the boolean :) |
22:18:10 | PMunch | When I did that it works |
22:18:34 | FromGitter | <zacharycarter> I don't know the answer to your question couven92 sorry |
22:19:26 | couven92 | there does not seem to be... I wonder why... I feel this is useful, since a lot of C-FFIs return strings together with their lengths |
22:21:17 | jsgrant | Basically have/am getting all my books for said "curriculum"; A vast majority of which right now Scala -- but Rust & Nim are certainly points of interest to me. |
22:22:31 | FromGitter | <zacharycarter> not quite sure how to benchmark but I'd like to |
22:23:03 | FromGitter | <zacharycarter> ugh my last message didn't send - my nim lambda job |
22:23:07 | FromGitter | <zacharycarter> it's fast for sure |
22:25:13 | FromGitter | <zacharycarter> I imagine the majority of the time it takes to execute is because it has to retrieve a file from s3 |
22:33:45 | * | sleepyqt quit (Quit: WeeChat 1.9) |
22:44:49 | * | miran quit (Ping timeout: 248 seconds) |
22:49:59 | * | nsf quit (Quit: WeeChat 1.9) |
22:51:25 | * | skrylar joined #nim |
22:51:29 | skrylar | gru cells fixed |
22:51:44 | skrylar | still a bit behind openai/google but hey |
22:56:57 | * | sz0 joined #nim |
22:58:09 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
23:05:13 | * | skrylar quit (Remote host closed the connection) |
23:06:13 | FromGitter | <yglukhov> @mratsim you around? |
23:13:29 | couven92 | YAIH! Araq, I just solved vccexe for Visual Studio 2017! :D I'll make a PR later :) |
23:14:34 | PMunch | Hmm, I'm getting a weird error "x.y cannot be assigned to". x is a simple object type, y is a field of type cint. |
23:15:28 | dom96 | is 'x' a 'var'/ |
23:15:29 | dom96 | ? |
23:15:50 | PMunch | It's all in the same function |
23:16:29 | * | skrylar joined #nim |
23:16:41 | skrylar | now to play the wonderful game of "why aren't my polygons showing up" |
23:17:44 | PMunch | https://play.nim-lang.org?gist=7022ab9f3e13e3a487890b7a3a62fef8 |
23:17:47 | PMunch | dom96, ^ |
23:19:31 | dom96 | https://play.nim-lang.org/?gist=fe4c76e1bca841fc43acc22fedc05461 |
23:21:29 | PMunch | Ah, right |
23:21:45 | PMunch | The default iterator doesn't yield mutable values |
23:23:04 | * | yglukhov quit (Remote host closed the connection) |
23:30:05 | * | cspar quit (Ping timeout: 240 seconds) |
23:32:31 | dom96 | yep |
23:36:23 | * | cspar joined #nim |
23:40:16 | PMunch | Phew, first day of the game jam over :) |
23:40:24 | PMunch | Got to say, Nim is pretty awesome |
23:40:38 | * | PMunch quit (Quit: Leaving) |
23:50:47 | * | vlad1777d quit (Ping timeout: 260 seconds) |
23:52:54 | dom96 | :D |