00:05:28 | * | vlad1777d quit (Ping timeout: 240 seconds) |
00:11:45 | * | Jesin joined #nim |
00:42:11 | * | yglukhov joined #nim |
00:46:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
00:58:44 | * | Etheco quit (Quit: Leaving) |
01:13:25 | * | def-pri-pub joined #nim |
01:17:48 | * | chemist69 quit (Ping timeout: 240 seconds) |
01:28:38 | * | PMunch quit (Quit: leaving) |
01:31:13 | * | libman quit (Quit: Connection closed for inactivity) |
01:31:28 | * | chemist69 joined #nim |
01:43:34 | * | daaf quit (Quit: Konversation terminated!) |
01:43:53 | * | daaf joined #nim |
01:59:20 | * | Trioxin2 joined #nim |
02:02:05 | * | Trioxin quit (Ping timeout: 268 seconds) |
02:03:48 | * | Trioxin2 quit (Ping timeout: 240 seconds) |
02:03:52 | * | Trioxin joined #nim |
02:14:21 | * | WhiskyRyan joined #nim |
02:16:48 | * | brson quit (Quit: leaving) |
02:25:47 | * | smt_ joined #nim |
02:29:10 | * | smt quit (Ping timeout: 255 seconds) |
02:32:07 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
02:37:28 | * | dddddd quit (Remote host closed the connection) |
02:47:53 | * | pilne quit (Quit: Quitting!) |
02:50:05 | * | rauss joined #nim |
02:54:06 | * | Elronnd left #nim (#nim) |
03:12:02 | * | smt_ quit (Read error: Connection reset by peer) |
03:12:28 | * | smt_ joined #nim |
03:17:59 | * | daaf quit (Ping timeout: 272 seconds) |
03:42:04 | * | vlad1777d joined #nim |
04:00:09 | * | Jesin quit (Quit: Leaving) |
04:08:26 | * | Neomex quit (Quit: Leaving) |
04:31:26 | * | mawkish quit (Ping timeout: 272 seconds) |
04:50:13 | * | def-pri-pub quit (Quit: Lost terminal) |
05:16:56 | * | Neomex joined #nim |
05:18:13 | * | alxf joined #nim |
05:21:08 | * | chemist69 quit (Ping timeout: 246 seconds) |
05:25:50 | * | chemist69 joined #nim |
05:33:21 | * | Nobabs27 quit (Quit: Leaving) |
06:03:49 | FromGitter | <mratsim> Is `nimprof` still working. I get a line with a “total executions of each stack trace:” but then it’s EOF. |
06:04:39 | FromGitter | <mratsim> Note: I’m on OSX with Clang if it'srelevant |
06:10:38 | FromGitter | <Varriount> @mratsim It's unmaintained |
06:10:46 | FromGitter | <mratsim> okay |
06:11:01 | FromGitter | <Varriount> Try using a C profiler. Since you're on OSX, you can use Instruments |
06:11:21 | FromGitter | <Varriount> You can use `--debugger:native` |
06:12:49 | FromGitter | <mratsim> okay, thanks |
06:14:51 | FromGitter | <mratsim> How can I shut up XDeclareButNotUsed for enums. It’s an error enum to interface with a C lib and I’m flooded. http://img.ctrlv.in/img/17/05/26/5927c7bb18139.png |
06:29:26 | * | nsf joined #nim |
06:30:02 | * | mawkish joined #nim |
06:30:43 | FromGitter | <mratsim> @Varriount Instruments is working great, thanks ;) |
06:46:50 | * | Vladar joined #nim |
06:48:07 | * | yglukhov joined #nim |
07:07:59 | FromGitter | <Varriount> @brechtm make it public |
07:08:12 | FromGitter | <Varriount> Or try using the size pragma |
07:15:15 | * | Kingsquee joined #nim |
07:16:26 | * | rokups joined #nim |
07:17:57 | * | rauss quit (Quit: WeeChat 1.8) |
07:19:12 | * | mawkish quit (Quit: WeeChat 1.7.1) |
07:21:59 | * | xet7 joined #nim |
07:28:37 | * | Arrrr joined #nim |
07:28:37 | * | Arrrr quit (Changing host) |
07:28:37 | * | Arrrr joined #nim |
07:30:04 | FromGitter | <mratsim> This is the dream, if we could have a REPL, we could use Nim in Jupyter like that: https://github.com/QuantStack/xtensor/blob/fb7589d2a255b5687547977998719075f7decbb1/notebooks/xtensor.ipynb |
07:38:05 | * | Vladar quit (Quit: Leaving) |
07:39:19 | * | Andris_zbx joined #nim |
07:40:10 | FromGitter | <abijahm> hello guys, has anyone successfully wrapped this library https://github.com/svn2github/ta-lib.git am a noob at c |
07:47:30 | * | Arrrr quit (Ping timeout: 240 seconds) |
07:49:42 | * | Arrrr joined #nim |
07:49:42 | * | Arrrr quit (Changing host) |
07:49:42 | * | Arrrr joined #nim |
07:51:14 | Arrrr | Wrapping is not too complicated https://github.com/ephja/nim-glfw/blob/master/src/glfw/wrapper.nim |
07:51:34 | * | sz0 joined #nim |
08:05:55 | * | lenstr quit (Ping timeout: 268 seconds) |
08:15:45 | euantor | Thanks for posting that libman! |
08:23:51 | * | couven92 joined #nim |
08:28:54 | * | Neomex quit (Quit: Leaving) |
08:53:51 | * | chemist69 quit (Ping timeout: 240 seconds) |
08:54:32 | * | Trustable joined #nim |
08:58:52 | * | chrisheller quit (Ping timeout: 260 seconds) |
09:00:58 | * | chrisheller joined #nim |
09:06:30 | * | gokr quit (Ping timeout: 240 seconds) |
09:09:55 | * | Neomex joined #nim |
09:12:05 | * | Arrrr quit (Ping timeout: 240 seconds) |
09:18:52 | * | Trioxin2 joined #nim |
09:19:51 | * | Trioxin quit (Quit: Konversation terminated!) |
09:20:00 | * | Matthias247 joined #nim |
09:20:12 | * | Etheco joined #nim |
09:20:25 | * | Trioxin joined #nim |
09:21:03 | * | chemist69 joined #nim |
09:21:59 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
09:23:20 | * | Trioxin2 quit (Ping timeout: 246 seconds) |
09:29:53 | FromGitter | <ephja> I dunno why I named it "wrapper" btw. the other module is the wrapper |
10:25:34 | * | PMunch joined #nim |
10:35:46 | * | Arrrr joined #nim |
10:48:14 | FromGitter | <zacharycarter> Still fighting a memory corruption issue - https://gist.github.com/zacharycarter/255dd7fc6cbf12ce3e9ad424ff5fdaca ⏎ ⏎ If anyone is willing to help me |
10:48:21 | FromGitter | <zacharycarter> https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-c/spine-c/src/spine/Skeleton.c#L84 |
10:52:12 | PMunch | It's seems like you have an infinite recursion? |
10:52:46 | FromGitter | <zacharycarter> damn |
10:54:07 | PMunch | If you look at the stack trace at the end of the log |
10:57:16 | * | chemist69 quit (Ping timeout: 246 seconds) |
11:00:36 | * | chemist69 joined #nim |
11:03:19 | * | skrylar joined #nim |
11:05:53 | skrylar | beep boop. |
11:06:43 | * | nsf quit (Quit: WeeChat 1.7.1) |
11:09:51 | * | bjz joined #nim |
11:10:33 | FromGitter | <zacharycarter> PMunch: Hrmmm I'm worried about the heap overflow |
11:11:31 | PMunch | Yeah, heap overflows can be hard to debug. |
11:12:06 | FromGitter | <zacharycarter> Agreed, I've been at this one for the past 3 days |
11:12:12 | PMunch | Did you look at the traceback though to check if it was indeed an infinite recursion? |
11:12:29 | FromGitter | <zacharycarter> I don't think it's a case of infinite recursion |
11:12:35 | FromGitter | <zacharycarter> something is wrong in my bindings I'm guessing |
11:12:48 | skrylar | that is usually the case |
11:12:58 | PMunch | But what is all the reprAux stuff? |
11:12:58 | skrylar | well, when something is one type and that does not match the other type |
11:13:27 | FromGitter | <zacharycarter> PMunch: I'm not sure but even if I don't use repr there I still get the error |
11:13:28 | * | skrylar wonders if should port the delta debugger to nim. hm |
11:13:53 | FromGitter | <zacharycarter> I just used repr to get it to throw it |
11:14:08 | PMunch | Aha |
11:14:19 | FromGitter | <zacharycarter> I'm trying to minify this example - right now it could be compiled with just libspine |
11:14:41 | FromGitter | <zacharycarter> hoping someone will jump on board to help me as this is a blocker for spine integration with frag |
11:20:05 | * | Neomex quit (Ping timeout: 240 seconds) |
11:24:19 | * | Vladar joined #nim |
11:25:01 | skrylar | as in the proprietary animation suite Spine? |
11:26:13 | FromGitter | <zacharycarter> yessir |
11:26:49 | FromGitter | <zacharycarter> skrylar: http://fragworks.io/ |
11:26:56 | FromGitter | <zacharycarter> you can see an example of raptor boy running in the engine there |
11:27:08 | FromGitter | <zacharycarter> it works, it's just you start moving code around and things crash as usual with memory corruption |
11:28:22 | skrylar | its just my spiny cynicism about supporting tools that have activation in them |
11:28:31 | skrylar | that being said if you have the header files i might look at it |
11:28:39 | FromGitter | <zacharycarter> all the header files are here |
11:28:50 | FromGitter | <zacharycarter> https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-c/spine-c/include/spine |
11:29:01 | FromGitter | <zacharycarter> If you do, I greatly appreciate it |
11:29:14 | FromGitter | <zacharycarter> skrylar: I was going to support Dragon Bones but they don't have a C runtime :/ |
11:29:34 | skrylar | dragon bones? |
11:30:04 | FromGitter | <zacharycarter> http://dragonbones.com/en/index.html |
11:30:38 | skrylar | intriguing |
11:30:42 | FromGitter | <zacharycarter> basically a Chinese rip off of spine |
11:30:48 | skrylar | i've only ever used blender and godot for such things |
11:30:50 | FromGitter | <zacharycarter> but open source and free |
11:31:27 | * | skrylar shakes fist at lack of linux version. bah |
11:31:36 | FromGitter | <zacharycarter> I don't really mind Spine being proprietary to be honest. The libgdx founders built the product and they deserve their comeuppance I suppose |
11:31:40 | skrylar | well i'm sure its a neat tool |
11:31:52 | FromGitter | <zacharycarter> it probably is I haven't played around with it yet |
11:32:00 | skrylar | mmm i dont have a problem with proprietry. i have a problem with web activation |
11:32:01 | FromGitter | <zacharycarter> If they ever write a C runtime or if I ever have time to write a Nim runtime I might |
11:32:12 | FromGitter | <zacharycarter> Oh I see what you mean |
11:32:27 | skrylar | i have a happily paid license to 3d coat, allegorithmic and tons of stuff |
11:32:36 | skrylar | just not if they treat me like a thief from the word go |
11:32:39 | skrylar | anyway |
11:32:47 | FromGitter | <zacharycarter> right |
11:33:00 | skrylar | it's not so bad to port C++ stuff *depending* on how much of a template hell it is |
11:33:06 | skrylar | you can do some basic stuff with m4 |
11:33:33 | FromGitter | <zacharycarter> mm interesting I hadn't heard of m4 before |
11:33:35 | skrylar | i had a little test rig that was like, func(int, something, int(param)) |
11:33:58 | skrylar | then you have one file that defines macros to do the C++ to C binder and another that does the C to nim binder |
11:34:16 | FromGitter | <zacharycarter> interesting |
11:34:30 | skrylar | some would argue swig is better |
11:35:51 | skrylar | i'll leave the tab open for a bit and see how i feel. not entirely against doing a hand-wrapper for libspine (i've done a few for nim already) |
11:35:53 | FromGitter | <zacharycarter> I haven't played with either but I'm going to now |
11:36:12 | FromGitter | <zacharycarter> :D okay |
11:37:51 | skrylar | well thing with m4 is its weird and ugly |
11:37:56 | skrylar | but every unix terminal has it |
11:38:54 | skrylar | If someone wanted to be extreme maximum effort they would be better served by taking libclang and using that to introspect the C, make xml or something, and go from there. but that's significantly more work |
11:39:16 | skrylar | only thing i can suggest is to minimize the code you are having issues with |
11:39:53 | skrylar | ah crap i didn't put diascia on github |
11:40:22 | skrylar | a delta debugger is nice if you can find one. removes lines until you have the smallest thing that still crashes |
11:40:41 | skrylar | otherwise make sure structs are packed the same in both the c and nim modules |
11:40:59 | skrylar | once had a bug where freepascal was doing heinous things to structure packing when floats were in a struct |
11:42:46 | skrylar | @zacharycarter if you do decide to use M4 on something, make sure to save the outputs in git or your windows users will hate you |
11:45:48 | FromGitter | <zacharycarter> thank you advice well taken |
11:46:30 | FromGitter | <zacharycarter> how can I ensure the structs are packed the same? |
11:47:29 | PMunch | Working with some Arduino C++ code and I really miss Nims extended Lisp-like support for ternary operations... |
11:48:35 | skrylar | @zacharycarter look at your wrapper and at the .h file, make sure the .h doesn't have any weird pragmas |
11:48:45 | skrylar | make sure your ints are cints and the like |
11:51:10 | FromGitter | <zacharycarter> okay yeah I think I've done that for the most part already |
11:51:14 | FromGitter | <zacharycarter> but I'll do another run over |
11:52:50 | skrylar | did you hand-bind or use c2nim? |
11:53:13 | * | skrylar has never c2nim'd anything, so |
11:53:30 | FromGitter | <zacharycarter> I used both |
11:53:40 | FromGitter | <zacharycarter> I ran the header file through the gcc preprocessor first |
11:53:54 | FromGitter | <zacharycarter> which basically concatenated all the .h files into one large .h file |
11:54:06 | FromGitter | <zacharycarter> then I ran c2nim |
11:54:24 | FromGitter | <zacharycarter> then I moved things around / had to implement a few functions the library expects you to implement |
11:54:48 | FromGitter | <zacharycarter> c2nim seemed to have done a pretty decent job - I've wrapped quite a few libs at this point both with c2nim and by hand |
11:55:01 | FromGitter | <zacharycarter> this one is giving me fits though |
11:57:35 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
11:57:38 | skrylar | and thats why i dont bother with them x.x |
12:04:03 | FromGitter | <zacharycarter> skrylar - bother with what? |
12:05:15 | skrylar | @zacharycarter autowrapper tools |
12:06:18 | FromGitter | <zacharycarter> ah gotcha |
12:09:58 | skrylar | considering a macro for state machines |
12:10:09 | skrylar | wonder if that could be done in a single sitting.. i don't see why not |
12:12:50 | fr1end | a sitting can be arbitrary long but bedsores are probably a limiting factor |
12:13:36 | fr1end | *arbitrarily |
12:13:38 | FromGitter | <zacharycarter> alright I have the bindings down to 455 loc and the crash is preserved. I don't think I can remove anything else |
12:13:58 | skrylar | are you doing that by hand o_o |
12:14:25 | * | bjz joined #nim |
12:14:43 | FromGitter | <zacharycarter> yup |
12:15:47 | FromGitter | <zacharycarter> I just removed a bunch of proc signatures and data structures that weren't used in the code that produces the crash |
12:32:13 | * | Neomex joined #nim |
12:36:05 | FromGitter | <zacharycarter> C float arrays should translate to ptr cfloat correct? |
12:40:58 | PMunch | Isn't C floats 32-bits while Nim floats are 64-bit? |
12:41:39 | PMunch | Oh wait |
12:42:03 | PMunch | You're mapping the other way round, then I guess it's fine |
12:47:38 | skrylar | i don't know if float and double have set names |
12:47:44 | skrylar | technically "int" doesn't mean much in C |
12:47:59 | PMunch | Yeah, the datatypes in C are quite messy :P |
12:48:05 | skrylar | its sort of assumed to mean 32-bit now, but it technically means "machine width" and it was never as well defined as pascal |
12:48:11 | skrylar | i know pascal actually DOES name the bit lengths |
12:48:49 | skrylar | colloqially floats are 32-bits and double are 64. though nimrod doesn't seem to like double and wants float64 |
12:49:08 | ftsf | floats are float64 by default i believe |
12:49:13 | skrylar | possibly |
12:49:13 | PMunch | Yes |
12:49:29 | skrylar | i intentionally use 32-bit floats still |
12:50:07 | PMunch | If you don't need the extra precision why spend 2x the storage |
12:50:17 | skrylar | people think they need the precision |
12:50:20 | skrylar | but its more than storage |
12:50:45 | skrylar | when they upgrade the processors they add 64-bit registers and the 32-bit ones get more space |
12:50:58 | skrylar | So under AVX2 you can almost do an entire convolution in a single cpu op |
12:51:12 | skrylar | well a convolution is 9 cells and avx2 can only fit 8 floats |
12:51:30 | skrylar | so yeah if you don't need the precision you also get a significant boost on paralell stuff |
12:52:27 | skrylar | had a short discussion with someone about how the only difference between an old Core Duo and a modern i7 is honestly just the avx opcodes |
12:52:40 | PMunch | If your compiler manages to optimize it in that is |
12:53:12 | PMunch | Didn't the i series also cut out some pipeline stages? |
12:53:18 | skrylar | it might |
12:53:31 | skrylar | my tensor stuff seems to optimize okay enough in gcc |
12:53:47 | skrylar | haven't checked clang, they have some autovectorizing as well |
12:53:57 | PMunch | Oh yeah, but those who wrote that probably knew what they were doing :P |
12:54:22 | skrylar | well you have to give the compiler some mental help |
12:54:31 | PMunch | You probably wont notice the biggest benefit for something not specifically optimised for avx |
12:54:55 | skrylar | gcc will do it but you have to either explicitly use vector pragma types or fiddle with switches |
12:56:07 | skrylar | in my case i just have a flat array of floats and simple for loops. if you tell it -ffast-math and -funroll-loops and turn on avx2 it will actually unroll and replace with the right opcodes |
12:56:43 | skrylar | it actually tries to do it without loop unrolling but its a hilariously sad bit of assembly |
12:57:08 | skrylar | it will just go one by one packing the floats in the register until it has eight and then call it, unless you use the unroll flag |
12:57:20 | skrylar | anyway |
13:01:03 | skrylar | compiling nim to shaders would be worth a chuckle :p |
13:01:29 | fr1end | huh wasn't someone doing exactly that? |
13:01:50 | fr1end | https://forum.nim-lang.org/t/1868/1 |
13:02:35 | fr1end | oh hm I think there was something that did the actual shader part in nim too |
13:03:16 | skrylar | i see some people put msgpack code in nimble |
13:03:20 | skrylar | ought to see if they did good jobs |
13:03:30 | fr1end | https://github.com/yglukhov/nimsl yeah |
13:03:40 | fr1end | crazy stuff! \o/ |
13:04:29 | skrylar | i would say that isn't hard, but actually, yeah its not trivial |
13:04:52 | skrylar | its basically reimplementing All The Things |
13:06:17 | skrylar | bgfs just uses glsl and does some silly preprocessor stuff to make it hlsl |
13:07:58 | FromGitter | <kirk86> hi everyone, I was wondering if I could ask a question to the nim developers. It seems that there is a lot of interest and traction of using nim for scientific computation but I don't know if the developers will push the language down that road. For instance we would love to see multidimensional arrays in nim like in other languages julia, numpy. Is that sth of interest to the developers? |
13:15:27 | FromGitter | <andreaferretti> it is certainly of interest to me :-) |
13:15:33 | FromGitter | <andreaferretti> but I am not a NIm core developer |
13:15:59 | FromGitter | <andreaferretti> @mratsim is working on https://github.com/mratsim/Arraymancer |
13:16:05 | skrylar | i thought we had multidimensional arrays? |
13:16:15 | FromGitter | <andreaferretti> no, we don't |
13:16:21 | FromGitter | <andreaferretti> at least not in the stdlib |
13:16:45 | skrylar | does that mean something different from the foo[3,2] kind of thing |
13:17:14 | FromGitter | <andreaferretti> no, it is exactly that thing |
13:17:27 | FromGitter | <andreaferretti> you *can* nest arrays if you happen to know the dimensions statically |
13:17:43 | FromGitter | <andreaferretti> but for things where the dimension is not known at compile time |
13:17:55 | FromGitter | <mratsim> It is the same but ndarrays can do computations efficiently |
13:17:56 | FromGitter | <andreaferretti> you need seqs |
13:18:05 | FromGitter | <andreaferretti> and seqs of seqs are not contiguous |
13:18:23 | * | arnetheduck quit (Remote host closed the connection) |
13:19:55 | skrylar | ok so you meant more of a numpy type lib |
13:20:17 | * | arnetheduck joined #nim |
13:20:18 | skrylar | those are pretty boring to write tbh |
13:20:21 | FromGitter | <mratsim> Yes, you can do Matrix computations efficiently, slicing, etc |
13:20:49 | skrylar | i have some nubile tensor stuff |
13:21:05 | FromGitter | <mratsim> What do you mean by boring? (and what is nubile) |
13:21:31 | skrylar | nubile = young, immature |
13:22:39 | skrylar | by boring i mean its a solved problem (so, not much curiosity) and the work is just piling solved formulas in to a module and doing benchmarks |
13:22:47 | FromGitter | <mratsim> ah I see. Quite a few tensor/ndarray lib ideas popping up in the past months :O |
13:23:15 | skrylar | tensors are hmm |
13:23:43 | skrylar | i've been using a basic one for some AI stuff |
13:23:51 | FromGitter | <mratsim> mmh, I don’t think it’s a solved problem. I found numpy code quite inefficient to be honest. It needs 1000+ lines for lot of core stuff, most of those for Python-C boilerplate and reference counting |
13:24:49 | skrylar | donno if someone could yoink the tensor code from torch7 for that |
13:24:59 | skrylar | i think a lot of its in C? |
13:25:30 | skrylar | i agree it would be cool. i just think its going to be hard to convince someone to do it |
13:25:41 | FromGitter | <mratsim> I’m using PyTorch, Numpy, Nervana Neon, Ndimage code as reference |
13:25:51 | FromGitter | <mratsim> Well I’m doing it and I don’t need convincing ;) |
13:26:11 | FromGitter | <mratsim> oh and Chainer’s as well |
13:26:13 | skrylar | shiny. |
13:26:38 | skrylar | most of my time has been filled with UI/UX derp |
13:26:43 | FromGitter | <mratsim> I just implemented, reshaping, broadcasting (explicit), permutating today |
13:36:11 | * | TheLemonMan joined #nim |
13:39:01 | skrylar | bleh decision time |
13:39:15 | skrylar | time to decide if signals and slots or just regular callbacks are better |
13:42:29 | FromGitter | <mratsim> I already have my plate full with returning views or copies, thankfully I don’t have to think about GUI stuff |
13:42:59 | FromGitter | <mratsim> @kirk86 What will be your use case? |
13:52:28 | skrylar | mratsim: gui stuff is just tedium lol |
13:55:14 | FromGitter | <ephja> didn't Qt rely on them because of the absence of closures in past versions of C++? |
13:58:28 | FromGitter | <mratsim> Btw: no idea on how to chain inline iterator with zip/enumerate? https://forum.nim-lang.org/t/2972. I can’t believe I’m the only one with that question |
13:58:59 | skrylar | ephja, not just that |
13:59:34 | skrylar | they also allow you to put multiple watchers on objects |
14:00:26 | skrylar | any window that uses a data source can also connect to said data source and be told when it disconnects or such, instead of having to route it all through an event pump |
14:00:54 | skrylar | although it seems nim is taking offense to my use of generics for it |
14:01:08 | * | Jesin joined #nim |
14:04:52 | skrylar | disregard i'm an idiot |
14:04:57 | skrylar | the error is because it wasn't a var type |
14:06:04 | skrylar | eeeh might just cheat with this and say like, use a seq type (uninitialized) and a "first" field |
14:06:23 | skrylar | So you pay for two pointers but if you only ever have one receiver, you don't pay for any allocs |
14:09:55 | FromGitter | <ephja> skrylar: wait. wasn't it mostly because of lack of certain metaprogramming features? |
14:14:01 | * | dddddd joined #nim |
14:14:13 | skrylar | donno. they're useful though |
14:14:40 | * | ftsf quit (Quit: Leaving) |
14:14:44 | skrylar | GTK also uses that model |
14:14:53 | FromGitter | <mratsim> Can we use the method call syntax for pattern matching in term-rewriting macro ? {a.proc1.proc2(arg2)} ? |
14:15:14 | skrylar | i *think* so |
14:15:28 | skrylar | call syntax is just the .() operator according to the docs |
14:15:50 | FromGitter | <ephja> actually, boost.signals did not rely on variadic templates |
14:16:30 | skrylar | variadic templates are wonderful |
14:16:42 | FromGitter | <ephja> maybe the Qt people never thought of manually adding variations. there's probably no need for more than 9 parameters anyway |
14:17:00 | skrylar | well the thing is Qt is very old and also they had more targets than just GCC |
14:17:32 | skrylar | I see people talk about some magical version of C++ that doesn't suck but in reality not everyone can use the C++0xBEEF features all the time :( |
14:17:39 | FromGitter | <ephja> good ol' complicated C++ |
14:17:42 | FromGitter | <mratsim> @skrylar It works with the “normal” syntax but doesn’t match with the method call so I guess it’s not supported |
14:17:45 | shmup | so i compiled nim on linux subsystem. in nim root is koch, so I ./koch install nimble. the readme says: "This will clone the Nimble repository, compile Nimble and copy it into Nim's bin directory." |
14:18:12 | shmup | now what I do see is a new nimble directory, with a nim/bin/nim which threw me off |
14:18:13 | FromGitter | <mratsim> C++0xDEADBEEF |
14:18:14 | skrylar | mratsim: you could always use regular macros if desperate |
14:18:34 | FromGitter | <mratsim> I didn’t mean that |
14:18:44 | shmup | can't find a nimble.exe anywhere |
14:18:50 | shmup | er nimble |
14:19:36 | skrylar | i should probably do more work and do less of the being bitter in the chat lol |
14:19:47 | FromGitter | <mratsim> ```template rewriteToTensorReshape*{oa.toTensor(B).reshape(dims)}``` [https://gitter.im/nim-lang/Nim?at=59283983f3001cd3425f8bb2] |
14:20:10 | skrylar | but yes the nice thing is that even if you can't get some of the template magic working you always have the nuclear option of writing a ful-on macro |
14:20:45 | skrylar | which is nice because then you can even have dplyr syntax ^^ |
14:21:03 | FromGitter | <mratsim> I already pushed the button for my slicing syntax :P to support stuff like foo[_, *], foo[0..*, 1..4|2] |
14:21:31 | FromGitter | <mratsim> R syntax is meh >_> |
14:22:13 | FromGitter | <ephja> A lot of people seem to think that there's no need for another language now that there's c++11 |
14:22:35 | skrylar | those people thought that before there was c++11 |
14:22:52 | skrylar | c++ promotes brain damage |
14:23:24 | shmup | well whether this is encouraged or not, I just ended up nim c nimble.nim from the nimble src that was created after doing a ./koch nimble |
14:23:25 | skrylar | the sheer amount of effort needed to understand anything about how it works invokes the ikea effect and sunk cost fallacies to the point people believe nothing else can be better because they already spent effort learning it |
14:24:36 | * | TheLemonMan left #nim (#nim) |
14:24:56 | skrylar | nevermind you can train someone on ST-80 in an evening |
14:25:02 | skrylar | and C++ takes years |
14:25:08 | skrylar | anyway i said i'd stop being bitter :3 |
14:26:21 | FromGitter | <ephja> Oh and the obligatory disclaimer about subjectivity |
14:27:31 | * | rauss joined #nim |
14:31:48 | skrylar | ephja, there's a lot of psychology issues behind it yeah |
14:32:01 | FromGitter | <Varriount> skrylar: Keep going! I might be able to use you to flavor my recipes |
14:32:03 | FromGitter | <mratsim> There is C++17 |
14:32:06 | skrylar | anchoring effect applies heavily to syntax |
14:32:08 | FromGitter | <Varriount> :P |
14:32:26 | skrylar | actually there is that one weird language |
14:32:40 | skrylar | forget the name. the gimmick is that every feature has to have a qualitative study done on it |
14:32:50 | FromGitter | <zacharycarter> Okay I figured out if I replace my unchecked arrays with pointers I don't get the buffer overflow exception |
14:32:50 | Xe | skrylar: is it any better than the one that corrodes? |
14:32:53 | FromGitter | <mratsim> Hence Mozilla people created Rust syntax because they coded in C++ all the time |
14:32:55 | FromGitter | <ephja> well, the ecosystems are arguably more important than the languages themselves, so those cognitive biases do not always apply |
14:32:55 | skrylar | so their syntax was decided by all these academic papers |
14:32:56 | FromGitter | <zacharycarter> so the problem is the unchecked arrays |
14:33:08 | FromGitter | <ephja> industry support matters |
14:33:29 | skrylar | ephja, the anchoring effects matters more for syntax than anything else |
14:33:40 | FromGitter | <zacharycarter> skrylar: I think you're talking about ponylang |
14:34:12 | FromGitter | <mratsim> Skrylar, it seems like Haskell is mostly driven by academics, but I actually like Haskell syntax |
14:34:14 | shmup | pony sounds right |
14:34:36 | FromGitter | <mratsim> but ponylang is only developed in the University of Oxford iirc? |
14:34:59 | FromGitter | <zacharycarter> not sure I just know it has mathematical proofs behind its safety |
14:35:02 | skrylar | ephja, i say this because like with ex. lua its a common complaint that it doesn't look like C |
14:35:16 | FromGitter | <mratsim> Mmmmh then it’s probably Idris? |
14:35:22 | skrylar | even though it has all those other things that people like :) |
14:35:26 | skrylar | anyway |
14:35:28 | FromGitter | <mratsim> or Coq |
14:35:41 | skrylar | i heard about coq today. haven't figured out how to use it yet |
14:36:01 | * | Matthias247 quit (Ping timeout: 246 seconds) |
14:36:19 | FromGitter | <ephja> my only concern is whether or not the syntax in question is overly verbose |
14:36:30 | * | Matthias247 joined #nim |
14:36:32 | FromGitter | <mratsim> Try J or K :P |
14:37:30 | FromGitter | <ephja> and that is why I've been using moonscript instead (compiles to lua). it has some neat shortcuts |
14:38:49 | FromGitter | <mratsim> Regarding Lua, before diving into Nim, I looked also at Terralang which seems to have a similar philosophy: http://terralang.org/ and is using Lua metaprogramming |
14:39:27 | * | mwbrown quit (Ping timeout: 240 seconds) |
14:42:29 | * | mwbrown joined #nim |
14:43:01 | FromGitter | <zacharycarter> sweet fixed my binding problem I think |
14:43:04 | FromGitter | <zacharycarter> only took 3 days |
14:43:36 | skrylar | it would be neat if varargs in a template would pass to function calls without being silly |
14:43:55 | skrylar | template(..., varargs[untyped]) = <if i try to pass the varargs to a function it doesn't splice them> |
14:58:05 | FromGitter | <zacharycarter> nm still hunting :/ |
15:03:18 | * | smt joined #nim |
15:03:53 | * | chemist69 quit (Ping timeout: 246 seconds) |
15:04:02 | FromGitter | <zacharycarter> hrm I think it's this one data structure I have that is recursive in nature |
15:06:36 | * | smt_ quit (Ping timeout: 260 seconds) |
15:06:48 | * | chemist69 joined #nim |
15:10:23 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:13:46 | * | bjz joined #nim |
15:16:29 | FromGitter | <Varriount> Fun. |
15:20:47 | FromGitter | <zacharycarter> @Varriount seems maybe if you have a data structure that has an unchecked array of a pointer to another data structure with an unchecked array, things get hairy |
15:20:48 | * | smt quit (Ping timeout: 240 seconds) |
15:21:01 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:21:33 | FromGitter | <Varriount> Hm. You know that unchecked arrays have a size of 0, right? |
15:21:54 | FromGitter | <Varriount> Could that be messing up things? |
15:23:09 | FromGitter | <zacharycarter> maybe |
15:23:37 | skrylar | hum |
15:23:59 | skrylar | this is going to sound silly. is there a way to access a closure's current situation? |
15:24:22 | skrylar | was just thinking of if a closure is put on a list, and wants to remove itself, it couldn't just say &myself because that wouldn't include the environemnt |
15:26:00 | * | Andris_zbx quit (Remote host closed the connection) |
15:26:15 | * | Matthias247 quit (Read error: Connection reset by peer) |
15:40:08 | * | arnetheduck quit (Ping timeout: 240 seconds) |
15:59:42 | FromGitter | <mratsim> Is there an equivalent OpenMP pragma to 0||n for custom iterators? |
16:00:48 | FromGitter | <Varriount> Not that I know of. |
16:01:10 | FromGitter | <Varriount> To be honest, I believe the built-in OpenMP iterator was mainly a proof-of-concept |
16:05:25 | skrylar | https://github.com/skrylar/skEasing i bring gifts |
16:05:55 | FromGitter | <zacharycarter> @Araq / @dom96 : any idea how to deal with nested unchecked arrays? |
16:07:47 | FromGitter | <zacharycarter> or recursive unchecked arrays |
16:08:36 | * | nsf joined #nim |
16:12:54 | FromGitter | <mratsim> I need to learn about multiprocessing for numerical computing >_>. I guess long weekend ahead. Is it possible to do shared memory multiprocessing in Nim (copying 5000x5000 matrices is costly), where should I look for that? |
16:13:52 | FromGitter | <Varriount> @mratsim It's possible to pass pointers to Nim's various threading facilities |
16:14:16 | * | Sentreen quit (Ping timeout: 260 seconds) |
16:16:13 | FromGitter | <dom96> @zacharycarter no idea I'm afraid |
16:16:34 | FromGitter | <zacharycarter> @dom96: @Araq is probably the only one who can help me at this point I think :P |
16:16:47 | FromGitter | <zacharycarter> I think the problem is the size of the unchecked array is obviously unknown |
16:17:00 | FromGitter | <zacharycarter> so the malloc call fails thus the heap-buffer-overflow |
16:17:11 | skrylar | mratsim: createdShared is your friend |
16:17:13 | FromGitter | <zacharycarter> it's trying to allocate more memory than is available since the inner unchecked array's size isn't correct |
16:17:54 | skrylar | you will have to make memory outside of the GC, so that multiple threads can work on it. that allows you to spin up one thread per CPU and give them a separate portion of the mathy bits to do things to |
16:18:13 | skrylar | or if you're handing it to a gpgpu |
16:20:59 | skrylar | some day i will know how to do the metadata for nimble |
16:21:06 | skrylar | until then the easing functions will just sit on github |
16:28:19 | * | Sentreen joined #nim |
16:30:32 | * | brson joined #nim |
16:31:12 | FromGitter | <zacharycarter> https://gist.github.com/zacharycarter/5f91e79110251221b43ad869ad26ec35 |
16:31:14 | FromGitter | <zacharycarter> this fails |
16:31:25 | FromGitter | <zacharycarter> pretty trivial example of the problem I'm facing |
16:31:47 | * | foxcub joined #nim |
16:31:53 | FromGitter | <zacharycarter> @dom96 should I create an issue? |
16:33:17 | foxcub | I want to call a C function with the signature int f(const void *buf, int count, …), where on the Nim side I want the argument to be openarray[T]. |
16:33:32 | foxcub | Is there a way to get const void* pointer to the beginning of the array? |
16:33:51 | foxcub | (And is it safe to assume that any openarray uses contiguous memory.) |
16:34:20 | FromGitter | <Varriount> foxcub: For the C backend, yes. |
16:34:37 | FromGitter | <Varriount> An openarray is a (int, *T) pair |
16:34:44 | foxcub | What would be the proc signature on the Nim side? |
16:35:14 | foxcub | Things like addr(arr[0]) don’t seem to work. |
16:35:28 | FromGitter | <Varriount> foxcub: Try unsafeAddr |
16:35:57 | FromGitter | <Varriount> addr won't work on immutable parameters by default. |
16:36:13 | foxcub | And when creating a declaration for the C function, what do I put for buf type? pointer? |
16:36:25 | FromGitter | <Varriount> One moment |
16:40:29 | foxcub | Looking at the C code, this is almost working. Using pointer, produces a cast to a (void*). So now I just need to figure out how to make it const void* |
16:42:28 | FromGitter | <Varriount> foxcub: Something like this: https://gist.github.com/Varriount/95809a65daae8bfd330580153454d585 |
16:42:50 | FromGitter | <Varriount> Wait, C has const? I thought only C++ had that. |
16:43:00 | FromGitter | <zacharycarter> no C def has const |
16:46:37 | demi- | yeah |
16:47:51 | FromGitter | <zacharycarter> https://gist.github.com/zacharycarter/02fdd992426f73e28fa7b674883fe466 |
16:48:06 | FromGitter | <zacharycarter> that's a better example of the problem I'm facing I think |
16:48:38 | skrylar | and then i broke nim ._. |
16:50:37 | FromGitter | <mratsim> @skrylar, after (not careful) consideration, I think OpenMP is the best way for my use case (also all numerical lib are using either OpenMB or Intel Thread Building Blocks). ⏎ ⏎ So the only difficulty is understanding how to emit OpenMP pragma like ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/nim-lang/Nim?at=59285cdceec422e415f03b22] |
16:51:46 | skrylar | there is a pragma that lets you put arbitrary C code in the output |
16:51:50 | skrylar | depending on the kind of pragmas |
16:52:03 | FromGitter | <mratsim> yeah the emit pragma |
16:52:38 | skrylar | apparently if a template function attempts to call a closure, Badness ensues |
16:53:17 | skrylar | well, in a weirdly complicated way |
16:53:37 | skrylar | It works just fine in the original module. Then a second one imports that module, and uses the template. Then nim gets deeply confused |
16:56:14 | skrylar | aaaaand nim .17 is broken on arch. lovely |
16:56:20 | FromGitter | <mratsim> I saw several inconsistencies with template, when called from another file I had to use template(args) instead of args.template otherwise I get undeclared routine |
16:57:20 | FromGitter | <Varriount> foxcub: Perhaps you need importcpp? |
16:57:46 | foxcub | I think I’ve figured it out. What you gave me works. I don’t actually need the const void*, or rather passing void* is Ok. |
16:57:48 | FromGitter | <Varriount> I don't think Nim bothers with generating 'const' in any of its declarations, mostly for compatibilities sake. |
16:58:17 | foxcub | I need to play around with it more, but for now I’m good. Thanks for your help. |
17:02:20 | skrylar | Araq, dom96: i broke your compiler again http://ix.io/va9 :( |
17:02:29 | FromGitter | <Varriount> foxcub: Actually, let me try something |
17:02:53 | dom96 | skrylar: report it |
17:03:12 | skrylar | didn't i just do that :f |
17:04:28 | FromGitter | <Varriount> foxcub: Does this work? https://gist.github.com/Varriount/95809a65daae8bfd330580153454d585 |
17:04:52 | FromGitter | <Varriount> I've never tried mixing imported C procedures with generics. |
17:05:25 | foxcub | Won’t ptr array[L, int] give me an int*, not a void*? |
17:06:34 | couven92 | foxcub, in C, there is no difference between int* and void*. On paper yes, but in reality: no |
17:07:08 | FromGitter | <Varriount> foxcub: I don't mean literally. |
17:07:19 | FromGitter | <Varriount> I mean, what happens if you use a generic type in an imported procedure |
17:08:11 | FromGitter | <Varriount> I predict that either it will work, or the C compiler will raise a redefinition error. |
17:08:59 | * | WhiskyRyan joined #nim |
17:09:19 | foxcub | couven92: sure, but what happens when it’s looking for a function to import from the library? Doesn’t it make a distinction? |
17:10:17 | foxcub | Varriount: I’m not sure. I’d have to try it, but I think it’s getting further away from what I’m after. |
17:10:36 | FromGitter | <kirk86> @mratsim thanks for the reply. I'm completely new to nim and haven't explored it properly but from reading on different forums I've found that people have had some concerns regarding array slicing, broadcasting and multidimensional array creation in a non statically typed fashion. Now I don't know if all of those are true that's why I asked the previous question. |
17:10:49 | * | chemist69 quit (Ping timeout: 240 seconds) |
17:11:29 | couven92 | foxcub, not really, what happens is that the imported function is looked for in the library export table (it's its own section in the binary file) and sets a function pointer in your binary's import table (that's another section in the binary) |
17:11:59 | foxcub | couven92: interesting. Thanks for the explanation. I’ll play with it more. |
17:12:08 | couven92 | and the only way the OS does the matching is by name... |
17:12:25 | * | WhiskyRyan quit (Client Quit) |
17:12:26 | foxcub | I have a different question. If I declare a proc f[T](), can I somehow call it as f[int]()? |
17:12:39 | foxcub | I.e., no arguments of f depend on T. |
17:12:57 | couven92 | then why need T? for naming? |
17:13:27 | foxcub | No, the function does different things depending on the type. |
17:13:29 | FromGitter | <mratsim> @kirk86 My lib supports all of that (though I choose not to make broadcasting automatic for now). ⏎ Torch (C) and Tensorflow (C++) also support those as far as i know so it’s not an issue of being statically typed. The issue they have is the ergonomics, you have to use torch.add, torch.mul or tf.dot everywhere in the code instead of the mathematical symbols |
17:15:19 | FromGitter | <mratsim> It’s still in a pretty rough shape with not enough tests, and no example/docs so I don’t put it on Nimble. Also 3d arrays and more should work fine but the display is broken >_> |
17:15:36 | couven92 | foxcub, by the way: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683212(v=vs.85).aspx this is how functions are imported from a library on Windows (nim calls this function at runtime when you use dynlib). On Linux this works exactly the same, just with the corresponding POSIX function. And if you use statically linked libraries, the same happens, but is done directly by the OS kernel when it starts up your process |
17:15:50 | * | chemist69 joined #nim |
17:16:16 | foxcub | couven92: thanks for the link |
17:16:50 | * | krux02 joined #nim |
17:20:04 | * | xaxisx quit (Quit: Leaving) |
17:25:38 | * | yglukhov quit (Remote host closed the connection) |
17:25:44 | * | foxcub quit (Quit: foxcub) |
17:26:56 | * | yglukhov joined #nim |
17:27:34 | * | WhiskyRyan joined #nim |
17:29:59 | FromGitter | <Varriount> foxcub: Yes, you can do that. |
17:30:37 | skrylar | hm.. weird |
17:30:42 | FromGitter | <Varriount> foxcub: Be sure to use 'when T is ...' for branches though |
17:31:10 | FromGitter | <Varriount> If you use 'if', the compiler will semantically check all branches |
17:31:43 | * | yglukhov quit (Ping timeout: 272 seconds) |
17:32:25 | * | krux02 quit (Remote host closed the connection) |
17:38:25 | * | krux02 joined #nim |
17:38:44 | * | Neomex quit (Ping timeout: 260 seconds) |
17:43:16 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:48:25 | * | sz0 quit (Quit: Connection closed for inactivity) |
17:50:49 | * | nsf quit (Quit: WeeChat 1.7.1) |
17:51:54 | skrylar | eh.. well updated the report and found a workaround |
17:52:06 | skrylar | turns out its returning closures from an iterator that makes it confused |
17:52:13 | * | Nobabs27 joined #nim |
17:52:44 | Nobabs27 | I get this error every time I save with VS Code: No 'nim' binary could be found in PATH: '/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl' |
17:53:17 | Nobabs27 | Alas I do indeed have it installed and added to my path. Anyway I can just turn off the error educate VS Code to reality? |
17:54:51 | dom96 | Nobabs27: You must be running VS Code in a way that your PATH isn't set |
17:55:01 | dom96 | It even displays your PATH |
17:55:14 | Nobabs27 | Well if it wasn't in my path I couldn't run nim -v ... |
17:55:57 | Nobabs27 | I installed it using choosenim |
17:56:17 | Nobabs27 | I added the export command to my .bashrc |
17:57:24 | Nobabs27 | if I do echo $PATH it's actually this: /home/babs/.nimble/bin:/home/babs/.nvm/versions/node/v6.10.2/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl |
18:00:32 | * | dddddd_ joined #nim |
18:01:29 | * | dddddd quit (Ping timeout: 240 seconds) |
18:11:05 | * | Trioxin quit (Read error: Connection reset by peer) |
18:12:14 | * | Trioxin joined #nim |
18:13:13 | couven92 | Nobabs27, do `which nim` to confirm that it finds it in your PATH |
18:13:59 | Nobabs27 | couven92: /home/babs/.nimble/bin/nim |
18:14:45 | couven92 | have you closed and reopened VS code after you edited the .bashrc? |
18:14:51 | * | Trioxin2 joined #nim |
18:14:57 | Nobabs27 | yes, I edited the .bashrc yesterday lol |
18:16:38 | * | Trioxin quit (Read error: Connection reset by peer) |
18:17:19 | Nobabs27 | @ couven92 ^ |
18:19:47 | FromGitter | <mratsim> Nobabs27, There was a very specific release of vscode-nim (in Feb-March though) where I had something similar. |
18:20:16 | FromGitter | <mratsim> https://github.com/pragmagic/vscode-nim/issues/46 |
18:20:17 | * | Trioxin2 is now known as Trioxin |
18:22:27 | * | yglukhov joined #nim |
18:26:46 | * | yglukhov quit (Ping timeout: 255 seconds) |
18:30:56 | * | yglukhov joined #nim |
18:31:17 | * | krux02 quit (Remote host closed the connection) |
18:35:11 | Nobabs27 | mratsim: I tried and ln -s that didnt fix it |
18:39:17 | * | yglukhov quit (Remote host closed the connection) |
18:41:23 | * | vlad1777d quit (Ping timeout: 272 seconds) |
18:48:35 | * | yglukhov joined #nim |
19:00:19 | * | pilne joined #nim |
19:02:03 | * | Sentreen quit (Ping timeout: 268 seconds) |
19:02:52 | * | yglukhov quit (Remote host closed the connection) |
19:02:54 | * | sz0 joined #nim |
19:07:24 | * | yglukhov joined #nim |
19:11:44 | * | yglukhov quit (Remote host closed the connection) |
19:15:13 | * | Sentreen joined #nim |
19:26:52 | * | Arrrr quit (Read error: Connection reset by peer) |
19:27:34 | * | Neomex joined #nim |
19:28:09 | * | Kingsquee joined #nim |
19:31:14 | * | Sentreen quit (Ping timeout: 245 seconds) |
19:32:02 | * | rauss quit (Quit: WeeChat 1.8) |
19:32:08 | * | Neomex quit (Read error: Connection reset by peer) |
19:44:31 | * | Sentreen joined #nim |
19:52:54 | dom96 | Nobabs27: can you run 'nim' from the VS code command line? |
19:53:16 | * | yglukhov joined #nim |
19:53:53 | * | rokups quit (Quit: Connection closed for inactivity) |
19:54:13 | Nobabs27 | dom96: yes I can |
20:01:56 | * | yglukhov quit (Remote host closed the connection) |
20:02:51 | * | yglukhov joined #nim |
20:11:10 | * | yglukhov quit (Remote host closed the connection) |
20:16:33 | dom96 | Varriount: thanks for the PR merges/reviews :) |
20:28:24 | * | yglukhov joined #nim |
20:29:20 | * | Vladar quit (Quit: Leaving) |
20:29:59 | * | Kingsquee quit (Excess Flood) |
20:31:51 | * | Kingsquee joined #nim |
20:35:16 | * | Kingsqueee joined #nim |
20:37:29 | * | Kingsquee quit (Ping timeout: 245 seconds) |
20:38:39 | * | Kingsqueee quit (Excess Flood) |
20:39:08 | * | Kingsqueee joined #nim |
20:54:29 | * | Kingsqueee quit (Excess Flood) |
20:54:58 | * | Kingsqueee joined #nim |
20:57:12 | * | WhiskyRyan joined #nim |
20:59:23 | * | WhiskyRyan quit (Client Quit) |
21:02:23 | * | WhiskyRyan joined #nim |
21:12:57 | FromGitter | <Varriount> @dom96 Your welcome. I hope I didn't pull in anything too extreme |
21:13:10 | FromGitter | <Varriount> I generally don't touch anything that modifies the compiler source. |
21:13:29 | * | Matthias247 joined #nim |
21:15:35 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:19:31 | * | WhiskyRyan joined #nim |
21:23:23 | * | skrylar ponders if functional reactive programming works in nim |
21:23:28 | * | WhiskyRyan quit (Client Quit) |
21:24:22 | * | WhiskyRyan joined #nim |
21:24:45 | FromGitter | <Varriount> skrylar: You mean like react? |
21:25:36 | skrylar | not familiar with react |
21:26:09 | skrylar | i donno. might not bother for a bit |
21:26:15 | skrylar | reading about FRP is neat but its like eeeeh wut |
21:26:37 | skrylar | honestly it seems a bit like syntactic sugar on top of signals and slots |
21:33:52 | * | sz0 quit (Quit: Connection closed for inactivity) |
21:39:16 | * | Trioxin2 joined #nim |
21:42:32 | * | Sentreen quit (Ping timeout: 246 seconds) |
21:43:05 | * | Trioxin quit (Disconnected by services) |
21:43:08 | * | Trioxin2 is now known as Trioxin |
21:44:57 | FromGitter | <mratsim> I’ve dabbled a bit in React and React Native, it’s quite nice. Much more sane that jquery, if only we could kill CSS with fire ... |
21:48:02 | FromGitter | <mratsim> Can we transform an openarray to a varargs? I don’t know the size of the openarray |
21:48:34 | FromGitter | <mratsim> or just pass the openarray to a varargs proc |
21:50:03 | * | daaf joined #nim |
21:50:06 | * | couven92 quit (Quit: Client disconnecting) |
21:54:47 | * | dexterk_ joined #nim |
21:55:08 | * | dexterk quit (Ping timeout: 246 seconds) |
21:56:06 | * | Sentreen joined #nim |
21:57:23 | FromGitter | <Varriount> @mratsim Alas, no. You need to create two overloads |
21:58:31 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:00:24 | FromGitter | <mratsim> It’s 4 overloads >_>, I want to pass a seq of slices to my []= macro but all the chain (5 functions/templates/macros) only takes varargs ewww |
22:01:46 | FromGitter | <Varriount> Template time |
22:01:59 | * | WhiskyRyan joined #nim |
22:02:11 | FromGitter | <Varriount> Make the functions take openarrays |
22:02:24 | FromGitter | <Varriount> @mratsim Can I see the code? |
22:06:11 | FromGitter | <mratsim> I can probably arrange the input to not need the full macro and use this `slicerMut`proc: https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/accessors_slicer.nim#L386 |
22:06:32 | skrylar | huh, wasn't there a function that ran the gc up to a set time limit |
22:07:07 | skrylar | oh. requires a flag. |
22:08:26 | FromGitter | <mratsim> @Varriount I hope to use `slicerMut` in a loop with a seq input generated during the loop |
22:09:35 | FromGitter | <mratsim> the end goal is to concatenate n tensor, I create an empty result shell and then I copy each tensors to the appropriate slice of the result |
22:10:31 | FromGitter | <Varriount> @mratsim The general technique is to create a template or generic procedure that contains the implementation, then use it in various overloads, converting where necessary |
22:11:04 | PMunch | Puh, just done with my IoT assignment |
22:11:15 | PMunch | I have to say, writing the server in Nim was a great choice! |
22:12:58 | PMunch | However I would have liked to see a better MySQL binding. Maybe something that can generate types based on a schema and then have automatic type conversion? But that would be hard to do with SQL.. |
22:15:08 | PMunch | And I'm a bit concerned with security and Jester |
22:17:28 | * | Trustable quit (Remote host closed the connection) |
22:18:38 | FromGitter | <mratsim> @Varriount, Actually I’ve tested you can pass a seq to a varargs, not sure if feature or bug but I’m happy :P |
22:23:23 | * | chemist69 quit (Ping timeout: 260 seconds) |
22:25:32 | * | chemist69 joined #nim |
22:35:01 | * | bjz joined #nim |
22:41:18 | * | brson quit (Quit: leaving) |
22:57:21 | * | ftsf joined #nim |
23:01:00 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:01:27 | * | skrylar quit (Remote host closed the connection) |
23:02:06 | * | brson joined #nim |
23:02:59 | * | brson quit (Client Quit) |
23:03:15 | * | brson joined #nim |
23:07:56 | * | brson quit (Client Quit) |
23:13:36 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:26:02 | * | yglukhov quit (Remote host closed the connection) |
23:35:44 | * | yglukhov joined #nim |
23:38:31 | * | daaf quit (Ping timeout: 260 seconds) |
23:39:48 | * | yglukhov quit (Ping timeout: 240 seconds) |
23:48:25 | * | daaf joined #nim |
23:49:04 | * | daaf quit (Read error: Connection reset by peer) |
23:49:18 | * | daaf joined #nim |
23:49:31 | * | daaf quit (Remote host closed the connection) |
23:53:46 | demi- | i think i'm going to build a wrapper for the graphql c library this weekend; mainly so i can look at the new github APIs |