00:01:14 | def-pri-pub | It's in `util.nim`. I think it might be better to go in it's own file and then imported by `util.nim` |
00:02:42 | FromGitter | <zacharycarter> agreed |
00:02:48 | FromGitter | <zacharycarter> I don't know if we'll ever get around to using it in zengine |
00:05:38 | def-pri-pub | Weren't you working on a website for zengine a while back? |
00:06:57 | FromGitter | <zacharycarter> I was but I stopped I didn't really get anywhere with it I got sidetracked trying to do soemthing with karax :P |
00:07:00 | FromGitter | <zacharycarter> I should start on one again |
00:07:23 | jsgrant | Just noticed; There's no nim2nix yet. |
00:07:32 | FromGitter | <zacharycarter> nim2nix? |
00:07:44 | def-pri-pub | yeah, I was just about to ask |
00:07:58 | def-pri-pub | (damn, the IRC logs are already logged in google) |
00:08:38 | jsgrant | Compat-layer for NixOS; Basically allows a prog-lang's packagemanager to talk to "nix" and install to the system proper to be run. |
00:08:49 | jsgrant | Because you don't run local-binaries on NixOS. |
00:09:10 | FromGitter | <zacharycarter> dah fuq is NixOS? |
00:09:19 | FromGitter | <zacharycarter> ohhh yeah |
00:09:21 | FromGitter | <zacharycarter> this thing |
00:09:35 | jsgrant | All but this machine (Fedora) are now on NixOS; Might be a fun-project ... still a year out before I do trivial Nim-hacking it looks. Ordering dom96's book tomorrow though. :^) |
00:10:12 | * | jsgrant is making a placeholder repo for now, as a reminder, regardless. |
00:10:45 | FromGitter | <zacharycarter> why are you waiting a year to start hacking on Nim? |
00:12:11 | * | mahmudov joined #nim |
00:13:48 | jsgrant | Well, more closely it's going to be a half-year once I start the beginning of the next on my self-imposed "curriculum"; This year has been a weird "reset/rebase" kind-of thing a lot of which is going through actual overly-romantic withdrawls from Lisp. |
00:14:36 | jsgrant | More-or-less "reteaching" myself to program, non-trivially, outside of Lisp... which I haven't done in like 4-5 years to any notable degree and really not at all, sans the last few months, for like 3 years prior. |
00:15:52 | FromGitter | <zacharycarter> yeah I feel that's one problem (major) with lisp |
00:16:19 | FromGitter | <zacharycarter> most lisp programmers I talk to about other programming languages shudder at the thought of switching |
00:16:59 | FromGitter | <zacharycarter> I think it's the investment one has to make into lisp to become competent in it |
00:17:54 | jsgrant | Once I finally, after like 2 years of bulling about it ... get my blog up, will eventually write about it; Just such an odd mindset I was in. |
00:18:37 | jsgrant | The fact that I had any -- let-alone such strong feelings of "selling out" trying to move away from it, is literally crazy to me. |
00:19:13 | FromGitter | <zacharycarter> :P embrace the new! embrace the Nim! |
00:19:43 | FromGitter | <zacharycarter> I'm attempting to write a non-recursive flood fill algo implementation and it's not going well |
00:21:24 | FromGitter | <zacharycarter> is there any way to TCO optimize Nim code? |
00:22:01 | jsgrant | Was absurdly productive though, during that time; And what get's me is I don't know how much of it was actually due to nice lil quirks in Lisp & how much of it was the almost unshakeable "man on a mission" mindset I had. |
00:23:09 | jsgrant | The latter, was certainly pushed in the community; And too (I think I've mentioned in here & certainly in other channels generally) I've been pensive to really peruse anything/any community that seems to mirror that ... namely Haskell. |
00:23:45 | jsgrant | Think there must be a sort-of "brain" that is apt to buy into that kind-of stuff in full-force. :^P |
00:24:00 | FromGitter | <zacharycarter> meh I gave CL a shot and just floundered for a few days trying to get things working |
00:24:15 | FromGitter | <zacharycarter> SDL wouldn't work and then I changed from SBCL to some other implementation and things still didn't work |
00:24:31 | FromGitter | <zacharycarter> then I tried out chicken scheme and the example project there didn't work |
00:24:34 | jsgrant | zach: One of the reasons Nim actually interested me initally, actually, is the Lispish macro-system. |
00:24:59 | FromGitter | <zacharycarter> makes sense |
00:25:02 | jsgrant | Ever play with CEPL? |
00:25:27 | * | vlad1777d quit (Ping timeout: 240 seconds) |
00:26:12 | FromGitter | <zacharycarter> nope! is that like a C repl? |
00:26:34 | jsgrant | *Marco/DSL-Lust is also a big reason why I too started reorienting to Scala. |
00:26:49 | * | renarc joined #nim |
00:26:50 | jsgrant | https://github.com/cbaggers/cepl |
00:27:30 | jsgrant | Baggers also has some pretty nice/decent demo's on his linked Youtube channel. |
00:28:19 | jsgrant | There was a good half-dozen or so Lisp Gamedev projects about; When I was still about. |
00:28:51 | jsgrant | Clinch was pretty nice too, really. |
00:30:10 | FromGitter | <zacharycarter> yeah I talked to a few lips users who were trying to get me to switch and were touting their game projects |
00:30:17 | FromGitter | <zacharycarter> I still think nim is better suited for gamedev |
00:32:44 | jsgrant | Yeah, at this point I agree; But your mindset (and mine not-nearly-as-much) doesn't fall into that "Assimilate" modulus. |
00:33:34 | FromGitter | <zacharycarter> true |
00:33:59 | jsgrant | I was running Emacs + Stumpwm for like 80% of my environment (dev or otherwise); And that still wasn't enough for me. |
00:34:53 | jsgrant | You sorta-kinda see that in "RIIR" (Rewrite It In Rust), but even then Lisp is a whole 'nother level because there are parties (myself included) who wanted LispMachines/LispOSes to "be a thing" again. |
00:36:35 | FromGitter | <zacharycarter> yeah |
00:36:44 | FromGitter | <zacharycarter> I def see it in the rust community |
00:41:58 | * | TjYoco joined #nim |
00:42:59 | jsgrant | But yeah, basically I "have a history" of falling into some of these absolutist traps & once in, it's absurdly hard for me to crawl out of -- so I've more-or-less crafted the loosely aforementioned "curriculum" with the explicit goal if going slow & curbing my enthusiasm. |
00:44:48 | jsgrant | Trying to go the "slow, but gainful payoffs" game; Which is certainly very counterintuitive to me. |
00:47:57 | jsgrant | Pretty sure I've functionally got to a point where I know what I'm doing -- but absolutely get why it sounds odd when I say, basically, "Oh yeah, I'm excited to play with Nim; Only going to take me 6+ months to a year to do anything non-trivial in!" :^P |
00:55:18 | FromGitter | <zacharycarter> hehe |
00:55:26 | FromGitter | <zacharycarter> makes sense |
01:12:02 | * | gangstacat quit (Quit: Ĝis!) |
01:14:55 | * | def-pri-pub quit (Quit: leaving) |
01:18:25 | * | TjYoco quit (Ping timeout: 248 seconds) |
01:19:34 | subsetpark | Araq dom96 : is there a handy list anywhere of the C types that Nim uses to represent its base types? |
01:23:47 | FromGitter | <zacharycarter> subsetpark: how goes the roguelike? |
01:25:05 | subsetpark | zacharycarter - I converted it to BLT and got roughly working everything already in place - however, I have this Nim/Python talk coming up soon so I have to work on my utility library for that instead. |
01:26:08 | FromGitter | <zacharycarter> gotcha |
01:40:02 | * | chemist69_ quit (Ping timeout: 255 seconds) |
01:53:56 | * | chemist69 joined #nim |
01:58:47 | * | endragor joined #nim |
02:02:56 | * | endragor quit (Ping timeout: 240 seconds) |
02:56:31 | * | Jesin quit (Quit: Leaving) |
02:59:02 | * | endragor joined #nim |
03:01:59 | * | Jesin joined #nim |
03:03:47 | subsetpark | zacharycarter: here's an extremely barebones, no-documentation first sketch: https://pypi.python.org/pypi/nim-types |
03:03:54 | subsetpark | `import ntypes` |
03:26:26 | * | onionhammer quit (Ping timeout: 240 seconds) |
03:28:36 | * | onionhammer joined #nim |
03:29:52 | * | dddddd quit (Remote host closed the connection) |
03:37:05 | * | onionhammer quit (Ping timeout: 248 seconds) |
03:38:57 | * | onionhammer joined #nim |
03:41:21 | * | onionhammer quit (Client Quit) |
04:39:26 | * | mahmudov quit (Remote host closed the connection) |
04:53:23 | FromGitter | <Bennyelg> When I am updating my package I should nimble publish again? |
04:53:27 | FromGitter | <Bennyelg> how is it working? |
05:12:01 | * | StarBrilliant quit (Ping timeout: 276 seconds) |
05:13:08 | * | miran joined #nim |
05:19:06 | * | StarBrilliant joined #nim |
05:24:30 | * | Vladar joined #nim |
05:30:10 | Araq_ | benneyelg: no, you don't have to do that. if the URL changed, you need to create a manual PR I think |
05:30:24 | Araq_ | if something else changed (dependencies) you don't need to do anything |
05:30:53 | Araq_ | nimble loads the dependencies from your .nimble file on github and so its knowledge is always up to date |
05:35:59 | * | gangstacat joined #nim |
06:02:27 | FromGitter | <Bennyelg> Fantastic |
06:02:32 | FromGitter | <Bennyelg> https://github.com/Bennyelg/nimPresto ⏎ Is now on nimble |
06:07:05 | * | miran quit (Ping timeout: 240 seconds) |
06:18:52 | * | vlad1777d joined #nim |
06:20:01 | * | ShalokShalom quit (Remote host closed the connection) |
06:22:53 | FromGitter | <mratsim> @zacharycarter If you manage to implement a fast floodfill ping me. No one will tell you this but Go-playing engine are not compute or memory bound, they are floodfill bound since you have to run flood fill thousand of times per second in a go AI. ⏎ ⏎ Here is my implementation in Rust using functional iterators style: while let, filter_map, fighting the borrow checker: https:/ |
06:22:53 | FromGitter | ... /github.com/mratsim/rustygo/blob/master/src/main.rs#L358-L378 |
06:24:05 | * | vlad1777d quit (Ping timeout: 240 seconds) |
06:26:10 | * | nsf joined #nim |
06:39:28 | * | jsgrant quit (Ping timeout: 240 seconds) |
06:43:39 | * | endragor quit (Remote host closed the connection) |
06:46:44 | * | spica joined #nim |
06:51:59 | * | ShalokShalom joined #nim |
07:08:51 | * | endragor joined #nim |
07:12:06 | * | yglukhov joined #nim |
07:13:22 | * | Arrrr joined #nim |
07:13:22 | * | Arrrr quit (Changing host) |
07:13:22 | * | Arrrr joined #nim |
07:14:52 | * | solitudesf joined #nim |
07:16:52 | * | yglukhov quit (Remote host closed the connection) |
07:18:39 | * | PMunch joined #nim |
07:20:05 | * | claudiuinberlin joined #nim |
07:29:32 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:46:20 | * | claudiuinberlin joined #nim |
07:46:41 | * | Sembei quit (Ping timeout: 240 seconds) |
07:47:24 | * | MyMind joined #nim |
07:50:02 | * | couven92 joined #nim |
08:04:20 | * | yglukhov joined #nim |
08:07:45 | * | spica quit (Ping timeout: 252 seconds) |
08:08:31 | * | yglukhov quit (Ping timeout: 248 seconds) |
08:11:34 | * | spica joined #nim |
08:23:37 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:23:57 | FromGitter | <Varriount> @mratsim Your Arraymancer library is really neat! |
08:24:02 | * | yglukhov joined #nim |
08:24:08 | * | couven92 quit (Quit: Client disconnecting) |
08:27:10 | * | claudiuinberlin joined #nim |
08:31:46 | * | couven92 joined #nim |
08:33:11 | * | Yardanico joined #nim |
08:43:07 | FromGitter | <Bennyelg> To whom using presto-db by facebook (sql engine) . ⏎ I created A nim connector :) ⏎ Now I'ts working pretty efficient ⏎ https://github.com/Bennyelg/nimPresto ⏎ ... [https://gitter.im/nim-lang/Nim?at=59ba411bbac826f054b7287f] |
08:51:26 | Arrrr | If i have a `proc test[T](t: T)` and T is `seq[A]`, is it possible to get the `A`, for example: `proc test[T](t: T) = test2[T.A](t[0])` |
08:56:45 | Araq_ | template elemType[T](a: seq[T]): typedesc[T] = T |
08:56:57 | Araq_ | ^ untested though |
08:56:59 | * | dom96|w joined #nim |
09:02:49 | Arrrr | Good shot https://play.nim-lang.org/?gist=1a755f0dd718bfd6513ac7bce41fec35 |
09:03:17 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
09:04:26 | Araq_ | for me the button keeps spinning |
09:04:35 | Araq_ | I guess compiler endless loop? |
09:04:56 | Arrrr | Is a thing playground does sometimes |
09:04:56 | Araq_ | oh now it works, ok |
09:05:00 | PMunch | It did that for me as well, but then it suddenly worked |
09:18:33 | FromGitter | <Varriount> @Bennyelg "connect" is a rather ambiguous term - perhaps you should provide an additional procedure called prestoConnect, or connectToPresto? |
09:20:11 | FromGitter | <Grabli66> Is there "Any" type that i can use in runtime, not in compile time? |
09:21:01 | dom96|w | Varriount: I don't think that's necessary. |
09:21:06 | PMunch | You can create a type with a kind field like the JSON module does |
09:21:09 | dom96|w | As long as the `connect` proc works on a Presto type |
09:22:13 | FromGitter | <Varriount> dom96: It doesn't. It just takes a hostname, port, etc |
09:22:28 | Araq_ | presto.connect |
09:22:50 | Araq_ | not sure why people pretend we have no disambiguation means |
09:23:12 | dom96|w | yeah. I agree with Araq. |
09:23:26 | dom96|w | Araq_ you should kill your other BNC. |
09:23:34 | dom96|w | Log in to it and /msg *status disconnect |
09:23:34 | Araq_ | I know |
09:23:59 | * | Araq quit (Quit: Bye!) |
09:24:19 | * | Araq_ is now known as Araq |
09:24:20 | FromGitter | <Grabli66> dom96|w, can i use ssl with jester? |
09:24:23 | FromGitter | <Varriount> Araq: Eh, I guess you have a point |
09:24:48 | dom96|w | Grabli66: yes, but not using Jester directly. You should put it behind nginx and set up SSL for it. |
09:25:37 | PMunch | I put mine behind Apache, worked pretty well |
09:25:48 | FromGitter | <Grabli66> dom96|w, do you plan to add native ssl support to jester? |
09:26:09 | PMunch | Why? That is just more code to maintain with little benefit |
09:26:26 | * | Yardanico quit (Remote host closed the connection) |
09:26:48 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:27:41 | FromGitter | <Grabli66> I dont want use nginx or apache. :) |
09:28:45 | FromGitter | <Varriount> It would benefit webapps, and small applications |
09:29:14 | FromGitter | <Varriount> I wonder if flask (python) supports ssl |
09:31:35 | PMunch | Well, someone could probably write a small reverse-proxy in Nim :) |
09:33:45 | dom96|w | Grabli66: Sure. But it's not a high priority for me. |
09:37:11 | PMunch | Varriount, it appears that it does: https://blog.miguelgrinberg.com/post/running-your-flask-application-over-https |
09:40:36 | * | claudiuinberlin joined #nim |
09:44:35 | couven92 | Hmm, @Araq_ I still get `msgs.nim(602, 32) Error: ambiguous call; both tables.[](t: var Table[[].A, [].B], key: A)[declared in lib\pure\collections\tables.nim(167, 5)] and tables.[](t: Table[[].A, [].B], key: A)[declared in lib\pure\collections\tables.nim(161, 5)] match for: (Table[system.string, system.int32], string)` on the 0.17.2 sources |
09:45:20 | Araq | couven92: you still haven't fixed the vcc bug, so yeah |
09:45:47 | couven92 | I have no idea what is going on here, so how am I to fix it? :O |
09:46:30 | dom96|w | if you want Jester to support SSL then asynchttpserver needs to support it first |
09:46:42 | dom96|w | and for that to happen you will likely need to wrestle quite a bit with openssl |
09:47:00 | couven92 | yes, you pointed med at some function in some file, I still have no idea what I am looking at there... (I am reasonably sure it has something to do with the compiler, that's about as far as I got :P ) |
09:55:10 | FromGitter | <Grabli66> dom96|w, asyncnet has ssl support. |
09:55:32 | dom96|w | Grabli66: Basic SSL support. |
09:55:52 | dom96|w | But do try to add SSL support to asynchttpserver :) |
09:56:05 | dom96|w | It might just work without any problems |
10:00:08 | yglukhov | dom96: btw, even "basic" ssl support needs improvement. cert validation almost never works ( |
10:00:35 | dom96|w | Yeah... SSL is tricky :\ |
10:00:55 | dom96|w | It took me months to get it this far. |
10:02:27 | yglukhov | Grabli66: https://github.com/yglukhov/variant |
10:02:34 | dom96|w | I think in the long run we should switch to BearSSL when it's ready https://bearssl.org/ |
10:03:23 | yglukhov | oh, that is interesting. never heard |
10:03:42 | FromGitter | <Grabli66> yglukhov, thanks |
10:04:07 | dom96|w | It should be possible for us to link to it statically, which would be awesome. |
10:04:27 | dom96|w | In fact, it might be a good idea to start using it already. |
10:05:31 | yglukhov | yeah, i've also been thinking about nimble support for foreign static libs. i think it would be nice to put static libs for different platforms/archs right into the nimble package... |
10:06:09 | FromGitter | <Bennyelg> @Araq what is the disamiguation when I use connect? |
10:06:23 | yglukhov | as a matter of fact nimble can already allow that, so nevermind |
10:07:12 | dom96|w | Yes, via submodules. |
10:07:12 | yglukhov | but yeah, static ssl lib (with a lot of platform/arch variants) would be great |
10:07:21 | dom96|w | (git submodules) |
10:07:35 | dom96|w | It would be awesome for Nimble to download dynamic libs too |
10:08:25 | FromGitter | <Bennyelg> @dom96 But the signature is unique to the presto, and you should import presto when use connect |
10:08:34 | FromGitter | <Bennyelg> @dom96 I don't see the problem |
10:08:49 | FromGitter | <Bennyelg> assuming you connect( with the right signature |
10:08:53 | dom96|w | Bennyelg: hrm? I'm fine with your code. Varriount isn't. |
10:09:23 | FromGitter | <Grabli66> Is there plugin system for nim? I want to load from nim process a module with some interface and use it like plugin. |
10:09:28 | FromGitter | <Bennyelg> Oh, sorry |
10:11:35 | FromGitter | <Bennyelg> @dom96 I read your comment on git about the 2 spaces convention. on my opinion is not enough when you read code 4 make a lot of different |
10:11:52 | * | sdw joined #nim |
10:12:29 | FromGitter | <Bennyelg> but it's just me I assuming it's an old habit |
10:16:01 | * | mahsav quit (Ping timeout: 248 seconds) |
10:16:43 | * | mahsav joined #nim |
10:22:21 | * | Yardanico joined #nim |
10:23:10 | * | spica quit (Ping timeout: 264 seconds) |
10:24:46 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:26:46 | * | ShalokShalom_ joined #nim |
10:27:40 | couven92 | Araq, I tried as you suggested to do some GC_rec calls ( https://github.com/nim-lang/Nim/compare/devel...couven92:issue-6229 ) but that didn't help... -.- |
10:29:39 | * | ShalokShalom quit (Ping timeout: 252 seconds) |
10:29:50 | * | endragor quit (Remote host closed the connection) |
10:34:07 | PMunch | BearSSL looks really interesting dom96|w |
10:34:17 | Araq | couven92: oh ok, hmmm |
10:35:28 | * | spica joined #nim |
10:36:53 | FromGitter | <Grabli66> It would be great if someone implements bearssl :) |
10:37:17 | PMunch | *hint hint* |
10:37:52 | PMunch | Try to run c2nim on it and see what happens |
10:38:34 | * | elrood joined #nim |
10:38:42 | FromGitter | <Grabli66> I am too old for that :) |
10:41:16 | * | mahsav2 joined #nim |
10:41:41 | * | mahsav quit (Ping timeout: 240 seconds) |
10:45:39 | * | Yardanico quit (Remote host closed the connection) |
10:46:44 | FromGitter | <mratsim> > @mratsim Your Arraymancer library is really neat! ⏎ ⏎ Thanks ! I’m almost done wrapping CUDA C so we can use custom GPU kernel in Arraymancer =) |
10:46:54 | FromGitter | <mratsim> @Varriount * |
10:49:34 | * | Ven`` joined #nim |
10:49:47 | * | dddddd joined #nim |
10:50:01 | * | vendethiel- quit (Ping timeout: 240 seconds) |
10:50:16 | * | endragor joined #nim |
10:53:14 | * | arnetheduck joined #nim |
10:55:26 | * | endragor quit (Ping timeout: 240 seconds) |
11:02:08 | yglukhov | Bennyelg: +1, also prefer 4 spaces. |
11:03:44 | PMunch | Grabli66, saw your question about plugins. Are you talking about dynamic libraries? Because that is available in Nim |
11:04:18 | Arrrr | 2 spaces masterrace |
11:04:27 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:04:30 | FromGitter | <Grabli66> PMunch, yes. Compile to dll, so, dynlib? |
11:05:31 | PMunch | https://rosettacode.org/wiki/Call_a_function_in_a_shared_library#Nim |
11:05:52 | PMunch | That's a pretty bare-bones example of DLLs in Nim |
11:05:58 | PMunch | It's pretty easy to work with |
11:06:38 | spica | guys, was the / (string, string) removed from the lib? |
11:06:47 | Araq | no |
11:06:51 | Araq | we all love it. |
11:06:55 | FromGitter | <Grabli66> PMunch, great |
11:07:03 | Araq | it's in ospaths now |
11:07:19 | spica | oh |
11:07:21 | spica | okay |
11:07:23 | Araq | can play.nim get c2nim support? that would be so cool |
11:07:31 | PMunch | Grabli66, https://forum.nim-lang.org/t/2051 that's an example showing dynamic loading |
11:07:57 | Araq | spica: os.nim forwards to ospaths.nim though, so everything should work as before |
11:08:02 | PMunch | So loading plugins and getting their procedures dynamically |
11:08:07 | Araq | did we break something? |
11:08:49 | spica | Araq, I was just reading through dom's book, and my code didn't compile. He only imported "os", so I thought you guys removed the operator |
11:09:06 | spica | so you broke his book :)) |
11:09:22 | FromGitter | <Grabli66> PMunch, thanks, it's what i want |
11:10:26 | Araq | huh? as I said, it should still work |
11:10:40 | Araq | can we get a proper bug report for this please? |
11:11:09 | spica | you just said you've moved the proc into another module |
11:11:24 | spica | should it work if just os is imported? |
11:11:30 | Araq | spica: yes. |
11:11:39 | Araq | os does 'export ospaths' |
11:11:55 | spica | I am a dummy |
11:12:10 | spica | my bad. I had this: "from os import nil" :) |
11:12:16 | spica | so it's ok, sry |
11:12:39 | FromGitter | <BigEpsilon> @Araq , talking about c2nim: https://github.com/nim-lang/c2nim/pull/97 |
11:12:41 | FromGitter | <ephja> are enum values limited to <int.high? |
11:12:58 | Araq | ephja: I think so |
11:14:13 | FromGitter | <ephja> `int.high` raises OverflowError in semEnum. I'm gonna have a look |
11:28:26 | * | claudiuinberlin joined #nim |
11:29:10 | * | claudiuinberlin quit (Client Quit) |
11:29:22 | * | Snircle joined #nim |
11:31:00 | * | dom96|w joined #nim |
11:42:05 | * | Sentreen quit (Ping timeout: 240 seconds) |
11:43:40 | * | endragor joined #nim |
11:43:43 | * | claudiuinberlin joined #nim |
11:48:41 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:50:27 | * | Yardanico joined #nim |
11:50:39 | * | vendethiel- joined #nim |
11:51:03 | * | ShalokShalom_ quit (Ping timeout: 252 seconds) |
11:51:27 | couven92 | Araq, I just realized: vcc does not seem to care about `vcc.options.debug`, what do I need to do to trigger the use of that configuration? I tried `nim c koch` and `nim c -d:debug koch` |
11:51:53 | * | ShalokShalom joined #nim |
11:52:08 | * | Ven`` quit (Ping timeout: 240 seconds) |
11:55:02 | * | Sentreen joined #nim |
11:57:37 | Araq | couven92: huh, good question, --debugger:native ? |
12:03:28 | * | MyMind quit (Ping timeout: 240 seconds) |
12:03:29 | * | Pisuke joined #nim |
12:05:56 | * | claudiuinberlin joined #nim |
12:06:56 | * | sz0 joined #nim |
12:09:36 | spica | guys, why does this fail? https://pastebin.com/HbeLkH7q unicode issues |
12:10:26 | FromGitter | <Grabli66> Is it possible to fix that https://play.nim-lang.org/?gist=b63a811237ba256c7821c174ed456553 ? |
12:10:27 | Araq | spica: are you on windows? |
12:10:30 | spica | i am |
12:10:37 | spica | dayum |
12:10:43 | Araq | run start.bat that came with Nim |
12:10:47 | spica | ok |
12:10:55 | Araq | and retry your program |
12:11:10 | Araq | in that terminal/shell/console |
12:12:23 | Araq | Grabli66: that's impossible, you need to duplicate the valueType field |
12:12:35 | FromGitter | <Grabli66> ok |
12:13:01 | Araq | you also might want to use JSonNode instead |
12:14:41 | PMunch | I think he's just doing it for fun Araq |
12:14:52 | spica | Araq, that works. Is it just a displaying issue? |
12:14:57 | FromGitter | <ephja> does anyone actually use 'items' for enum types to iterate over enums with holes? |
12:15:10 | Araq | spica: yes. it's a Windows bug really. |
12:15:35 | FromGitter | <Grabli66> yglukhov, Your variant type is slow? :) |
12:15:46 | spica | yep, it works fine withot start.bat in mingw terminal |
12:16:33 | Araq | spica: look at start.bat's code to see the workaround |
12:16:49 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:17:58 | spica | small inconsistency issue in the api: unicode.runSubStr vs system.substr |
12:19:18 | Yardanico | well it's runeSubStr |
12:19:31 | * | claudiuinberlin joined #nim |
12:19:42 | FromGitter | <ephja> should 'items' be left as it is and then have an iterator that accounts for holes? |
12:20:25 | spica | Yardanico, it is. but the Str is title cased, in system.substr it's not |
12:20:36 | Yardanico | spica, it doesn't matter |
12:20:53 | Yardanico | you can call it like "runesubstr" or "runeSubStr" |
12:20:55 | spica | Well, it doesn't but it's a bit inconsistent |
12:21:28 | Yardanico | echo "asdasd".runesubstr(5, 3) |
12:21:31 | PMunch | ephja, what would be the purpose of an items iterator that didn't account for holes? When would you want to use that instead of one that accounted for them? |
12:21:32 | Yardanico | if you like it |
12:21:36 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
12:22:03 | PMunch | runE_suB_strinG |
12:22:14 | PMunch | Reverse camel snake-case |
12:22:21 | Yardanico | yeah |
12:22:29 | spica | lol |
12:22:34 | Yardanico | runE_suB_stR |
12:22:45 | spica | that stll doesn't change the facts |
12:22:49 | Yardanico | why? |
12:22:55 | Yardanico | you can call it like you want |
12:23:08 | spica | lol |
12:23:09 | Yardanico | it's not a big deal in nim |
12:23:11 | spica | I do know that |
12:23:30 | PMunch | That should be implemented as well, shorthand insensitivity :P proc sub{str|srting} |
12:23:35 | spica | but the api is inconsistent |
12:23:41 | spica | whatever |
12:23:50 | spica | not a big deal, just saying |
12:23:57 | FromGitter | <ephja> PMunch: I dunno if it was done for reasons of simplicity or for some other reason |
12:24:02 | spica | look at php, you don;t want to end up like that |
12:24:09 | Yardanico | like what? |
12:24:10 | spica | absolute rubbish consistency |
12:24:13 | PMunch | I agree with spica, even though it doesn't matter in Nim the core modules should be consistent with the style guide |
12:24:36 | Yardanico | well then you can say "Nim compiler should be consistent with the style guide" :P |
12:24:56 | PMunch | ephja, ah I get you. Do a git blame on it and see who did it :P |
12:25:06 | FromGitter | <ephja> though it's not that difficult to account for holes in the compiler, but `e.low .. e.high` is very simple |
12:25:41 | * | TjYoco joined #nim |
12:32:00 | Araq | the Nim compiler predates the style guide |
12:32:31 | Yardanico | yeah, I know |
12:32:39 | Yardanico | but maybe in the future |
12:37:00 | * | endragor quit (Remote host closed the connection) |
12:37:08 | * | ShalokShalom quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
12:38:40 | * | endragor joined #nim |
12:38:55 | * | ShalokShalom joined #nim |
12:42:13 | couven92 | Araq, sry, suddenly had to attend a meeting... Uhm, yes: `--debugger:native` did work... |
12:42:59 | * | ShalokShalom quit (Remote host closed the connection) |
12:43:21 | * | ShalokShalom joined #nim |
12:43:34 | couven92 | Is there a way to set vcc.options for the usual case without using .always (since that also would affect `--opt:size` and `--opt:speed`? |
12:45:50 | FromGitter | <zacharycarter> subsetpark: nice! |
12:49:21 | * | kunev quit (Ping timeout: 252 seconds) |
12:50:06 | * | relax joined #nim |
12:50:59 | * | kunev joined #nim |
12:51:29 | * | dom96|w joined #nim |
12:51:39 | spica | how does one convert a string into an array or seq or hashset? Is there any api for that? |
12:52:34 | PMunch | Turning "Hello, world" into ["H","e","l","l",...]? |
12:52:54 | spica | yes |
12:53:51 | PMunch | First init the seq to str.len then just iterate and set the fields |
12:54:04 | PMunch | Not sure if there is any code for that anywhere |
12:54:10 | PMunch | But it would be like 5 lines of code |
12:54:17 | * | pilne joined #nim |
12:55:00 | spica | Yeah, I was just curious if there's a proc or something for this task. |
12:55:44 | spica | so if you want to sort the chars of a string, make a seq first via loops, then sort. In python we can sort strings, so that's what I was after |
12:56:11 | Araq | you can sort strings in Nim |
12:56:18 | Araq | no idea why you think you can't |
12:57:15 | spica | how |
12:57:26 | * | relax quit (Ping timeout: 240 seconds) |
12:57:28 | PMunch | https://forum.nim-lang.org/t/3075 |
12:58:23 | * | renarcii joined #nim |
12:58:55 | spica | Dayum. I was using sort(cmp[string]), that's why it failed |
13:02:39 | * | renarc quit (Remote host closed the connection) |
13:02:50 | * | renarcii is now known as renarc |
13:03:18 | * | Ven`` joined #nim |
13:04:13 | * | Sembei joined #nim |
13:04:47 | * | renarc quit (Quit: Leaving) |
13:05:01 | * | vendethiel- quit (Ping timeout: 255 seconds) |
13:05:12 | FromGitter | <zacharycarter> I think you can just do @"Hello World" spica |
13:05:13 | * | renarc joined #nim |
13:05:40 | Yardanico | yeah |
13:05:51 | * | Pisuke quit (Ping timeout: 252 seconds) |
13:06:11 | spica | it wokrs |
13:08:05 | yglukhov | Grabli66: its superfast if wrapped type size is <= sizeof(pointer). otherwise, it allocates a copy, and still remains super fast ;) |
13:08:37 | FromGitter | <Grabli66> yglukhov, good :) |
13:09:00 | yglukhov | by "superfast" i mean it is as fast as it can be given its semantics =) |
13:10:56 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:10:59 | FromGitter | <Grabli66> Ok. I'll try to use it :) |
13:13:52 | yglukhov | Grabli66: it is worth mentioning though that such functionality is rarely needed. in most cases you can get away without losing compile time type tracking, or use nim obj variants. so i would suggest to revisit your program's concept before using variants. |
13:13:56 | * | onionhammer joined #nim |
13:14:16 | * | vlad1777d joined #nim |
13:14:30 | FromGitter | <Grabli66> Maybe later |
13:15:34 | * | renarc quit (Remote host closed the connection) |
13:23:06 | subsetpark | Araq: here's something interesting - the same code fails in the VM |
13:23:12 | * | claudiuinberlin joined #nim |
13:23:37 | subsetpark | https://www.irccloud.com/pastebin/jGgQombE/ |
13:29:57 | spica | works fine on my system. nim32 on windows |
13:30:03 | spica | with gcc |
13:30:24 | spica | but what kind of shell is that? |
13:30:54 | TjYoco | works on mine too |
13:33:08 | Yardanico | guys, wrap this code in "static" block |
13:33:10 | Yardanico | and try again :) |
13:33:30 | Yardanico | VM - compile-time VM for executing Nim macros and other stuff which is computed at compile-time |
13:34:06 | FromGitter | <krux02> spice: try calling "nim secret" on the command line |
13:34:26 | FromGitter | <krux02> on linux I recommend to use "rlwrap nim secret" |
13:35:22 | spica | yeah, sorting fails that way |
13:36:40 | FromGitter | <krux02> subsetpark: please create a bug report |
13:39:30 | spica | lol |
13:40:05 | spica | :(( |
13:40:22 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:40:40 | * | relax joined #nim |
13:41:29 | spica | >>> var c=[1,2,3,4,-1] |
13:41:29 | spica | >>> sort(c, cmp) |
13:41:37 | spica | try that one guys |
13:41:40 | spica | in nim secret |
13:41:47 | spica | Error: unhandled exception: value out of range |
13:43:28 | TjYoco | where are you accessing the array |
13:43:48 | * | claudiuinberlin joined #nim |
13:44:15 | spica | what do you mean? |
13:44:50 | spica | sortin fails, not arr access |
13:45:54 | FromGitter | <krux02> yes the nim vm was my disillision to nim as well |
13:46:22 | TjYoco | It worked for me in nim secret |
13:46:51 | spica | what nim ver? |
13:46:57 | TjYoco | 0.17.2 |
13:47:01 | spica | same |
13:47:06 | spica | windows ? |
13:47:10 | TjYoco | yeah |
13:47:17 | spica | nim 32 or 64? |
13:47:55 | TjYoco | 64 |
13:48:16 | spica | fails on 64 and 32... |
13:48:46 | spica | https://pastebin.com/QdehtiPz |
13:51:20 | Yardanico | arch doesn't matter in VM |
13:51:25 | Yardanico | AFAIK |
13:51:43 | Yardanico | just do a bugreport already :) |
13:52:51 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:54:35 | * | vlad1777d quit (Ping timeout: 240 seconds) |
13:54:56 | FromGitter | <Grabli66> Yardanico, can nimble watch changes in files and build? |
13:55:11 | Yardanico | what do you mean? |
13:55:13 | Yardanico | hot reloading? |
13:55:21 | FromGitter | <Grabli66> yes |
13:55:37 | FromGitter | <Grabli66> Build on changes in source files |
13:56:10 | Yardanico | well I mean you want your app to be stopped and started again? |
13:56:40 | Yardanico | if you want to do this without restarting the program itself (with a script or by hand) - your only way is dynamic libraries |
13:57:08 | Yardanico | but no, I think nimble doesn't have a feature like that |
13:58:22 | * | claudiuinberlin joined #nim |
13:58:22 | FromGitter | <Grabli66> Vscode plugin can do that. But it not use nimble, just nim compiler |
13:58:50 | Yardanico | well can you explain more precisely what do you want to do? |
13:59:23 | * | PMunch quit (Quit: Leaving) |
14:00:19 | TjYoco | Grabli66 do you mean you're making a nimble package and importing it elsewhere and want to know if it detects source code changes automatically? |
14:01:12 | FromGitter | <Grabli66> I want "nimble" looked for changes in the project and automatically began to build as if they were |
14:01:32 | FromGitter | <Grabli66> I use nimble for project managment |
14:01:39 | Yardanico | well you would make a script for that |
14:01:47 | Yardanico | ah |
14:01:52 | FromGitter | <Grabli66> And build my project like "nimble build" |
14:01:54 | Yardanico | or simple nim program (if you're on linux) |
14:02:11 | FromGitter | <Grabli66> And i want "nimble build watch" :) |
14:02:27 | Yardanico | well there's no cross-platform way to do that in Nim currently |
14:02:37 | Yardanico | and I don't think it would be a good feature for a package manager :) |
14:02:53 | FromGitter | <Grabli66> But it also a project manager |
14:02:58 | Yardanico | yeah |
14:03:00 | Yardanico | manager |
14:03:00 | FromGitter | <Grabli66> Build system, i mean |
14:03:14 | Araq | yup, I think it would be a cool nimble feature |
14:03:38 | Yardanico | Araq, currently we don't have cross-platform way to watch file changes, do we? |
14:03:57 | Araq | we have fsmonitor |
14:04:02 | Araq | only supports linux |
14:04:14 | Araq | apparently somebody has a Win implementation too |
14:04:24 | Araq | check the forum |
14:04:40 | Yardanico | ah, https://gist.github.com/mashingan/4a31d3a630e22cf9274eebf475ee60e6 |
14:05:05 | Yardanico | winim is this - https://github.com/khchen/winim |
14:05:09 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
14:07:07 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:08:44 | * | claudiuinberlin joined #nim |
14:10:33 | Araq | ok, I see you volunteered. |
14:10:37 | Araq | nice |
14:11:01 | Yardanico | Araq, what ? :) |
14:11:09 | FromGitter | <Grabli66> Cool. We'll be waiting for results :) |
14:11:21 | Araq | give fsmonitor a Windows implementation. |
14:11:29 | Araq | and then an OSX one. |
14:11:53 | Araq | and then a (Free)[BL]SD one |
14:15:10 | * | ShalokShalom quit (Remote host closed the connection) |
14:15:21 | * | endragor quit (Remote host closed the connection) |
14:16:08 | * | sz0 quit (Quit: Connection closed for inactivity) |
14:16:42 | FromGitter | <ephja> `errSetTooBig: "set is too large",` big or large? ;) |
14:16:45 | * | endragor joined #nim |
14:17:14 | Araq | sometimes it shows I'm no native speaker :P |
14:17:20 | Araq | PRs welcome |
14:17:34 | * | dom96|w joined #nim |
14:18:13 | FromGitter | <ephja> I'm not so sure myself, but "large" might be more formal |
14:19:51 | Araq | "set is too <insert dick joke here>" |
14:19:59 | Araq | ^^ problem solved |
14:20:23 | * | endragor quit (Remote host closed the connection) |
14:20:30 | * | endragor joined #nim |
14:20:55 | * | endragor quit (Remote host closed the connection) |
14:21:19 | TjYoco | "Overflow Error: Hint: Try uinch8 instead of uinch4" |
14:21:50 | Araq | "your mother's set ..." |
14:22:52 | FromGitter | <ephja> roughly what is needed in order to assign a run time variable to the value that a compile time variable holds at the very end of the compile time scope? |
14:23:20 | Yardanico | well I create new variable in a proc to do this |
14:23:29 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
14:23:29 | Yardanico | e.g. in a proc: "var myvar = SomeConst" |
14:23:34 | * | endragor joined #nim |
14:24:06 | FromGitter | <k0pernicus> Hello! |
14:24:16 | Yardanico | hi |
14:24:17 | Araq | "Uncountable set detected, ask Cantor for help" |
14:24:22 | FromGitter | <k0pernicus> Is anybody here has trouble with example 4.26 from Nim in Action? |
14:24:33 | FromGitter | <krux02> ¡olleH |
14:24:37 | FromGitter | <k0pernicus> The code is ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59ba9125210ac269202edb38] |
14:24:47 | FromGitter | <ephja> Yardanico: yes but sometimes it's not good enough |
14:24:49 | * | dom96|w joined #nim |
14:25:01 | FromGitter | <k0pernicus> I compiled the code with `nim c -d:ssl` |
14:25:24 | FromGitter | <Yardanico> @k0pernicus works fine for me |
14:25:25 | FromGitter | <Yardanico> with -d:ssl |
14:25:38 | FromGitter | <k0pernicus> But I got this error running it: `Error: unhandled exception: SSL support is not available. Cannot connect over SSL.` |
14:25:56 | FromGitter | <Yardanico> well maybe you've compiled it to another directory? :) |
14:26:25 | FromGitter | <k0pernicus> Oh well - sorry… |
14:26:30 | FromGitter | <k0pernicus> The error is: `Error: unhandled exception: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure` |
14:26:43 | FromGitter | <k0pernicus> Different from the previous one :-] |
14:26:45 | FromGitter | <Yardanico> oh |
14:26:54 | FromGitter | <Yardanico> something bad with your openssl? |
14:27:03 | FromGitter | <k0pernicus> Mmmmh... |
14:27:33 | FromGitter | <k0pernicus> I will update `brew`… just in case… but I don’t think so |
14:27:38 | FromGitter | <Yardanico> https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/861137 |
14:27:42 | FromGitter | <k0pernicus> `Warning: openssl 1.0.2l is already installed` |
14:28:15 | * | endragor quit (Ping timeout: 248 seconds) |
14:28:26 | FromGitter | <ephja> @Yardanico one example is implementing opengl.loadExtensions without compiler support. lexicographic order shouldn't matter |
14:29:00 | FromGitter | <Yardanico> @k0pernicus are you sure nim uses this new ssl? |
14:29:04 | FromGitter | <ephja> well, I should figure it out myself eventually |
14:29:23 | FromGitter | <k0pernicus> @Yardanico It’s in the book |
14:29:37 | FromGitter | <k0pernicus> That’s why I asked if anybody has got troubles with the book’s code |
14:29:44 | Yardanico | It's the error in OpenSSL |
14:29:47 | Yardanico | what's why I'm asking |
14:29:59 | Yardanico | and I mean openssl by "ssl" |
14:30:16 | FromGitter | <k0pernicus> Oh ok, sorry |
14:31:29 | Yardanico | well I don't really know, you can google this error |
14:31:53 | FromGitter | <k0pernicus> Yep, I tried |
14:31:57 | dom96|w | Mac OS X's older openssl doesn't support cloudflare's SSL IIRC |
14:32:48 | Yardanico | brew update && brew install openssl && brew link --force openssl && openssl version -a |
14:32:54 | Yardanico | but this can break your system :) |
14:33:08 | Yardanico | because every program will use newer OpenSSL |
14:33:09 | FromGitter | <k0pernicus> @Yardanico openssl from brew is already installed ;-0 |
14:33:31 | Yardanico | did you do "brew link --force openssl" ? |
14:33:35 | FromGitter | <k0pernicus> Yep |
14:33:46 | Yardanico | what's the output of "openssl version -a" ? |
14:33:54 | * | relax quit (Ping timeout: 246 seconds) |
14:34:00 | Yardanico | and if you did this right now, try to relogin or reboot |
14:35:13 | * | Calinou quit (Ping timeout: 248 seconds) |
14:36:07 | FromGitter | <k0pernicus> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59ba93d7bc4647297432edd0] |
14:36:08 | FromGitter | <edubart> How to enable gcc warnings when compiling with nim? (disable the -w argument that nim passes to gcc to ignore all warnings) |
14:36:45 | Yardanico | edit nim.cfg ? |
14:37:05 | Yardanico | yourNimCompilerDir/config/nim.cfg |
14:37:15 | Yardanico | maybe there's a better way |
14:37:22 | FromGitter | <edubart> I've tried adding -passC:-Wall but gcc still ignores all warnings |
14:37:36 | Yardanico | you should try to edit nim config as I said |
14:37:47 | Yardanico | but why do you want gcc warnings? just curious :) |
14:38:15 | TjYoco | Im trying to fix a dependency issue by using Generics, how should I fix this 'Field' is not a concrete type? https://gist.github.com/Tyler-Yocolano/ebe83c4b1051ec31d15b8cbb57ac3ad3 |
14:38:53 | FromGitter | <edubart> why I need is explained in my comment on https://github.com/nim-lang/Nim/issues/6324 |
14:38:59 | Yardanico | you can't have a seq of different types |
14:39:09 | Yardanico | generics are compile-time thing |
14:39:12 | FromGitter | <edubart> what line I have to add/edit in nim.cfg? |
14:39:54 | Yardanico | try to edit line 128 |
14:39:58 | Yardanico | and remove "-w" here |
14:40:09 | Yardanico | (if you're on linux) |
14:40:09 | TjYoco | Yardanico alright, thought they were all technically Field objects so that wouldn't matter |
14:40:19 | Yardanico | TjYoco, no, that would matter |
14:40:26 | Yardanico | https://forum.nim-lang.org/t/3167 |
14:41:06 | Yardanico | generics are not a runtime thing |
14:42:28 | TjYoco | ohhh gotcha |
14:43:36 | FromGitter | <k0pernicus> @Yardanico Does the code run well on your computer? |
14:43:39 | FromGitter | <k0pernicus> No exception? |
14:43:59 | Yardanico | yes. I'm on linux (arch linux) |
14:44:12 | FromGitter | <k0pernicus> And what is your version of OpenSSL ? |
14:44:41 | Yardanico | OpenSSL 1.1.0f 25 May 2017 :) |
14:45:05 | FromGitter | <k0pernicus> Mmmmh ok |
14:45:06 | Yardanico | well it's arch, here's everything has latest versions |
14:45:24 | Yardanico | dom96|w himself uses mac IIRC |
14:45:44 | * | relax joined #nim |
14:45:45 | FromGitter | <k0pernicus> @dom96 Are you using MacOS? Can you paste your OpenSSL please? |
14:45:50 | * | sz0 joined #nim |
14:45:50 | dom96|w | what URL are you trying to request? |
14:45:58 | dom96|w | I'm not on my MBP right now |
14:45:59 | Yardanico | dom96|w, he's trying to request nim-lang.org |
14:46:07 | FromGitter | <k0pernicus> Yep |
14:51:55 | FromGitter | <Grabli66> How to create an interface type in nim? |
14:52:32 | Yardanico | there's no "interface" in Nim |
14:52:50 | FromGitter | <Grabli66> I know :) |
14:53:02 | Yardanico | what are you trying to do? |
14:53:04 | FromGitter | <Grabli66> But. I want something like interface |
14:53:26 | Yardanico | well there should be a reason for that |
14:53:40 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:53:54 | * | nsf quit (Quit: WeeChat 1.9) |
14:54:05 | FromGitter | <Grabli66> Multiple inheritance |
14:54:27 | Yardanico | well there should be a reason for that :D |
14:54:37 | FromGitter | <Grabli66> :) |
14:54:50 | FromGitter | <edubart> I've been absent from nim related stuff for about one year, how is the progress towards 1.0 since then? closer or farther? |
14:54:53 | Yardanico | well, really, you can post your code (which you want to do) |
14:55:01 | Yardanico | edubart: closer indeed |
14:55:08 | FromGitter | <Grabli66> I want object that has field from other two objects |
14:55:15 | FromGitter | <Grabli66> fields |
14:55:51 | Yardanico | ehh, you don't get me :D I mean why do you want to have an object like this? can you post a code which you're trying to make work? |
14:56:32 | TjYoco | I thought I read somewhere about composition instead of inheritance, something like the new object would have fields of the other ones instead of being a child of them... is that anywhere close to correct? |
14:56:32 | Yardanico | also this: http://openmymind.net/Interfaces-In-Nim/ |
14:57:01 | * | arnetheduck quit (Ping timeout: 240 seconds) |
14:57:17 | * | claudiuinberlin joined #nim |
14:57:47 | FromGitter | <edubart> but I saw that the github issues is larger (I remember that were ~900 a year ago) and some looks scary, this gives me the feel that is farther |
14:57:56 | FromGitter | <Grabli66> Yardanico, Good trick :) |
14:57:57 | * | pilne quit (Quit: Quitting!) |
14:58:15 | Yardanico | edubart: well because issues are closed and new ones are opened? :) |
14:58:29 | FromGitter | <Grabli66> Yardanico, Maybe there is a mixins? |
14:58:35 | FromGitter | <edubart> I am talking about open ones |
14:58:35 | * | Ven`` quit (Ping timeout: 240 seconds) |
14:58:52 | Yardanico | look at rust or swift then :P |
14:59:11 | Yardanico | ah, swift doesn't have issues in github repo |
15:00:37 | FromGitter | <edubart> rust 2770 much more haha, however 19382 closed ones, they have a better ratio |
15:00:50 | Yardanico | because nim community is smaller |
15:01:31 | Yardanico | https://github.com/nim-lang/Nim/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20updated%3A%3E2016-09-14 |
15:01:32 | * | Ven`` joined #nim |
15:01:45 | Yardanico | not the best search, but still |
15:01:48 | TjYoco | how many issues though are "Q: I can't get this to work; A: You're doing it wrong, here's how" |
15:01:56 | FromGitter | <k0pernicus> @edubart The first release of Nim will be ok when `high-priority` issues will be fixed |
15:02:06 | FromGitter | <k0pernicus> (I think…) |
15:02:08 | Yardanico | well Araq wanted to release 1.0 years ago IIRC |
15:02:14 | Yardanico | but community stopped him |
15:02:20 | * | Jesin quit (Quit: Leaving) |
15:02:20 | FromGitter | <k0pernicus> Why? |
15:02:38 | FromGitter | <k0pernicus> (11 high-priority issues for the moment I think) |
15:02:48 | FromGitter | <edubart> we all I hope so, rhoughtly in how many years maybe 1.0 will be out? |
15:03:14 | Yardanico | no one can ask questions like this, there's no schedule |
15:03:22 | FromGitter | <k0pernicus> Maybe it’s too late for 2017… 2018? |
15:03:32 | FromGitter | <zacharycarter> these kind of questions are pointless |
15:03:41 | FromGitter | <edubart> is nim in feature freeze or it keeps adding new features often? |
15:03:51 | Araq | I'm still shooting for 2017 fwiw |
15:04:00 | Araq | every year is Nim v1 year. |
15:04:01 | FromGitter | <zacharycarter> please look at the release notes if you want to see when features are added @edubart |
15:04:09 | Yardanico | edubart: it's not feature freeze |
15:04:50 | Yardanico | nimble became much smarter in this year AFAIK |
15:05:11 | Yardanico | or for example "The C/C++ code generator has been rewritten to use stable name mangling rules. This means that compile times for edit-compile-run cycles are much reduced." |
15:05:13 | FromGitter | <edubart> aside from bugs, is thread a roadmap or list of new features that will be added? |
15:05:24 | FromGitter | <edubart> is there* |
15:05:47 | Yardanico | well, https://github.com/nim-lang/Nim/blob/devel/todo.txt, but i don't know if it's a good source |
15:05:56 | Araq | edubart: I'm working on a new one |
15:06:05 | Yardanico | Araq, yay |
15:07:29 | Yardanico | but AFAIK not nil is not complete now |
15:08:10 | Araq | in a nutshell: make 'not nil' the default for 'ref', make 'nil' an invalid state for strings/seqs, make 'case' do pattern matching for objects |
15:09:04 | * | Jesin joined #nim |
15:10:17 | FromGitter | <edubart> other thing that I'm afraid a little is that the project itself is much dependent on Araq, I hope Araq keeps rocking and improving nim forever, however what happens in other scenario? |
15:10:55 | Araq | it's a valid concern, we hired "zahary" who knows pretty much everything too |
15:11:29 | Araq | making the bus factor 2 for Nim's core. Jehan too knows almost everything afaict but he is not very active either |
15:11:41 | FromGitter | <edubart> Araq, do you feel more tired of improving and fixing Nim compared with yourself years ago? will you keep rocking as much as you can? |
15:12:50 | TjYoco | Do you expect him to say No he's giving up soon? |
15:12:52 | FromGitter | <edubart> hmm, good to know that you are hiring others to help, I hope the active core developers grows |
15:13:08 | Araq | I'm improving Nim's ecosystem more than the compiler these days (sorry), we got "karax" for browser based frontends (SPAs), we're getting a unique ORM |
15:13:09 | Yardanico | TjYoco, well I think Araq wouldn't give up :) |
15:13:21 | Yardanico | at least because there's large code bases written in Nim AFAIK :) |
15:14:00 | Araq | that means two things: |
15:14:11 | Araq | - progress is slower than I would like |
15:14:29 | Araq | - I am having lots of fun with no signs of growing tired :D |
15:14:39 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:14:53 | * | vivus joined #nim |
15:15:08 | TjYoco | Couldn't someone just fork Nim and upgrade it their own way anyhow? |
15:15:21 | Yardanico | TjYoco, yes, if he knows Nim compiler internals |
15:15:25 | Yardanico | nim compiler is MIT |
15:15:34 | FromGitter | <edubart> improving the ecosystem is a good strategy, a good ecosystem will attract more people to help out, thus improving more the ecosystem in a recursive manner |
15:15:42 | Yardanico | but I don't know any reason to fork Nim |
15:15:54 | Araq | I know most of you don't agree |
15:16:19 | Araq | but the compiler is really not hard, complex algorithms have been avoided for the most parts |
15:16:53 | FromGitter | <ephja> I'm probably just slow |
15:17:11 | * | haha_ joined #nim |
15:17:19 | TjYoco | Yardanico, I agree from what I've seen in the past month or so. Just saying if there were major concerns in the community or whatever then anyone can just make OtherNim |
15:17:41 | Araq | once you get over my eccentric style of writing things ("hi, I am a single char variable. guess what it means") it's not all that hard |
15:18:46 | Araq | there is the tendency though that hard bugs stay around for long. that's quite common in open source land.+ |
15:20:25 | Yardanico | well there's 160 issues with "feature"label |
15:21:39 | * | claudiuinberlin joined #nim |
15:23:05 | Yardanico | oh, we have 80 open PRs |
15:26:50 | * | jsgrant joined #nim |
15:30:13 | * | vlad1777d joined #nim |
15:31:51 | FromGitter | <krux02> Sorry I knew I am annoying, but it is annoying that by default the debug build has no debug symbols |
15:33:04 | Araq | krux02: edit your nim.cfg and add --debugger:native |
15:33:22 | FromGitter | <krux02> nim.cfg is confusing |
15:33:26 | FromGitter | <krux02> and I did |
15:34:13 | FromGitter | <krux02> the result was the output "using config file ..." broke my code |
15:34:30 | couven92 | @krux02 on Windows? |
15:34:39 | couven92 | using vcc? |
15:35:57 | FromGitter | <krux02> https://github.com/nim-lang/nimble/issues/397 |
15:36:13 | FromGitter | <krux02> couven92 I am on Linux only |
15:36:34 | couven92 | okay... because i just found out some things about vcc :P |
15:37:27 | FromGitter | <krux02> Araq: so just editing nim.cfg actually breaks things |
15:38:17 | Araq | seems a nimble bug to me |
15:38:35 | FromGitter | <krux02> yea it is in the nimble bug tracker alread |
15:39:56 | Araq | can't we fix the real issue here? |
15:40:14 | FromGitter | <krux02> The real issue to me here is that the debug build has no debug symbols |
15:40:19 | Araq | this staticRead"nimble path" hack needs to die |
15:40:31 | FromGitter | <krux02> ah yea that one |
15:41:38 | FromGitter | <krux02> the compile command should accept arguments that are relative to the file it is in |
15:41:50 | FromGitter | <krux02> I thit that was the reason I did that hack in the first place |
15:42:12 | FromGitter | <krux02> I *think* |
15:45:35 | FromGitter | <Grabli66> What is wrong? https://play.nim-lang.org/?gist=7cdb8206df4b0f94d59ca883a336672a |
15:45:44 | FromGitter | <krux02> Araq: I think a pragma ``{.addCIncludePath: "some/path/".}`` with a relative path the the current file would fix this. |
15:46:56 | Araq | grabli66: use 'of' instead of 'is' here. |
15:47:26 | Araq | krux02: we have no way to ship C code with Nim code |
15:47:46 | Araq | I mean no official way. |
15:47:56 | couven92 | we don't have custom GC finalizers (destructors) yes, do we? |
15:47:59 | Araq | just a bunch of hacks people came up with |
15:48:24 | Yardanico | couven92, I think we do |
15:48:42 | FromGitter | <krux02> Araq: well no official way, but this way here works pretty well: https://github.com/krux02/nimAntTweakBar/blob/master/AntTweakBar.nimble |
15:48:47 | * | haha_ quit (Quit: haha_) |
15:48:54 | Yardanico | couven92, https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L220 |
15:49:19 | couven92 | oh! nice! |
15:51:01 | FromGitter | <krux02> couven92: I would be careful with the finalizers, test if they actually can do what you want |
15:51:33 | FromGitter | <krux02> I remember that I tried destructors in Nim and they ware pretty far away from being reliable |
15:51:33 | * | haha_ joined #nim |
15:51:34 | Araq | btw I invented a new GC algorithm |
15:51:41 | Araq | how can I get the fame? |
15:51:51 | couven92 | Araq, WHAAAAT? :O |
15:52:01 | FromGitter | <krux02> whoohoo, party |
15:52:11 | Araq | it's just a variant of existing algorithms really |
15:52:14 | Araq | but still. |
15:52:18 | Yardanico | Araq, ahh |
15:52:22 | Yardanico | I remember this link |
15:52:29 | FromGitter | <krux02> well isn't a variant of existing algorithm what we all do |
15:52:38 | Araq | yeah indeed. |
15:52:46 | Yardanico | you've said that you was experimenting with a new GC |
15:55:12 | Araq | I read about something similar in a children's book once. |
15:56:33 | Yardanico | it seems I found it :P https://people.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf |
15:56:38 | FromGitter | <k0pernicus> In “Garbage Collection for kids” ? |
15:56:46 | FromGitter | <krux02> random information of the day: in gdb the command ``rbreak`` matches with regular expressions on function names and allows setting breakpoints in Nim functions pretty neatly |
15:56:50 | Yardanico | (found it again) |
15:57:26 | FromGitter | <krux02> and ``tui enable`` in gdb shows the sourcecode interactively |
15:57:34 | Yardanico | Araq, so new GC will arrive to Nim? or it's just an algorithm, not an implementation? |
15:57:52 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
15:58:03 | FromGitter | <krux02> I think it is already in Nim, we just never noticed it :D |
15:58:41 | FromGitter | <Grabli66> Araq, why there is "is" and "of" to check types? |
15:58:42 | FromGitter | <k0pernicus> @Araq Did you benchmarked it yet? |
15:59:23 | FromGitter | <krux02> @Grabli66 well I guess it has to do with inheritance and type aliases |
15:59:47 | FromGitter | <krux02> is just checks for type aliases and of also matches with super types |
16:00:09 | * | couven92 quit (Read error: Connection reset by peer) |
16:00:16 | FromGitter | <krux02> Araq: I broke the GC |
16:00:28 | FromGitter | <krux02> I made a change and now my test fails the GC initialization |
16:04:30 | * | solitudesf quit (Remote host closed the connection) |
16:07:30 | * | Trustable joined #nim |
16:07:34 | * | dom96|w joined #nim |
16:08:43 | * | miran joined #nim |
16:08:47 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:09:56 | * | claudiuinberlin joined #nim |
16:11:56 | * | couven92 joined #nim |
16:12:37 | * | spica left #nim ("Leaving") |
16:13:17 | * | vlad1777d quit (Remote host closed the connection) |
16:15:08 | * | vlad1777d joined #nim |
16:15:42 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:21:01 | Araq | will look at it later, krux02 |
16:21:02 | Araq | bbl |
16:23:52 | FromGitter | <ephja> hmm ⏎ ⏎ ```type E = enum a = <int.high ⏎ echo({a})``` [https://gitter.im/nim-lang/Nim?at=59baad18c101bc4e3ac882a7] |
16:30:58 | * | relax quit (Ping timeout: 264 seconds) |
16:34:50 | Arrrr | try `type E = enum c = 0, a = <int.high` |
16:36:07 | Arrrr | mm what i'd like to have is a len(enum) proc |
16:36:49 | * | relax joined #nim |
16:40:51 | * | jolik69 joined #nim |
16:41:34 | * | haha_ quit (Quit: haha_) |
16:44:17 | * | Yardanico_ joined #nim |
16:44:27 | * | Yardanico_ quit (Client Quit) |
16:44:43 | * | Yardanico_ joined #nim |
16:46:08 | * | sz0 quit (Quit: Connection closed for inactivity) |
16:46:15 | * | salewski joined #nim |
16:46:22 | * | haha_ joined #nim |
16:46:35 | * | Yardanico quit (Ping timeout: 240 seconds) |
16:48:52 | * | Yardanico_ quit (Client Quit) |
16:49:06 | * | Yardanico joined #nim |
16:49:12 | salewski | gtype.h:#if GLIB_SIZEOF_SIZE_T != GLIB_SIZEOF_LONG || !defined __cplusplus |
16:49:29 | * | jolik69 quit (Quit: Leaving) |
16:49:58 | salewski | How do I test for cplusplus backend in Nim code? when defined(cplusplus)? |
16:56:03 | FromGitter | <k0pernicus> Hey |
16:56:11 | FromGitter | <k0pernicus> I am experimenting with `concept` |
16:56:12 | salewski | My guess was not bad, seems to be when defined (cpp). Bye. |
16:56:30 | FromGitter | <k0pernicus> This is the code I wrote: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59bab4beb59d55b823f79373] |
16:57:12 | Yardanico | ok? |
16:57:18 | Yardanico | ah, I see |
16:57:32 | Yardanico | you can't use concept as a concrete type |
16:57:34 | FromGitter | <k0pernicus> As I implement `<` for the `Nothing` type, it should be satified the `Comparable` concept, right? |
16:57:45 | Yardanico | yes |
16:57:52 | Yardanico | but your myMax is wrong |
16:57:55 | Yardanico | you can't return Comparable |
16:57:58 | FromGitter | <k0pernicus> Ow |
16:58:26 | FromGitter | <Yardanico> use something like this |
16:58:29 | FromGitter | <Yardanico> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59bab5357b7d98d30df5c81e] |
16:59:43 | FromGitter | <k0pernicus> Cool, it works! |
16:59:46 | FromGitter | <k0pernicus> Thanks a lot! |
17:00:16 | FromGitter | <k0pernicus> So, instead of returning a concept, we return a concrete type that is a “similar type” (or alias) of the concept type, right? |
17:00:27 | FromGitter | <Yardanico> nonono |
17:00:54 | FromGitter | <Yardanico> myMax will accept any type which satisfies "Comparable" concept, and myMax will return a result with this type |
17:01:10 | FromGitter | <k0pernicus> Ow ok, I see |
17:01:13 | FromGitter | <k0pernicus> Wrong deduction |
17:01:15 | FromGitter | <k0pernicus> Thanks :-) |
17:01:32 | FromGitter | <k0pernicus> (Actually, the `myMax` procedure is from the book) |
17:02:07 | FromGitter | <k0pernicus> (page 254) |
17:02:12 | * | couven92 quit (Quit: Client disconnecting) |
17:02:19 | FromGitter | <Yardanico> also you wouldn't have any concepts or generics at runtime, they all resolved at compile-time |
17:02:43 | FromGitter | <Yardanico> so for each type pair new C (or C++) function is generated |
17:02:49 | FromGitter | <k0pernicus> Yep |
17:03:09 | FromGitter | <Yardanico> Here it would be this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59bab64d1081499f1f301e50] |
17:03:56 | FromGitter | <k0pernicus> (beautiful) |
17:04:08 | FromGitter | <k0pernicus> Like generics, right? |
17:04:12 | FromGitter | <k0pernicus> All in compile time |
17:04:20 | FromGitter | <Yardanico> yes |
17:04:28 | FromGitter | <Yardanico> also I've used generics in my code |
17:04:31 | FromGitter | <k0pernicus> (just saw your “generics at runtime” - sorry for that) |
17:04:34 | FromGitter | <Yardanico> myMax is a generic proc |
17:04:40 | FromGitter | <k0pernicus> I see |
17:07:16 | * | Jesin quit (Quit: Leaving) |
17:07:44 | * | yglukhov quit (Remote host closed the connection) |
17:08:40 | * | haha_ quit (Quit: haha_) |
17:12:20 | * | mahmudov joined #nim |
17:16:12 | * | relax quit (Ping timeout: 260 seconds) |
17:18:01 | * | Sentreen quit (Ping timeout: 240 seconds) |
17:18:12 | * | ShalokShalom joined #nim |
17:18:35 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:21:41 | * | adeohluwa joined #nim |
17:23:36 | FromGitter | <krux02> args |
17:24:01 | FromGitter | <krux02> spending enough time with gdb I start to like it |
17:24:09 | FromGitter | <krux02> even though I never thought I would ever do that |
17:24:30 | FromGitter | <krux02> it is all so complicated and needs a lot of knowledge to actually do anything |
17:24:33 | * | dom96|w joined #nim |
17:26:30 | FromGitter | <Grabli66> Can i create recursive iterator? Nim says "recursive dependency" |
17:26:56 | FromGitter | <krux02> well I tried that, too |
17:27:33 | FromGitter | <krux02> aparently, it doesn't seem so |
17:27:40 | FromGitter | <krux02> I even triey clusure iterators |
17:27:44 | FromGitter | <krux02> tried |
17:28:06 | FromGitter | <Grabli66> Success? |
17:28:11 | FromGitter | <krux02> nope |
17:28:29 | FromGitter | <krux02> my solution was to not use an iterator, but to write out the items into a seq |
17:28:51 | FromGitter | <krux02> for my use case that worked, too, but I would have preferred iterators |
17:29:17 | * | joby joined #nim |
17:29:24 | FromGitter | <Grabli66> Ohh. I know what to do |
17:32:20 | * | Sentreen joined #nim |
17:33:17 | Araq | seriously guys. iterators/generators vs coroutines |
17:33:30 | Araq | without a stack you can't have recursion |
17:33:57 | FromGitter | <krux02> Araq: yes, but aren't clusure iterators with a Stack? |
17:34:10 | FromGitter | <Grabli66> But we want :) |
17:36:22 | FromGitter | <krux02> It not that we all implemented iterators with the knowledge that recoursion would not be possible with it. |
17:36:34 | FromGitter | <krux02> We just try it and then realized that it doesn't work |
17:36:40 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:36:45 | ehmry | assuming that the stack can grow indefinitely is also not portable |
17:38:32 | * | haha_ joined #nim |
17:39:03 | FromGitter | <krux02> ehmry: sure |
17:39:19 | * | joby quit (Quit: Page closed) |
17:40:14 | FromGitter | <Grabli66> Ok. I can that understand. But why where is no interfaces? :( |
17:44:52 | FromGitter | <mratsim> Is there a way to tell the compiler not to optimise a proc? I’m trying this multiply by two on GPU but the resulting C is “optimized” via a CPU function. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59bac0147b7d98d30df604a1] |
17:45:07 | Yardanico | yeah |
17:45:21 | FromGitter | <Yardanico> ah |
17:45:25 | FromGitter | <Yardanico> you mean N_INLINE? |
17:45:35 | FromGitter | <mratsim> yes |
17:45:53 | FromGitter | <mratsim> I don’t want the *= to be replaced by stareq …. |
17:45:56 | Yardanico | IDK then |
17:46:32 | FromGitter | <Bennyelg> how do I push an update of package in nimble |
17:46:47 | FromGitter | <mratsim> create a new tag on github |
17:46:54 | Yardanico | make a new tag and update version in .nimble file |
17:46:58 | FromGitter | <mratsim> and update your nimble |
17:47:19 | FromGitter | <Bennyelg> so new nimble publish ? |
17:47:23 | Yardanico | nooo |
17:47:30 | Yardanico | new version tag on GitHub |
17:47:41 | Yardanico | make a new commit which updates version in .nimble file |
17:47:48 | Yardanico | and then create a tag which refers this commit |
17:48:25 | FromGitter | <Bennyelg> how do I create new tag |
17:48:44 | FromGitter | <krux02> what do you guys see in this gif https://camo.githubusercontent.com/bbec54f58f9f10beb07a20d5fe0465586d888763/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f6c314a3973363553576a486979614a656f2f67697068792e676966 |
17:49:00 | Yardanico | bad performance? :) |
17:49:21 | FromGitter | <Bennyelg> Ok, i got the tag |
17:49:24 | Yardanico | Bennyelg: https://github.com/VKBots/VBot/releases/new |
17:49:26 | FromGitter | <Bennyelg> and nimble version update |
17:49:27 | FromGitter | <Bennyelg> what now |
17:49:43 | * | yglukhov joined #nim |
17:49:57 | FromGitter | <krux02> bad performance?! why that? |
17:49:58 | * | couven92 joined #nim |
17:50:00 | * | haha_ quit (Quit: haha_) |
17:51:04 | FromGitter | <Bennyelg> :| |
17:51:37 | FromGitter | <Bennyelg> oh great |
17:51:48 | FromGitter | <Bennyelg> it's automatically after tag, thanks |
17:54:05 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:54:26 | * | haha_ joined #nim |
18:01:31 | FromGitter | <mratsim> I see "Non-Image content-type returned" |
18:03:54 | Araq | mratsim: need more help with .emit? |
18:05:19 | FromGitter | <mratsim> Mmm, that may be a solution yes |
18:06:09 | * | haha_ quit (Quit: haha_) |
18:06:54 | * | relax joined #nim |
18:08:51 | FromGitter | <mratsim> got to go. ⏎ ⏎ I will start with emit before trying something else. ⏎ I was actually thinking of nim-templates: https://github.com/onionhammer/nim-templates ⏎ ... [https://gitter.im/nim-lang/Nim?at=59bac5b3b59d55b823f7f824] |
18:10:23 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
18:11:08 | * | yglukhov joined #nim |
18:16:27 | FromGitter | <adamrezich> can anyone tell me what I'm doing wrong such that this whole thing works except for the last test? https://play.nim-lang.org/?gist=b839e751c5b638b3fd339ac87fc9b16a still figuring out macros :/ |
18:18:59 | FromGitter | <krux02> @adamrezich maybe you should use quote in macros |
18:19:12 | FromGitter | <krux02> it lets you create code blocks with actually using code |
18:19:23 | FromGitter | <krux02> `````` |
18:20:13 | Arrrr | do not pass evproc directly to add. Use a variable first |
18:20:27 | * | Snircle joined #nim |
18:20:43 | FromGitter | <krux02> @adamrezich well that doesn't solve anything, but it helps to keep things simpler |
18:20:48 | FromGitter | <adamrezich> @krux02 I didn't know about that, I'll look into it though |
18:21:08 | FromGitter | <krux02> you can use packticks to insert nodes |
18:21:14 | TjYoco | adamrezich, this works too a.add(evproc(Tick, echo "hi")) |
18:21:43 | FromGitter | <adamrezich> @Arrrr the point is to make it as DSL-like as possible, so I'll probably make the actual proc that takes in an evproc into a macro too |
18:22:06 | FromGitter | <krux02> ```let node: NimNode = ... ⏎ result = quote do: ⏎ foo.bar(`node`)``` [https://gitter.im/nim-lang/Nim?at=59bac8cebac826f054ba5296] |
18:23:03 | FromGitter | <krux02> to my experience it works best, when you try to be minimal in what your dsl supports |
18:23:29 | Arrrr | Yep, i know prefer to do everything with templates. Easier to maintain and understand |
18:23:33 | Arrrr | *now |
18:23:33 | FromGitter | <krux02> each feature needs to be maintained, documented |
18:24:08 | FromGitter | <krux02> Arrrr: I agree, when templates allow that, then I totally agree |
18:24:19 | FromGitter | <krux02> but not everything is possible |
18:24:31 | Yardanico | well this example will be a bit wordy with quote do |
18:24:44 | FromGitter | <krux02> but if you try you will realize that a lot is actually possible with templates |
18:24:55 | FromGitter | <krux02> doesn't matter |
18:25:02 | FromGitter | <krux02> maybe it does |
18:25:35 | FromGitter | <krux02> I just don't like super long ``nnkXYP.newTree(...)`` expressions |
18:25:47 | FromGitter | <krux02> and not everything can be created with quote do |
18:26:03 | FromGitter | <krux02> quote do always creates nnkStmtList |
18:26:09 | FromGitter | <krux02> not always what you want |
18:27:48 | FromGitter | <adamrezich> the whole point of this is to cut down on code duplication and make defining game logic and stuff as simple and DSL-like as possible. I want to make it so users of this game engine can quickly define "event types": a tuple containing the event, and a proc type that takes in an Elem (game object) and said tuple type. this part works fine, but I want to take it a step further and allow users to easily create lambdas |
18:27:48 | FromGitter | ... of that proc type and pass them to the event system. I wouldn't be worrying about this last part if Nim had the ability to use proc types when declaring lambdas like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59baca24c101bc4e3ac92324] |
18:28:36 | FromGitter | <adamrezich> but you can't do that without metaprogramming in nim for reasons I more or less understand (but I still wish that was a feature, though!) |
18:29:23 | Arrrr | Well is good to learn how to use macros and report bugs. |
18:29:49 | FromGitter | <adamrezich> yeah this was definitely a good excuse to take a couple hours and learn the macro/AST side of Nim c: |
18:29:55 | LyndsySimon | Question - is there a Nim library out there yet specifically for developing RESTful APIs? |
18:30:26 | Yardanico | LyndsySimon, no |
18:30:31 | Arrrr | you can search it: `nimble search rest` |
18:30:33 | Yardanico | specifically for restful apis - no |
18:33:28 | FromGitter | <Araq> @adamrezich isn't that trivially solved with a helper template? |
18:34:05 | Araq | after(getUpComp[TimestepMgr](elem).evTick, OnTick = |
18:34:05 | Araq | # body here |
18:34:05 | Araq | ) |
18:34:47 | LyndsySimon | Yardanico: Interesting. Is that something that would be useful, or is it easy enough that a library isn't needed? |
18:35:18 | Araq | is still full of boilerplate anyway |
18:35:30 | FromGitter | <adamrezich> @Araq: i-is it? like I said, I'm still new to nim's metaprogramming faculties. also can you paste that somewhere? gitter botched it |
18:36:02 | FromGitter | <adamrezich> oh it turned the () syntax into a markdown link lol |
18:36:40 | Araq | still reads like a C++ "inspired" construct |
18:37:31 | Araq | LyndsySimon: does "produces JSON from SQL queries" count as "rest" library? |
18:38:12 | FromGitter | <adamrezich> which part? it's the best system I could come up with for making an event system with user-defined events attached to objects in the scene graph |
18:38:35 | FromGitter | <adamrezich> though I have been trying to be more nim-like, cutting down on ptrs and using refs where it makes sense haha |
18:39:40 | Yardanico | can't you just do something like myObject.on(Tick): body ? |
18:39:48 | Yardanico | and on would be some macro or template |
18:42:46 | Yardanico | and generate all boilerplate yourself :) |
18:43:31 | * | haha_ joined #nim |
18:59:24 | FromGitter | <ephja> @krux02 I sometimes discard the statement list if necessary |
19:03:08 | * | couven92 quit (Ping timeout: 246 seconds) |
19:08:47 | FromGitter | <adamrezich> @Yardanico that would require the event system to be even more generic than it is but I think that's what I'm going to move towards |
19:08:56 | Yardanico | well why? no |
19:09:13 | Yardanico | you would store some const variables and read them from macros to generate all the stuff you have now |
19:09:40 | FromGitter | <adamrezich> well also elements don't have events, components do, because i went down that crazy architectural route lol |
19:10:15 | FromGitter | <adamrezich> this all sounds really complicated but it's actually working really well and i'm enjoying writing it in nim |
19:10:23 | Araq | yeah don't do that. events are hard to debug. ;-) |
19:10:58 | FromGitter | <adamrezich> true! |
19:11:04 | Araq | why? because they turn control flow into data flow. |
19:11:34 | Araq | all the debugging tools attack control flow. |
19:12:26 | LyndsySimon | Araq: I'd say that's part of it (i.e., serializing/deserializing from SQL). There are other parts though, like dealing with pagination, enveloping, and error handling. Maybe even auth[n|r], depending on how thin you're trying to keep the library. |
19:12:57 | Yardanico | jester + ornim ? :P |
19:13:01 | Yardanico | + some stuff |
19:13:11 | * | haha_ quit (Quit: haha_) |
19:13:19 | Araq | ormin is vaporware but I'm testing it now... |
19:13:31 | Yardanico | well would it be possible to add async to it? |
19:14:10 | Araq | oh yeah that's planned too but requires more changes -.- |
19:14:32 | Yardanico | well you're free to do everything you want to do :) |
19:15:36 | Araq | LyndsySimon: pagination is just 'order by foo desc; limit 10 offset 20' :P |
19:15:55 | * | claudiuinberlin joined #nim |
19:15:59 | Araq | error handling is try: ... except: sendError(getCurrentExceptionMsg) |
19:16:09 | Araq | auth is hard... |
19:17:00 | Yardanico | https://github.com/dom96/jester/issues/26 |
19:17:28 | Yardanico | well but you'll still have to implement auth yourself :P |
19:18:34 | Araq | we need a jsongen library |
19:18:55 | Araq | sucks to produce a JSON in memory representation only to render it to strings anyway |
19:19:20 | Yardanico | Araq, also, some question about ornim - will it always parse .sql file, or maybe in some future you would be able to declare your DB tables from Nim? |
19:19:46 | * | haha_ joined #nim |
19:19:57 | Yardanico | ah, soorry, ormin, not ornim |
19:20:00 | Araq | Yardanico: good question, I'm not too happy with the helper exe that parses the SQL |
19:20:39 | Araq | it's a weird setup that will cause problems for nimble package management etc |
19:22:26 | * | couven92 joined #nim |
19:23:16 | Araq | I think yeah, we should have a DSL for table creation too |
19:24:06 | FromGitter | <ephja> a DSL for DSLs? |
19:24:19 | Yardanico | lol |
19:24:25 | Yardanico | hmm, actually SQL is a DSL? |
19:27:11 | Araq | ephja: SQL is easy to improve upon. |
19:27:41 | Araq | for example, make 'not null' the default for every field declaration... *cough* |
19:28:15 | Yardanico | xDDD |
19:28:20 | Araq | standardize on a "ID primary key auto increment" syntax. |
19:28:37 | Araq | standardize the 'references table(column)' syntax |
19:29:31 | FromGitter | <ephja> does standard SQL not cover these aspects or do engines often diverge from it anyway? |
19:29:53 | Araq | standard SQL is pretty weak and the db engines shit on it |
19:30:12 | Araq | that means "both". |
19:32:49 | * | Matthias247 quit (Read error: Connection reset by peer) |
19:40:59 | LyndsySimon | Araq: One way to do pagination is through limit/offset, yes - but not the only way. For instance, it may be necessary to ensure that subsequent pages do not return records that were sent on previous pages. |
19:41:24 | LyndsySimon | Araq: To be clear, I'm not saying that's a requirement for anything I'm working on right now - but it is something that I've had to do in the past, and something that other languages' libraries support. |
19:42:02 | Araq | sure but I pagination can get tricky so I'm not sure how far it can be abstracted |
19:42:07 | * | LyndsySimon nods |
19:42:29 | Araq | it's so hard DBs support it out of the box with limit/offset ;-) |
19:42:37 | LyndsySimon | Yeah, I'm not trying to nail down the details. I'm really just looking for a project I can sink my teeth into so I can come up to speed in Nim. |
19:42:38 | * | Jesin joined #nim |
19:43:12 | * | LyndsySimon remembers dealing with it manually in MS SQL Server. |
19:43:25 | LyndsySimon | MS SQL didn't get limit/offset support until 2012, I want to say. |
19:43:46 | LyndsySimon | It's still not part of ANSI SQL, is it? |
19:44:35 | Araq | not sure, ANSI SQL is like ANSI C. yes there is a standard but there also only a handful of implementations so you can safely ignore it |
19:46:15 | Araq | actually it's like most standards. who cares if it adheres to the HTML spec when all the browser agree on it. the spec will adapt soon enough to the real world. |
19:46:51 | * | Araq doesn't believe in standards. |
19:53:35 | * | ipjk joined #nim |
19:54:15 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:55:48 | * | nsf joined #nim |
19:59:08 | * | chemist69 quit (Ping timeout: 246 seconds) |
20:00:12 | * | Matthias247 joined #nim |
20:03:30 | * | claudiuinberlin joined #nim |
20:11:29 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
20:11:38 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:13:18 | * | miran quit (Remote host closed the connection) |
20:16:14 | * | Jesin quit (Quit: Leaving) |
20:17:48 | * | chemist69 joined #nim |
20:17:59 | * | haha_ quit (Quit: haha_) |
20:19:51 | * | Yardanico quit (Remote host closed the connection) |
20:21:08 | LyndsySimon | I'm struggling to understand how this works: https://github.com/nim-lang/Nim/blob/devel/lib/impure/db_postgres.nim#L503-L523 |
20:21:27 | LyndsySimon | The "connection" parameter doesn't seem to be used for anything as far as I can tell. |
20:22:01 | TjYoco | the same proc is used for like 4 different db's |
20:22:25 | TjYoco | so if you switch to another one you still just call open |
20:22:43 | LyndsySimon | Right, that makes sense. So it's just a case of maintaining the same functional signature? |
20:23:03 | * | claudiuinberlin joined #nim |
20:23:27 | TjYoco | Yeah, it was in Nim in Action, I'm pretty sure thats what it said. |
20:24:05 | LyndsySimon | Gah. I didn't even see the note in the docstring :( |
20:24:58 | Araq | in retrospect I would do it differently. it's not really useful to have the same API for 'open' |
20:26:12 | LyndsySimon | Fair. Do you take PRs on GitHub? |
20:36:10 | Araq | always. |
20:36:28 | LyndsySimon | https://github.com/nim-lang/Nim/pull/6381 |
20:36:54 | LyndsySimon | It's a tiny, ridiculously small change - but I figure it's better to submit it as a PR than to demand someone else fix it. |
20:37:20 | Araq | er ... this is needs to be fixed differently then |
20:37:30 | LyndsySimon | That works too :) |
20:37:54 | Araq | "host=localhost dbname=dbname" # you need to construct this string in 'open' |
20:38:15 | Araq | I take it back, a unified open proc is awesome for reasons like this |
20:38:17 | LyndsySimon | Hmm? I tested it locally and it works. |
20:38:28 | Araq | yes it works, but it's not correct |
20:38:44 | Araq | that's nuking the abstraction |
20:38:48 | LyndsySimon | OK. Let me know if I can correct it, or if I should leave it alone. |
20:39:01 | Araq | try to understand what I mean |
20:39:18 | Araq | let db = open("localhost", "user", "password", "dbname") # this is how it is supposed to work |
20:39:28 | Araq | # currently the 'localhost' is IGNORED |
20:39:37 | Araq | that's the bug |
20:40:04 | Araq | within open you need to construct the |
20:40:07 | LyndsySimon | Gotchya. I understand the concept of what needs to be done, then. I lack a few pieces of information but i can get them. |
20:40:22 | Araq | 'host=localhost dbname=dbname' part |
20:41:07 | * | salewski quit (Quit: WeeChat 1.4) |
20:41:10 | * | LyndsySimon nods |
20:42:55 | LyndsySimon | The connection param is intended to be in the format `<hostname>:<port>`, correct? E.g. `localhost:5432` in the default case? |
20:43:08 | Araq | yes |
20:43:53 | * | gokr joined #nim |
20:44:10 | LyndsySimon | Great. Outside the scope of this discussion, have you considered supporting URI-style configuration in the standard library? |
20:44:26 | Araq | ugh, the doc comment says |
20:44:37 | Araq | ## Example: |
20:44:37 | LyndsySimon | E.g.: `open("postgresql://username:password@localhost:5432/dbname")` |
20:44:37 | Araq | ## con = open("", "", "", "host=localhost port=5432 dbname=mydb") |
20:45:18 | Araq | no, we want less string parsing, not more |
20:45:47 | Araq | the wrappers do not support runtime switching between DBs anyway |
20:46:01 | * | LyndsySimon nods |
20:46:30 | * | mahmudov quit (Remote host closed the connection) |
20:46:33 | Araq | there is a nimble package for that though. then your app depends on sqlite.dll, postgre.dll and mysql.dll at the same time, a hallmark of good engineering |
20:47:16 | LyndsySimon | If I build the string in `open`, should I also check to ensure that the host and port are not already specified in the `database` parameter? Not doing so would break backward compatibility. |
20:47:59 | Araq | you break compat by checking the 'database' parameter, I think |
20:48:04 | LyndsySimon | Let me know if I'm asking too many questions, by the way. I'm definitely off on a tangent, but it is helping me understand things. |
20:48:41 | Araq | you need to continue to support what the docs show, aka connection empty, stuff cooked up in the dbname section |
20:49:08 | FromGitter | <zacharycarter> hoping someone can help me figure out why this code is not exiting the while loop - https://gist.github.com/zacharycarter/dbb8a2561f64fe67ada0edb0e1d538d6#file-nimrl-nim-L53-L95 |
20:51:48 | TjYoco | echo your queue.len in the while loop. Maybe checkValidity isnt working and you keep adding 4 for every 1 you pop |
20:52:12 | Arrrr | I have seen something strange: |
20:52:14 | FromGitter | <zacharycarter> yeah that is probably the case |
20:52:24 | FromGitter | <zacharycarter> as the queue seems to be growing like crazy |
20:52:28 | Arrrr | This inside your while: dungeon[coord.column, coord.row] = CellKind.Floor |
20:52:37 | Arrrr | And this inside your check: dungeon[column, row].kind != CellKind.Floor |
20:52:54 | Arrrr | i don't understand why is there a kind but not in the other place |
20:53:01 | FromGitter | <zacharycarter> ooo good catch |
20:53:08 | FromGitter | <zacharycarter> oh wait |
20:53:14 | FromGitter | <zacharycarter> because one is an assignment and one is checking the property |
20:53:17 | FromGitter | <zacharycarter> if you look further up in the code |
20:53:28 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59baec48177fb9fe7ec02fc4] |
20:53:57 | FromGitter | <zacharycarter> TjYoco: yeah I'm thinking that's what's happening I'm just not sure why... |
20:54:34 | Araq | zacharycarter: it's an interesting bug, add a duplicate check |
20:54:49 | FromGitter | <Bennyelg> @zacharycarter What does `[]` and `[]=` means |
20:54:58 | FromGitter | <Bennyelg> and how do you call them |
20:55:06 | Araq | var traversed = initHashSet[(int, int)]() |
20:55:07 | FromGitter | <zacharycarter> Araq: what do you mean a duplicate check? |
20:55:22 | Araq | if traversed.containsOrIncl((x, y)): |
20:55:29 | Araq | echo "cycle? ", x, y |
20:55:48 | FromGitter | <zacharycarter> I'll try that thanks Araq |
20:56:17 | Araq | btw I love Nim's containers |
20:57:05 | Arrrr | I have written code like this before, move the CellKind.Floor assignment inside your ifs to gain speed. |
20:57:23 | FromGitter | <zacharycarter> |
20:57:27 | FromGitter | <zacharycarter> thanks for the protip |
20:57:31 | Araq | if checkValidity(dungeon, coord.column, coord.row - 1): |
20:57:31 | Araq | queue.addLast((coord.column, coord.row - 1)) |
20:57:44 | Araq | 4 times copied and pasted with minor modifications? |
20:57:51 | FromGitter | <zacharycarter> yeah |
20:58:01 | Araq | use a template here |
20:58:09 | Araq | eliminates typos |
20:58:17 | FromGitter | <zacharycarter> good idea |
20:59:20 | FromGitter | <zacharycarter> @Bennyelg they are operator overrides |
21:01:16 | Arrrr | maybe is a bug in queue |
21:05:13 | FromGitter | <zacharycarter> Maybe |
21:05:18 | Arrrr | I compiled it in playground with the change i suggested and it works https://play.nim-lang.org/?gist=340671337ddf5a97bd252e014be5b8fb |
21:05:32 | Arrrr | less checks i suppose |
21:06:25 | FromGitter | <zacharycarter> Awesome thank you! |
21:08:03 | * | Vladar quit (Quit: Leaving) |
21:12:03 | LyndsySimon | I'll be glad when the staticly-typed nature of Nim is more natural to me :( |
21:12:30 | LyndsySimon | I'm calling a proc, and I want to pass an argument only if that argument is not an empty string; if it is an empty string I want to pass that argument as nil. |
21:12:51 | * | xet7 quit (Remote host closed the connection) |
21:15:38 | Araq | proc p(param = "") |
21:15:45 | Arrrr | (if str == "": string(nil) else: str) |
21:16:56 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
21:17:27 | Araq | Arrrr: string(nil) will cease to exist |
21:17:40 | Arrrr | why is that |
21:17:46 | * | vlad1777d quit (Ping timeout: 255 seconds) |
21:19:15 | * | MyMind joined #nim |
21:20:20 | Arrrr | I suppose you are going to init seqs and strings by default. Will {.noinit.} work for them? |
21:20:23 | * | gokr left #nim (#nim) |
21:21:05 | * | Sembei quit (Ping timeout: 240 seconds) |
21:27:46 | LyndsySimon | Araq: Here you go, round 2 - https://github.com/nim-lang/Nim/pull/6381 |
21:27:53 | Araq | "" will be mapped to 'nil' internally, Arrrr |
21:27:53 | * | vlad1777d joined #nim |
21:28:11 | Araq | btw len(s) for s.isNil returns 0 already |
21:28:18 | Araq | and does so since quite some time |
21:28:35 | * | relax quit (Ping timeout: 240 seconds) |
21:28:42 | Araq | maybe later we'll get a different string implementation |
21:29:34 | Araq | but having both nil and "" sucks, always makes for subtle differences nobody should care about. if you do care, use an Option type |
21:30:25 | Araq | LyndsySimon: looks good |
21:30:35 | LyndsySimon | Woot! |
21:30:35 | Arrrr | So, will "" consume memory or not, that's the question. |
21:30:41 | * | LyndsySimon celebrates |
21:30:43 | Arrrr | other than pointer that is |
21:31:09 | LyndsySimon | The code is mostly copied from db_mysql, but still. I had to figure out what it was doing, I didn't just copypasta. |
21:32:48 | Araq | LyndsySimon: I suppose 'port' should be a parameter of open too :-) |
21:33:01 | Araq | but that's a PR for another time |
21:33:27 | LyndsySimon | Araq: Yes, I agree. If we take the approach of "less string parsing is better", then that's what I would do to be consistent. |
21:33:32 | Araq | Arrrr: no, we map it to 'nil', newString(0) will continue to allocate though |
21:34:57 | LyndsySimon | You mentioned earlier that the package that lets you use URIs required your app to be dependent upon multiple DBs' DLLs. Is that necessarily the case, though? Couldn't you have compile-time code that parses the connection string and conditionally includes only the library that's appropriate? Assuming of course that the DB URI is not configurable at runtime. |
21:36:26 | Araq | then the type would be static[string], not 'string' |
21:38:36 | Araq | but string based DSLs are suspicious, I know the Nim syntax, I can construct a call like connect(database = "x") # use defaults for the other parameters |
21:38:57 | Araq | but how do I the same in the string literal? it is not obvious |
21:39:56 | Araq | the error messages are also likely worse when I get it wrong, the compiler's error messages are good, ymmv |
21:40:41 | * | couven92 quit (Ping timeout: 240 seconds) |
21:47:34 | * | couven92 joined #nim |
21:51:10 | * | vivus quit (Quit: Leaving) |
22:00:59 | * | elrood quit (Quit: Leaving) |
22:12:44 | FromGitter | <zacharycarter> Arrrr: I'd still like to know why my first post didn't work |
22:12:54 | FromGitter | <zacharycarter> because I don't think your solution gives me the results I'm expecting |
22:13:02 | FromGitter | <zacharycarter> unless there's another bug somewhere else in my code |
22:14:45 | Araq | zacharycarter: replace the queue with a seq to rule out a stdlib bug |
22:15:22 | FromGitter | <zacharycarter> will do |
22:17:12 | * | Trustable quit (Remote host closed the connection) |
22:22:02 | FromGitter | <zacharycarter> must be a bug in my implementation thanks for the suggestion Araq, doesn't work with a seq either |
22:22:30 | Araq | trace it and it should become obvious |
22:22:47 | Araq | there is something we're all missing :-) |
22:28:10 | ipjk | zacharycarter: mind pasting a link so I can have a go at it? |
22:28:17 | FromGitter | <zacharycarter> sure |
22:28:36 | FromGitter | <zacharycarter> I think I know the problem though - Araq hinted at it earlier, the same neighbors are getting added to the queue over and over again |
22:28:59 | FromGitter | <zacharycarter> ipjk: https://play.nim-lang.org/?gist=13389d1a61a89cbaceedc48f66b01b55 |
22:29:26 | Araq | play.nim-lang is so awesome :D |
22:29:32 | FromGitter | <zacharycarter> thank you! :D |
22:29:40 | * | nsf quit (Quit: WeeChat 1.9) |
22:29:40 | Araq | oh yeah |
22:29:53 | Araq | it's your work, good job |
22:30:00 | Araq | can you add c2nim support? |
22:30:14 | FromGitter | <zacharycarter> probably - I'll take a stab at it over the weekend |
22:30:21 | Araq | that would be so cool |
22:30:31 | Araq | often I only need to translate C snippets |
22:30:42 | Araq | and creating a file, running c2nim on it etc is overkill |
22:30:54 | FromGitter | <zacharycarter> yeah that would be super handy I'm often doing the same thing |
22:32:39 | Araq | huh, what's this? word wrap for the editor? is it 2017 already? |
22:34:00 | FromGitter | <zacharycarter> I wish we had a better editor for the playground |
22:36:28 | FromGitter | <zacharycarter> alright finally fully connected caves :D |
22:37:38 | FromGitter | <zacharycarter> https://imgur.com/a/HlLll |
22:47:17 | Araq | I still don't get why your cycle detection doesn't work :-) |
22:47:35 | * | Arrrr quit (Ping timeout: 240 seconds) |
22:51:12 | FromGitter | <zacharycarter> ¯\_(ツ)_/¯ |
22:51:37 | FromGitter | <zacharycarter> time for some other type of dungeon |
22:51:57 | FromGitter | <zacharycarter> BSP I guess |
23:03:09 | * | yglukhov quit (Remote host closed the connection) |
23:08:18 | TjYoco | When I try nimble publish it tells me 'Host key verification failed. fatal: Could not read from remote repository.' |
23:08:39 | TjYoco | I have public_repo checked for my access token, is there anything else I need? |
23:09:02 | Araq | sorry, no idea |
23:09:22 | * | renarc joined #nim |
23:11:42 | couven92 | Araq, any new ideas for the vcc regression bug? |
23:12:03 | Araq | couven92: does it work without -d:release? |
23:12:08 | couven92 | yes |
23:12:33 | dom96 | TjYoco: That sounds like a git error |
23:12:41 | dom96 | Is it setup correctly? |
23:12:53 | * | jsgrant quit (Ping timeout: 255 seconds) |
23:13:30 | TjYoco | dom96 I have setup through VSCode and I can push and pull from remote |
23:14:33 | dom96 | TjYoco: Can you git clone from command line? |
23:14:38 | TjYoco | although... it does say 'Command: git clone [email protected]:Tyler-Yocolano/packages' and my thing isnt called packages, but idk if thats a nimble thing |
23:15:29 | TjYoco | dom96 yeah I just cloned my repo |
23:15:30 | Araq | couven92: try to compile semcalls.c without optimization settings |
23:15:48 | Araq | it used to be easy to do that but I forgot |
23:16:03 | couven92 | {.opt: none.} |
23:16:06 | couven92 | ? |
23:20:21 | Araq | no. |
23:21:21 | couven92 | Yeah, that would have been too easy right? :P Well, would've been nice :P |
23:22:12 | couven92 | Araq, can I run `nim compile -c compiler/nim` and then edit `nimcache/nim.json`? |
23:22:52 | Araq | no |
23:23:35 | couven92 | what is the projectname.json for anyways? just randomly useful metadata or does nim actually use it? |
23:26:53 | Araq | metadata for other tools |
23:27:03 | Araq | nim only produces it, it doesn't consume it |
23:27:22 | couven92 | Araq, I can compile nim with a non-optimized semcalls.c manually from the command-line and see what happens |
23:27:29 | couven92 | but that's really messy :( |
23:28:07 | couven92 | since nim.json tells what I need to do... :) |
23:28:19 | FromGitter | <mratsim> @zacharycarter Is there a bug tracker/feature request on play.nim-lang.org? I would like to see ASM output similar to https://play.rust-lang.org/ or https://gcc.godbolt.org/ to understand where the compiler uses AVX and where I should give him a small nudge. |
23:29:11 | FromGitter | <mratsim> oh, and loop unrolling |
23:30:37 | Araq | couven92: add this to nim.cfg |
23:30:52 | Araq | semcalls.speed = "" |
23:31:02 | Araq | and pray it works :-) |
23:31:15 | couven92 | WOW! okay, let's see :) |
23:31:42 | couven92 | that would be in `compiler/nim.cfg`, right? |
23:37:21 | couven92 | Araq, nope same error |
23:37:41 | Araq | check these options are used please |
23:37:51 | Araq | maybe you need |
23:38:05 | Araq | semcalls.speed = "-O0" or vcc's equivalent |
23:38:50 | TjYoco | It says verified as Tyler-Yocolano, so that should mean my access token worked right? And my repo is public as seen https://github.com/Tyler-Yocolano/nimbomb and my token says "public_repo" not sure what else to try |
23:38:56 | FromGitter | <zacharycarter> @mratsim please just file an issue on github https://github.com/zacharycarter/nim-playground |
23:40:34 | couven92 | Araq, uhm... that's weird... nim does not generate `nimcache/compiler_semcalls.c` at all... is semcalls included somewhere instead of imported? |
23:41:24 | couven92 | which would also mean, that `semcalls.option` can't really work, right? since nim doesn't actually invoke the compiler for semcalls.nim |
23:41:33 | Araq | yeah |
23:41:53 | Araq | nimgrep for it |
23:44:52 | couven92 | Araq, no match? |
23:44:58 | dom96 | TjYoco: Afraid you'll need to create a PR manually |
23:46:45 | couven92 | ah, semcall not semcalls and it's in sem.nim |
23:47:11 | couven92 | so `sem.speed = "/Od"` in the config then? let's see... |
23:49:06 | TjYoco | dom96 could you confirm that it should output: 'Command: git clone [email protected]:Tyler-Yocolano/packages ...' and not '[email protected]:Tyler-Yocolano/nimbomb', my actual package name? As well, I enable every tick mark under the access token and instead of outputting: 'Host key verification failed.', it read: `Permission denied (publickey).' That seems strange... |
23:49:31 | dom96 | yes, it should |
23:50:10 | TjYoco | dom96 whoops thats the nimble packages thing, duh |
23:51:55 | couven92 | Araq, no setting `sem.speed = "/Od"` (with `/Od` being vcc's don't optimize) didn't do it... same error and nim.json shows `/O2` (optimize for speed) |
23:53:06 | Araq | sem.always = ? |
23:56:59 | couven92 | Araq, nope and even with both configs there it doesn't affect anything... (maybe need `compiler` prefix, since it's in compiler? |
23:57:46 | couven92 | AH! maybe do `sem.options.always`... |
23:57:57 | couven92 | like with `vcc.options.always` |