00:17:31 | PrimHelios | rayman22201: Thanks again! Just got it working and it's perfect :) |
00:20:35 | * | krux02 quit (Remote host closed the connection) |
00:30:04 | * | kinkinkijkin joined #nim |
00:35:05 | FromGitter | <rayman22201> awesome! glad I could help |
00:39:20 | * | rockcavera joined #nim |
00:44:44 | * | ghost64 quit (Read error: Connection reset by peer) |
01:01:52 | * | zachk quit (Quit: Leaving) |
01:19:09 | * | ghost64 joined #nim |
01:19:36 | * | abm quit (Ping timeout: 250 seconds) |
01:23:22 | FromGitter | <gogolxdong> How to use nimscript to ssh login? |
01:23:47 | FromGitter | <gogolxdong> exec "ssh [email protected] -p x" |
01:24:13 | FromGitter | <gogolxdong> comes to the password inputting step. |
01:26:43 | * | theelous3__ quit (Ping timeout: 268 seconds) |
01:30:14 | * | theelous3__ joined #nim |
01:30:20 | FromGitter | <sotrhRaven> How do you go about installing nim on Haiku? |
01:32:58 | FromGitter | <sotrhRaven> Never mind, I see it now. Version 0.19.0-1 is in HaikuDepot. |
01:47:18 | PrimHelios | gogolxdong: I'd recommend using publickey login if possible. If not, you can call startProcess from the osproc module and use the inputHandle proc to get a file pointer to the process' stdin. https://nim-lang.org/docs/osproc.html#startProcess%2Cstring%2Cstring%2CopenArray[string]%2CStringTableRef%2Cset[ProcessOption] |
01:47:37 | * | rayman22201 quit (Ping timeout: 256 seconds) |
01:50:39 | FromGitter | <zetashift> pretty cool that Nim is on Haiku. I wanted to try it out in a VM for a while now. Wonder how much effort it took to port it over |
01:50:41 | FromGitter | <gogolxdong> thanks, I used that module, thought there is a easier way to do that with nims. |
01:52:34 | PrimHelios | ah, missed the nimscript part, my bad |
01:53:57 | * | Tyresc quit (Quit: WeeChat 2.3-dev) |
01:54:40 | FromGitter | <sotrhRaven> @zetashift I just tried it in a vm I had from the recent release. I kind of want to add a drive to my machine to install it on physical hardware. |
01:56:37 | FromGitter | <sotrhRaven> Just the hello world type example. but it works as expected. I like Haiku only I believe it would throw the family for a loop. Was hard enough when I switched to Linux on the main pc years ago. |
02:01:49 | bozaloshtsh | how come nre.toSeq now returns seq[Option[string]] instead of seq[string]? |
02:03:25 | bozaloshtsh | the commit is here: https://github.com/nim-lang/Nim/commit/c0a47f7e22039100123eea34a3cb2c956a9eb829 but I can't understand why it should return a list of Option[string]... would it ever be the case that some of them were present and some not? |
02:04:12 | bozaloshtsh | oh, it's because nil string is the same as |
02:04:12 | bozaloshtsh | " |
02:04:16 | bozaloshtsh | err, empty string* |
02:05:21 | FromGitter | <gogolxdong> @PrimHelios open a file after getting a FileHandle, then write? |
02:07:27 | * | fthe quit (Ping timeout: 240 seconds) |
02:09:06 | PrimHelios | gogolxdong: Yeah, I think this is the proc you want: https://nim-lang.org/docs/system.html#open%2CFile%2CFileHandle%2CFileMode |
02:14:17 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c19a97941637902414fef94] |
02:14:31 | FromGitter | <gogolxdong> index out of bounds: (i:-1) <= (n:-1) [IndexError] |
02:18:10 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c19aa624303512ab468d6de] |
02:22:39 | bozaloshtsh | If the nim compiler type checks the program but the C compiler throws an error, that's surely a bug right? |
02:24:18 | bozaloshtsh | The C compiler thinks that myFunction_mangled is of type `int` when in fact it's not. |
02:24:28 | bozaloshtsh | s/is of type/returns/ |
02:29:15 | bozaloshtsh | Of course, I'm going to try to come up with a minimal reproducible example, but for the time being, here are the errors. I'd really appreciate any ideas for a workaround. |
02:29:20 | bozaloshtsh | https://gist.github.com/sid-code/cb82b18d1d8b7bfd7fc45bcc02b989e3 |
02:45:54 | bozaloshtsh | welp, back to master it is... this is a heisenbug. |
02:46:07 | bozaloshtsh | hope whoever runs into it next is luckier than I am. |
02:46:24 | * | theelous3__ quit (Ping timeout: 244 seconds) |
02:52:08 | bozaloshtsh | should I still report the bug on GitHub if (a) I can't begin to understand why it happens and (b) I can't reproduce it outside of my project ? |
03:00:26 | PrimHelios | I definitely would. It's a compiler bug, and a bug report, even if unreproducible, provides a record that it exists in case anyone runs into it in the future |
03:02:48 | bozaloshtsh | PrimHelios: yeah, you're right. I don't even know what to title it outside of "compiler generates code with type error" :/ |
03:05:18 | PrimHelios | That's probably good enough for now. You can always rename it if y'all find out more info about the bug |
03:08:50 | * | banc quit (Quit: Bye) |
03:23:13 | * | dddddd quit (Remote host closed the connection) |
03:24:54 | * | banc joined #nim |
03:32:32 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c19bbcff40433141931eb14] |
03:32:54 | FromGitter | <gogolxdong> this is not interactive |
03:33:27 | FromGitter | <gogolxdong> http://ix.io/1wlJ |
03:52:02 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:28:16 | * | kapil____ joined #nim |
04:51:15 | bozaloshtsh | gogolxdong: you want the ssh process to take input from stdin? |
04:54:53 | * | endragor joined #nim |
04:56:41 | * | nsf joined #nim |
05:41:58 | * | narimiran joined #nim |
05:48:54 | FromGitter | <gogolxdong> yes |
05:57:18 | * | plushie quit (Quit: plushie) |
06:03:59 | FromGitter | <gogolxdong> Is LockFreeHash.nim usable? proc set[K,V] overlays with identifier set. |
06:04:14 | FromGitter | <gogolxdong> overlaps |
06:06:41 | FromGitter | <gogolxdong> LockFreeHash.nim(169, 27) Error: undeclared identifier: 'atomic_load_n' |
06:07:50 | FromGitter | <gogolxdong> Is LockFreeHash usable? |
06:27:45 | FromGitter | <gogolxdong> http://ix.io/1wlP |
06:28:15 | FromGitter | <gogolxdong> cannot get Process interactive |
06:44:52 | FromGitter | <xmonader> @gogolxdong just do ssh credentials info 'CMD_TO_EXECUTE' other than that it'd be pretty messy, otherwise you will need a pty .. here's what you will be doing if going with the handling file descriptors https://github.com/xmonader/expectless/blob/master/expect.py |
06:49:40 | FromGitter | <AchalaSB> How to call byte32 address in Nim? How to declare it? |
06:54:02 | FromGitter | <AchalaSB> Can I upload any kind of files here? ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Is this `data["uploaded_file"] = ("test.html", "text/html", ... [https://gitter.im/nim-lang/Nim?at=5c19eb0ab4ef82024856f40d] |
06:56:30 | leorize | yes, it's required. How are you going POST data without data? |
06:57:15 | * | narimiran quit (Ping timeout: 268 seconds) |
06:57:30 | FromGitter | <AchalaSB> what is structre for upload `.png` file? |
06:57:48 | Araq | gogolxdong: lockfreehash is abandoned |
06:59:09 | FromGitter | <gogolxdong> https://github.com/cheatfate/asynctools |
06:59:14 | FromGitter | <gogolxdong> ok |
07:01:54 | FromGitter | <gogolxdong> said there is asyncpty, might be helpful, also find a nimssh2 wrapper |
07:03:52 | Araq | nimble search ssh2 |
07:05:13 | FromGitter | <gogolxdong> sure, have got one. It should be found, my bad. |
07:05:44 | * | krux02 joined #nim |
07:13:02 | FromGitter | <xmonader> @AchalaSB don't you just base64 encode it in your form? |
07:15:22 | krux02 | http://ix.io/1wlW |
08:17:10 | * | kapil____ quit (Quit: Connection closed for inactivity) |
08:23:02 | * | kapil____ joined #nim |
08:29:32 | * | nc-x joined #nim |
08:32:07 | * | lritter joined #nim |
08:32:35 | nc-x | Araq: if you have time can you please review my PR's https://github.com/nim-lang/Nim/pulls/nc-x this week? Next week I have holidays so I would like to fix the PR's then if there are any problems |
08:33:41 | * | nc-x quit (Client Quit) |
09:07:39 | * | floppydh joined #nim |
09:10:04 | * | stefanos82 joined #nim |
09:11:53 | FromGitter | <gogolxdong> @shashlick , how to convert the ssh2.c file under libssh2/example? |
09:13:51 | FromGitter | <gogolxdong> need some changes for nimssh2.cfg file? |
09:14:03 | * | whaletechho quit (Quit: ha det bra) |
09:16:39 | * | ftsf joined #nim |
09:20:56 | * | abm joined #nim |
09:21:59 | * | PMunch joined #nim |
09:29:01 | FromGitter | <mratsim> @alehander42 I’ve updated the text generator to ignore unknown tokens, and added another example with training on Pride and Prejudice. https://github.com/mratsim/Arraymancer/blob/master/examples/ex06_shakespeare_generator.nim ⏎ ⏎ @Vindaar I really need to save NN models, i.e. dozens of tensors. Think nimhdf5 is up for it? ⏎ ⏎ While protobuf is quite popular (and Pickle :/) and probably needed for ONNX and |
09:29:01 | FromGitter | ... interoperability. I think the Nim ecosystem is a bit messy at the moment. [https://gitter.im/nim-lang/Nim?at=5c1a0f5d9f431114186413c4] |
09:32:11 | FromGitter | <alehander42> ah char-rnn, I remember I was trying to reuse some kind of lua or python implementation of it years ago |
09:32:28 | FromGitter | <timotheecour> @mratsim ya, protobuf would be a good fit |
09:34:20 | FromGitter | <xmonader> what is the idiomatic way for developing plugins? something like go plugin https://golang.org/pkg/plugin/ ? |
09:34:27 | FromGitter | <alehander42> so is it actually working on char, or on token level? |
09:35:10 | FromGitter | <mratsim> yes, char by char: https://github.com/mratsim/Arraymancer/blob/master/examples/ex06_shakespeare_generator.nim#L32 |
09:35:48 | FromGitter | <mratsim> @timotheecour, I read up on ONNX spec, I will add it but probably with a custom parser/serializer so later on :P |
09:36:00 | FromGitter | <alehander42> nice, does it only work on a cpu tho |
09:36:07 | FromGitter | <mratsim> hdf5 is already there in Arraymancer, + this would allow loading Keras models |
09:36:44 | FromGitter | <mratsim> at the moment yes. I still need to add deep learning on Cuda OpenCL. |
09:37:08 | FromGitter | <timotheecour> question related to that: is there a way to write Nim and output coda/opencl ? |
09:37:31 | FromGitter | <mratsim> but next steps is to remove all those deprecated warning, rebuild docs, release a new version before breaking the backend in a non-backward compatible way |
09:37:54 | FromGitter | <timotheecour> (btw, very cool you release that RNN demo, will look at it when I get to it) |
09:37:56 | FromGitter | <mratsim> @timotheecour there was a summer of code for that in 2015, 2014? but no one took up the challenge |
09:38:18 | FromGitter | <mratsim> https://github.com/nim-lang/Nim/wiki/GSoC-2015-Ideas |
09:38:35 | FromGitter | <mratsim> and 2016: https://github.com/nim-lang/Nim/wiki/GSoC-2016-Ideas |
09:38:39 | FromGitter | <timotheecour> so there’s nothing at all in the space of cuda/opencl from nim ? Awww :( what would be best option? |
09:38:52 | FromGitter | <mratsim> Actually there is |
09:39:02 | FromGitter | <mratsim> but I don’t understand what is happening: https://github.com/jcosborn/cudanim |
09:39:31 | FromGitter | <mratsim> it’s like 200 lines of macros to do this: https://github.com/jcosborn/cudanim/blob/master/demo1/ex1.nim#L28-L31 |
09:39:45 | FromGitter | <mratsim> awesome proof of concept but I can’t debug it :P |
09:39:46 | FromGitter | <alehander42> is this relevant https://twitter.com/NimTorch/status/1052077869168451584 |
09:39:54 | FromGitter | <alehander42> i remember the tweet, but no idea if it means the same |
09:40:38 | FromGitter | <mratsim> I’m using those inline templates: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/private/incl_kernels_cuda.nim |
09:40:56 | FromGitter | <mratsim> and call them like this: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/private/p_kernels_interface_cuda.nim |
09:41:11 | FromGitter | <mratsim> and for opencl: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/private/p_kernels_interface_opencl.nim |
09:41:41 | FromGitter | <Vindaar> @mratsim In principle certainly. I store all my data using nimhdf5 (~15 GB files) and it works fine. The library has some problems and the code is ugly in parts (thanks to me learning Nim, first time writing a "high level interface" for a library and learning HDF5 internals). |
09:42:14 | FromGitter | <Vindaar> With the different use case maybe probably new bugs will appear, but I'll be there to fix them :) |
09:42:53 | FromGitter | <timotheecour> @mratsim thanks for the links! curious whether https://twitter.com/NimTorch/status/1052077869168451584 uses those ugly emit’s or something cleaner |
09:43:25 | FromGitter | <mratsim> cudaGlobal, pretty sure it comes from cudanim |
09:43:53 | FromGitter | <timotheecour> (seems like the right level of abstraction also, flexible + simple enough to use) |
09:43:54 | FromGitter | <mratsim> I plan to rework that as well with Laser. |
09:44:17 | * | Calinou quit (Remote host closed the connection) |
09:44:43 | FromGitter | <mratsim> Basically the pragma will go over the nim AST and strip everything: https://github.com/jcosborn/cudanim/blob/master/inline.nim |
09:44:48 | FromGitter | <timotheecour> so would that allow writing, say, inference in deep net in Nim such that the entire inference runs in GPU? |
09:45:25 | FromGitter | <mratsim> have to check, I checked that code when I was 4 months into Nim and didn’t write a single macro so I didn’t understand a quarter of what was going on |
09:45:41 | FromGitter | <timotheecour> (avoiding cpu <=> gpu within a batch which would slow things down a lot) |
09:45:42 | * | Calinou joined #nim |
09:46:26 | FromGitter | <mratsim> I think the hardest part is to generate GPU code, once that’s done, avoiding data mocement is easy since you just pass pointers to GPU mem |
09:46:47 | FromGitter | <timotheecour> mocement ? |
09:46:51 | FromGitter | <timotheecour> movement, ok |
09:46:52 | FromGitter | <mratsim> movement |
09:47:27 | FromGitter | <timotheecour> your shakespear demo should get a nice speedup with that |
09:47:45 | FromGitter | <timotheecour> btw have u played w running it on AWS or google compute engine ? |
09:48:02 | FromGitter | <mratsim> yes, I want to make it easy to go use it in prod |
09:48:16 | FromGitter | <mratsim> The shakespeare demo is slow for various reason. |
09:48:33 | FromGitter | <mratsim> 1) I don’t use OpenMP, I have a false sharing issue, either in my GRU or embedding layer |
09:49:24 | FromGitter | <mratsim> 1) max is slow: https://github.com/nim-lang/Nim/issues/9514 |
09:49:41 | FromGitter | <mratsim> (actually even the SIMD max is slow in my benchmark but it’s still faster |
09:49:59 | FromGitter | <timotheecour> a friend of mine (yaroslav bulatov) wrote some tools to facilitate training models on AWS (using distributed training on X machines) ; he obtained the fastest training of imaginet and open sourced it |
09:50:08 | FromGitter | <timotheecour> maybe some insight could be reused? |
09:50:16 | FromGitter | <mratsim> 1) exp and log from <math.h> could be improved 10x: https://github.com/numforge/laser/blob/master/benchmarks/vector_math/bench_exp_avx2.nim |
09:50:35 | FromGitter | <mratsim> Was he a fast.ai student? |
09:51:33 | FromGitter | <mratsim> direct link to benches: https://github.com/numforge/laser/blob/master/benchmarks/vector_math/bench_exp_avx2.nim#L256-L295 math.h 160M exponentials per second and with math 1.3G exponentials |
09:51:41 | FromGitter | <mratsim> fmath* |
09:52:00 | FromGitter | <timotheecour> > max is slow ⏎ that one can be fixed with a patched nim that does inline or a locally redifined max, no? |
09:52:36 | FromGitter | <mratsim> I need to redefine it, the compiler only vectorize is into vmaxss with -march=native and -ffast-math |
09:52:37 | FromGitter | <timotheecour> No, he worked at openai and google before |
09:53:49 | FromGitter | <mratsim> and lastly, for GRU I need to iterate on 4 tensors at the same time. Since I only implemented up to map3/apply3 I have to use temporaries |
09:54:18 | FromGitter | <timotheecour> are these performance issues (log, max, exp etc) relevant in any way if/when we move to GPU? |
09:54:22 | FromGitter | <mratsim> and I’m pretty sure exp/log/tanh in such loops are not vectorised. THis should be addressed in Laser: https://github.com/numforge/laser#loop-fusion-and-strided-iterators-for-matrix-and-tensors |
09:54:26 | FromGitter | <mratsim> nop |
09:54:52 | FromGitter | <mratsim> not sure about OpenCL but for Cuda and AMD Hip it’s not relevant. |
09:55:06 | FromGitter | <mratsim> unless Nvidia has poor implementation of exp/log/max |
09:55:37 | FromGitter | <timotheecour> the performance gains one would get form gpu would likely dwarf these improvements (not saying these shouldn’t improve, I guess it’s nice for debugging locally without using a GPU) |
09:56:44 | FromGitter | <mratsim> I still like to have a very efficient processing on CPU. I don’t remembr which article, probably someone complaining about Amazon prices that says that CPU processing is still cheaper. (though certainly not for research) |
09:57:06 | FromGitter | <timotheecour> 1 area where GPU could be slower compared to CPU is sequential algorithms, eg matrix inverse, or certain linear algebra routines that dont’ parallelize well |
09:57:33 | FromGitter | <mratsim> and on many small devices CPU is best. |
09:57:37 | FromGitter | <timotheecour> right, debugging is a good use case anyway |
09:58:53 | FromGitter | <timotheecour> btw, do u know any nim stuff in the space of distributed / cloud computing? eg, mapreduce on N machines |
09:59:43 | krux02 | timotheecour: The most popular framework in general that I know is MPI |
09:59:49 | krux02 | it is for fortran and C/C++ |
10:00:07 | krux02 | I don't know how well it works with Nim |
10:00:19 | krux02 | but with some effort, it should be possible to use |
10:00:22 | FromGitter | <mratsim> I don’t think there are any, though @bluenote10 compared NimData to distributed workflow in his repo |
10:00:38 | FromGitter | <mratsim> easiest would probably be to wrap something like Nvidia RAPIDS: https://rapids.ai/community.html |
10:01:15 | FromGitter | <mratsim> see: https://github.com/bluenote10/nimdata#basic-operations-small-data |
10:02:26 | krux02 | from what I learned GPU accelerated computing is the cheapest in €/flop |
10:02:28 | FromGitter | <timotheecour> > NimData is currently non-distributed ⏎ ⏎ (from https://github.com/bluenote10/nimdata#basic-operations-small-data) |
10:02:56 | krux02 | but very expensive in power consumption flop/W |
10:03:28 | krux02 | MPI is distributed and low level |
10:03:31 | FromGitter | <mratsim> @krux02 it really depends. For research that’s for sure because you save on the researcher time, but for 24/7 computing there was some analysis on Google TPUs that showed that a similarly powerful CPU array was cheaper |
10:04:02 | FromGitter | <timotheecour> ya i’m skeptical about cpu being cheaper per unit of work, probably depends on problem domain though. |
10:04:06 | FromGitter | <alehander42> but who does 24/7 training |
10:04:14 | FromGitter | <mratsim> not training |
10:04:17 | FromGitter | <mratsim> serving models |
10:04:27 | FromGitter | <alehander42> but isn't serving way less computationally taxing |
10:04:34 | FromGitter | <mratsim> yes |
10:04:36 | FromGitter | <alehander42> ugh, running |
10:04:51 | FromGitter | <mratsim> I’ll find the article |
10:05:07 | FromGitter | <alehander42> so can one train models on the gpu which can be ran on a cpu |
10:05:33 | FromGitter | <mratsim> that’s what is done yeah. Intel even has an “inference” stick dedicated to running pretrained model |
10:05:48 | FromGitter | <mratsim> and Apple “strategy” in ML is also that. Just serving the models |
10:06:12 | FromGitter | <alehander42> I see |
10:06:39 | FromGitter | <mratsim> @timotheecour @alehander42 I think it was this article: https://minimaxir.com/2017/07/cpu-or-gpu/ |
10:07:00 | krux02 | while everybody is hyped about AI, I still try to improve data visualization to train the neural network behind my eyes. |
10:07:24 | FromGitter | <mratsim> Can we distribute krux02 to the cloud though? ;) |
10:07:27 | * | MyMind quit (Ping timeout: 240 seconds) |
10:07:33 | * | Pisuke joined #nim |
10:07:37 | krux02 | but output speed through a keyword isn't very fast |
10:07:55 | krux02 | nope, I don't distribute |
10:08:16 | krux02 | and I only work for myself or when I get payed directly. |
10:09:30 | krux02 | But I think it is much more valuable to me, when my neural network is trained rather than an artificial neural networ on some computer that I don't own. |
10:11:11 | FromGitter | <mratsim> arraymancer can run on your computer |
10:11:38 | krux02 | still, but the training effect is unavaiable as soon as the computer is turned off. |
10:11:58 | FromGitter | <mratsim> same thing when you sleep |
10:12:08 | krux02 | not really |
10:15:00 | krux02 | the only problem is, the neural network never stops training and it might drop important information |
10:16:37 | FromGitter | <mratsim> you can stop training it and even keep multiple version around. |
10:17:15 | FromGitter | <mratsim> When we do ML we version our models just in case a modification we do introduces some regression |
10:17:43 | FromGitter | <mratsim> and during training we also do “chackpointing” in case further training worsen the results |
10:17:47 | FromGitter | <mratsim> checkpointing* |
10:18:16 | FromGitter | <alehander42> I think krux02's neural network never stops |
10:18:37 | FromGitter | <alehander42> but I'd love if he versions himself .. think about it where is krux03 |
10:20:01 | FromGitter | <timotheecour> that would be nice |
10:24:37 | * | rockcavera quit (Remote host closed the connection) |
10:35:59 | * | dddddd joined #nim |
11:05:12 | * | synthmeat joined #nim |
11:18:18 | * | theelous3 joined #nim |
11:37:33 | * | theelous3__ joined #nim |
12:10:29 | FromGitter | <xmonader> I got a very weird message during build ⏎ https://pastebin.com/yxqqi0L9 ⏎ ⏎ ``` ... Error: invocation of external compiler program failed. Cannot allocate memory 12``` [https://gitter.im/nim-lang/Nim?at=5c1a3534b8760c21bbf14c33] |
12:10:31 | * | theelous3 quit (Ping timeout: 268 seconds) |
12:13:40 | * | theelous3 joined #nim |
12:21:42 | Araq | xmonader: use a swap partition? |
12:27:14 | FromGitter | <xmonader> yup |
12:27:31 | FromGitter | <xmonader> when i ran the build process again it worked, but no idea why that happened in the first place? |
12:27:51 | FromGitter | <xmonader> is it something local to my machine or something can happen randomly? |
12:28:11 | FromGitter | <xmonader> ^ i'm working on a 9 years old laptop atm |
12:30:24 | * | odc quit (Ping timeout: 250 seconds) |
12:32:34 | * | nc-x joined #nim |
12:32:53 | * | odc joined #nim |
12:34:48 | nc-x | @dom96: Regarding https://github.com/nim-lang/Nim/pull/9981, what should I write in the TODO? Because I don't see those magic typed/untyped procs going away from system.nim/stdlib any time soon. |
12:35:26 | dom96 | Why not? |
12:37:19 | nc-x | How will those procs be implemented then? AFAIK magics don't work with macros/templates. |
12:37:51 | Araq | ^ we can introduce .magic templates |
12:38:00 | Araq | but I dunno how much work it would be |
12:42:13 | nc-x | Okay I added the todo |
12:44:39 | dom96 | also, in the future, it would be nice to explain in the code why the code is disabled for stdlib |
12:45:49 | dom96 | (if you ever create a similar PR/change) |
12:46:22 | nc-x | Okay |
12:47:05 | * | nc-x quit (Quit: Page closed) |
12:58:11 | * | nsf quit (Quit: WeeChat 2.3) |
13:03:09 | FromGitter | <alehander42> Araq, can I test many compiler err-msgs in the same file somehow |
13:03:28 | * | Vladar joined #nim |
13:04:48 | * | fthe joined #nim |
13:16:49 | * | fthe quit (Ping timeout: 250 seconds) |
13:25:00 | * | Snircle joined #nim |
13:27:35 | krux02 | nc-x: nice work on the typed/untyped on procs. |
13:34:08 | * | nc-x joined #nim |
13:34:18 | nc-x | krux02: Thank you! |
13:36:12 | krux02 | I wanted to implement it as well, but then got stuck on it, did something else and then forgot about it. |
13:52:23 | * | nc-x quit (Ping timeout: 256 seconds) |
13:57:08 | * | endragor quit (Remote host closed the connection) |
13:57:37 | * | endragor joined #nim |
14:02:16 | * | endragor quit (Ping timeout: 250 seconds) |
14:03:59 | Araq | alehander42: yes, use a cmd: "nim check $file" nimout: '''stuff here''' |
14:46:07 | * | lritter quit (Ping timeout: 244 seconds) |
15:02:56 | * | ftsf quit (Ping timeout: 250 seconds) |
15:16:27 | * | theelous3 quit (Ping timeout: 240 seconds) |
15:20:14 | * | omgbbq joined #nim |
15:20:23 | omgbbq | HeavenO |
15:20:45 | omgbbq | It it possible to have tables within tables? |
15:21:49 | Araq | certainly |
15:24:09 | FromGitter | <mratsim> @timotheecour re distributed computing, maybe you can use nimpy for https://github.com/ray-project/ray/ (apparently it’s use as a backend for https://github.com/modin-project/modin) |
15:24:36 | omgbbq | Thanks Araq |
15:38:25 | omgbbq | I'm a little daft. Shouldn't something like thing work? |
15:38:26 | omgbbq | var a = initTable["label", Table]() |
15:38:49 | FromGitter | <mratsim> label should be a type not a string |
15:39:19 | FromGitter | <mratsim> `initTablestring, Table[int, string ()` for example |
15:39:59 | * | levix joined #nim |
15:40:40 | omgbbq | Aha! Thank you very much FromGitter |
15:41:04 | FromGitter | <mratsim> FromGitter is a relay bot ;) |
15:41:29 | omgbbq | Arigato mr roboto |
15:41:58 | omgbbq | or thankyou mratsim ;) |
15:53:22 | omgbbq | Got it to work! |
15:55:02 | * | levix quit (Remote host closed the connection) |
15:56:56 | FromDiscord_ | <Diogo> Hi everyone! I'm new to Nim, can you tell me if it's possible to built multiple "modules" each as a single dlls and some modules uses other modules? Like including headers in C++ for each dll. I'm building a game and want it to be very modular to be easy to build mods later on. |
15:57:11 | FromDiscord_ | <Diogo> Hi everyone! I'm new to Nim, can you tell me if it's possible to build multiple "modules" each as a single dlls and some modules uses other modules? Like including headers in C++ for each dll. I'm building a game and want it to be very modular to be easy to build mods later on. |
15:57:42 | * | omgbbq quit (Quit: Page closed) |
15:58:50 | * | nsf joined #nim |
16:03:46 | PMunch | @Diogo, in theory yes. But there are some issues with the GC and DLLs at the moment |
16:04:12 | PMunch | Loading non-GC DLLs works just fine though |
16:05:29 | * | PMunch quit (Remote host closed the connection) |
16:05:55 | FromDiscord_ | <Diogo> I see, the GC (and standard libraries?) would be present in all dll's? |
16:08:46 | * | Trustable joined #nim |
16:09:06 | FromGitter | <mratsim> you can strip the gc |
16:09:32 | FromGitter | <mratsim> unused proc/types are not imported, only system.nim is in by default |
16:09:46 | FromGitter | <mratsim> https://nim-lang.org/docs/system.html |
16:10:13 | FromGitter | <mratsim> compile with gc:none and nim will warn you when you want to use the gc |
16:10:48 | FromGitter | <mratsim> but mostly the issue is that you need to call “nimMain” when loading a nim lib. |
16:11:32 | FromGitter | <mratsim> when linking to multiple nim libs you would have a conflict, so better have one nim interface that imports all the nim modules. |
16:12:14 | FromGitter | <mratsim> alternatively gc:destructors (experimental) will replace strungs and seqs with non-gc’ed version |
16:13:25 | FromGitter | <mratsim> otherwise if your pure nim, plenty of game devs are fine with at ost tuning the max pause allowed by the gc |
16:13:35 | FromGitter | <mratsim> you're |
16:13:35 | * | narimiran joined #nim |
16:13:41 | FromGitter | <mratsim> at most* |
16:15:07 | FromDiscord_ | <Diogo> ok, thank you. But regarding types that are an the main game, like a GameObject, the "mod" will have to include it, is there a way to tell the compiler to not copy the code and to just expect the code to be there? |
16:17:59 | FromDiscord_ | <Diogo> or is it ok to have duplicated code? |
16:18:37 | FromDiscord_ | <Diogo> it's probably not a problem I guess, it's going to be the same version |
16:19:24 | FromGitter | <mratsim> you can have the compiler produce a header |
16:19:34 | * | kinkinkijkin quit (Remote host closed the connection) |
16:19:39 | FromDiscord_ | <Diogo> oh |
16:19:47 | FromDiscord_ | <Diogo> ok, thank you 😃 |
16:19:52 | FromGitter | <mratsim> https://nim-lang.org/docs/backends.html#backend-code-calling-nim-nim-invocation-example-from-c |
16:21:01 | Araq | PMunch: I need something reproducible in order to fix the DLL issues |
16:21:22 | Araq | as I said, the test suite covers it, it's green, it uses the GC and the GC does collect stuff without crashing |
16:21:45 | FromGitter | <mratsim> even importing multiple nim dlls in the same project? |
16:21:51 | FromGitter | <mratsim> no nimMain conflicts? |
16:22:17 | Araq | the nimrtl.dll contains the GC, other DLLs don't |
16:22:48 | * | endragor joined #nim |
16:22:50 | Araq | but the test only has a "client" and a "server", so maybe we need to expand it |
16:24:51 | FromDiscord_ | <Diogo> Just to be clear, the header is to invoke nim from C, and not Nim from one dll to Nim in other, right? that would mean if I needed classes from the Game in Mod1, Mod1 would export everything from Mod1 and Game to Dll1 ? |
16:27:04 | * | endragor quit (Ping timeout: 246 seconds) |
16:30:16 | FromDiscord_ | <Diogo> therefore (in case I did not misunderstand that) my question is, is there a way to exclude the Game code, during compilation and use the generated headers only? (that would mean the C code would not have the all the Game code, only the headers) |
16:30:46 | FromDiscord_ | <Diogo> therefore (in case I did not misunderstand that) my question is, is there a way to exclude the Game code, during compilation and use the generated headers only? (that would mean the resulting C code would not have the all the Game code, only the headers) |
16:39:57 | FromDiscord_ | <Diogo> therefore (in case I did not misunderstand that) my question is, is there a way to exclude the Game code, during compilation and use the generated headers only? (that would mean the resulting C code would not have all the Game code, only the headers) |
16:42:42 | FromGitter | <mratsim> I’m not sure, I didn’t play much with Nim DLL/FFI. |
16:43:51 | * | whaletechho joined #nim |
16:45:50 | FromGitter | <alehander42> Diogo, btw, if you're changing your message, please try to just add a new one with `fixed words and stuff*` , because in gitter/irc we receive the whole message again |
16:46:30 | leorize | Diogo: so, you mean you want the game to be it's own library instead? |
16:47:35 | FromDiscord_ | <Diogo> @mratsim Ok, but thank you for the help! |
16:48:12 | FromDiscord_ | <Diogo> @alehander42 you are right, sorry, I will do that next time |
16:51:19 | FromDiscord_ | <Diogo> @leorize I want to have the game I develop to be a normal executable, but each game mod produced by other people that will potentially add other functionality will be a dll |
16:52:37 | FromDiscord_ | <Diogo> and I will load each of them and then start the game |
16:59:44 | * | vlad1777d joined #nim |
17:04:53 | * | abm quit (Quit: Leaving) |
17:25:12 | * | d10n-work joined #nim |
17:53:00 | FromGitter | <mratsim> @Diogo if something is possible in C, it’s possible in Nim ;) |
17:56:30 | * | plushie joined #nim |
17:56:34 | Zevv | For the AoC players on #nim, I learned macros today, please admire my solution: https://github.com/zevv/aoc2018/blob/master/a19c.nim |
18:05:41 | FromDiscord_ | <Diogo> @mratsim I really like Nim! The optional GC and the possibility of configuring the GC max pause makes it awesome for game dev. I will keep on learning and try to do what I need, thanks 😃 |
18:08:49 | Zevv | Is there a way to represent a NimNode as human readable and indentet Nim code? treeRepr and lispRepr are both not quite what I'm looking for |
18:10:20 | * | crem quit (Read error: Connection reset by peer) |
18:10:48 | * | crem joined #nim |
18:12:37 | * | Trustable quit (Remote host closed the connection) |
18:17:54 | FromGitter | <mratsim> @Zevv `toStrLit` |
18:18:47 | leorize | Zevv: `repr` is your friend |
18:18:48 | FromGitter | <mratsim> elven code looks lembler |
18:19:00 | FromGitter | <mratsim> looks like assembler |
18:19:11 | FromGitter | <mratsim> repr doesn’t work on NimNode, you need treerepr |
18:19:28 | leorize | it does for me, it actually print out the Nim code |
18:19:33 | FromGitter | <mratsim> but toStrLit generates Nim code that you can copy paste |
18:19:36 | leorize | looks horrible w the gensym symbols though |
18:19:42 | Zevv | leorize: well look at that, thanks for pointing out |
18:19:55 | Zevv | works like a charm |
18:19:56 | FromGitter | <mratsim> oh, repr never worked for me :P |
18:20:06 | leorize | must have been a new thing then :P |
18:20:19 | FromGitter | <mratsim> I’ve always used toStrLit |
18:20:48 | Zevv | ah toStrLit also works, and is actually in the documentation |
18:21:04 | Zevv | I was looking for a somethingRepr() function |
18:21:23 | * | narimiran quit (Ping timeout: 246 seconds) |
18:21:25 | leorize | well, `repr` is supposed to be the universal debugging tool :) |
18:21:55 | FromGitter | <mratsim> repeat after me 100 times `echo is not a debugger` |
18:21:59 | Zevv | yes, but I expected (wrong) that it would a lot of brackets and nested stuff |
18:22:17 | Zevv | for i in 1..100: echo "echo is a great debugger" |
18:25:00 | leorize | `echo` is the best debugger |
18:25:19 | leorize | !eval for _ in 1..100: echo "echo is the best debugger" |
18:25:21 | NimBot | echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵echo is the best debugger↵ech... |
18:41:06 | * | NimBot joined #nim |
18:47:17 | * | kinkinkijkin joined #nim |
18:59:36 | * | zachk joined #nim |
19:01:35 | * | zachk quit (Read error: Connection reset by peer) |
19:02:07 | * | zachk joined #nim |
19:02:27 | * | zachk quit (Changing host) |
19:02:28 | * | zachk joined #nim |
19:24:59 | FromGitter | <alehander42> Echo is an ok debugger |
19:25:31 | FromGitter | <alehander42> Far from the best possible debugger |
19:43:54 | * | McSoFake joined #nim |
19:50:05 | * | floppydh quit (Quit: WeeChat 2.3) |
19:50:51 | * | Perkol joined #nim |
20:02:05 | Araq | yuriy: nim cpp -r tests\async\tasynctry.nim fails |
20:02:13 | Araq | I wonder if you know why |
20:20:37 | * | nsf quit (Quit: WeeChat 2.3) |
20:24:11 | * | Tyresc joined #nim |
20:51:13 | * | narimiran joined #nim |
20:51:44 | * | narimiran quit (Remote host closed the connection) |
20:54:37 | * | Perkol quit (Remote host closed the connection) |
21:03:57 | * | Vladar quit (Remote host closed the connection) |
21:17:11 | * | kapil____ quit (Quit: Connection closed for inactivity) |
21:32:52 | Zevv | I have a SIGSEGV in the compiler that goes away with -d:obj_check:off, how I debug this? |
21:42:52 | FromGitter | <mratsim> ../Nim/koch temp c --debugger:native build/yourfile.nim |
21:43:14 | FromGitter | <mratsim> assuming Nim directory is at the same level as your working directory |
21:43:23 | FromGitter | <mratsim> you need to git clone Nim repo |
21:44:22 | Zevv | I have that, let me try |
21:50:56 | Zevv | Error: unhandled exception: sym is not accessible [FieldError] |
21:52:10 | FromGitter | <mratsim> sounds fun :P, if you have a repro code open an issue on Github |
21:52:52 | Zevv | yeah there's even more happening: compiling the same file sometimes crashes and sometimes doesnt |
21:53:24 | Zevv | but only if I pass -d:obj_check:off |
21:54:45 | FromGitter | <deech> Further findings on the recent `Showstopper` bug: https://github.com/nim-lang/Nim/issues/10033. |
22:02:23 | Zevv | Well, shoot. It depends where my source file is located, compiling in one directory crashes the compiler, in another there is no problem |
22:02:26 | Zevv | strace to the rescue |
22:05:34 | Zevv | compiles fine when run under strace, crashes without |
22:13:19 | Zevv | I now have two strace -f outputs of the exact same command, one failing and one working |
22:14:19 | Zevv | The last thing happening is lstat("/home/ico/external/Nim/lib/core/macros.nim", {st_mode=S_IFREG|0644, st_size=52647, ...}) = 0 |
22:19:52 | FromGitter | <mratsim> heisenbug |
22:20:07 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
22:23:15 | * | vlad1777d quit (Ping timeout: 250 seconds) |
22:34:06 | * | whaletechho quit (Remote host closed the connection) |
22:36:35 | * | whaletechho joined #nim |
23:01:52 | * | theelous3__ quit (Ping timeout: 246 seconds) |
23:04:07 | * | fthe joined #nim |
23:15:03 | * | fthe quit (Ping timeout: 246 seconds) |
23:20:06 | * | fthe joined #nim |
23:35:42 | * | McSoFake quit (Read error: Connection reset by peer) |
23:37:59 | * | stefanos82 quit (Remote host closed the connection) |
23:51:35 | bozaloshtsh | Here be a regression: b1ad5fd7d |
23:51:38 | bozaloshtsh | https://github.com/nim-lang/Nim/commit/b1ad5fd7da0d5b93b260ddd62f98f7331cc801fb |
23:52:27 | bozaloshtsh | with sufficiently complicated recursive dependencies, this commit causes bad codegen |
23:52:51 | bozaloshtsh | recursive dependencies + forward declarations to band-aid the real problems in my code :/ |