00:00:02 | * | ghost64 quit (Quit: See you!) |
00:00:52 | * | ghost64 joined #nim |
00:05:22 | dom96 | gc_safe is for parallelism |
00:05:40 | * | krux02 quit (Remote host closed the connection) |
00:05:58 | dom96 | if you can't alloc then the async macro might not give you much |
00:06:09 | rayman22201 | yes, but part of that is preventing heap allocations correct? |
00:06:41 | dom96 | not really, it's about ensuring that heap-allocated data on one thread is not accessed by another |
00:07:12 | dom96 | GC safe means "this proc does not access any global variable/state that may be owned by another thread or call any functions that are not gc safe" |
00:07:14 | dom96 | 'night |
00:08:59 | rayman22201 | fair enough. gn |
00:10:10 | * | stefanos82 quit (Remote host closed the connection) |
00:13:19 | FromDiscord_ | <exelotl> ahh ok this won't work because yield in valid nim code always needs a value. I guess I'll need to come up with my own magic word |
00:28:34 | * | Cthalupa quit (Ping timeout: 246 seconds) |
00:29:12 | * | Cthalupa joined #nim |
00:41:58 | * | zachk quit (Quit: Leaving) |
00:47:42 | * | seni quit (Ping timeout: 246 seconds) |
01:21:45 | * | libman_ is now known as libman |
01:27:19 | FromDiscord_ | <exelotl> god it feels like I'm writing a mini compiler at this point. I got if statements working but sometimes they generate unnecessary code. Tomorrow I guess I'll tackle loops or something |
01:41:28 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
01:50:43 | FromGitter | <zacharycarter> omg tech interview over |
01:50:47 | FromGitter | <zacharycarter> thank goodness |
01:51:03 | FromGitter | <zacharycarter> so exhausted and stressed - can finally relax |
01:57:45 | FromGitter | <zacharycarter> 70-75% confident in my effort(s) - I didn't do perfectly but I think I did well |
01:57:49 | FromGitter | <zacharycarter> or well enough I guess |
01:57:57 | FromGitter | <zacharycarter> hopefully will find out tomorrow :D |
02:01:20 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
02:36:04 | * | radgeRayden joined #nim |
02:45:14 | * | vlad1777d quit (Ping timeout: 250 seconds) |
03:01:51 | * | Tyresc quit (Quit: WeeChat 2.4-dev) |
03:02:24 | * | banc quit (Quit: Bye) |
03:25:53 | * | banc joined #nim |
03:37:37 | FromGitter | <gogolxdong> How to cast ⏎ ⏎ ```type ⏎ EventHandler* = proc (ev: Event; target: VNode) {.closure.}``` [https://gitter.im/nim-lang/Nim?at=5c53bf01f04ef00644bd6f3c] |
03:40:15 | * | darithorn quit (Remote host closed the connection) |
04:03:23 | * | nsf joined #nim |
04:07:10 | FromGitter | <Varriount> @zacharycarter Looking at a new job? |
04:16:24 | * | noonien quit (Quit: Connection closed for inactivity) |
04:22:11 | FromGitter | <zacharycarter> @Varriount - just finished 3rd round with Riot Games |
04:22:21 | FromGitter | <zacharycarter> next is on-site |
04:26:14 | FromGitter | <zacharycarter> assuming I made it past 3rd round - but like I said earlier - I think I did well enough |
04:26:20 | FromGitter | <zacharycarter> but tomorrow will tell :P |
04:47:32 | * | westerbly_ joined #nim |
04:49:39 | * | radgeRayden quit (Ping timeout: 250 seconds) |
04:55:36 | * | westerbly_ quit (Remote host closed the connection) |
04:56:44 | * | mbomba joined #nim |
04:57:01 | * | radgeRayden joined #nim |
04:57:39 | FromGitter | <Varriount> @zacharycarter Cool! I definitely think you're a good match for a game company. |
04:58:26 | * | mbomba quit (Client Quit) |
05:00:37 | FromGitter | <zacharycarter> @Varriount thanks mang! me too! :D |
05:01:08 | FromGitter | <zacharycarter> I learned so much in the past 1.5 weeks - learned most common algo STC and same with ops on DS's |
05:01:32 | FromGitter | <zacharycarter> also understand how most of them work - I don't know all algos yet obv / how to solve all problems efficiently - but I could talk to those points when making my solutions |
05:02:16 | FromGitter | <zacharycarter> I also learned about converting from decimal to binary and vice versa - which I had learned previously but not in as memorable as a way |
05:03:49 | FromGitter | <zacharycarter> also learned about different C++ things - like how virtual functions work with a vtable and vptr and also neat pointer arithmetic things |
05:04:07 | * | NimBot joined #nim |
05:04:35 | FromGitter | <zacharycarter> so many effing things to cover and learn - plus math skills on top of it - for a non-CS person it's a lot, but I feel like even if I don't get this gig, I'll be well prepared for whatever I pursue next |
05:06:50 | * | dddddd quit (Remote host closed the connection) |
05:07:30 | FromGitter | <zacharycarter> connecting practical experience w/ understanding is addicting - like I've used bit flags / sets and masks for so long |
05:07:40 | * | radgeRayden quit (Remote host closed the connection) |
05:07:43 | FromGitter | <zacharycarter> but now that I understand them - I feel like I have super powers or something :P |
05:08:11 | * | radgeRayden joined #nim |
05:11:15 | FromGitter | <zacharycarter> http://tiny.cc/jvxu2y - was a godsend |
05:11:32 | FromGitter | <zacharycarter> plus google |
05:11:54 | FromGitter | <bung87> I’m curious about what’s the job title? |
05:12:11 | FromGitter | <zacharycarter> I'd be a game programmer on the game modes team for League of Legends |
05:12:24 | FromGitter | <zacharycarter> so introducing new game play modes to the game |
05:13:13 | FromGitter | <bung87> so you will programing LOL game server? |
05:13:45 | FromGitter | <zacharycarter> I doubt it's much networking code - I mean I'm sure I'd have to work with code that is running in a multiplayer capacity |
05:13:55 | FromGitter | <zacharycarter> but I have a feeling most of the plumbing will be in place to handle that gracefully |
05:14:15 | FromGitter | <zacharycarter> I think it's more about implementing gameplay logic - like if a new game mode is designed or introduced, how to implement it best |
05:15:09 | FromGitter | <bung87> sounds cool ,whether the frontend or backend |
05:15:26 | FromGitter | <zacharycarter> thanks! my dream job is to work on a game engine - but I need to get into the industry first |
05:15:30 | FromGitter | <zacharycarter> and I think I could land at much worse spots than Riot |
05:15:46 | FromGitter | <zacharycarter> so - this is an amazing opportunity for me, I just hope I didn't bungle it haha |
05:15:50 | FromGitter | <zacharycarter> but either way - it was a great experience |
05:18:00 | FromGitter | <bung87> yeah ,definitely. if you have art work experience,you could be a Indie game developer at that time. |
05:21:03 | FromGitter | <zacharycarter> I know - but I'm turrible at any artistic pursuit |
05:21:12 | FromGitter | <zacharycarter> I can watch a 3d modeling tutorial and replicate / change things a little |
05:21:27 | FromGitter | <zacharycarter> but when it comes to like - baking maps and actually making the model usable - I'm worthless |
05:23:25 | FromGitter | <bung87> ah,I once try developing a game found it need very much art resources. |
05:25:19 | FromGitter | <zacharycarter> well - I think you can get away with an idea and prototype art |
05:25:40 | FromGitter | <zacharycarter> so like - if you're making a 3d rts - generate the terrain etc and then for units use basic geometric shapes |
05:25:48 | FromGitter | <zacharycarter> and then get a concept down / working |
05:26:10 | FromGitter | <zacharycarter> once you have a game concept that's fun (you can work w/ a designer) then you can start attracting artists |
05:26:20 | FromGitter | <zacharycarter> artists will work on games that have good design behind them |
05:26:32 | FromGitter | <zacharycarter> sometimes for free if they like the idea enough and think it will take off |
05:26:53 | FromGitter | <zacharycarter> positive exposure = best thing ever for an indie dev |
05:27:11 | FromGitter | <bung87> yeah, that’s right,I just try to developing it see what problems I will meet during develping a game |
05:27:20 | FromGitter | <zacharycarter> there are lots ;) |
05:27:35 | FromGitter | <zacharycarter> but if you have any questions - or ever have an idea and want to collaborate with someone - let me know! |
05:28:21 | FromGitter | <zacharycarter> I have a lot of experience in that area - not experience with everything - but a lot of experience with building your own game library by combining other open source libraries to fill functionality needs |
05:28:24 | FromGitter | <bung87> like how to dymaticlly load map in a 2d or 3d game |
05:28:36 | FromGitter | <zacharycarter> I have a lot of experience with that kind of thing |
05:28:41 | FromGitter | <zacharycarter> both 2d and 3d |
05:28:59 | FromGitter | <zacharycarter> https://github.com/zacharycarter/mapgen |
05:29:06 | FromGitter | <zacharycarter> that was very early in my learning of proc gen days |
05:29:29 | FromGitter | <zacharycarter> not that I've done a ton since - but that was a fun project that ended up being a black hole |
05:29:41 | FromGitter | <zacharycarter> never ending trail of deepening complexity |
05:33:00 | FromGitter | <bung87> the map results look good. |
05:33:41 | FromGitter | <kayabaNerve> Is it possible to see if a ref was GC'd? |
05:34:28 | FromGitter | <kayabaNerve> I think the GC is clearing this ref early since accessing a string I can prove I set causes a segfault. I also can prove it's the same ref. |
05:34:49 | FromGitter | <kayabaNerve> (not saying it's me versus the community :P Saying I didn't make a typo; sorry if I was overly hostile there) |
05:56:55 | FromGitter | <Varriount> @kayabaNerve I believe there might be a GC debug symbol you can define. |
05:58:36 | FromGitter | <kayabaNerve> Which would do what specifically? |
05:59:08 | FromGitter | <kayabaNerve> So I parse it as X, which is a ref object of Y, cast it to X, and then cast it back to Y and pass it to an anonymous function stored in an object |
05:59:25 | FromGitter | <kayabaNerve> Said function can't access a member of Y, even though I know I set it and it's the same ref |
05:59:44 | FromGitter | <kayabaNerve> I tried GC_ref, declaring an var of Y and passing that var (not the cast) |
06:00:14 | FromGitter | <kayabaNerve> First was because I thought the GC was deleting it. Second was because what other option is there except manual memory management. |
06:01:50 | FromGitter | <kayabaNerve> And the member itself is a string |
06:10:29 | * | wildlander quit (Quit: Konversation terminated!) |
06:21:25 | * | narimiran joined #nim |
06:23:51 | * | radgeRayden quit (Ping timeout: 252 seconds) |
06:42:11 | FromGitter | <Varriount> @kayabaNerve Could you post the code? |
06:45:29 | FromGitter | <kayabaNerve> I don't have a MWE |
06:48:00 | FromGitter | <kayabaNerve> So I can link my work and specify files, but... |
06:49:19 | FromGitter | <Varriount> @kayabaNerve You say you parse it as X... Then cast it to X? |
06:50:57 | FromGitter | <kayabaNerve> Parse as Y ⏎ Return as X ⏎ Cast to Y ⏎ Pass as Y to anonymous function [https://gitter.im/nim-lang/Nim?at=5c53ec519221b9382df6f99e] |
06:52:34 | FromGitter | <Varriount> Y and X are reference types? |
06:52:45 | FromGitter | <kayabaNerve> X is a ref object ⏎ Y is a ref object of X |
06:52:54 | * | krux02 joined #nim |
06:53:15 | FromGitter | <kayabaNerve> I did modify X to be an object ⏎ Made Y an object of X ⏎ And then added Z as ref Y ⏎ ⏎ And then used Z where I previously used Y [https://gitter.im/nim-lang/Nim?at=5c53ecdbc2dba5382ec08aa8] |
06:53:50 | FromGitter | <kayabaNerve> And then I tried to created a new ref in the proc before I pass it, and memcpy the data out of the one that was returned, but then that segfaulted |
06:54:27 | FromGitter | <kayabaNerve> GDB commented on `genericAssignAux_mQY3YYo2RBkhPz09ajfLwpQ(void*, void*, TNimType*, bool) ()` |
06:54:43 | FromGitter | <kayabaNerve> And I'm trying to see what GDB thinks of my code without Z |
06:55:30 | FromGitter | <Varriount> I would really need to see the Nim code in question |
06:56:24 | FromGitter | <kayabaNerve> [Switching to Thread 0x7fffdf2c3700 (LWP 78380)] ⏎ copyString (src=0xf2f8f0045fc2a3ea) at /home/lukep/.choosenim/toolchains/nim-0.19.2/lib/system/sysstr.nim:100 ⏎ 100 if (src.reserved and seqShallowFlag) != 0: |
06:56:38 | FromGitter | <kayabaNerve> Yeah, I'll push and link it... |
06:59:17 | FromGitter | <kayabaNerve> @Varriount Mind if I PM it? |
06:59:21 | FromGitter | <kayabaNerve> And thanks for trying to help. |
07:03:25 | FromGitter | <Varriount> Sure |
07:03:40 | avsej | hi I saw new tag 0.19.4, but there is not tarball deployed. Is it like "pre-release" or something? or just someone forgot to upload the tarball on site? |
07:04:54 | narimiran | avsej: wait for couple of hours :) |
07:07:48 | narimiran | avsej: or use this if you're not patient: https://github.com/nim-lang/nightlies/releases/tag/version-0-19-2019-02-01-b6d96ca |
07:19:03 | avsej | thanks. I will check that, because previous release tarball was broken. and I had to skip that in Fedora |
07:20:09 | narimiran | avsej: please report if something is broken with 0.19.4 |
07:20:44 | avsej | sure |
07:24:35 | FromGitter | <timotheecour> same thing with: `choosenim 0.19.4`: `Version 0.19.4 does not exist` |
07:26:07 | avsej | narimiran, why there are several tarballs on the nightlies? what is the difference between -linux and -osx? which one is going to be published finally? |
07:35:20 | FromGitter | <mratsim> one is compiled for linux and the other for osx? |
07:37:33 | * | m712 quit (Ping timeout: 252 seconds) |
07:41:03 | FromGitter | <timotheecour> except no: ⏎ ⏎ > The Windows zips contain platform specific binaries whereas the the Linux and OSX archives contain pre-packaged source that can be used to build Nim on Linux, OSX and even Windows. |
07:41:36 | * | m712 joined #nim |
07:41:58 | FromGitter | <timotheecour> i hope in the future, it’ll build binaries instead of just src on linux and OSX (useful to speedup CI to avoid building over and over) |
07:42:50 | FromGitter | <timotheecour> should i re-open https://github.com/nim-lang/nightlies/issues/18 ? |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:53 | * | gmpreussner joined #nim |
08:05:14 | avsej | i've checked https://github.com/nim-lang/nightlies/releases/download/version-0-19-2019-02-01-b6d96ca/nim-0.19.4-linux.tar.xz and everything looks good |
08:05:26 | avsej | looking forward tarball on the site |
08:10:57 | * | eizua joined #nim |
08:12:01 | * | eizua quit (Remote host closed the connection) |
08:12:49 | * | eizua joined #nim |
08:13:27 | * | eizua left #nim (#nim) |
08:23:17 | FromGitter | <mratsim> @Araq, if we want to write a image processing/tensor expression compiler that can generate LLVM IR in Nim, can we plug into Nim codegen with our own custom backend for a specific scope (macro)? reference https://github.com/mratsim/Arraymancer/issues/347, This is related to your recurrent GSoC idea for OpenCL code generator: https://github.com/nim-lang/Nim/wiki/GSoC-2016-Ideas#add-a-code-generator-for-opencl cc |
08:23:17 | FromGitter | ... @timotheecour |
08:27:10 | * | kapil____ joined #nim |
08:27:22 | FromGitter | <timotheecour> @mratsim can an approach similar to this help ? https://github.com/fragcolor-xyz/nimline/blob/5ab07e505d60f105ad4d3f9930621a06ab31d403/nimline.nim#L126 which enables this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5402eaceb5a2264f762792] |
08:29:34 | FromGitter | <mratsim> Here I want to bypass the C++ generation and directly generate LLVM IR and join the happy ranks of: ⏎ Tensorflow XLA: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/g3doc/overview.md ⏎ PyTorch Glow: https://github.com/pytorch/glow ⏎ Dask: https://dask.org ⏎ Gradient Halide: https://people.csail.mit.edu/tzumao/gradient_halide/ ... [https://git |
08:29:35 | FromGitter | ... ter.im/nim-lang/Nim?at=5c54036e54f21a71a1dd84f1] |
08:31:20 | FromGitter | <mratsim> ideally in JIT modeas well. |
08:34:13 | FromGitter | <mratsim> SPIR-V IR is fine as well |
08:40:08 | FromGitter | <timotheecour> @mratsim How about: https://github.com/timotheecour/vitanim/blob/master/testcases/tests/t0127.nim#L7 |
08:42:56 | FromGitter | <mratsim> I don't know much about compilers but I believe it's possible to pass the "what I want" and let the compiler optimize the "how to do it best" depending on the target platform but that may be a hacky first step, the main issue is that the C source file will have plenty of fluff (like OS related utilities) |
08:43:51 | FromGitter | <timotheecour> i just updated the snippet, it now works and outputs the llvm IR; is that what u want? |
08:44:41 | FromGitter | <timotheecour> generates: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5406f8ca428b064537c275] |
08:47:29 | Araq | mratsim: I love the idea but currently it's a bit hard |
08:47:52 | Araq | what you really want is a "partial" codegen that deals with annotated procs only, I think |
08:49:06 | Araq | with the compiler API you can add a new backend without touching the rest of the compiler, but it's lots of work and then needs to be able to compile everything |
08:50:34 | * | oculux quit (Quit: blah) |
08:50:55 | * | hwallann joined #nim |
08:51:02 | FromGitter | <mratsim> I want something like that in terms of high level API ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c540875ceb5a2264f76539b] |
08:51:21 | FromGitter | <mratsim> this is tensor addition |
08:51:54 | * | oculux joined #nim |
08:52:11 | FromGitter | <mratsim> inspired by my current forEach ⏎ ⏎ ```forEach x in a, y in b, z in c: ⏎ z = x + y``` [https://gitter.im/nim-lang/Nim?at=5c5408bb93fe7d5ac025612c] |
08:57:28 | FromGitter | <timotheecour> @mratsim r u expecting the body of `jit` to be arbitray nim code or is it a limited DSL that you control? |
08:57:39 | FromGitter | <mratsim> and higher level than my JIT with multiple backend target: https://github.com/numforge/laser/blob/master/examples/ex06_jit_hello_world.nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c540a03454aad4df7d8038d] |
08:57:45 | FromGitter | <mratsim> limited to a DSL |
08:58:03 | FromGitter | <timotheecour> if the former, this is similar to https://github.com/arnetheduck/nlvm project; |
08:58:15 | FromGitter | <mratsim> basically array/image processing DSL ;) |
08:59:30 | FromGitter | <mratsim> or if not a DSL, everything inside will be compute graphe nodes, that will be compiled/jitted at the end. |
08:59:58 | Araq | write an issue/RFC |
09:00:11 | * | Vladar joined #nim |
09:00:12 | Araq | because I don't really understand what you want, sorry |
09:00:33 | FromGitter | <mratsim> I want to reuse Nim codegen to output LLVM IR |
09:00:45 | FromGitter | <mratsim> the frontend part I'll take care of it. |
09:00:53 | Araq | but it produces C(++) code |
09:00:53 | FromGitter | <timotheecour> is this related to halide https://github.com/mratsim/Arraymancer/issues/347? |
09:00:58 | Araq | and there is nlvm |
09:00:59 | FromGitter | <mratsim> yes it is |
09:01:15 | FromGitter | <timotheecour> then maybe we can follow up there? |
09:01:23 | FromGitter | <timotheecour> unless it’s more specific, idk |
09:01:30 | FromGitter | <mratsim> this is basically a followup on my latest post. |
09:01:45 | FromGitter | <mratsim> I'm exploring if Nim already as non-C/C++ codegen facilities |
09:01:57 | FromGitter | <mratsim> given the OpenCL codegen idea for GSoC |
09:02:20 | Araq | well but openCL is close-ish to C and llvm IR ain't |
09:02:26 | FromGitter | <mratsim> but it seems like it's too rough so it's better if I implement my own codegen |
09:02:33 | FromGitter | <timotheecour> ya like i mentioned above (and so did araq) the most advanced project for that at this point would be nvlm https://github.com/arnetheduck/nlvm |
09:04:13 | FromGitter | <mratsim> I'm aware of it. I'll check how it does the codegen |
09:05:13 | * | floppydh joined #nim |
09:05:36 | FromGitter | <timotheecour> @araq can the nim VM generated IR be serialized ? if so than can a program compiled with regular nim, upon encountering a custom pragma, serialize its IR, passes it to nlvm and gets back LLVM IR > |
09:08:03 | FromGitter | <mratsim> I think we can just link to llvmruntime and write into a buffer |
09:09:08 | FromGitter | <timotheecour> > and write into a buffer ⏎ ⏎ but the underlying question is whether it’s serializable easily |
09:10:46 | FromGitter | <timotheecour> and maybe it is, i suppose it involves serializing a graph (representing nim compiler nodes) and avoiding serializing same node twice if 2 paths lead to same node |
09:11:59 | Araq | sounds like a terrible idea, the VM wasn't designed for native codegen |
09:13:17 | FromGitter | <mratsim> I probably only need something like that: https://github.com/numba/llvmlite |
09:17:03 | FromGitter | <mratsim> leaving for Brussels, see you this evening for those here. |
09:19:58 | FromGitter | <timotheecour> @mrastim how about this: ⏎ u write the nim frontend for your DSL: ⏎ ⏎ ```forEach x in a, y in b, z in c: ⏎ z = x + y``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5c540f3eceb5a2264f768366] |
09:24:05 | * | solitudesf quit (Quit: ZNC - https://znc.in) |
09:25:05 | * | solitudesf joined #nim |
10:01:13 | * | seni joined #nim |
10:19:34 | FromGitter | <arnetheduck> @mratsim isn't all the above simply `asm` or `emit` statements? more emit, with `nlvm`.. if you just want to emit IR, you don't want to write text either.. you want to use some llvm bindings and build them using the included builders |
10:21:46 | FromGitter | <timotheecour> i think he’s en route for brussels; but what he’s after is this: https://github.com/mratsim/Arraymancer/issues/347#issuecomment-459351890 |
10:23:30 | FromGitter | <timotheecour> @arnetheduck your approach requires compiling with `nlvm` right? haven’t tested in a while so idk how mature it is? |
10:40:53 | * | JustASlacker joined #nim |
10:43:05 | FromGitter | <arnetheduck> `emit`/`asm` would need `nlvm` - it doesn't support either right now. if you just want to spit out llvm ir (even at compile time), you could do that with a wrapper as long as ffi is enabled |
10:54:09 | FromGitter | <timotheecour> sorry it’s super later here and my brain is fried; ⏎ ⏎ > emit/asm would need nlvm - it doesn't support either right now ⏎ ⏎ 1) u’re saying llvm doesn’t support `emit/asm` right now right? so can’t be used for that ? ... [https://gitter.im/nim-lang/Nim?at=5c54255178e1ed4103c400e4] |
10:59:14 | Araq | https://forum.nim-lang.org/t/4610 can somebody help him? |
11:02:54 | FromGitter | <timotheecour> Done => https://forum.nim-lang.org/t/4610#28858 `import segfaults` shd help |
11:09:37 | Araq | lol I don't think so, but thank you |
11:16:21 | Zevv | why is 'segfaults' nowhere in the docs? |
11:17:32 | FromGitter | <timotheecour> PR welcome |
11:17:51 | FromGitter | <timotheecour> it’s very useful, when it’s time to debug some segmentation faults |
11:17:59 | Zevv | sorry, I ment: why does it not end up in the docs? it has a ## doc block? |
11:18:48 | FromGitter | <timotheecour> for same reason testament doesn’t run tests on everything: it doesn’t run docs on ‘**/*' |
11:18:55 | Zevv | ah ok |
11:18:56 | FromGitter | <timotheecour> ```**/*``` |
11:19:27 | FromGitter | <timotheecour> that’s the issue: https://github.com/nim-lang/Nim/issues/10276 |
11:24:42 | * | ng0 joined #nim |
11:28:45 | FromGitter | <GULPF> segfaults is in lib/pure, so that's not the issue |
11:28:59 | FromGitter | <GULPF> the docs are generated, they are just not linked anywhere I guess: https://nim-lang.org/docs/segfaults.html |
11:29:58 | * | Perkol joined #nim |
11:31:38 | * | dom96_w joined #nim |
11:31:44 | FromGitter | <timotheecour> inded; `segfaults` is not in https://nim-lang.github.io/Nim/theindex.html and searching for `segfaults` returns nothing in searchbar |
11:32:05 | FromGitter | <timotheecour> => we should allow searching for modules in search bar ⏎ => index.html should index modules |
11:34:19 | * | nsf quit (Quit: WeeChat 2.3) |
11:36:05 | FromGitter | <timotheecour> weird, other modules seem listed; just some (like segfaults) are not |
11:55:57 | * | kapil____ quit (Quit: Connection closed for inactivity) |
11:56:53 | dom96_w | FOSDEM time yay |
11:57:01 | * | dom96_w quit (Quit: Textual IRC Client: www.textualapp.com) |
12:14:48 | federico3 | any tip on implementing a callback from a dynamic library? |
12:19:24 | Araq | get the calling convention right |
12:20:03 | federico3 | any example? |
12:22:40 | * | dddddd joined #nim |
12:24:30 | Araq | proc calledFromC(arg1: cstring; arg2: cint) {.cdecl.} |
12:24:47 | Araq | sorry if that was obvious and unhelpful |
12:31:59 | Zevv | federico3: what's your specific problem? |
12:32:47 | Zevv | The callback should be fairly trivial, but take care if the lib starts calling you from a different thread, for example |
12:39:43 | * | stefanos82 joined #nim |
12:42:17 | federico3 | I have to catch my flight, thanks for the help |
13:15:14 | * | kapil____ joined #nim |
13:20:28 | narimiran | Araq: check your local repo, you might be one commit ahead of master |
13:20:58 | narimiran | heh, out of context. wrong channel :) |
13:29:17 | * | Sentreen quit (Quit: WeeChat 1.6) |
13:31:59 | * | vlad1777d joined #nim |
13:36:04 | * | Cthalupa quit (Ping timeout: 246 seconds) |
13:37:26 | * | Snircle joined #nim |
13:37:29 | * | Cthalupa joined #nim |
13:40:41 | * | Sentreen joined #nim |
13:41:21 | * | Perkol quit (Quit: Leaving) |
13:41:53 | * | Cthalupa quit (Ping timeout: 246 seconds) |
13:43:28 | * | Cthalupa joined #nim |
13:44:49 | * | abm joined #nim |
13:46:13 | shashlick | Narimiran - I'll be working on nightlies today |
13:46:25 | shashlick | When is 0.19.4 going to be released? |
13:46:32 | shashlick | I want to add Linux binaries |
13:46:44 | narimiran | shashlick: there's more work to be done?! we planned to use the stuff that's already there |
13:46:56 | narimiran | when? this afternoon :D |
13:47:04 | narimiran | but we can wait, i guess :) |
13:47:11 | shashlick | Well I did a poc with holy build box |
13:47:34 | shashlick | So we can have Linux binary xz with everything pre built |
13:47:35 | narimiran | binaries would be nice, i guess |
13:47:54 | shashlick | Thing is then we will need to post separate xz for osx |
13:51:51 | FromGitter | <arnetheduck> @timotheecour `nlvm` has nightly releases btw: https://github.com/arnetheduck/nlvm/releases |
13:52:59 | FromGitter | <arnetheduck> and `emit` support would have to be added (I'd probably implement it a different way than emitting text though) |
13:53:27 | * | stefanos82 quit (Remote host closed the connection) |
14:01:10 | shashlick | @arnetheduck - I can take up enabling llvm fully in nimterop, will help make C support more complete but will you be able to start testing and using it? |
14:05:37 | FromGitter | <bung87> user define type name will conflict with std lib ?I got`/Users/bung/Nim/lib/pure/net.nim(138, 15) Error: ambiguous identifier: 'Protocol' --use protocol.Protocol or nativesockets.Protocol` |
14:10:36 | * | hwallann quit (Remote host closed the connection) |
14:13:41 | FromDiscord_ | <juan_carlos> Hi. |
14:15:39 | * | floppydh quit (Quit: WeeChat 2.3) |
14:16:05 | * | radgeRayden joined #nim |
14:17:54 | FromGitter | <mratsim> @arnetheduck @timotheecour yes I was thinking on directly linking to LLVM runtime and use it’s code builder facilities |
14:18:37 | FromGitter | <mratsim> I found out that LLVM has something called “bitcode” which is a binary representation of its IR so I wouldn’t have to go through a text file. |
14:19:29 | FromGitter | <mratsim> This would also be a good match to the JIT Assembler I started, except that I would use it for LLVM IR/bitcode instead of x86_64 assembly |
14:22:34 | FromGitter | <mratsim> Also Nvidia describes the LLVM IR that is valid for GPU generation: https://docs.nvidia.com/cuda/nvvm-ir-spec/index.html hopefully this is also valid for OpenCL and AMDGPU target. |
14:48:28 | * | Cthalupa quit (Ping timeout: 250 seconds) |
14:49:59 | Zevv | Nim vertex shaders :) |
14:51:04 | * | Cthalupa joined #nim |
14:55:55 | FromGitter | <mratsim> I don’t know anything about Graphics programming so can’t say :P |
14:56:23 | FromGitter | <mratsim> if anything I’ll subvert them for machine learning (especially on Mac and mobile devices) |
15:00:27 | FromDiscord_ | <demotomohiro> You can not write vertex shaders with CUDA |
15:01:47 | Zevv | I know, I know |
15:01:57 | livcd | is playground broken ? I cant seem to run this: https://glot.io/snippets/f934240p60 |
15:02:03 | Zevv | broken for some weeks |
15:02:07 | Zevv | just as nimbot |
15:03:04 | FromGitter | <mratsim> @demotomohiro I think Zevv was talking about jitting LLVM IR into vertex shaders |
15:03:32 | livcd | ah that's a shame |
15:03:59 | Zevv | Nah, not really. not much to JIT, as shaders are typically text which gets compiled by the GPU drivers |
15:04:13 | Zevv | I was just trolling about |
15:04:37 | Zevv | livcd: Zah was working on play/bot some time ago, not sure what the status is |
15:04:54 | FromDiscord_ | <juan_carlos> https://tio.run/#nim |
15:05:40 | FromDiscord_ | <demotomohiro> LLVM IR can be used to write vertex shaders? |
15:06:01 | FromDiscord_ | <demotomohiro> I know OpenGL supports SPIR-V |
15:06:08 | Zevv | Tio also doesn't like "import posix; while true: discard fork()" :) |
15:06:28 | narimiran | that's why we can't have nice things ;) |
15:08:20 | FromDiscord_ | <juan_carlos> Dont break the Nim 😥 |
15:08:34 | Zevv | *someone* has to break it |
15:08:45 | * | Vladar quit (Read error: Connection reset by peer) |
15:08:48 | Zevv | Oh it has proper ulimits "Failed to copy files from the runtime temporary directory |
15:08:49 | Zevv | Unable to fork: Resource temporarily unavailable" |
15:08:50 | Zevv | that's good |
15:09:12 | FromDiscord_ | <juan_carlos> Fun b'cause Tio Nim is literally "Uncle Nim" on Spanish. |
15:09:20 | livcd | juan_carlos: tanks but cant turn on threads |
15:11:02 | FromGitter | <mratsim> @demotomohiro, probably: https://github.com/LunarG/LunarGLASS |
15:11:04 | * | Vladar joined #nim |
15:17:09 | FromDiscord_ | <demotomohiro> @mratsim thank you! It seems LLVM IR can be converted to SPIR-V. |
15:17:36 | FromGitter | <mratsim> AFAIK it’s still work in progress for an official SPIR-V backend |
15:18:01 | Araq | https://www.youtube.com/watch?v=sEQnmInxmfg |
15:18:08 | Araq | as promised |
15:18:38 | FromDiscord_ | <juan_carlos> 👀🍿 |
15:18:41 | Zevv | \o/ ! |
15:19:22 | * | JustASlacker quit (Remote host closed the connection) |
15:19:33 | * | leorize quit (Ping timeout: 252 seconds) |
15:19:40 | Araq | and this time I cut out krux02's ramblings ;-) |
15:19:54 | * | leorize joined #nim |
15:20:41 | FromGitter | <mratsim> look who’s talking :P |
15:24:33 | narimiran | nim dev blog, directors cut :D |
15:25:07 | Araq | lol |
15:26:22 | FromGitter | <mratsim> “Hello World works” yeaaah |
15:28:41 | FromGitter | <mratsim> was the parsing bug the reason I had to do: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ ? [https://gitter.im/nim-lang/Nim?at=5c5465a954f21a71a1e020fc] |
15:36:21 | Araq | no. :-) |
15:36:41 | Araq | that's because the command *expression* syntax only supports one argument |
15:36:52 | Araq | in order to not confuse anybody :P |
15:37:10 | FromGitter | <bung87> it fix proc_call [1,2,3] with array |
15:37:45 | FromGitter | <bung87> otherwise need proc_call([1,2,3]) |
15:42:53 | livcd | cool podcast |
15:44:28 | Araq | thank you |
16:04:25 | FromGitter | <riddl_gitlab> @Araq those changes you are talking about on podcast, e.g. fixed syntax for function calls with tuples are going to be available with 0.19.4 ? or is it only on devel branch for now? |
16:06:50 | Araq | 0.19.4 was released today but we're still updating the website :P |
16:07:21 | Araq | and it's a bugfix release, technically the parser thing was a grammar extension so it wasn't backported |
16:07:44 | Araq | the 0.19.x series is about boring conservative stuff that really cannot make anything worse |
16:08:00 | Araq | all the new exiting things are for 0.20 |
16:08:20 | shashlick | ok so I missed the boat on adding linux binaries - anyway makes more sense on the 0.20 release |
16:08:32 | FromGitter | <riddl_gitlab> sure, thanks |
16:08:38 | FromDiscord_ | <demotomohiro> Are there source code of nim 2 glsl compiler macro? |
16:08:41 | shashlick | so Araq, right now both linux and OSX get the same link for download |
16:08:49 | Araq | I know |
16:08:56 | Araq | already uploaded, shashlick |
16:09:04 | FromDiscord_ | <demotomohiro> I cannot find about nim 2 glsl with google |
16:09:10 | shashlick | if we create a linux specific binary package, are you open to a separate OSX source package |
16:09:29 | Araq | yep |
16:09:33 | * | abm quit (Remote host closed the connection) |
16:09:43 | Araq | but it also needs a tiny website redesign |
16:09:50 | Araq | right now we have Unix vs Windows |
16:09:54 | * | abm joined #nim |
16:10:19 | Araq | bah |
16:10:33 | Araq | https://nim-lang.org/install.html still says we have no nightly builds :-( |
16:10:37 | Araq | but we do... |
16:10:40 | FromGitter | <riddl_gitlab> `proxychains choosenim update stable` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c546f807b68f9410254f2ea] |
16:10:57 | FromGitter | <riddl_gitlab> something is not working well |
16:11:51 | FromGitter | <riddl_gitlab> `wget http://nim-lang.org/download/nim-0.194.tar.xz` ⏎ ```2019-02-01 17:11:23 BŁĄD 404: Not Found.``` |
16:12:19 | narimiran | @riddl_gitlab choosenim is not yet updated, AFAIK |
16:12:24 | FromGitter | <riddl_gitlab> i doubt ts fault of my corp's proxy |
16:12:28 | FromGitter | <riddl_gitlab> oh, ok |
16:12:29 | Araq | https://nim-lang.org/download/nim-0.19.4.tar.xz |
16:12:34 | Araq | it is missing a dot for some reason |
16:13:03 | narimiran | either the dot is missing, or there is one dot too much |
16:13:15 | narimiran | should be -0194 or -0.19.4 |
16:13:47 | FromGitter | <riddl_gitlab> yeah, that link is working. For some reason choosenim is looking for -0.194... |
16:14:18 | shashlick | what OS @riddl_gitlab |
16:14:32 | shashlick | and what version of choosenim |
16:14:44 | Araq | ah thanks, fixed |
16:14:45 | * | abm quit (Ping timeout: 268 seconds) |
16:14:46 | FromGitter | <riddl_gitlab> choosenim v0.3.2 (2018-02-28 14:12:37) [linux/amd64] |
16:14:48 | Araq | can you retry please? |
16:15:24 | FromGitter | <riddl_gitlab> Couldn't download file from http://nim-lang.org/download/nim-0.1.4.tar.xz. |
16:15:25 | FromGitter | <riddl_gitlab> ;D |
16:15:28 | FromGitter | <riddl_gitlab> 99999 |
16:15:32 | FromGitter | <riddl_gitlab> missing now ;) |
16:15:49 | Araq | can you retry please? |
16:16:11 | FromGitter | <riddl_gitlab> Works :) |
16:16:13 | Araq | I'm too stupid to type in the version number correctly :D |
16:16:43 | FromGitter | <riddl_gitlab> you need some automation for that :D |
16:18:11 | shashlick | does anyone know if OSX binaries work across versions or need some special work like on Linux |
16:19:17 | Araq | shashlick, no idea. I would guess they work rather well without any shenanigans |
16:19:47 | shashlick | ok so nightlies already creates separate files so we simply need web changes |
16:20:06 | shashlick | i'll enable saving binaries in koch xz and we can test them over this cycle and see how well they work |
16:20:24 | shashlick | linux will have to run a docker container |
16:20:35 | shashlick | but it is quite simple |
16:20:43 | FromGitter | <riddl_gitlab> i need to read how to build a flatpak nim app.. |
16:21:03 | FromGitter | <dom96> You'd think writing 0.19.4 in a text file wouldn't be that hard :p |
16:21:36 | narimiran | burn from Brussels? |
16:22:01 | FromGitter | <riddl_gitlab> haha, give him a break :D typos happens |
16:22:03 | FromGitter | <arnetheduck> fwiw, `nlvm` builds a single-binary file that will work on all linuxes and includes the std lib and all, using travis |
16:22:06 | FromGitter | <dom96> I was hoping I could work on this in the train but the connectivity is incredibly bad |
16:24:17 | shashlick | @arnetheduck - how are you bundling everything together including stdlib |
16:24:28 | FromGitter | <arnetheduck> appimage |
16:25:12 | FromGitter | <arnetheduck> https://github.com/arnetheduck/nlvm/releases, https://github.com/arnetheduck/nlvm/blob/master/.travis.yml |
16:25:22 | shashlick | is it like pyinstaller / extracting everything into temp every run type scenario? |
16:26:56 | * | noonien joined #nim |
16:27:13 | FromGitter | <arnetheduck> squashfs, mounted using a loop device |
16:29:05 | * | Trustable joined #nim |
16:29:07 | shashlick | nice - using holy build box is also easy, http://ix.io/1zIU is how you run it and http://ix.io/1zIS is how i'm building the package |
16:29:27 | shashlick | but ya, typical xz file rather than single binary |
16:30:07 | shashlick | i want to create a portable nim distro - nim.exe, minimal stdlib and tcc |
16:30:10 | * | vlad1777d quit (Ping timeout: 268 seconds) |
16:32:07 | shashlick | but looking at windows for starters |
16:32:19 | FromGitter | <dom96> Are you planning to distribute Nim nightlies with a dependency on docker? |
16:32:49 | shashlick | no, it uses docker to load an old distro |
16:32:52 | radgeRayden | sorry if this is too simple but is there a tool for updating on windows or am I supposed to do it manually? I saw you guys talking about choosenim but I don't seem to have this. |
16:33:05 | shashlick | and builds within that so the resulting binaries are compatible with many new distros |
16:33:12 | shashlick | docker only for compile |
16:35:17 | narimiran | radgeRayden: you can do it manually. if i remember correctly, it is "2-click process", nothing complicated |
16:35:36 | radgeRayden | so just open the installer and it should be fine, thanks |
16:49:58 | * | darithorn joined #nim |
16:57:01 | leorize | shashlick: do you link it with glibc? |
16:57:38 | shashlick | I believe it does |
16:57:59 | shashlick | https://github.com/phusion/holy-build-box#which-linux-distributions-do-binaries-compiled-with-holy-build-box-support |
16:58:54 | Calinou | shashlick: tcc is probably a bad choice if you want high performance though |
16:59:04 | shashlick | many ways to solve this problem but this method took me an hour to pull off |
16:59:37 | Calinou | also, you can create a .tar.xz with a single command, use `tar cfJ archive.tar.xz directory/` |
16:59:45 | shashlick | Calinou - I just want a mini nim to build a plugin system |
16:59:55 | Calinou | (level 9 is pretty much unnecessary, and it requires more RAM to be extracted too) |
17:00:08 | Calinou | it's not like level 6 is too fast already :P |
17:00:12 | shashlick | ya, I'll be extending koch xz to productize this |
17:00:21 | shashlick | just leveraged what was in koch xz for that POC |
17:00:42 | leorize | I don't really think you should package a C compiler with |
17:01:05 | shashlick | that's not for the nightly or official releases, just for a POC text editor i'm working on |
17:01:20 | shashlick | want to build a plugin system |
17:01:48 | leorize | a nimscript based plugin system? |
17:01:59 | leorize | or a proper C interface? |
17:02:04 | shashlick | that's where I started, but --app:lib works so nicely |
17:02:36 | shashlick | anyway, will see - better to ship plugins as binaries |
17:03:16 | leorize | binary plugins aren't the best when it comes to cross-platform |
17:04:06 | shashlick | true but i'll have to provide a build of the editor anyway |
17:13:47 | * | leorize quit (Quit: WeeChat 2.3) |
17:34:24 | * | tobbez quit (Quit: Lost terminal) |
17:35:38 | Zevv | fosdemmers: happy beerfest! |
17:35:58 | * | kapil____ quit (Quit: Connection closed for inactivity) |
17:44:03 | * | leorize joined #nim |
17:45:35 | * | nsf joined #nim |
17:46:01 | * | tobbez joined #nim |
17:46:23 | FromDiscord_ | <juan_carlos> Holy Box is not like the similar to AppImage ?. |
17:50:33 | shashlick | AppImage has squashfs and bundles everything into one file |
17:50:43 | shashlick | holy build box just simplifies building with an old glibc |
17:52:01 | FromDiscord_ | <juan_carlos> 🆗 |
17:58:37 | FromGitter | <zacharycarter> https://github.com/idea4good/GuiLite |
18:00:38 | FromGitter | <zacharycarter> have our prayers finally been answered (kind of anyway)? |
18:01:27 | Zevv | what prayers? |
18:01:41 | FromGitter | <zacharycarter> cross platform GUI solution that doesn't suck |
18:01:54 | narimiran | Zevv: prayers for yet another GUI lib :D |
18:01:56 | FromGitter | <zacharycarter> and offers retained mode |
18:02:16 | FromGitter | <zacharycarter> not yet another - one that actually does what it needs to well |
18:02:30 | FromGitter | <zacharycarter> and this seems to show promise - but will only know after its used by more people I suppose |
18:03:04 | Zevv | I was already ready to type "nuklear and imgui" :) |
18:03:45 | FromGitter | <zacharycarter> ah - yeah but those are immediate mode |
18:03:54 | Zevv | yes indeed |
18:03:54 | FromGitter | <zacharycarter> we need something like Qt |
18:03:58 | FromGitter | <zacharycarter> but with less Qt :P |
18:04:12 | Zevv | is that something like wxwidgets, with less wx? |
18:04:27 | FromGitter | <zacharycarter> heh - wxWidgets is okay I guess but it's a large dependency |
18:04:28 | FromGitter | <zacharycarter> just like Qt is |
18:04:37 | Zevv | always the problem |
18:04:49 | FromGitter | <zacharycarter> ideally we have something that is small, and doesn't concern itself with all of the bells and whistles that Qt and wxWidgets do |
18:05:03 | shashlick | no example? |
18:05:06 | FromGitter | <zacharycarter> for Nim GUI solutions - I still think nigui is the best |
18:05:15 | FromGitter | <zacharycarter> yeah - that's what was bugging me - it's hard to make sense of the demos |
18:05:30 | FromGitter | <zacharycarter> he says like - this library doesn't actually build the UI controls - you have to do that yourself |
18:05:32 | FromGitter | <zacharycarter> so I'm a bit puzzled |
18:06:00 | FromGitter | <zacharycarter> `GuiLite just a framework, it could not create UI by itself. In order to show how to build UI App with it, We provide some samples for your reference.` |
18:06:08 | FromGitter | <zacharycarter> https://github.com/idea4good/GuiLiteSamples |
18:07:06 | Zevv | How is this different from all the others? |
18:07:15 | FromGitter | <Vindaar> @Araq in case you're here. I'm looking at https://github.com/nim-lang/Nim/issues/10478. I'm confused by your comment. The macro is evaluated but during `semAfterMacroCall` the call to `semExpr` fails, because `nkExprEqExpr` isn't handled at all in that proc. Are you saying we should never end up in `semExpr` in the first place? |
18:07:34 | FromGitter | <zacharycarter> seems much lighter weight |
18:07:44 | Zevv | ok, true, if its really 5kloc |
18:07:46 | FromGitter | <zacharycarter> also - it has a C API - so it should be easy to bind to |
18:07:52 | FromGitter | <zacharycarter> that's not true with Qt |
18:07:55 | shashlick | i'm just wondering what header has teh API |
18:07:58 | Zevv | https://github.com/andlabs/libui |
18:08:06 | FromGitter | <zacharycarter> libui is very buggy from what I've heard |
18:08:08 | FromGitter | <zacharycarter> and unfinished |
18:08:08 | shashlick | cause they just extern in the user app |
18:08:11 | FromGitter | <Varriount> TheLemonMan: Have you seen https://probablydance.com/2018/06/16/fibonacci-hashing-the-optimization-that-the-world-forgot-or-a-better-alternative-to-integer-modulo/ ? |
18:08:43 | FromGitter | <zacharycarter> this may very well not be any better - but who knows - it's another potential option to check out and play around with |
18:09:08 | Zevv | true |
18:09:59 | FromGitter | <Varriount> libui had such promise |
18:10:43 | Zevv | I made the Lua binding once, but abandoned it. It was indeed not finished and buggy |
18:10:49 | Zevv | but still being developed now, it seems |
18:15:17 | * | TheLemonMan joined #nim |
18:16:53 | TheLemonMan | Varriount, yeah but the savings are negligible until your table gets huuge |
18:17:56 | TheLemonMan | I wanted something nice for small & medium-sized dicts |
18:19:33 | TheLemonMan | gotta experiment with robin-hood hashing for the indices array tho but I expect it to be slower than the current probing scheme |
18:24:47 | TheLemonMan | Vindaar, yeah the problem is not-that-easy to tackle since the macro is expanded during the parameter evaluation pass |
18:26:12 | FromGitter | <Vindaar> @TheLemonMan Ah, thanks. Any rough idea how to proceed? |
18:27:48 | TheLemonMan | nope |
18:27:55 | FromGitter | <Vindaar> Hehe, ok :) |
18:35:55 | shashlick | narimiran: windows nightly is failing due to windows path differences |
18:36:03 | narimiran | shashlick: gaaah |
18:36:33 | narimiran | i'll put that example behing `when defined(posix)` |
18:36:45 | narimiran | it is `/../`, right? |
18:36:56 | shashlick | ya https://github.com/nim-lang/Nim/blob/devel/lib/pure/os.nim#L428 |
18:37:09 | shashlick | and you get a/b\d/e |
18:37:13 | shashlick | just because of that one \ |
18:37:20 | shashlick | even the other one might break the same way |
18:37:28 | shashlick | you could just replace \ with / |
18:38:06 | shashlick | you get a\d/e for second one |
18:38:59 | narimiran | shashlick: i pushed the quickfix |
18:39:50 | narimiran | everything else in `os.nim` is ok when you do `nim doc`? |
18:40:17 | Araq | TheLemonMan, how about implementing BTree.del ? |
18:40:38 | Araq | I want BTrees in the stdlib, no hashing, no cry |
18:40:42 | shashlick | there's more |
18:40:59 | shashlick | line 1256 |
18:41:04 | narimiran | argh, give me the whole list |
18:41:05 | Araq | deterministic iteration order, no security attack vector |
18:42:14 | shashlick | narimiran: looks like normalizePath doesn't work |
18:42:19 | shashlick | a does not change on windows |
18:42:20 | narimiran | shashlick: and few lines below also, probably `normalizeD` |
18:42:35 | shashlick | if I echo a after normalizePath(), echo a => a///b//..//c///d |
18:42:58 | narimiran | anything more after `normalize(d)`? |
18:43:23 | narimiran | i'm still surprised and disappointed that appveyor didn't catch that stuff |
18:43:24 | shashlick | 1293 also fails |
18:43:41 | narimiran | that's `normalized`, right? |
18:43:42 | shashlick | that's it |
18:43:47 | shashlick | yes |
18:44:18 | narimiran | when you remove those three (/../, normalize, normalized), everything else is ok? |
18:44:32 | shashlick | yes |
18:44:36 | narimiran | ok, pushing |
18:44:46 | shashlick | but normalize isn't working at all, so that needs to be fixed |
18:51:52 | TheLemonMan | Araq, have you seen my port of Python's dict implementation? |
18:51:58 | Araq | nope |
18:52:11 | TheLemonMan | https://github.com/LemonBoy/compactdict here you go |
18:52:22 | TheLemonMan | much simpler than btrees |
18:52:38 | Araq | I don't agree. |
18:53:02 | Araq | you never know the hashing's attack vectors |
18:53:08 | Araq | and btrees don't have any |
18:54:45 | TheLemonMan | yeah, that's true, but with a good-enough™ hash plus some clever shuffling you can go pretty far |
19:00:05 | Araq | any benchmark numbers? |
19:00:17 | Araq | is it better than Nim's stdlib? |
19:01:30 | Araq | template nextTry(h, maxHash: Hash): untyped = ((5*h) + 1) and maxHash # we used to do this but it's pretty bad because of the cache behaviour |
19:02:03 | TheLemonMan | gotta implement rehashing to a smaller size first and I'll benchmark it |
19:02:48 | narimiran | TheLemonMan: did you forget `.toDict()` in your readme example? |
19:02:51 | TheLemonMan | yeah but this time the array is a tad smaller so it's more likely to stay in cache |
19:03:22 | TheLemonMan | narimiran, yep, too bad markdown doesn't support the :test: directive :P |
19:14:17 | * | abm joined #nim |
19:23:44 | TheLemonMan | plotly api is nightmare fuel |
19:25:46 | Araq | I hate the Element vs Node distinction in the DOM, it's crap |
19:26:40 | TheLemonMan | see, we're _never_ happy! |
19:39:52 | * | natrys joined #nim |
19:45:53 | * | d10n-work joined #nim |
19:46:07 | Araq | TheLemonMan, btw your PRs are a bit on hold until I've implemented nimble package checking logic to detect more regressions |
19:47:05 | TheLemonMan | no worries, better be safe than sorry |
19:56:41 | FromDiscord_ | <exelotl> woooo markdown features in docgen! |
19:56:52 | FromDiscord_ | <exelotl> that's awesome <3 |
20:00:37 | * | abm quit (Quit: Leaving) |
20:11:20 | FromGitter | <basp> Agreed. I think the whole language and toolkit is awesome to work with. |
20:15:27 | Araq | thanks. |
20:15:38 | Araq | we also have a new milestone btw: https://github.com/nim-lang/Nim/milestone/6 |
20:17:59 | rayman22201 | 👍 to the new milestone |
20:22:34 | * | TheLemonMan quit (Ping timeout: 250 seconds) |
20:26:09 | FromGitter | <basp> excited for release candidate, thank *you*! |
20:30:59 | * | wildlander joined #nim |
20:31:04 | * | wildlander quit (Changing host) |
20:31:04 | * | wildlander joined #nim |
20:42:24 | Zevv | is it feasible to backport the doc generator with linkable procs to 0.19.4 so that the current docs get a bit more friendly while the big revamp is going on behind the scenes? |
20:44:24 | narimiran | re markdown: it is still rough around the edges and some stuff don't work (but even some stuff don't work in rst :P) |
20:44:34 | narimiran | Zevv: glad you like that feature |
20:45:03 | narimiran | i took me 2 days of explaining what i want to have implemented :D |
20:45:18 | Zevv | I never realized it wasn't there, but now that it is I realize how much it helps |
20:45:24 | Zevv | Why is it hard to explain? |
20:45:33 | narimiran | because i'm retarded :D |
20:45:46 | Zevv | congrats, that makes two of us |
20:46:04 | narimiran | btw, docs CSS revamp will make much easier to spot these "hidden" links |
20:46:39 | narimiran | current links work by the word of mouth: "hey, did you know that we now have links there and there?" |
20:46:54 | Zevv | euh, they do stand out in blue? |
20:47:00 | narimiran | nope |
20:47:05 | Zevv | oh the other ones, true :) |
20:47:14 | shashlick | @kaushalmodi - travis caching is not working on windows |
20:47:15 | Zevv | I just opened a page to see that they're not blue :) |
20:47:32 | narimiran | that would be too much, but they'll have a nice mild underline |
20:47:51 | narimiran | so you know they are links, but no in-your-face screaming |
20:48:24 | Zevv | nice. |
20:48:41 | Zevv | Are you open for input still? |
20:49:04 | narimiran | always ;) |
20:49:10 | narimiran | what do you have in mind? |
20:49:20 | Zevv | not sure if it makes sense: |
20:49:29 | Zevv | the 'see also' sections now say "this proc" and "that proc" |
20:49:32 | FromGitter | <kaushalmodi> shashlick: I'd resort to opening an issue on the travis ci repo |
20:49:34 | xace | any nim lib that allows you to bind global hotkeys in a X11 environment in linux? |
20:49:40 | Zevv | that's quite verbose, and proc is the norm |
20:49:42 | FromGitter | <kaushalmodi> they usually respond in a day or two |
20:50:10 | FromDiscord_ | <juan_carlos> Why instead of maintaining a CSS, dont use some CSS Framework thats minimalistic and dont need JavaScript?, like Spectre (9kb) or Lit (300Bytes). |
20:50:12 | Zevv | Would it make sense to make it this() and that(), and maybe only note the exeption for templates and macros |
20:50:21 | Zevv | oh of course there is also iterators, funcs, etc, aw |
20:50:33 | Zevv | no nevermind |
20:50:34 | FromGitter | <kaushalmodi> shashlick: I don't use Windows so it's difficult to guess what's wrong in the current config |
20:50:46 | Zevv | just thinking out loud |
20:50:50 | narimiran | ah, i started with that `... proc` stuff, is seemed suitable, but i get your point |
20:50:56 | FromGitter | <kaushalmodi> may be `[[ -f FILE ]]` where FILE has paths with forward slashes doesn't work? |
20:51:03 | narimiran | but that is not CSS, that's just lots of manual deleting :D |
20:51:35 | Zevv | Are these verbatim in the docs? |
20:51:47 | narimiran | @juan_carlos because that would be much more work for little benefit? :/ |
20:53:00 | rayman22201 | @xace, there are x11 bindings, but no docs, and I don't know enough about it to help. Maybe this will help anyway? https://github.com/PMunch/x11 |
20:54:23 | Zevv | global hotkey hooking requires record X11 extension |
20:54:25 | narimiran | hmmm, now i noticed that devel docs, when you click on `source` takes you to **master** branch, not devel :( |
20:56:46 | Zevv | xace: You need only a handful of X11 calls for key hooking, if that helps you I can see if I can make a quick wrapper for you? |
21:00:13 | * | TheLemonMan joined #nim |
21:00:28 | * | Tyresc joined #nim |
21:03:21 | * | zachk joined #nim |
21:15:30 | shashlick | @kaushalmodi - that's not the issue |
21:15:48 | shashlick | if you see the beginning where cache gets restored, there's nothing getting restored, which means nothing gets backed up |
21:17:11 | FromDiscord_ | <juan_carlos> How can be the best way to generate a random string of 100 ascii letters?. |
21:20:05 | shashlick | the syntax to cache is obviously correct since it works on Linux and OSX |
21:20:10 | shashlick | but gets left out on Windows |
21:20:22 | shashlick | considering windows is new for travis, I'm wondering if it doesn't work yet |
21:20:34 | shashlick | haven't found any known issues though |
21:30:41 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
21:35:14 | FromGitter | <Varriount> Araq: What is the alternative to multi-methods? |
21:37:59 | Zevv | juan_carlos: something like var s: string; for i in 1..100: s.add random(33..127).char might do? |
21:38:59 | * | nsf quit (Quit: WeeChat 2.3) |
21:41:10 | FromDiscord_ | <juan_carlos> I used: |
21:41:15 | FromDiscord_ | <juan_carlos> `repeat($rand(10_00_00_00_00_00_00_00_00.int..int.high), 5)` |
21:41:27 | FromDiscord_ | <juan_carlos> Dont need to be crypto strong. |
21:42:05 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
21:42:21 | Zevv | I guess that also works :) |
21:55:55 | Araq | varriount: single dispatch methods |
21:59:27 | FromGitter | <Varriount> Araq: How are those better? |
22:00:12 | Araq | they are a bit easier to understand and we can later implement them via more traditional vtables |
22:00:46 | Araq | and we should also get rid of the strange .base annotation then |
22:01:12 | Araq | it's not a big deal, people claimed it won't break any code besides the tests |
22:29:28 | FromGitter | <iffy> Before I spend a bunch of time debugging: is cross-compiling a static lib from macOS for Windows supported? |
22:31:15 | Araq | unlikely |
22:31:28 | Araq | you would need a clang/gcc that can do it |
22:32:11 | * | abeaumont quit (Ping timeout: 250 seconds) |
22:34:16 | FromGitter | <iffy> and mingw doesn't? |
22:34:35 | FromGitter | <iffy> nim happily makes the static lib, btw -- it just seems to have trouble be used when I get to Windows |
22:42:36 | shashlick | how does winrelease build tools? i don't see it called anywhere |
22:44:51 | shashlick | ok it calls koch zip which does |
22:49:24 | FromDiscord_ | <akavel> Hi! I'm a total newbie. I want to read and write some binary data from stdin/to stdout, in big endian. How would I best approach this? I want to parse/emit a particular protocol. |
22:50:20 | FromDiscord_ | <akavel> (It's mostly big endian uint64 numbers, interspersed with raw strings/byte spans) |
22:52:05 | FromDiscord_ | <akavel> Also, I would like to be able to write tests for it, so it should be possible to substitute some mock input in place of the stdin, and verify that output is correct (matching some session transcript) |
22:52:11 | * | craigger quit (Quit: bye) |
22:53:09 | FromDiscord_ | <akavel> (I can write my own mocks, I am just not sure how to structure the thing to make sure the stdin/stdout can be easily replaced with my mock object/type/funcs/...) |
22:53:38 | FromDiscord_ | <akavel> Could you please help? |
22:55:14 | shashlick | stdin/out are just files so you could stub with just files |
22:56:00 | shashlick | also, simple readChars/readBytes or the like can be used to read and write |
22:56:28 | shashlick | there's also an endian lib that can help |
22:57:07 | * | narimiran quit (Ping timeout: 240 seconds) |
22:59:41 | FromDiscord_ | <akavel> Hm; could you possibly point me to some funcs in Nim stdlib docs that could get me started? |
22:59:49 | FromDiscord_ | <akavel> I must admit I have trouble navigating them :/ |
23:00:45 | FromDiscord_ | <akavel> So, as much as I maybe grasp your general thoughts, I still don't have an idea how to approach this in Nim 😦 |
23:01:47 | FromGitter | <kaushalmodi> akavel: https://nim-lang.github.io/Nim/theindex.html and Ctrl+F in browser to the rescue :) |
23:02:19 | FromGitter | <kaushalmodi> agreed that the documentation of https://nim-lang.github.io/Nim/endians.html an use some help |
23:02:25 | FromDiscord_ | <akavel> Ok, thanks, I'll try it! 😃 |
23:02:36 | FromGitter | <kaushalmodi> s/an/can |
23:03:22 | FromGitter | <kaushalmodi> shashlick: sorry, couldn't spend any time at looking at the windows failure; too much work |
23:03:27 | FromDiscord_ | <akavel> Also, if I were to use Streams, can I somehow pass stdin & stdout to them? |
23:04:58 | FromDiscord_ | <akavel> Hmmm, ok, I think I found it myself: |
23:05:11 | FromDiscord_ | <akavel> thanks to the index, I found that 'stdin' is a 'File', |
23:05:51 | FromDiscord_ | <akavel> and the 'streams' library has a 'newFileStream()' variant taking a 'File' - so, I suppose they should work together 😉 |
23:06:00 | FromDiscord_ | <akavel> thank you guys!!! |
23:06:09 | * | craigger joined #nim |
23:06:20 | FromGitter | <kaushalmodi> you can look at https://github.com/nim-lang/Nim/blob/devel/lib/pure/unittest.nim |
23:06:25 | * | craigger quit (Client Quit) |
23:06:26 | FromGitter | <kaushalmodi> it is using streams |
23:06:34 | FromGitter | <kaushalmodi> I haven't studied that code |
23:06:43 | * | krux02 quit (Remote host closed the connection) |
23:06:44 | FromGitter | <kaushalmodi> but I know it has a bug where it does not send errors to stderr |
23:07:03 | FromGitter | <kaushalmodi> may be if you figure out streams and std*, you can patch it :P |
23:07:05 | FromGitter | <kaushalmodi> no pressure |
23:07:07 | FromGitter | <kaushalmodi> :) |
23:07:37 | FromGitter | <kaushalmodi> ref: https://github.com/nim-lang/Nim/blob/devel/lib/pure/unittest.nim |
23:07:49 | FromGitter | <kaushalmodi> wrong ref |
23:07:54 | FromGitter | <kaushalmodi> right ref: https://github.com/nim-lang/Nim/issues/7913 |
23:09:28 | * | craigger joined #nim |
23:09:34 | FromGitter | <Vindaar> > <TheLemonMan> plotly api is nightmare fuel ⏎ Are you talking about nim-plotly or plotly.js? If the former, sorry. That's partly my fault. I'm all open ears to improve it though! If the latter, well yeah. It's not great... |
23:09:44 | FromGitter | <Vindaar> ugh, gitter.. |
23:09:45 | * | craigger quit (Client Quit) |
23:09:58 | shashlick | @kaushalmodi - i've been doing some tests |
23:10:07 | shashlick | https://github.com/genotrance/nightlies/pull/1 |
23:10:55 | * | natrys quit (Quit: natrys) |
23:10:58 | FromGitter | <kaushalmodi> as an aside shashlick and @genotrance sound like different people (I know you are the same :P) |
23:11:11 | FromGitter | <kaushalmodi> when I read shashlick, I think of nightlies |
23:11:17 | FromGitter | <kaushalmodi> and genotrance reminds of nimterop |
23:11:19 | FromGitter | <kaushalmodi> :) |
23:12:16 | shashlick | haha ya its about time i gave up shashlick on irc |
23:12:17 | FromGitter | <kaushalmodi> shashlick: it's just the removal of double quotes? |
23:12:29 | shashlick | no, it isn't caching at all |
23:12:35 | FromGitter | <kaushalmodi> actually it's prudent to use double quotes whenever in doubt |
23:12:51 | shashlick | i am trying by removing $TRAVIS_BUILD_DIR from caching let's see |
23:13:07 | shashlick | but also added travis folding so we can actually go thru everything |
23:14:12 | * | craigger joined #nim |
23:17:24 | * | craigger_ joined #nim |
23:18:56 | * | craigger quit (Ping timeout: 250 seconds) |
23:20:03 | * | craigger_ quit (Client Quit) |
23:20:07 | * | Vladar quit (Remote host closed the connection) |
23:22:03 | * | craigger joined #nim |
23:39:14 | * | craigger quit (Quit: bye) |
23:41:24 | * | craigger joined #nim |
23:46:19 | FromGitter | <iffy> Is there a way to run `finish.exe` non-interactively? (i.e. answer yes to everything) |
23:46:27 | FromGitter | <iffy> When installing Nim on Windows |
23:53:54 | * | craigger quit (Quit: bye) |
23:56:20 | * | craigger joined #nim |