00:07:47 | * | Jesin quit (Quit: Leaving) |
00:11:34 | FromGitter | <mratsim> Seems like there is a breaking change to `Slice` ⏎ ⏎ ```Error: cannot instantiate Slice ⏎ got: (type int) ⏎ but expected: (T, U)``` [https://gitter.im/nim-lang/Nim?at=59f66e36f7299e8f534a635a] |
00:14:17 | * | Jesin joined #nim |
00:45:53 | * | Senketsu joined #nim |
01:12:29 | * | dddddd quit (Read error: Connection reset by peer) |
01:19:47 | * | skrylar joined #nim |
01:20:26 | skrylar | interesting |
01:21:09 | skrylar | updated emacs and such to fiddle around with nim modes again, and the git submodule seems to be causing an excessive amount of redraws whenever editing files in git folders o.O |
01:25:57 | GitDisc | <treeform> Do you guys know if tulayang vistis this channel? |
01:27:33 | FromGitter | <superfunc> do we have any facility in the macros lib for replace some identifier with another? |
01:28:43 | GitDisc | <treeform> maybe they go by the name of yglukhov ... |
01:28:44 | skrylar | i think you're intended to use unquoting for that |
01:35:00 | * | cspar_ joined #nim |
01:37:35 | * | cspar__ quit (Ping timeout: 248 seconds) |
01:49:23 | skrylar | interesting graphics question moment: is projection painting inherently slow, or are some of these tools just being weird |
01:50:12 | skrylar | From what i've gathered, there IS an overhead from finding which triangles are under the cursor and then mapping those back to UV space, but some of that you can get around with readback |
01:51:03 | skrylar | guess i'll have to profile what a stack of matrix multiplications actually adds up to |
01:55:07 | FromGitter | <gogolxdong> I have put SDL2_net.dll into nim path, compile and run net_server.nim in sdl2 examples shows `could not load: SDL2_net.dll` |
02:07:00 | * | Snircle joined #nim |
02:18:27 | * | chemist69 quit (Disconnected by services) |
02:18:33 | * | chemist69_ joined #nim |
02:27:29 | * | UxerUospr joined #nim |
02:35:50 | UxerUospr | I'm having problems using the nre library: https://gist.github.com/optik-aper/67419f071a026107879b0d54b07f8f8a |
02:36:54 | UxerUospr | I'm looking at the tests code for examples, but even copying and pasting the code from the test yeilds the same compiler type mismatch error |
02:37:45 | * | vlad1777d quit (Remote host closed the connection) |
02:43:05 | * | gokr quit (Ping timeout: 246 seconds) |
02:50:36 | UxerUospr | I opened issue #6629 for my problem |
03:02:41 | * | Senketsu quit (Remote host closed the connection) |
03:03:51 | * | UxerUospr quit (Quit: Lost terminal) |
03:09:11 | * | skrylar quit (Quit: Leaving) |
03:10:42 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:17:30 | FromGitter | <gogolxdong> Did I miss anything with SDL2_net.dll? |
03:35:15 | FromGitter | <superfunc> skrylar: thanks, I ended up getting by with a simple function and copyChildrenTo |
04:06:27 | GitDisc | <treeform> I did play around with SDL2 in nim, but if you are going to do openGL I recommend GLFW its much simpler and better. Unless you are using the slow 2d pixel bliting stuff. |
04:54:28 | * | FromGitter * Varriount wonders why no one uses allegro |
04:55:58 | * | Senketsu joined #nim |
04:56:02 | * | Senketsu quit (Remote host closed the connection) |
05:16:44 | FromGitter | <gogolxdong> not much opengl, just need a cross-platform GUI which can send and receive tcp request to interactive with libvirt server, better can run in web GUI form. |
05:23:12 | FromGitter | <gogolxdong> @yglukhov Is it feasible? nimx example can be compiled to js and emscripten , I think there is a way like tcp request sent by pushing the button in html5. |
05:28:37 | * | vlad1777d joined #nim |
05:41:14 | * | vlad1777d quit (Ping timeout: 255 seconds) |
05:52:13 | * | vlad1777d joined #nim |
06:07:27 | * | Vladar joined #nim |
06:41:04 | * | nsf joined #nim |
06:52:06 | watzon | Is it possible to turn off garbage collection in the compiler? |
07:19:14 | * | gangstacat quit (Quit: Ĝis!) |
07:19:17 | Araq | watzon: koch boot -d:release --gc:none ? |
07:23:41 | watzon | There we go |
07:23:44 | * | gangstacat joined #nim |
07:24:03 | * | miran joined #nim |
07:30:37 | FromGitter | <mratsim> @gogolxdong there was an electron-nim project/proof of concept |
07:36:53 | * | PMunch joined #nim |
07:47:21 | * | tdc joined #nim |
07:49:06 | * | tdc_ joined #nim |
07:52:43 | * | tdc quit (Ping timeout: 258 seconds) |
07:56:43 | * | Arrrr joined #nim |
07:56:43 | * | Arrrr quit (Changing host) |
07:56:43 | * | Arrrr joined #nim |
07:57:27 | FromGitter | <gogolxdong> @mratsim thanks ,I think it's helpful and it's from PMunch ,this is great. |
07:57:53 | PMunch | Huh? |
07:58:18 | FromGitter | <gogolxdong> jester+karax+nim-electron |
07:59:12 | PMunch | Ah :) nim-electron is very minimal by the way |
07:59:20 | PMunch | I was more or less just testing if it would work |
08:03:39 | * | dddddd joined #nim |
08:05:15 | * | xet7 quit (Quit: Leaving) |
08:07:06 | FromGitter | <gogolxdong> You provide me timely help. |
08:08:16 | FromGitter | <mratsim> I’ve got an unexplainable openmp regression instead of being 8x faster than single-threaded it’s slower (even 5x slower sometimes)… Tried: ⏎ ⏎ 1) Changing Nim version —> nothing ⏎ 2) git bisect —> nothing ⏎ 3) reverting to GCC-6 helps somewhat but only by 20% ... [https://gitter.im/nim-lang/Nim?at=59f6ddf0d6c36fca31b30e15] |
08:10:29 | Araq | well ... if changing the Nim version doesn't help |
08:10:42 | Araq | what are we supposed to do? |
08:11:47 | FromGitter | <mratsim> I wasn’t asking for anything. Trying to check if OpenMP 5.0 introduced a regression somehow ... |
08:16:49 | * | Sembei joined #nim |
08:18:09 | * | Pisuke quit (Ping timeout: 248 seconds) |
08:20:15 | FromGitter | <Yardanico> @mratsim about slices - yes, slices now contain index and backwards index |
08:20:35 | FromGitter | <Yardanico> You can read the change it changelog.md |
08:20:39 | FromGitter | <Yardanico> *in |
08:28:09 | * | yglukhov joined #nim |
08:32:21 | * | yglukhov quit (Ping timeout: 240 seconds) |
08:34:07 | Arrrr | the ^1 is mostly used for seqs and strings right? |
08:35:08 | Araq | yes |
08:36:42 | FromGitter | <mratsim> Seems like the OpenMP “regression/slowdown” only happen on Mac at a specific commit. Can’t reproduce it on Linux... |
08:36:46 | * | Ven joined #nim |
08:37:09 | * | Ven is now known as Guest36397 |
08:41:33 | * | gokr joined #nim |
08:46:16 | * | yglukhov joined #nim |
08:52:17 | * | JappleAck joined #nim |
08:58:12 | * | floppydh joined #nim |
09:03:27 | * | Sembei quit (Ping timeout: 240 seconds) |
09:03:39 | * | MyMind joined #nim |
09:09:06 | * | slim_jim_jiss joined #nim |
09:12:49 | * | Guest36397 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:13:56 | * | claudiuinberlin joined #nim |
09:14:40 | yglukhov | Araq: hi, varargs doesn't work with roof op. |
09:15:07 | Araq | should it? |
09:15:25 | yglukhov | used to work. i think it should, why not? |
09:15:34 | yglukhov | its almost like an openarray |
09:15:55 | Araq | does it work for openarray? |
09:16:10 | yglukhov | err... let me check |
09:17:21 | yglukhov | Araq: it doesn't |
09:17:25 | yglukhov | ( |
09:17:54 | yglukhov | but it should, right? =) |
09:18:04 | Araq | I guess... |
09:18:27 | Araq | I think the versions that currently take 'seq' could use 'openArray' instead |
09:20:47 | yglukhov | and array versions will be preferred over openarray, right? |
09:21:04 | Araq | yup |
09:21:40 | Araq | btw the breaking language changes have come to an end, I think |
09:21:52 | Araq | only stdlib cleanups remain for v1 |
09:22:14 | yglukhov | Araq: another problem. addr myArr[^1] doesn't work now |
09:22:47 | Araq | argh :-) |
09:22:58 | Araq | so we need a 'var' overload for that one, oh my |
09:23:30 | yglukhov | yup, and a bunch of tests i think =) |
09:24:21 | yglukhov | btw, var would not fix it completely, because unsafeAddr will still not work |
09:24:47 | yglukhov | Araq: maybe `[]`(BackwardIndex) should be templates, not procs? |
09:25:04 | Araq | can you work on that? |
09:25:24 | * | NimBot joined #nim |
09:25:52 | yglukhov | not in the nearest time im afraid. lots of stuff to handle after my vacation. |
09:26:37 | Araq | alright, fixing it then |
09:26:52 | yglukhov | btw, what do you think of https://github.com/nim-lang/Nim/pull/6614 |
09:26:54 | Araq | but er |
09:26:58 | yglukhov | isnt that genious? |
09:27:19 | Araq | they can't be templates because that would reintroduce the very bug I fixed |
09:27:51 | Araq | ok, maybe with unsafeAddr hacks but then the JS backend suffers... |
09:28:53 | yglukhov | Araq: they could use tmp vars, copy all arguments to those |
09:29:07 | yglukhov | or... actually, no.. |
09:29:36 | Araq | yglukhov: well I don't really understand it, so yeah, it's genious |
09:30:04 | yglukhov | Araq: can you ping cheatfate to review it? |
09:30:19 | Araq | actually addr myArr[^1] doesn't have to work |
09:30:33 | yglukhov | oh really? =)) |
09:30:40 | Araq | it's clearly a breaking change how ^1 works |
09:30:59 | Araq | and the error message is honest about it, so meh |
09:31:03 | yglukhov | you could get away with that, but thats cheating =) |
09:31:41 | yglukhov | also that looks intuitively inconsistent, dont you think? |
09:33:14 | yglukhov | afk 15m |
09:34:47 | PMunch | Araq, I tried to ask dom96 about this but he told me to ask you. I was wondering if there was a particular reason why there is no way to explicitly call a template or macro while parsing AST. |
09:35:40 | PMunch | I managed to get something working by using getAst and expandMacros, but it was evaluated in the scope of the outer macro implementation, which obviously didn't work. |
09:39:15 | Araq | "intuitively inconsistent", sure whatever, I'm after consistency after you've learned the basics of the freaking language |
09:39:59 | Araq | PMunch: what do you mean? |
09:40:43 | PMunch | Let's say I have a macro like for-example the routes macro in jester |
09:41:44 | PMunch | Which takes mostly code but with some extra symbols mixed in. Now someone wants to create a template to for example create a full REST for a resource. |
09:42:21 | PMunch | Problem is that templates within the macro aren't evaluated until after the macro has run. So the macro is unable to do what's needed with the symbols the template would spit out |
09:43:15 | PMunch | It would be nice if we could, after having found a template call node in some AST, call a function to expand that node to the output of the template. |
09:43:26 | * | slim_jim_jiss quit (Ping timeout: 246 seconds) |
09:44:24 | Araq | and how could the macro evaluate the template? templates can be overloaded and type information is not yet available |
09:45:44 | PMunch | Hmm, good point |
09:47:07 | PMunch | Bt wouldn't Nim be able to do type-checking on the arguments? |
09:47:27 | PMunch | https://github.com/dom96/jester/issues/34 This is the issue that got me thinking about this |
09:47:28 | FromGitter | <mratsim> I've checked on OpenMP forums, seems like OpenMP thread creation is very costly on OSX: http://forum.openmp.org/forum/viewtopic.php?f=3&t=1583 http://forum.openmp.org/forum/viewtopic.php?f=3&t=1017 |
09:48:12 | PMunch | I've run into this kind of problem before, and I feel like Nim should have some way of doing this. |
09:50:17 | * | zolk3ri joined #nim |
09:51:24 | Araq | PMunch: it comes up all the time |
09:51:33 | Araq | but I dunno how to solve it |
09:56:14 | yglukhov | Araq: so to summarize: roof should work with openarrays and varargs, but unsafeAddr should not work with roof? addr could probably work with some effort... |
09:56:49 | Araq | roof should work with openarrays and varargs |
09:57:13 | yglukhov | thats it? =) |
09:57:33 | Araq | I don't care about addr that much, I need to see how many different overloads that requires |
09:58:11 | Araq | why does thttpclient hang on my local machine? |
09:58:21 | Araq | it works in travis. |
09:58:28 | Araq | firewall? |
09:58:53 | yglukhov | unlikely... |
10:01:08 | yglukhov | Araq: why 2 params for Slice? |
10:01:30 | * | thomasross__ joined #nim |
10:01:42 | Araq | so that 0 .. ^1 can be constructed? |
10:02:00 | Araq | bbl |
10:02:51 | yglukhov | Araq: i'm not sure what to think of it... there seems to be no way of making the code compatible with 2 nim versions at once. meaning thats pretty hard to trnasition... |
10:03:41 | * | thomasross_ quit (Ping timeout: 240 seconds) |
10:04:12 | * | slim_jim_jiss joined #nim |
10:10:57 | FromGitter | <mratsim> Same issue, I have to choose devel or 0.17.2 now ... |
10:22:15 | FromGitter | <gogolxdong> `````` |
10:23:02 | * | chaosdav quit (Ping timeout: 260 seconds) |
10:23:24 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59f6fd9cb20c64242965922f] |
10:25:38 | FromGitter | <gogolxdong> @PMunch works well in windows but no in linux ubuntu. Have followed the instructions ,not sure where to look into. |
10:26:36 | floppydh | somehow struggling to get a simple unix-domain connection with lib/net.nim - does someone have any demo code for me by any chance? |
10:29:24 | Arrrr | async? |
10:30:13 | floppydh | is there an async implementation for them? |
10:30:43 | floppydh | as it happens I found my answer for blocking ones: https://github.com/nim-lang/Nim/issues/3320 :) |
10:30:48 | floppydh | right after I wrote here |
10:32:06 | * | Trustable joined #nim |
10:39:49 | yglukhov | Araq: besides addr, you can't assign to memebers. myArr[^1].a = 123 |
10:40:51 | yglukhov | Araq: how about reverting all of this, and trying to rethink the problem once again. Slices change is particularly harmful. there should be some way to transition gracefully. |
10:41:47 | yglukhov | @mratsim, what do you think? |
10:45:34 | PMunch | gogolxdong that's strange. I wrote it on a Linux machine and never tried it on Windows :P |
10:45:41 | PMunch | So I would expect it to be the other way around |
10:45:55 | floppydh | can I manually grow a sequence ? |
10:46:07 | PMunch | floppydh, setSize? |
10:46:40 | PMunch | Err, setLen |
10:47:07 | floppydh | PMunch: thanks a lot |
10:49:02 | FromGitter | <gogolxdong> yeah,it's strange ,I though the same as you. |
10:49:04 | PMunch | @gogolxdong could you show me the contentt npm-debug.lo file? |
10:49:45 | PMunch | Ugh, I've managed to somehow enable insert mode and I don't have a key to turn it off.. |
10:50:47 | FromGitter | <gogolxdong> http://paste.openstack.org/show/624951/ |
10:52:06 | floppydh | how do I get the address of the first element of a sequence Foo again? |
10:52:33 | PMunch | @gogolxdong, can you make sure that the original quickstart thing works? |
10:52:33 | Arrrr | addr(foo[0]) |
10:53:08 | FromGitter | <gogolxdong> it's strange ,the version in windows in ~1.6.2 ,in linux it's 1.6.5. |
10:54:27 | FromGitter | <gogolxdong> but I changed both to ~1.7.8, windows works well too |
10:56:28 | FromGitter | <mratsim> @Araq is there any difference in Nim Allocator between Linux and macOS, some OpenMP pattern may trigger either memory fragmention |
10:57:00 | FromGitter | <mratsim> https://stackoverflow.com/questions/5875989/does-multithreading-emphasize-memory-fragmentation |
10:57:08 | FromGitter | <mratsim> Or "false sharing" |
10:57:32 | FromGitter | <mratsim> https://stackoverflow.com/questions/6605677/openmp-poor-performance-of-heap-arrays-stack-arrays-work-fine |
10:57:47 | FromGitter | <gogolxdong> electron-quickstart package can't work straight well. |
11:02:16 | * | Snircle joined #nim |
11:05:44 | FromGitter | <gogolxdong> in both platform. |
11:07:43 | floppydh | I can't take the addr of an argument no? |
11:08:33 | FromGitter | <mratsim> You can if it's car or a ref type |
11:08:38 | floppydh | currently copymeming values in a generic proc into a seq[char], but then I can't pass like string literals etc to the proc, has to be a var with an address, I assume one can do the same with value semantics? - like adding the char-representation of any type whatsoever |
11:11:09 | FromGitter | <mratsim> Use unsafeAddr s[0] |
11:16:38 | floppydh | mratsim thanks a lot |
11:18:59 | FromGitter | <gogolxdong> ubuntu distribution 17.10 |
11:23:04 | * | tdc_ quit (Read error: Connection reset by peer) |
11:23:29 | * | tdc_ joined #nim |
11:25:05 | * | yglukhov quit (Remote host closed the connection) |
11:25:39 | * | yglukhov joined #nim |
11:27:07 | * | yglukhov quit (Remote host closed the connection) |
11:27:19 | * | yglukhov joined #nim |
11:31:13 | Araq | mratsim: there is no difference in implementation but different mmap() behaviour can also cause it |
11:31:25 | yglukhov | Araq: ok, var overloads seem to work... |
11:31:34 | Araq | yglukhov: I can make it compatible with the old version I think |
11:31:46 | yglukhov | Slices? |
11:31:48 | yglukhov | how? |
11:32:10 | yglukhov | sorry, battery is low. will go offline now. |
11:32:11 | Araq | Slice[T] should stay but an alias for HeterogenousSlice[T, T] |
11:32:22 | Araq | or something with a better name... |
11:32:30 | yglukhov | yup. might be good. |
11:32:59 | yglukhov | bbl |
11:33:15 | * | yglukhov quit (Remote host closed the connection) |
11:33:36 | FromGitter | <mratsim> @Araq, thanks, I guess I'll just say, if you can't eat your Apple and have high performance too *shrug* |
11:33:40 | * | yglukhov joined #nim |
11:38:17 | * | yglukhov quit (Ping timeout: 260 seconds) |
11:38:52 | * | elrood joined #nim |
12:02:49 | * | yglukhov joined #nim |
12:12:42 | FromGitter | <dandevelo> I am trying to have some handlers (procs) and being able to get them by name. So I thought of creating a Table[string,proc]. Are there any other options? |
12:17:11 | floppydh | trying to pass a var to a template/macro and inside print both the name of the variable and its repr/contents - any pointers? |
12:20:17 | * | jjido joined #nim |
12:31:13 | Arrrr | astToStr |
12:31:36 | Arrrr | dandevelo that's probably the best option |
12:32:20 | Arrrr | A faster approach would be to use arrays and enums, but depends on your requirements |
12:33:29 | FromGitter | <dandevelo> How would the arrays and enums approach work? |
12:34:11 | Arrrr | array[MyEnum, proc] |
12:34:46 | FromGitter | <dandevelo> That would work with a predefined list of functions, right? Not with variable function names |
12:34:49 | FromGitter | <Yardanico> yeah |
12:34:50 | Arrrr | For every proc you add you make sure to add a new enum value |
12:36:14 | FromGitter | <dandevelo> Yep. Thanks! |
12:41:40 | FromGitter | <mratsim> Note: identifier construction is very useful to create proc with variable names |
12:42:05 | FromGitter | <dandevelo> @mratsim not sure I understand |
12:42:08 | FromGitter | <mratsim> https://nim-lang.org/docs/manual.html#templates-identifier-construction |
12:42:46 | FromGitter | <dandevelo> Nice! Didn't know about those |
12:42:49 | FromGitter | <dandevelo> Thanks! |
12:42:54 | FromGitter | <mratsim> ```template createProc(name: untyped) = proc `name`() = discard``` |
12:43:32 | * | Jesin quit (Quit: Leaving) |
12:46:02 | FromGitter | <dandevelo> When using a table, is there a way to check if a key is inside the table and get the value at the same time? I know that [] will raise an exception if the key doesn't exist. Is that also the case for release mode? |
12:47:49 | * | Trustable quit (Remote host closed the connection) |
12:56:59 | Araq | dandevelop: use getOrDefault |
12:57:02 | * | gokr quit (Ping timeout: 260 seconds) |
12:59:31 | FromGitter | <Yardanico> @dandevelo yes it will raise an exception in release mode too |
12:59:36 | FromGitter | <Yardanico> exceptions aren't disabled in release mode |
13:00:18 | FromGitter | <dandevelo> Thanks @Yardanico not sure why I got that impression but it was from a discussion I had here a few weeks ago |
13:01:49 | floppydh | so am I going to get hanged by the neck if rather then wrapping a whole big c-lib to use a small bit of it, I rather just write a small c file that exposes that functionality and then import a few of those interface functions as nim procs? |
13:02:33 | Araq | write a small Nim file instead |
13:02:49 | floppydh | Araq: I'd have to emit tho? |
13:04:01 | floppydh | I'll try that first, the multi line string-syntax for emit seems a bit unwieldy, but sure |
13:04:23 | floppydh | I see `foo` is just supported for standard string literals now |
13:04:53 | floppydh | oh, or is that the point, to encourage people to import them ? |
13:07:41 | * | smt joined #nim |
13:10:33 | * | smt` quit (Ping timeout: 246 seconds) |
13:14:59 | Araq | floppydh: what do you mean? `foo` is supported like it always was |
13:15:11 | floppydh | Araq: manual says only for "..." not for """...""" |
13:15:16 | floppydh | and that its deprecated I think |
13:15:20 | floppydh | for emit |
13:15:49 | Araq | well yes, emit works better with the list of items |
13:15:49 | floppydh | " For backwards compatibility, if the argument to the emit statement is a single string literal, Nim symbols can be referred to via backticks. This usage is however deprecated. " |
13:15:58 | floppydh | ah okay |
13:16:06 | Araq | hmm that seems wrong |
13:16:19 | Araq | the backticks are for backwards compat but they work in any string literal |
13:16:32 | floppydh | oh |
13:16:54 | floppydh | but I assume I can either write a nim-proc then emit C in it, or just top-level-emit a c function and then import it as a nim-proc? |
13:16:59 | floppydh | what is preferred? |
13:18:17 | Araq | write a Nim proc instead without 'emit' |
13:18:41 | Araq | but if you really need the emit, make it as small as possible |
13:19:41 | floppydh | gotcha |
13:20:13 | * | UxerUospr joined #nim |
13:21:36 | UxerUospr | I found a typo in the manual on: https://nim-lang.org/docs/manual.html#converters |
13:22:03 | FromGitter | <SitiSchu> Do a PR ^^ |
13:22:22 | UxerUospr | Okay |
13:24:45 | PMunch | Wait, what's the typo? |
13:25:04 | UxerUospr | the anchor for convertible relation |
13:25:14 | UxerUospr | doesn't exist |
13:25:29 | FromGitter | <Yardanico> yeah, change it to https://nim-lang.org/docs/manual.html#type-relations-convertible-relation |
13:25:29 | Araq | already fixed in devel |
13:25:34 | Araq | I think |
13:25:35 | UxerUospr | and should be https: #type-relations-convertible-relation |
13:25:55 | PMunch | Aaah, right. Yeah a lot of anchors are broken.. |
13:25:59 | UxerUospr | s/https//g |
13:26:30 | UxerUospr | Araq: thanks! |
13:26:33 | * | yglukhov quit (Remote host closed the connection) |
13:30:50 | FromGitter | <Yardanico> UxerUospr: yeah, it's fixed |
13:31:21 | UxerUospr | @Yardanico: cool, thanks! |
13:32:28 | * | yglukhov joined #nim |
13:41:01 | FromGitter | <gogolxdong> @PMunch sovled. rm node_modules/electron then npm install electron -g for linux |
13:42:02 | PMunch | Aah, good to hear you figured it out |
13:42:13 | Araq | PMunch: what do you think about this: |
13:42:30 | Araq | introduce 'semityped' as a macro parameter mode |
13:42:46 | Araq | that type checks the body but doesn't produce errors |
13:42:59 | Araq | the macro can then "fix" the wrong parts |
13:43:05 | FromGitter | <Yardanico> hmmm |
13:43:08 | Araq | and sem'check runs completely afterwards |
13:43:25 | Araq | so a macro naturally sees template expansions |
13:43:35 | PMunch | Ooh, yes that sounds great! |
13:43:45 | Araq | but needs to be able to deal with partially sem'checked ASTs |
13:44:01 | Araq | though that's usually not much work to do in practice |
13:44:43 | PMunch | Most of the macros that do these replacement things typically uses untyped anyways since the things it want to replace doesn't really exist |
13:45:57 | Araq | yes. |
13:46:02 | FromGitter | <Yardanico> but I really hope it would be properly documented |
13:46:08 | Araq | it'll be really tricky to implement though |
13:46:16 | FromGitter | <Yardanico> so all can understand differences between untyped/semityped/typed |
13:47:00 | Araq | yardanico: maybe we should just change what 'typed' does? |
13:47:23 | Araq | it's still 'typed', it's just that errors are detected later and don't prevent macro invokations |
13:47:39 | PMunch | Yeah, that actually surprised me the first time I used typed |
13:47:54 | Araq | but implementing this will be a pita, the compiler is written with "continue after error" in mind |
13:48:02 | Araq | and does AST error corrections |
13:48:06 | Araq | but still ... |
13:48:41 | Araq | another HUGE "attack surface" |
13:48:57 | PMunch | I think it's something that will really improve the usability of macros and DSTs |
13:49:12 | Araq | agreed, right now it's hardly composable |
13:49:34 | Araq | will also improve nimsuggest support within macro bodies as a side effect |
13:50:06 | PMunch | What do you mean by "attack surface" in this context? |
13:50:46 | Araq | it's a combinatorial explosion to test against, every node kind comes in 2 flavours: errornous and correct |
13:51:15 | Araq | and things like nkVarSection actually change the shape after sem'check |
13:51:32 | Araq | though that's probably always been a bad idea to begin with and needs to wiped out |
13:54:24 | * | Jesin joined #nim |
14:03:34 | * | Trustable joined #nim |
14:05:29 | * | Arrrr quit (Read error: Connection reset by peer) |
14:06:45 | PMunch | Hmm, yeah I can see that being a problem.. |
14:07:01 | PMunch | But I think it's not going to cause too many issues |
14:12:37 | * | Jesin quit (Quit: Leaving) |
14:16:34 | * | yglukhov quit (Remote host closed the connection) |
14:16:47 | Araq | like my "changed how ^ is implemented" ? |
14:17:06 | Araq | I too thought "it's not going to cause many issues" |
14:17:24 | * | JappleAck quit (Quit: Leaving) |
14:18:32 | PMunch | Haha, fair point |
14:19:12 | PMunch | Well, if it's implemented as a new semityped type then it at least won't break old code |
14:19:29 | PMunch | Whether or not it is justified to have both is another issue |
14:20:38 | PMunch | I'd say maybe implement it as a new type first, then if it turns out to be too little difference for it to be useful to differentiate then they can me merged. |
14:23:16 | Araq | I don't see why, macros that right now take 'typed' continue to work |
14:23:28 | Araq | since right now only valid code can be passed to them |
14:23:34 | Araq | well ok |
14:23:44 | Araq | they secretly need to support a new AST scheme, hmmm |
14:26:13 | PMunch | Hmm, that is a valid point. However if I were to change something while working on the devel version it could break things for people using a "stable" version |
14:29:58 | FromGitter | <Yardanico> That's why you can have branches on github:) |
14:30:08 | FromGitter | <Yardanico> Devel and master |
14:30:38 | FromGitter | <SitiSchu> branches on git* :P |
14:31:02 | * | Jesin joined #nim |
14:31:18 | FromGitter | <Yardanico> Yeah, story |
14:31:22 | FromGitter | <Yardanico> Sorry :D |
14:33:30 | * | wishi quit (Remote host closed the connection) |
14:35:44 | * | wishi joined #nim |
14:39:13 | FromGitter | <data-man> @Araq: HSlice? :) ⏎ it would be nice if it was possible to write so: ⏎ ⏎ ```type ⏎ Slice*[T, U] = object ⏎ a*: T ⏎ b*: U ⏎ Slice*[T] = Slice[T, T]``` [https://gitter.im/nim-lang/Nim?at=59f73991210ac269204c14dd] |
14:42:02 | Araq | sure, overloading generics based on arity |
14:42:53 | Araq | I'll happily support every useful feature for version 1 cause that's how to get software quality. :P |
14:43:25 | * | gokr joined #nim |
14:48:28 | FromGitter | <Yardanico> Araq: maybe you can use github milestone thing so we all can see what will be fixed/implemented before 1.0 ? :) |
14:48:38 | FromGitter | <Yardanico> https://github.com/nim-lang/Nim/milestones |
14:55:12 | Araq | yardanico: the last time we tried to use a "milestone" didn't go well |
14:55:28 | Araq | so nah, better keep my todo.txt up to date |
15:03:14 | * | miran_ joined #nim |
15:19:02 | * | Ven joined #nim |
15:19:46 | * | Ven is now known as Guest42207 |
15:27:56 | * | PMunch quit (Quit: Leaving) |
15:49:06 | * | nsf quit (Quit: WeeChat 1.9.1) |
15:50:50 | FromGitter | <data-man> @Araq: Are you here now? :) |
15:53:10 | * | JappleAck joined #nim |
15:53:47 | Araq | sure |
15:54:58 | FromGitter | <data-man> I already asked before, but what do you think about https://github.com/blog/2392-introducing-code-owners? ⏎ In the D language, relatively recently, this was done for Phobos. ⏎ ⏎ Do you plan to expand the Nim development team? ⏎ IMHO, this would the Nim benefit. [https://gitter.im/nim-lang/Nim?at=59f74b51976e63937e064b16] |
16:04:51 | Araq | we need to expand the development team, fully agree with that |
16:05:16 | * | byte512 quit (Read error: Connection reset by peer) |
16:06:23 | Araq | but we can't just make up more rules for contributors, contributing needs to stay as simple as possible for now in order to attract new core developers |
16:08:03 | Araq | it's fine if you say "I am adding xyz to the stdlib and will continue to maintain it" but it requires trust, so ... we need to be sure you'll here for some time |
16:08:48 | * | byte512 joined #nim |
16:10:00 | Araq | do you want to become a core dev with write access? :-) |
16:11:46 | * | gokr quit (Ping timeout: 264 seconds) |
16:12:15 | Araq | btw it is my impression D's development is slowed down by a too restrictive process and it's hurting D a bit. I'm following its forum quite a bit and not many are willing to go through the ultra-hard review process. |
16:12:55 | Araq | could be wrong, ofc |
16:16:22 | FromGitter | <data-man> Oh yeah! I would really want to become a core dev with write access! :) ⏎ But I'm with the Nim too short to claim it. ⏎ I'm very humble. :) |
16:17:21 | Araq | well I see you're active with the PRs, that's nice |
16:17:47 | Araq | continue on this path and I'll make you a core dev within months ;-) |
16:18:07 | Araq | trust takes time. |
16:21:13 | * | smt` joined #nim |
16:21:59 | FromGitter | <data-man> Thank you! ⏎ But I'm probably too old for that. ⏎ Maybe I'm the oldest here. :) ⏎ I was born when computers were large and chewed punch cards, and a memory of 1 megabytes was a luxury. :) [https://gitter.im/nim-lang/Nim?at=59f751a732e080696e4372ce] |
16:23:47 | Araq | er ... should I be concerned now? you don't intend to live for a couple of months? |
16:24:22 | * | smt quit (Ping timeout: 255 seconds) |
16:27:42 | FromGitter | <data-man> Oh, no! ⏎ I hope to stretch out a couple more ... ⏎ ... tens of years. :) |
16:30:22 | * | sleepyqt joined #nim |
16:39:31 | * | yglukhov joined #nim |
16:48:59 | * | Guest42207 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:51:00 | * | nsf joined #nim |
16:51:02 | FromGitter | <UrKr> `import module as module_alias` precludes calling function from module with this notation `value.f(x)` right? |
16:52:05 | FromGitter | <Varriount> @UrKr I believe that's when you do "from ... Import nil" |
16:54:07 | * | Ven joined #nim |
16:54:31 | * | Ven is now known as Guest45092 |
16:55:20 | * | Jesin quit (Quit: Leaving) |
16:55:57 | FromGitter | <UrKr> Right, you mean import the function directly? ⏎ Any opinions on `value.module_alias.f(x)` |
16:56:12 | * | Guest45092 is now known as Ven`` |
16:57:02 | FromGitter | <Varriount> I don't believe that's possible. |
16:59:31 | FromGitter | <UrKr> It's not - I tried :) just wondering if it's something to be considered, since the now the `x.f(y)`notation has to be refactored if you run into a nameclash for `f`, right? |
17:00:21 | * | PMunch joined #nim |
17:01:02 | Araq | yeah but it has to be "refactored" / edited anyway |
17:01:20 | Araq | moving the 'x' into the 'f(' is not that much work |
17:03:52 | FromGitter | <data-man> @Araq: Do you plan for version 1.0 to add a loop with a postcondition? (do / while as in the C (JS) or repeat / until as in the Pascal) ⏎ This is one of fundamental programming constructs, and I was very surprised that this is not in Nim. ⏎ In addition, for such a loop there is a direct analogue in the C and JS. |
17:04:41 | Araq | nah, it's a template/macro away and Python lacks it too. |
17:05:13 | Araq | it's also not obvious what it should look like given Nim's indentation based syntax |
17:05:17 | Araq | while true: |
17:05:21 | FromGitter | <UrKr> Hm... yeah you're right I suppose. Still something like `s.f(x).g(y).h(z)` would be slightly more annoying. Also, you're right "edited" is more appropriate here... "refactor" sounds a bit affected |
17:05:24 | Araq | if cond: break |
17:06:03 | FromGitter | <UrKr> Hm... yeah you're right I suppose. Still something like `s.f(x).g(y).h(z)` would be slightly more annoying. Also, you're right "edited" is more appropriate here... "refactor" sounds a bit affected |
17:06:13 | Araq | UrKr: that dot notation causes some trouble already, it's worth it to unify procedural and OO concepts |
17:06:21 | Araq | but shouldn't be pushed any further IMO |
17:06:38 | * | dddddd quit (Remote host closed the connection) |
17:07:27 | FromGitter | <UrKr> Right, I suppose I agree. |
17:08:02 | Araq | in fact, I thought about distinguishing between x.field() and (x.field)() |
17:08:09 | Araq | in order to make it less ambiguous |
17:08:41 | Araq | but that doesn't solve much so I intend to keep things as they are |
17:11:50 | Araq | UrKr: btw to resolve ambiguities usually 'import x except clash, clashB' is usually the better idea |
17:15:52 | FromGitter | <data-man> ```i = 0 ⏎ until i < 10: ⏎ i.inc``` ⏎ ⏎ ??? [https://gitter.im/nim-lang/Nim?at=59f75e48d6c36fca31b5f187] |
17:18:09 | * | Jesin joined #nim |
17:21:56 | FromGitter | <vberset> Hello. I want to write to file chunks of data while I compute some values based on them, asynchronously. I try to achieve that using the `AsyncFile` API. But, it doesn't expose a function to flush the OS buffer. This would have allowed me to be sure at the end of the chunk's processing that the (untouched) chunk is effectively written on disk. Is there a proper solution to achive that with `AsyncFile`? Or should I use |
17:21:56 | FromGitter | ... other primitives? |
17:25:02 | * | floppydh quit (Quit: WeeChat 1.9.1) |
17:25:28 | * | yglukhov quit (Remote host closed the connection) |
17:26:01 | * | jjido quit (Ping timeout: 255 seconds) |
17:44:18 | dom96 | vberset: easiest thing to do might be to add a `flush` into asyncfile |
17:53:16 | * | yglukhov joined #nim |
17:55:18 | * | PMunch quit (Quit: leaving) |
17:57:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
18:01:12 | * | ofelas joined #nim |
18:01:29 | FromGitter | <stisa> @data-man the template would look something like https://play.nim-lang.org/?gist=15d3b99149747490a5b6de3fd74042aa |
18:11:04 | * | tdc_ quit (Read error: Connection reset by peer) |
18:11:21 | * | jjido joined #nim |
18:11:50 | * | tdc joined #nim |
18:12:59 | * | captainkraft quit (Quit: WeeChat 1.9) |
18:16:23 | * | Vladar quit (Remote host closed the connection) |
18:17:46 | * | jjido quit (Ping timeout: 255 seconds) |
18:17:56 | * | jjido joined #nim |
18:22:00 | FromGitter | <data-man> @stisa: Thank you! ⏎ I was hoping that a macro can do almost anything, but I'm thinking about the generated machine code. ⏎ First I'll do some speed research. :) |
18:23:20 | * | nsf quit (Quit: WeeChat 1.9.1) |
18:24:00 | Araq | the machine code has no inefficiencies, it's basic control flow stuff |
18:24:19 | Araq | that was close to perfect in the 80ies |
18:25:12 | Araq | and so nobody suggested "replace while loop with goto for speed" in C back then |
18:28:34 | * | durandu joined #nim |
18:30:26 | * | durandu quit (Client Quit) |
18:31:05 | * | yglukhov joined #nim |
18:31:06 | * | ofelas quit (Quit: shutdown -h now) |
18:35:43 | * | yglukhov quit (Ping timeout: 248 seconds) |
18:40:43 | * | yglukhov joined #nim |
18:44:30 | * | yglukhov quit (Read error: Connection reset by peer) |
18:45:06 | * | yglukhov joined #nim |
18:46:07 | * | rauss quit (Quit: WeeChat 1.9.1) |
18:47:28 | * | rauss joined #nim |
18:58:06 | * | vivus joined #nim |
19:00:15 | * | miran_ quit (Quit: Leaving) |
19:06:09 | * | Ven`` quit (Read error: Connection reset by peer) |
19:14:50 | * | slim_jim_jiss quit (Ping timeout: 255 seconds) |
19:28:36 | * | lurker joined #nim |
19:29:37 | * | Sentreen quit (Ping timeout: 260 seconds) |
19:35:17 | * | xet7 joined #nim |
19:39:17 | Gertm | Can Nim be compiled on a RPi? (I have the first gen) |
19:41:25 | FromGitter | <Yardanico> yeah |
19:41:29 | FromGitter | <Yardanico> if you have swap :) |
19:42:12 | * | Sentreen joined #nim |
19:49:46 | FromGitter | <Varriount> It'll take quite a while though |
19:49:51 | FromGitter | <gokr> Nim worked great on rpi3 |
19:51:02 | FromGitter | <Gooseus> whats the easiest way to read piped data into a string in a nim program? I feel I'm missing something obvious here |
19:52:48 | FromGitter | <Varriount> read from the stdin file handle? |
19:53:09 | FromGitter | <Varriount> https://nim-lang.org/docs/system.html#stdin |
19:53:51 | FromGitter | <Varriount> @Gooseus What are you piping? |
19:57:53 | * | Jesin quit (Quit: Leaving) |
20:00:58 | * | slim_jim_jiss joined #nim |
20:02:12 | FromGitter | <Gooseus> yeah, I'm just reading in data from another command line program... when I tried stdin.readAll I got the data in the var I think, but then I can't echo to stdout and even when I did stdout.write it just writes out the stdin, even though I'm writing other data to stdout: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59f78544b20c64242968b921] |
20:02:27 | FromGitter | <Gooseus> well that didn't format how I wanted at all... |
20:03:21 | * | nsf joined #nim |
20:07:42 | yglukhov | Gooseus: should not you use the pipe operator | instead of file redirection > |
20:07:56 | yglukhov | or is that some shell i'm unaware of =) |
20:08:25 | FromGitter | <Gooseus> jeez, I did not sleep much last night... ok, derp |
20:11:04 | * | xet7 quit (Quit: Leaving) |
20:11:15 | FromGitter | <Gooseus> thanks yglukhov, that little bit of stupid cost me way too much |
20:11:57 | yglukhov | yeah, programmers need to sleep sometimes. ;) |
20:12:46 | * | xet7 joined #nim |
20:22:49 | * | Ven joined #nim |
20:23:12 | * | Ven is now known as Guest9063 |
20:23:39 | GitDisc | <treeform> Hey yglukhov, you did the async mysql thing? |
20:24:00 | yglukhov | treeform: nope |
20:24:25 | GitDisc | <treeform> ok sorry to bother you |
20:24:26 | yglukhov | cassandra, rethinkdb, mongo - maybe. mysql - nope =) |
20:24:27 | * | vlad1777d quit (Ping timeout: 260 seconds) |
20:24:40 | yglukhov | no problem |
20:29:45 | * | tdc quit (Read error: Connection reset by peer) |
20:30:20 | FromGitter | <Gooseus> @dom96 @Varriount alright, here is my latest attempt - a nimaws module with sigv4 and awsclient and a service specific s3client - https://github.com/Gooseus/nimaws |
20:30:48 | * | PMunch joined #nim |
20:30:51 | FromGitter | <Gooseus> I didn't try to publish it to nimble yet, but I setup the .nimble file and structure how I think it's supposed to be, figured I'd get some feedback first |
20:31:36 | FromGitter | <Gooseus> gotta go for a walk, will cycle back in a little bit |
20:31:39 | * | tdc joined #nim |
20:31:43 | yglukhov | Gooseus: have you seen this https://github.com/aidansteele/aws_sdk.nim |
20:33:16 | FromGitter | <Varriount> @Gooseus Thanks! I'll have a look at it later |
20:33:52 | * | gokr joined #nim |
20:34:02 | FromGitter | <Varriount> There are some stylistic suggestions I might make, as well as some string optimizations. |
20:38:47 | FromGitter | <Varriount> @Gooseus Thanks for all the effort you've put into this... perhaps the possibility of an AWS library for Nim isn't so far-fetched. |
20:39:04 | FromGitter | <Varriount> (It also means I might have the possibility of using Nim at work!) |
20:45:48 | * | gokr quit (Ping timeout: 240 seconds) |
20:45:57 | * | tdc quit (Ping timeout: 240 seconds) |
20:47:19 | * | gokr joined #nim |
20:52:16 | * | UxerUospr left #nim (#nim) |
21:15:30 | FromGitter | <Gooseus> yglukhov, yeah, I was using that as a reference and took a few hints... I mostly started this as an academic pursuit and a potential tool for some basic work stuff if I could get it working |
21:22:12 | FromGitter | <Gooseus> but now that it's built and I'm still having fun, I wouldn't mind continuing some more... @Varriount thanks! def let me know |
21:24:10 | * | PMunch quit (Quit: leaving) |
21:27:43 | FromGitter | <Gooseus> does anyone here know the maintainer of that aws_sdk? there hasn't been any activity in 3 months and it looks like they were also a nim noob, would be good to know if were still planning to work on it |
21:30:26 | * | lurker quit (Quit: Leaving) |
21:32:05 | FromGitter | <Varriount> @Gooseus I believe he's in the gitter and/or IRC room |
21:33:16 | GitDisc | <treeform> Gooseus, "insanely detailed and tedious process." That is no joke. Thank you for doing this. |
21:37:56 | FromGitter | <Gooseus> treeform np, had a lot of fun with it despite the AWS nonsense... though I'm going to be revising that shit again and again if I keep working on it and I imagine it'll become much less fun |
21:38:19 | * | couven92 joined #nim |
21:38:50 | FromGitter | <Gooseus> knowing my luck AWS will deprecate v4 next year |
21:39:02 | * | yglukhov quit (Remote host closed the connection) |
21:39:13 | * | Jesin joined #nim |
21:39:37 | * | yglukhov joined #nim |
21:39:55 | * | gooseus joined #nim |
21:43:52 | * | yglukhov quit (Ping timeout: 252 seconds) |
21:44:51 | FromGitter | <Gooseus> @Varriount I don't see him if he's going by @aidansteele |
21:45:08 | FromGitter | <Varriount> I believe he goes by something different. |
21:45:13 | * | vlad1777d joined #nim |
21:46:28 | FromGitter | <Varriount> @Gooseus Any idea why the process is so convoluted? |
21:46:45 | * | yglukhov joined #nim |
21:47:30 | * | slim_jim_jiss quit (Ping timeout: 246 seconds) |
21:47:43 | FromGitter | <Gooseus> which process? |
21:49:24 | * | vivus quit (Quit: Leaving) |
21:50:04 | yglukhov | Gooseus: the author of aws_sdk doesn't look active, but he actively merged a couple of my prs. i think you could ask him to make you a collaborator if you're concerned. |
21:50:31 | * | slim_jim_jiss joined #nim |
21:50:34 | * | jjido quit (Remote host closed the connection) |
21:50:49 | yglukhov | not that i'm interested, just want to keep nim community efforts focused =) |
21:51:46 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:52:21 | * | claudiuinberlin joined #nim |
21:52:29 | FromGitter | <Gooseus> @Varriount the sigv4 stuff? Not 100%, but I think it has to do with a combination of how they need to secure and authenticate each request within their iam structure and how a lot of http clients don't guarantee the order of the headers and querystring params |
21:53:28 | FromGitter | <Gooseus> yglukhov yeah, I hear ya, I'll reach out |
21:59:29 | * | libman joined #nim |
22:01:57 | * | gooseus quit (Quit: leaving) |
22:05:23 | * | Guest9063 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:12:58 | * | slim_jim_jiss quit (Ping timeout: 264 seconds) |
22:16:24 | * | JappleAck quit (Quit: Leaving) |
22:19:41 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
22:24:37 | * | Ven joined #nim |
22:25:01 | * | Ven is now known as Guest73995 |
22:34:35 | * | vlad1777d quit (Ping timeout: 240 seconds) |
22:38:44 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:53:46 | GitDisc | <treeform> Gooseus, can I feature request to get S3 list working? |
22:53:57 | GitDisc | <treeform> for listing files? |
22:54:24 | GitDisc | <treeform> I only need list and download and I will be set for life. |
23:00:52 | * | sleepyqt quit (Quit: Leaving) |
23:05:23 | * | Guest73995 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:06:54 | FromGitter | <Gooseus> treeform sure, let's see how hard that is to get going with what I have |
23:19:03 | * | yglukhov quit (Remote host closed the connection) |
23:22:22 | * | elrood quit (Quit: Leaving) |
23:43:34 | * | zolk3ri quit (Remote host closed the connection) |
23:55:53 | * | yglukhov joined #nim |
23:59:57 | * | yglukhov quit (Ping timeout: 240 seconds) |