00:00:23 | * | disruptek joined #nim |
00:07:54 | * | cyberjpn joined #nim |
00:16:54 | * | disruptek quit (Read error: Connection reset by peer) |
00:17:37 | * | disruptek joined #nim |
00:33:05 | FromDiscord_ | <demotomohiro> @deech |
00:33:05 | FromDiscord_ | <demotomohiro> !eval import macros;dumptree:echo not 1==1-1 |
00:33:08 | NimBot | StmtList↵ Infix↵ Ident "=="↵ Infix↵ Ident "not"↵ Ident "echo"↵ IntLit 1↵ Infix↵ Ident "-"↵ IntLit 1↵ IntLit 1 |
00:34:55 | FromDiscord_ | <demotomohiro> https://nim-lang.github.io/Nim/manual.html#syntax-precedence |
00:37:04 | FromDiscord_ | <demotomohiro> import macros;dumplisp:echo not 1==1-1 |
00:37:21 | FromDiscord_ | <demotomohiro> !eval import macros;dumplisp:echo not 1==1-1 |
00:37:22 | NimBot | StmtList(Infix(Ident("=="), Infix(Ident("not"), Ident("echo"), IntLit(1)), Infix(Ident("-"), IntLit(1), IntLit(1)))) |
00:46:09 | FromDiscord_ | <demotomohiro> 'echo not 1 == 1 - 1' is 'echo (not 1) == (1 - 1)' |
00:46:09 | FromDiscord_ | <demotomohiro> And 'not 1' is -2 because it is bitwise not. |
00:46:43 | * | kapilp joined #nim |
00:57:02 | * | sz0 quit (Quit: Connection closed for inactivity) |
00:58:58 | * | cyberjpn quit (Ping timeout: 246 seconds) |
01:00:16 | * | elronnd joined #nim |
01:07:12 | * | elronnd is now known as Elronnd |
02:02:06 | * | banc quit (Quit: Bye) |
02:02:49 | leorize | Araq: devel is failing https://travis-ci.org/nim-lang/Nim/builds/538017333 |
02:04:43 | * | thomasross joined #nim |
02:13:00 | * | ftsf joined #nim |
02:17:31 | * | deech quit (Ping timeout: 258 seconds) |
02:26:16 | * | couven92 quit (Read error: Connection reset by peer) |
02:26:24 | * | banc joined #nim |
02:27:48 | leorize | narimiran: your fixing attempts backfired :p https://travis-ci.org/nim-lang/Nim/jobs/538017334#L4997 |
02:32:13 | * | rnrwashere joined #nim |
02:40:44 | * | rnrwashere quit (Remote host closed the connection) |
02:41:20 | * | rnrwashere joined #nim |
02:45:34 | * | rnrwashere quit (Ping timeout: 252 seconds) |
02:57:09 | * | dddddd quit (Remote host closed the connection) |
03:08:50 | * | rnrwashere joined #nim |
03:40:59 | * | rnrwashere quit (Remote host closed the connection) |
03:41:39 | * | rnrwashere joined #nim |
03:45:04 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
03:45:34 | * | laaron joined #nim |
04:12:54 | * | theelous3 quit (Ping timeout: 258 seconds) |
04:18:09 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:34:25 | * | nsf joined #nim |
04:56:58 | * | Guest93678 quit (Ping timeout: 246 seconds) |
05:02:05 | * | Senketsu quit (Quit: WeeChat 2.4) |
05:10:31 | * | rnrwashere quit (Remote host closed the connection) |
05:21:08 | * | leorize quit (Quit: WeeChat 2.3) |
05:23:03 | * | laaron quit (Remote host closed the connection) |
05:24:51 | FromGitter | <rishavs> When I declare a global variable in Nim, all my children modules get to use it automatically or do I need to do something to use them? ⏎ ⏎ My project structure is; ⏎ Main.nim ⏎ ... [https://gitter.im/nim-lang/Nim?at=5cecc62383ae782aeee28074] |
05:26:50 | * | laaron joined #nim |
05:30:13 | * | narimiran joined #nim |
05:34:29 | FromGitter | <Varriount> @rishavs "use" isn't a valid keyword |
05:35:02 | FromGitter | <rishavs> i was paraphrasing there. sorry about it. I used the var as `echo x` |
05:45:33 | * | kapilp quit (Quit: Connection closed for inactivity) |
05:46:48 | * | leorize joined #nim |
05:47:50 | FromGitter | <rishavs> If you see the repl.it i have linked you can see a simple bit of code simulating my problem |
05:49:01 | leorize | rishavs: no, globals don't work like that |
05:49:24 | leorize | their scope is the same as for functions |
05:49:52 | leorize | if you wanted to use it outside, you'd have to import the module containing it & have that variable exported |
05:49:56 | FromGitter | <rishavs> ah, so it isn't a fully global variable. Do i nee dto export it explicitly? |
05:50:08 | leorize | yep |
05:50:17 | leorize | it's as global as a function would be |
05:51:07 | FromGitter | <rishavs> I cant import my main module in my child module as that would be a recursive import. Can you look at the repl here and show me how i should go about it? https://repl.it/repls/QuizzicalFabulousRom |
05:51:44 | leorize | mind you, `mod` is a keyword :p |
05:53:29 | leorize | rishavs: that example doesn't compile |
05:53:31 | FromGitter | <rishavs> learned it the way. Raised a bug on that |
05:53:52 | FromGitter | <rishavs> https://repl.it/repls/GrandioseThunderousBoards |
05:53:55 | FromGitter | <rishavs> wrong repl!!! |
05:54:13 | leorize | https://nim-lang.github.io/Nim/manual#modules |
05:54:14 | FromGitter | <rishavs> sorry, i linked to one i used to add a bug in github for the mod issue |
05:54:16 | leorize | ^ see that one |
05:55:08 | leorize | https://repl.it/repls/SentimentalStrictMaintenance |
05:56:33 | FromGitter | <rishavs> thats very interesting. So the placement of my import statement is important |
05:56:43 | FromGitter | <rishavs> I am so used to just put it at the top |
05:56:43 | FromGitter | <rishavs> :D |
05:57:09 | leorize | narimiran: you know you could just restart the build from travis console, right? :p |
05:57:44 | leorize | I'm not sure if I'd need to rebase the branch for it to test the latest commit |
05:59:59 | narimiran | leorize: yeah, but i can't do the same for appveyor, so it is easier for me to just go through various PRS and close-open them |
06:01:01 | narimiran | leorize: btw, those stupid errors are one more evidence that i should not try to fix anything when i'm tired |
06:01:47 | leorize | :p |
06:02:49 | leorize | if anyone is interested, I could add windows to travis :p |
06:02:57 | leorize | this ci thing is kinda fun |
06:07:25 | Araq | rishavs: put your imports at the top and don't use recursive module dependencies. |
06:07:48 | Araq | you cannot fake what you don't have -- modularity, so you might as well use 'include' instead. |
06:07:50 | Zevv | leorize: you allright? |
06:08:10 | leorize | ? |
06:08:20 | Zevv | "this ci thing is kinda fun" |
06:08:34 | * | solitudesf joined #nim |
06:09:00 | FromGitter | <rishavs> Thanks Araq. will give include a try |
06:09:08 | leorize | Zevv: writing automated jobs is fun :p |
06:09:14 | leorize | learned a bit of docker on the way |
06:09:18 | Zevv | at my job CI is reason #1 for grown men crying like babies |
06:10:10 | leorize | I'm a packager :p writing automated script is kind of a specialty |
06:10:52 | Zevv | I bet you're worth a lot of $$$ with that skills and patience :) |
06:12:28 | leorize | ;) |
06:13:40 | * | seerix quit (Remote host closed the connection) |
06:14:29 | narimiran | Zevv: he is still in school, remember? ;) |
06:15:20 | Zevv | oh, right, I forgot |
06:16:28 | narimiran | leorize: if you're having fun with CIs, more optimizations like you did recently where you speed them up would be welcome :) |
06:17:06 | leorize | I think I squeezed the most out of them :p |
06:17:11 | leorize | virtualized hardware can only get so far |
06:17:32 | leorize | MS have this azure pipelines thing |
06:17:47 | leorize | but no published specs, so I don't know if their hw is better than travis' |
06:20:41 | narimiran | from what i heard, travis was sold to some company which fired most of its developers, so now people recommend either circle ci or azure pipelines.... |
06:21:49 | leorize | azure seems to be a better deal |
06:24:44 | Araq | leorize: can't reproduce these failures |
06:25:14 | leorize | Araq: narimiran pushed some fix recently |
06:25:27 | leorize | you'd need to wait for the next CI job to finish |
06:26:24 | Araq | ah! |
06:26:34 | Araq | so ... narimiran skips the review process |
06:26:36 | Araq | :P |
06:26:54 | Araq | and has trouble with closing ''' |
06:26:59 | Araq | that explains a lot ;-) |
06:28:56 | narimiran | Araq: yeah, narimiran should stop working and go to bed when tired ;) |
06:29:20 | Araq | won't blame you for that, I do the same |
06:29:56 | narimiran | btw, devel is now green, yaaay for morning freshness :) |
06:30:33 | Zevv | leorize: have we ran the complete CI job through a `perf record` yet? |
06:30:52 | leorize | nope |
06:31:19 | Zevv | well, here we go |
06:32:26 | * | PMunch joined #nim |
06:32:29 | leorize | azure only have 2 cpu cores as well |
06:32:34 | leorize | I doubt that it could be any faster |
06:43:58 | Zevv | http://zevv.nl/div/perf-test.png, for what it's worth |
06:44:11 | * | salewski joined #nim |
06:45:41 | salewski | narimiran, the new homepage is really not that great. Look is less friendly compared to former release, |
06:45:57 | salewski | and textual contend is not great also. |
06:46:07 | narimiran | salewski: PRs welcome ;) |
06:46:18 | salewski | I suggestest already to hire an expert maybe. |
06:46:28 | salewski | See my draft on forum. |
06:47:20 | salewski | I would regard that as much better personally, and it is hacked togeter in 30 minutes |
06:47:33 | leorize | hmm azure built csources in 32s |
06:47:34 | salewski | from a non native speaker. |
06:47:39 | salewski | Bye. |
06:51:08 | PMunch | Hmm, my Nimble doesn't appear to run "before" rules |
06:53:24 | Araq | salewski: hi |
06:55:36 | PMunch | I kinda agree with salewski, although I'm not entirely sure what he means by unfriendly. And the Julia in a Nutshell page is about the most boring page I've seen in a while. I did think to myself though as I read through the new content that maybe the grouping wasn't the best idea. This way you will start reading about one part of the language, which seems like the most important one, because it's on the top. And as you read the list it gets less and less |
06:55:36 | PMunch | interesting. At least until the next category, which has more cool features in it, before it too drags on a bit. |
06:56:54 | PMunch | And someone mentioned yesterday that they would like to see more mentions of the type system, which I agree would be nice (plus of course the macro system, but that's a bit harder to show in a short snippet) |
06:57:41 | salewski | Hi Araq, I looked at the generatet assembler of the ^ operator. No surprise for me, as it is not inlined :-) |
06:58:07 | FromGitter | <alehander42> what about julia in a nutshell :O |
06:59:25 | salewski | PMunch: Unfriendly nearly black background, and long text fragments. And not all understandable for every one. |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:02 | salewski | The first page should never give too much details... |
07:00:04 | PMunch | Oh yeah, I'm not sure I like how big the dark field got either.. |
07:01:00 | PMunch | Hmm, so what about having "cards", ie. smaller text snippets about a feature, that links, or opens up, to more content on that same feature? |
07:01:32 | PMunch | Pique the interest of the reader with the coolest stuff, then get them clicking as soon as possible to drive engagement? |
07:02:08 | Araq | salewski, it should be specialized in most optimizers worth their money |
07:03:23 | Araq | I don't want to have static[T] handwritten specializations everywhere in 2019 |
07:03:52 | salewski | Yes I understand. |
07:04:14 | Araq | and also, the optimization is worthwile to do at runtime too |
07:04:25 | * | gmpreussner joined #nim |
07:04:39 | Araq | if you don't know the value at compile-time, but it turns out to be 2 or 3 at runtime we also like the faster path |
07:04:49 | Araq | that's why we went with this solution |
07:05:18 | Araq | about the website, I think it's going in the right direction |
07:05:25 | Araq | but your suggestions are good too. |
07:05:39 | salewski | Fine. |
07:05:48 | Araq | however, we need to be careful to not have *too* much text, nobody then reads it |
07:06:00 | * | krux02 joined #nim |
07:06:23 | PMunch | Yeah that's part of our concern now. It looks a bit daunting when you first open it |
07:06:49 | salewski | That is true. But latest version has already too much text, with too much details. |
07:09:07 | salewski | And I like some short whole sentences better than just fragments. |
07:10:19 | salewski | Fragments are ok for a teaching lession in a classroom, where teacher explains it. |
07:10:56 | zestyr | I agree the new version went more in the "wall of text" direction rather than a clean but still informative landing page like before |
07:19:02 | * | nc-x joined #nim |
07:19:54 | nc-x | i don't have any particular opinion of whether we need a wall of text or not but i wouldn't use the word "universal" to describe nim. |
07:20:07 | nc-x | because there is no accepted definition of universal |
07:21:27 | nc-x | and if you use the word universal, all the comments on hn/reddit would be picking on it (just like - the "first" native compiled language with hcr - had most comments about lisp and whatever) |
07:22:24 | salewski | Universal means "there is no real restriction". But ok, maybe only "for systems and application programming" |
07:22:53 | FromGitter | <kayabaNerve> I'm more offended about the lack of Oxford commas than the new design |
07:25:01 | salewski | Have to leave now, bye. |
07:25:04 | * | salewski quit (Quit: WeeChat 2.3) |
07:25:20 | FromGitter | <kayabaNerve> I also highly question that Nimbus description. |
07:25:32 | narimiran | kayabanerve: "efficiency, expressiveness, and elegance." |
07:26:00 | nc-x | Can anybody check the nim website on mobile? |
07:26:30 | nc-x | is the top bar with all the links to different pages moving or is it stuck? |
07:26:50 | nc-x | for me it is stuck so half the links are inaccessible |
07:27:05 | leorize | nc-x: scroll it sideways |
07:27:12 | nc-x | not working |
07:27:20 | nc-x | leorize: ^^^ |
07:27:36 | leorize | weird, it works for me here |
07:27:53 | nc-x | Also the examples are too low now on mobile. |
07:28:12 | nc-x | people might not scroll that down. |
07:28:58 | nc-x | leorize: which browser? I am on latest chrome. |
07:29:02 | leorize | narimiran: have fun :) https://travis-ci.org/nim-lang/Nim/jobs/538017335#L7856 |
07:29:14 | * | dddddd joined #nim |
07:29:49 | leorize | nc-x: oh, something changed recently |
07:29:53 | leorize | not working here as well |
07:29:58 | leorize | both bromite & firefox |
07:30:15 | nc-x | narimiran: ^^^ |
07:30:16 | narimiran | nc-x: shit, it was working yesterday. |
07:30:20 | narimiran | will fix it |
07:30:59 | nc-x | 👍🏻 |
07:31:32 | * | cyberjpn joined #nim |
07:33:14 | * | nc-x quit (Quit: Page closed) |
07:39:25 | FromGitter | <rishavs> as a somewhat new user (i did try nim years ago), i much prefer the new site. ON mobile however, the snippets do not follow the actual feature section so its harder to digest |
07:42:52 | FromGitter | <alehander42> i think i like the text but probably |
07:43:00 | FromGitter | <alehander42> it can add some of the suggestions |
07:43:08 | * | stefanos82 joined #nim |
07:43:24 | FromGitter | <alehander42> i also dont get the nimAsgn..v2 |
07:43:30 | FromGitter | <alehander42> missing ting |
07:43:47 | FromGitter | <alehander42> with os:standalone |
07:43:55 | FromGitter | <alehander42> do i need to change how strs.nim is included |
07:44:40 | FromGitter | <alehander42> is gcDestructors implied? |
07:46:26 | * | slugm joined #nim |
07:46:39 | narimiran | re website: if y'all can gather all your suggestions in one place (e.g. https://forum.nim-lang.org/t/4880) it will be easier to fix/update the website |
07:48:25 | * | slugm left #nim (#nim) |
07:49:21 | * | kapilp joined #nim |
07:49:48 | * | matt-m joined #nim |
07:54:07 | * | hoijui joined #nim |
08:12:55 | PMunch | @Vindaar, just updated the persistent vector library. There were some bugs in the slicing operator that should all be fixed now :) |
08:18:13 | * | Kaivo quit (Ping timeout: 246 seconds) |
08:19:19 | * | Kaivo joined #nim |
08:27:30 | * | neceve joined #nim |
08:35:19 | FromGitter | <alehander42> hm i get weird behavior in copyString, have to try -useMallc |
08:35:24 | FromGitter | <alehander42> malloc* |
08:39:24 | leorize | azure can complete a CI round in 30m |
08:39:28 | leorize | that's rather impressive |
08:40:29 | FromGitter | <alehander42> how much for travis? |
08:40:46 | leorize | 38m43s |
08:41:35 | leorize | for those interested: https://dev.azure.com/alaviss/Nim/_build/results?buildId=8 |
08:41:52 | leorize | I only run for linux to compare |
08:43:36 | leorize | it doesn't have the nice output folding function of travis though |
08:45:14 | Zevv | maybe we should make the output of the test run less verbose anyway. What is the use of so much output if all is ok. No news is good news |
08:45:52 | narimiran | leorize: since you're having fun with these - how about circle ci? |
08:47:49 | * | cyberjpn quit (Ping timeout: 244 seconds) |
08:47:57 | leorize | gonna try it out now |
08:48:25 | Zevv | is runCI safe to run at home? |
08:48:37 | leorize | yep |
08:51:36 | leorize | looks like parallelism is implemented by these ci services via splitting tests into multiple ci jobs |
08:51:36 | * | Vladar joined #nim |
08:51:47 | leorize | gonna be quite some work if we want to support that |
09:01:32 | * | ftsf quit (Quit: Leaving) |
09:05:24 | FromDiscord_ | <kodkuce> hmm is there some parser library for jest or asynchttp, for arguments or should i just manual do it ? |
09:05:33 | FromDiscord_ | <kodkuce> hmm is there some parser library for jester or asynchttp, for arguments or should i just manual do it ? |
09:08:33 | Zevv | cgi.decodedata? |
09:09:44 | leorize | kodkuce: what kind of parser? |
09:10:36 | * | floppydh joined #nim |
09:14:12 | FromDiscord_ | <kodkuce> uName = fields.Str(required=True, validate=validate.Length(min=3, max=25)) , something like this , tought now am thinking i am gona anyway use json 99% of time so i can just do if try catch and if json dosnet parse , send invalid request , tought i still need manualy to check lenghts and similar |
09:14:48 | FromGitter | <alehander42> validation library? |
09:15:07 | FromGitter | <alehander42> i am not sure, probably one can make one it would be easy with macro |
09:15:35 | FromGitter | <alehander42> <3 |
09:16:05 | FromGitter | <alehander42> uName = string!(len in 3..25) |
09:16:31 | FromDiscord_ | <kodkuce> yep, i think validation library is the right word :), duno i still dident even try to write a macro, tought will probably do this manual am just doint reg/auth atm |
09:16:52 | FromDiscord_ | <kodkuce> "uName = string!(len in 3..25)" i go test this |
09:17:06 | FromGitter | <alehander42> or ⏎ validate: ⏎ uName: string!(3..25) |
09:17:09 | FromGitter | <alehander42> no no |
09:17:12 | FromGitter | <alehander42> this doesnt work sorry |
09:17:19 | FromGitter | <alehander42> i was just thinking about possible DSL-s |
09:18:14 | FromGitter | <alehander42> otherwise one can still write several simple validation functions and hook them up |
09:18:33 | FromGitter | <alehander42> but i really dont know if somebody did it already |
09:18:44 | FromGitter | <alehander42> look in nimble |
09:19:56 | FromDiscord_ | <kodkuce> yep anyway does nim have like terary operator like var x = weight > 20 ? "skiny" : "fat" ? |
09:19:58 | FromDiscord_ | <kodkuce> yep anyway does nim have like terary operator like var x = weight > 20 ? "skiny" : "fat" |
09:20:13 | FromDiscord_ | <kodkuce> yep anyway does nim have like terary operator like var x = weight < 20 ? "skiny" : "fat" |
09:20:44 | FromGitter | <alehander42> please dont edit your messages in discord #nim |
09:21:10 | FromGitter | <alehander42> i know it's usually very good to do so, but the way the irc bridge works, we get a new message for each |
09:21:15 | FromGitter | <alehander42> otherwise yes |
09:21:18 | FromGitter | <alehander42> if else |
09:21:23 | FromGitter | <alehander42> if weight > 20 : .. else: .. |
09:21:54 | FromGitter | <alehander42> (you can use `fix word*`) |
09:22:18 | FromDiscord_ | <kodkuce> ok sorry i newer thinked about editing and IRC |
09:22:45 | FromGitter | <alehander42> no problem its a strange issue indeed |
09:23:00 | FromGitter | <alehander42> what are you doing? a web app |
09:23:02 | FromGitter | <alehander42> ? |
09:23:33 | Zevv | kodkuce: alehander42 means that the if yields an expression. So you do `var x = if weight < 20: "skinny" else: "fat"` |
09:23:56 | FromDiscord_ | <kodkuce> atm want to do a Auth Reg with JSON token atm |
09:30:24 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
09:33:25 | * | laaron joined #nim |
09:41:21 | * | leorize quit (Remote host closed the connection) |
09:47:16 | * | couven92 joined #nim |
09:48:32 | * | ShalokShalom joined #nim |
09:50:40 | * | leorize joined #nim |
09:54:29 | FromGitter | <alehander42> interesting |
10:09:09 | leorize | narimiran: circle ci is a mess |
10:09:36 | leorize | to use it I'd need to spin my own docker image then upload it to docker hub |
10:09:39 | leorize | no thanks |
10:09:52 | Araq | leorize, in your PR(s) please remember that I'd like to understand the code too and I don't know what 'RUN' is |
10:10:12 | Araq | nor do I want to read code that uses too many Bash ... tricks (?) |
10:10:25 | leorize | not really tricks |
10:10:27 | leorize | just functions |
10:10:51 | leorize | the `run` thing is a function |
10:11:11 | leorize | the default definition for non-docker is to run the command as-is |
10:11:18 | leorize | for docker it runs them in docker |
10:11:29 | Araq | there is RUN vs run and it confuses me :P |
10:11:49 | leorize | the RUN is part of an inline docker file :p |
10:12:11 | * | hoijui quit (Ping timeout: 248 seconds) |
10:12:24 | Araq | tbh I am not even sure where the YAML ends and the Bash script starts |
10:12:43 | FromDiscord_ | <kodkuce> did nim-lang.org just got update? |
10:12:51 | Araq | I hate this "declarative" yaml shit that doesn't work at all and so needs to fallback to Bash |
10:13:12 | * | Vladar quit (Remote host closed the connection) |
10:13:23 | FromGitter | <Vindaar> @PMunch: Oh nice, thank you! |
10:13:40 | * | Vladar joined #nim |
10:16:14 | * | leorize quit (Quit: WeeChat 2.3) |
10:17:31 | narimiran | @kodkuce yep, and it is still work in progress as people are giving their suggestions for (further) improvement |
10:20:21 | FromDiscord_ | <kodkuce> i think it looks nicer now, anyway what hash to use for passwords in db, in python i used that argon2, does nimble have search i go man it |
10:23:26 | FromDiscord_ | <kodkuce> list and grep worked kinda |
10:25:30 | zestyr | `nimble search` is a thing |
10:26:00 | zestyr | I recommend the package nimcrypto |
10:26:47 | FromDiscord_ | <kodkuce> yep i was tarded i searched by name insted by tag |
10:28:42 | Zevv | i searched for sha1 the other day. And did not find nimcrypto |
10:29:17 | Zevv | so its not always obvious |
10:31:19 | zestyr | there's sha1 in the stdlib though |
10:32:43 | PMunch | There is? |
10:32:50 | narimiran | std/sha1 |
10:34:26 | leorize[m] | use nim-libsodium |
10:34:41 | leorize[m] | there are password hashing functions there |
10:34:56 | leorize[m] | @kodkuce ^ |
10:35:11 | Zevv | yeah but its not ment as ea generic sha1. it only outputs hex and does not support update/finish |
10:38:41 | FromDiscord_ | <kodkuce> nice libsodium has argon2 thingy 😃 |
10:41:03 | * | elrood joined #nim |
10:41:09 | FromGitter | <kaushalmodi> Araq: Any hint on why parsetoml was commented out in Nim CI? https://github.com/nim-lang/Nim/commit/af6539b0c3b6958251737d5bc140cbcc8652eb8b |
10:41:45 | narimiran | kaushalmodi see the commit message for a hint :P |
10:41:53 | FromGitter | <kaushalmodi> What needs to be fixed? |
10:42:05 | FromGitter | <kaushalmodi> What can I run locally to see the issue? |
10:43:39 | narimiran | latest devel and then try to do nimble test parsetoml |
10:43:54 | FromGitter | <kaushalmodi> Ok |
10:45:52 | leorize[m] | @Araq I will probably change the `run` into `maybe_in_docker`. Is that more clear? |
10:48:19 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
10:49:17 | * | laaron joined #nim |
10:49:58 | * | laaron quit (Client Quit) |
10:50:40 | * | laaron joined #nim |
10:54:08 | leorize[m] | if needed I can also move the `install` out of the travis matrix |
10:57:36 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
10:57:37 | * | vlad1777d joined #nim |
10:58:47 | Araq | leorize[m], it's clearer but not clear |
10:59:03 | Araq | "maybe_in_docker"? maybe? when? and when not? |
10:59:21 | * | laaron joined #nim |
11:04:03 | * | cyberjpn joined #nim |
11:04:07 | FromGitter | <Vindaar> @kaushalmodi the problem with `parsetoml` now is that it changes the `kind` of a variant object at runtime. Araq fixed that unintended loophole. here: https://github.com/NimParsers/parsetoml/blob/master/src/parsetoml.nim#L952 and here: https://github.com/NimParsers/parsetoml/blob/master/src/parsetoml.nim#L1046 ⏎ I only looked at it for a couple of minutes yesterday and wasn't sure what the best way to fix the code is |
11:04:44 | * | kapilp quit (Quit: Connection closed for inactivity) |
11:05:13 | FromGitter | <kaushalmodi> I don't know variant objects, but would the json module be affected the same way? |
11:05:35 | narimiran | see here: https://github.com/nim-lang/Nim/commit/383147f5cb3db55cde451902d2c11c5cee9df075 |
11:05:54 | * | cyberjpn quit (Client Quit) |
11:07:40 | FromGitter | <alehander42> Pass a var object and directly assign a value with different kind to it |
11:08:00 | FromGitter | <kaushalmodi> Thanks. For future, can a short issue be opened on such 3rd party packages that hints the package dev to such commit that shows how the breaking change on devel could be fixed? |
11:08:00 | FromGitter | <alehander42> That seems like a possible solution to me |
11:08:50 | FromGitter | <kaushalmodi> In this case, I just happened to notice that commented out commit |
11:11:34 | * | rnrwashere joined #nim |
11:12:29 | leorize[m] | Araq: http://ix.io/1KgY <-- here's an alternative config |
11:14:50 | leorize[m] | I haven't tested it yet though |
11:15:33 | leorize[m] | probably won't work as is, but the final result will be similar |
11:16:22 | * | rnrwashere quit (Ping timeout: 276 seconds) |
11:32:58 | * | deech joined #nim |
11:49:01 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
11:49:45 | * | laaron joined #nim |
11:56:27 | * | hoijui joined #nim |
12:14:02 | narimiran | @alehander42 "i think one can talk a bit more about the type system, it seems underrated to me" --> any suggestion what to add and how to expand it? (for uninitiated: this is for our landing page on the website) |
12:17:59 | leorize[m] | narimiran: omg circle ci chew through csources in 8s |
12:18:10 | narimiran | :) |
12:19:19 | narimiran | so we have travis in 38 min, azure in 30 min, and circle in ..... |
12:19:40 | leorize[m] | still running :p |
12:20:29 | PMunch | narimiran, well now the landing page barely mentions the type system at all |
12:21:14 | narimiran | PMunch: i'm working on the improvements and would like to improve that part too, but i'm out of ideas |
12:22:00 | PMunch | I'll try to think of something |
12:24:24 | * | Snircle joined #nim |
12:25:04 | leorize[m] | I know why nodejs tests fail on 32 bit now :p |
12:25:06 | leorize[m] | ubuntu xenial uses nodejs 4.2 |
12:28:01 | narimiran | btw, is there a reason why we're not on 18.04? would something else break? |
12:29:14 | leorize[m] | because travis don't have anything newer than xenial |
12:32:00 | * | solitudesf quit (Ping timeout: 248 seconds) |
12:35:13 | * | leorize joined #nim |
12:42:58 | shashlick | CI is painful since it is so slow to debug |
12:44:21 | shashlick | Mostly cannot run locally to verify it things are correct |
12:44:40 | * | hoijui quit (Ping timeout: 268 seconds) |
12:44:41 | * | matt-m quit (Remote host closed the connection) |
12:45:14 | * | matt-m joined #nim |
12:45:53 | * | NimBot joined #nim |
12:51:03 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
12:51:35 | * | laaron joined #nim |
12:57:13 | Araq | # believe it or not, the direct check for ``containsOrIncl(c, a, b)`` |
12:57:13 | Araq | # increases bootstrapping time from 2.4s to 3.3s on my laptop! |
12:57:21 | Araq | ^ those were the days... |
12:57:30 | Araq | Nim bootstraps on 2.4s on my laptop |
12:57:41 | Araq | now it's at 5s ? |
12:58:01 | narimiran | revert all the commits!!11!!!1! :P |
12:59:27 | narimiran | or a better way - just remove three of those `containsOrIncl` and boom, instant 2.7 sec improvement! math checks out! |
12:59:47 | narimiran | optimizations are easy! |
13:05:37 | * | theelous3 joined #nim |
13:12:54 | FromGitter | <alehander42> rewrite nim man |
13:12:55 | FromGitter | <alehander42> in rust |
13:12:56 | FromGitter | <alehander42> duh |
13:12:57 | FromGitter | <alehander42> obvious |
13:13:46 | * | Vladar quit (Read error: Connection reset by peer) |
13:14:04 | * | apodo joined #nim |
13:17:33 | * | nsf quit (Quit: WeeChat 2.4) |
13:24:18 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
13:25:30 | * | laaron joined #nim |
13:41:03 | leorize[m] | Araq: what do you think about the alt config? |
13:43:33 | Araq | please give me the link once again |
13:43:59 | Zevv | http://ix.io/1KgY |
13:45:20 | Araq | looks good |
13:47:16 | * | lritter joined #nim |
13:50:52 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
13:51:59 | * | rnrwashere joined #nim |
13:53:02 | * | laaron joined #nim |
14:00:50 | * | Senketsu joined #nim |
14:01:27 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
14:01:50 | * | laaron joined #nim |
14:04:02 | * | laaron quit (Client Quit) |
14:05:14 | * | laaron joined #nim |
14:06:54 | * | rnrwashere quit (Remote host closed the connection) |
14:07:32 | * | rnrwashere joined #nim |
14:11:58 | * | rnrwashere quit (Ping timeout: 252 seconds) |
14:13:59 | * | vivus joined #nim |
14:14:57 | FromDiscord_ | <kodkuce> @leorize[m] hmm ok i just checked sodium_sizes and i dident see any argon2 procs, are there non ? guess i can use scrypt then |
14:15:22 | vivus | Hello all. so I reformatted my code to use objects now, but I am dealing with an issue in JSON that is causing some of the fields to be displayed as blank, like so: `[{"Field0": 0, "Field1": "", "Field2": {"f0": "", "f1": null}},` |
14:16:21 | narimiran | leorize[m]: did circle finish? :P what was its time? |
14:16:27 | vivus | I am guessing this is some formatting issue with JSON I need to include in my settings |
14:17:35 | vivus | this is what the JSON output looks like: https://dpaste.de/szcG |
14:22:17 | * | PMunch quit (Remote host closed the connection) |
14:22:59 | FromGitter | <jrfondren> I think it's more likely that you're providing blank strings, and that the JSON output is correct for what it gets |
14:27:35 | * | rnrwashere joined #nim |
14:27:35 | * | salewski joined #nim |
14:28:34 | salewski | narimiran, I wonder if we can join/link the examples from the nim homepage with the nim playground. |
14:28:53 | narimiran | salewski: that't the idea for the future indeed |
14:28:57 | salewski | Have never used playground, but that would be great for newcommers. |
14:29:05 | narimiran | for now, i'm implementing your suggestions |
14:29:06 | salewski | Fine. |
14:29:38 | leorize | @kodkuce: the one without any _scrypt or anything like that is the argon |
14:29:45 | leorize | because that's the default |
14:29:59 | leorize | narimiran: circle failed :p I'm investigating |
14:30:39 | FromDiscord_ | <kodkuce> hmm i thinki am looking wrong place sodium_sizes only returns cint , i think i have to look in normal sodium just need first find those docs |
14:30:40 | salewski | I will fine tune my text this evening, have alredy added a few forgetten points, and will try to make it a bit shorter. |
14:30:53 | * | couven92 quit (Ping timeout: 245 seconds) |
14:30:58 | * | pwntus quit (Ping timeout: 246 seconds) |
14:31:05 | narimiran | salewski: great, i'll be following the forum, but you can ping me here too if you want |
14:31:14 | vivus | @jrfondren I'm not seeing any blank strings in my table here: https://dpaste.de/mbgU |
14:31:22 | salewski | I really like the second page at https://nim-lang.org/features.html |
14:31:38 | salewski | That page is fine to explain all the details... |
14:32:00 | salewski | Bye. |
14:32:01 | narimiran | salewski: currently i'm struggling with the 'elegant' part and i'm not sure how to put more emphasis on the type system |
14:32:02 | * | salewski quit (Client Quit) |
14:36:13 | FromDiscord_ | <kodkuce> https://download.libsodium.org/doc/password_hashing says "Sodium's high-level crypto_pwhash_* API leverages the Argon2 function." , and in nim sodium there is no pwhash, there is crypt_auth , meybe that? |
14:36:47 | leorize | there's pwhash |
14:36:53 | leorize | use the version on git |
14:37:31 | leorize | ah, it's not nim-libsodium, it's libsodium |
14:37:52 | leorize | install it like this to get the git version: `nimble install 'libsodium@#head'` |
14:38:12 | FromDiscord_ | <kodkuce> oh ok will try |
14:38:24 | FromDiscord_ | <kodkuce> nimble remove libsodium |
14:39:06 | * | couven92 joined #nim |
14:41:12 | * | rnrwashere quit (Remote host closed the connection) |
14:41:14 | laaron | vivus, good json fix. I here json.to often `key_not_found` exception, any idea make json.to relax to process non-exist field |
14:41:38 | Zevv | narimiran: new nim-lang page comments here, privmsg or in the forum? |
14:41:54 | narimiran | Zevv: depending if they are good or bad :P |
14:42:06 | Zevv | hehe |
14:42:21 | * | rnrwashere joined #nim |
14:44:12 | FromGitter | <jrfondren> I think it'd be a lot more approachable, and easier to extend, and just as informative, if you had the topics ('Expressive', etc.) as tabs that selected which bullet points you'd see. |
14:44:35 | vivus | laaron: json.to ? |
14:45:03 | FromGitter | <jrfondren> You'd just have "[Efficient]. Elegant. Expressive." with the efficiency bullet-points displayed, and the user can hover over or click 'Elegant' to switch to those. |
14:45:46 | FromGitter | <jrfondren> that might change the sample code as well. |
14:47:27 | FromGitter | <jrfondren> and one way to expand on that would be to have a separate line of tabs that are questions rather than praise. "GC?", "Types?". same treatment otherwise. |
14:48:02 | laaron | vivus, yes, `json.to` unmarshal method, don't know if you familiar with that |
14:48:37 | vivus | laaron: I used marshal previously and it generated the same output. Can you link to me what you are talking about so I can test it out? |
14:50:37 | laaron | vivus, when json string have more fields than object. thanks. https://nim-lang.github.io/Nim/json.html#to.m%2CJsonNode%2Ctypedesc |
14:52:15 | vivus | laaron: is this an import or export feature? |
14:53:13 | dom96 | laaron: use `Option[T]` |
14:54:50 | * | rockcavera quit (Remote host closed the connection) |
14:57:08 | * | elrood quit (Remote host closed the connection) |
14:58:09 | laaron | vivus, I mean usage problem. what's mean import/export feature |
14:58:41 | vivus | laaron: I am trying to export table-data to JSON and it is giving me blank entries. Trying to figure out why, cause my table has no blank entries |
14:59:03 | * | rnrwashere quit (Remote host closed the connection) |
14:59:14 | * | rockcavera joined #nim |
14:59:14 | leorize | narimiran: almost done |
14:59:51 | * | rnrwashere joined #nim |
15:00:14 | laaron | vivus, oh, I see. I am trying to decode json string to an object, the reverse way, in case you know that |
15:02:48 | laaron | dom96, how use `Option[T]`, when there a explict type object |
15:03:44 | dom96 | not sure what you mean |
15:04:44 | leorize | narimiran: 24mins |
15:04:51 | narimiran | oooh, nice |
15:05:01 | * | kapilp joined #nim |
15:06:48 | * | Trustable joined #nim |
15:06:54 | narimiran | leorize: ...and can we have the whole travis matrix in it (linux, osx, cpp)? |
15:07:11 | leorize | osx is paid |
15:08:37 | narimiran | leorize: what about azure pipelines? |
15:11:06 | laaron | dom96, like the `json.to` example in manual, if drop a `name` field, will return `key not found` exception. how can I avoid this exception by use `Option[T]`, put `Option[T]` where |
15:15:44 | narimiran | leorize: if i'm reading azure pipelines website correctly, it offers "10 free parallel jobs with unlimited minutes per month" for open source projects, and one of their headlines is "Get cloud-hosted pipelines for Linux, macOS, and Windows" |
15:17:17 | * | rnrwashere quit (Remote host closed the connection) |
15:18:20 | dom96 | laaron: name: Option[string] |
15:18:40 | leorize | narimiran: yea, we can support all of those w azure |
15:19:17 | laaron | dom96, https://dpaste.de/FRVd |
15:19:25 | narimiran | leorize: it sounds good -- what's the catch? ;) |
15:19:51 | dom96 | laaron: weight: Option[int]? |
15:22:42 | * | rnrwashere joined #nim |
15:22:48 | * | zestyr quit (Quit: WeeChat 2.4) |
15:24:25 | shashlick | Do you all think there's value in a central repo of nimterop wrappers or let the community use the tool to make wrappers and focus on something else |
15:24:36 | leorize | narimiran: it's MS? :p |
15:25:48 | * | narimiran DEVELOPERS DEVELOPERS DEVELOPERS |
15:25:53 | laaron | dom96, I see, thanks. I think and want to just omit the field before. |
15:29:12 | * | nanofame joined #nim |
15:30:38 | nanofame | Hello guys. Just wanted to say Nim is nice but I think it's practically useless unless people have a dedicated team that can keep up with the changes in the compiler and fixing all the libs... |
15:31:33 | shashlick | there's a stable branch of the compiler |
15:31:55 | shashlick | 0.19.x has had 4 releases already |
15:32:55 | shashlick | if you are using nim in production, you wouldn't want to keep updating |
15:33:27 | nanofame | the stable branch is more often broken than the dev branch. With so many changes to dev branch some of the libs are usually broken all the time |
15:34:22 | shashlick | do you have specific examples? i've been using 0.19.x for the last year with no issues |
15:34:35 | shashlick | obviously you need to keep the lib also at a fixed tag/commit |
15:35:46 | nanofame | I have been using just jester,winim,odbc and a few others |
15:35:53 | Zevv | nanofame: stdlibs are all CI tested. The occasional bug slips through of course, but I don't experience problems with that myelf |
15:36:30 | FromGitter | <liquid600pgm> I get very strange behavior when I launch VSCodium and write *any* Nim code. I save the code, everything seems to work but then my PC freezes up completely with the disk activity LED on |
15:36:45 | nanofame | I am more complaining about 3rd party libs that cannot keep up with devel |
15:37:16 | shashlick | well, the message is to use stable and not devel |
15:37:46 | shashlick | stable has been at 0.19.x for the last 8 months and backported bug fixes |
15:38:39 | nanofame | I am not competent developer enough to fix the issues myself |
15:39:28 | shashlick | devel is under active development, bleeding edge - only nim developers should be using devel, and lib writers should be porting their libs |
15:39:51 | laaron | does nimble support lock on commit/tag version? |
15:39:54 | nanofame | I think I have overestimated my abilities and maturity of Nim's ecosystem |
15:40:12 | shashlick | i understand until recently, stable was not maintained but that has changed |
15:40:29 | shashlick | @nanofame: what's the challenge with using 0.19.6? |
15:40:54 | nanofame | I have had issues with stable before and was told to upgrade to devel |
15:41:07 | nanofame | and I was using devel since then |
15:41:09 | shashlick | @laaron - nimble doesn't supporting locking but you can install a particular tag or commit if you wanted with the @ operator |
15:41:32 | shashlick | @nanofame - was this in the 0.19.x timeframe? |
15:41:40 | * | Kaivo quit (Ping timeout: 244 seconds) |
15:41:48 | narimiran | nanofame: so, you're using devel and you claim "the stable branch is more often broken than the dev branch."!? |
15:42:01 | nanofame | I think I am giving up for now on Nim. I need something more mature and with larger community |
15:42:28 | shashlick | @nanofame - how about you let us help you get stable on stable |
15:42:33 | nanofame | narimiran: I have had issues with some pks on stable and was just told to install devel... |
15:43:10 | * | Kaivo joined #nim |
15:43:22 | laaron | ok. seems add version locking feature to nimble is good proposal |
15:43:32 | narimiran | nanofame: ok, have you reported the issues to those packages? have they fixed them in the mean time? |
15:43:36 | shashlick | ya there have been some discussions aroudn that |
15:44:02 | shashlick | @narimiran - we need to change this community mindset - libs should always work on stable |
15:44:14 | shashlick | otherwise nim will never be attractive to real world usage |
15:45:02 | narimiran | shashlick: yeah, 0.20 should be *the* stable one that everybody should agree on |
15:45:16 | narimiran | as it is 1.0rc in disguise |
15:47:37 | vivus | narimiran: do you have any suggestions for the JSON issue I highlighted above? |
15:47:44 | vivus | i've run out of ideas to find a solution |
15:48:24 | FromGitter | <liquid600pgm> damn Gitter, it glitches out and doesn't show me older messages from today |
15:48:29 | FromGitter | <liquid600pgm> their client is terrible |
15:50:46 | nanofame | I will try to setup stable tomorrow and run some libs |
15:51:15 | shashlick | okay, feel free to post here if you run into any issues |
15:52:50 | narimiran | vivus: can you share the link once again, please? |
15:52:54 | nanofame | I like Nim but for a mediocre dev like me it's too much |
15:53:19 | vivus | JSON output: https://dpaste.de/szcG ... table output: https://dpaste.de/mbgU |
15:54:18 | vivus | nanofame: I am forcing myself to use Nim even though I am probably subpar at dev. It has its quirks, but the language is nice overall . the community is ++ though, these folks help A LOT |
15:54:26 | narimiran | vivus: so what is the problem, what are you doing, etc.? i haven't been following the discussion |
15:55:06 | nanofame | Have a nice eve everyone. GN |
15:55:10 | * | nanofame quit (Quit: Page closed) |
15:55:15 | vivus | narimiran: the table output does not contain any empty strings but the JSON output does. All I am doing to convert to JSON is: `var myjs = $$mytable` |
15:58:32 | narimiran | vivus: ok, will take a look, just let me grab something to eat first |
15:58:41 | vivus | narimiran: sure, no rush. take your time |
15:59:25 | * | lqdev[m] joined #nim |
16:00:26 | FromGitter | <alehander42> i love you all |
16:06:00 | * | floppydh quit (Quit: WeeChat 2.4) |
16:10:38 | narimiran | shashlick: has federico3 contacted you about nightlies, and why they don't ship csources? |
16:12:05 | * | thomasross quit (Remote host closed the connection) |
16:12:24 | federico3 | no he hasn't :) |
16:12:31 | federico3 | shashlick: do you see my queries on IRC? |
16:12:41 | shashlick | i don't get DMs, nope 😞 |
16:13:04 | * | natrys joined #nim |
16:14:27 | narimiran | vivus: it is hard for me to work with these giant files - do you maybe have some minimal example where you see these differences? also, can you share your code? |
16:15:02 | federico3 | shashlick: is there anything publishing source tarballs for the nightlies similar to the releases? |
16:15:51 | shashlick | csources are already in the releases posted online |
16:16:08 | shashlick | what are you looking for in specific? |
16:17:34 | shashlick | linux x32 and x64 xz files posted online have binaries included but they are just like any other xz file so you can recompile if you prefer |
16:17:44 | shashlick | same with all others |
16:22:07 | federico3 | shashlick: I'm looking for a packages with .nim sources, csources, build.sh and no binaries |
16:23:09 | shashlick | well, the only one without any binaries right now is the osx package |
16:23:38 | shashlick | but all you really need to do is remove the bin directory from one of the binary releases and it is the same as a source release |
16:24:07 | shashlick | there's 6 binaries in the bin file, other than that, everything else is identical to source release |
16:24:26 | shashlick | oh and koch |
16:24:32 | federico3 | ok thanks |
16:31:04 | narimiran | vivus: my manual inspection tells me that for `"67": (f0: "...", f2: @["We don\'t see things as they are, but as we are."]),"` you introduce `f2` field, and after that for every entry in the table you get one good entry + one `{"Field0": 0, "Field1": "", "Field2": {"f0": "", "f1": null}},` |
16:31:51 | narimiran | so something is going on in your source around that place |
16:33:22 | vivus | narimiran: just got back, sorry for not replying sooner |
16:33:42 | FromDiscord_ | <kodkuce> |
16:33:42 | FromDiscord_ | <kodkuce> https://cdn.discordapp.com/attachments/371759389889003532/582969750469083140/2019-05-28_183129.png |
16:34:25 | * | nsf joined #nim |
16:35:33 | narimiran | vivus: heh, that `f2` might be because of my edit, ignore that :D but there problems start :) |
16:36:55 | narimiran | vivus: look at the `f0` string in "70", "68", and so on - the last character might be the one causing problems |
16:37:47 | narimiran | "了。" |
16:38:16 | narimiran | but this is just guessing on my part, based on "unicode is hard" |
16:39:00 | * | matt-m quit (Ping timeout: 268 seconds) |
16:39:31 | FromGitter | <zacharycarter> love you too @alehander42 |
16:40:03 | vivus | narimiran: my next idea is to try a different foreign language to see what happens there. I will try a Slavic or some other language with its own unique writing |
16:42:40 | * | matt-m joined #nim |
16:43:40 | * | ng0 joined #nim |
16:44:09 | FromGitter | <zacharycarter> could try Finnish :P I have no idea what you're doing but I'm all about everything Finland since I moved here haha |
16:44:09 | FromDiscord_ | <kodkuce> do droped images create link on irc or not show at all? |
16:44:34 | narimiran | we see a link, but we don't know what to do with that image |
16:45:46 | FromDiscord_ | <kodkuce> frame it and put it in your house? |
16:46:08 | FromDiscord_ | <kodkuce> btw, kodkuce==poopBot if you havent notice xD |
16:46:42 | FromGitter | <zacharycarter> I think it belongs in a museum personally |
16:48:21 | FromDiscord_ | <kodkuce> duno but i was able to call this function until i added async pragma and switched to pg thingy |
16:48:28 | narimiran | kodkuce i did, don't worry ;) |
16:48:32 | FromGitter | <alehander42> @zacharycarter <3 |
16:48:36 | FromGitter | <alehander42> how is helsinki |
16:48:43 | FromGitter | <Varriount> Hey @zacharycarter ! :D |
16:49:03 | FromGitter | <zacharycarter> Hi guys :) |
16:49:09 | FromGitter | <alehander42> i only remember suomi of my nokia |
16:49:12 | FromGitter | <alehander42> language menu |
16:49:29 | * | elrood joined #nim |
16:49:38 | FromGitter | <zacharycarter> Haha - my Finnish is still awful - I can say thank you and hi and that's about it :P |
16:50:20 | FromGitter | <zacharycarter> Helisnki is pretty awesome - moving into my first apartment here on Saturday (I've been staying in a temporary one work got for me) - but I really like the city |
16:51:33 | FromGitter | <zacharycarter> Also my first main task at work is building a web application lmao - at least it's integrating with an actual game server and the work schedule is more rigorous, plus I work solo on my project which is nice |
16:53:04 | FromGitter | <Varriount> @zacharycarter Neat, you moved across the pond? |
16:53:48 | * | vivus quit (Remote host closed the connection) |
16:54:13 | * | neceve quit (Remote host closed the connection) |
16:54:15 | FromGitter | <zacharycarter> Yup! I managed to land a job with Wargaming's (World of Tanks) mobile division as a tools programmer |
16:55:03 | FromGitter | <zacharycarter> the hitch was I had to move to Helsinki, but having never lived outside of the US before, it's an opportunity I'm glad I came across |
16:56:14 | FromDiscord_ | <kodkuce> World of Tanks sux, but nice place to go only sux its kinda cold |
16:56:38 | * | rockcavera quit (Remote host closed the connection) |
16:56:39 | * | FromGitter * Varriount dooesn't play many moble games |
16:56:41 | FromGitter | <zacharycarter> it's a pretty fun studio though - we have a music room with a drum set / guitars / electric piano and people play Warhammer 40k, MTG, etc... after hours |
16:57:11 | FromGitter | <alehander42> yes come to balkans we dont need global warming, we already have the local one |
16:57:20 | FromGitter | <zacharycarter> I played a lot of World of Warships on PC and liked it - I wasn't as into World of Tanks (played on xbox 360) |
16:58:17 | FromGitter | <zacharycarter> the weather's been pretty mild - it was cold when I got here and snowed lightly a few times, but since then it's been 10 - 20 Celsius |
16:58:44 | FromGitter | <alehander42> people should play Bach on piano, not warhammer |
16:58:48 | FromGitter | <alehander42> :P |
16:59:05 | FromGitter | <alehander42> what about your dog :O |
16:59:16 | FromGitter | <zacharycarter> he's with me :D he came along for the journey |
17:00:25 | FromGitter | <zacharycarter> I think he likes it over here more than back home haha |
17:01:41 | FromGitter | <zacharycarter> I do want to visit the Balkans btw - maybe next summer |
17:02:40 | FromGitter | <zacharycarter> oh and the head of the studio offered to buy me (with company money) warhammer 40k units this morning so I'm not complaining :P although I think I'll pass on his offer as I'd like to actually own my army |
17:03:29 | FromDiscord_ | <kodkuce> my problem number 1 was i writed future insted Future |
17:07:40 | FromGitter | <zacharycarter> need to remember to proper case those type names... |
17:13:46 | FromGitter | <alehander42> Wow that's a big change |
17:15:36 | FromGitter | <alehander42> First |
17:15:47 | FromGitter | <alehander42> Is it a huskey dog |
17:17:09 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/KwVW/cooper.jpg) |
17:17:17 | FromGitter | <zacharycarter> Nope! He's a lab mix |
17:17:50 | * | solitudesf joined #nim |
17:18:13 | FromGitter | <zacharycarter> There's a lot more to explore though here (parks and nature everywhere), and I think he he likes being in the city where there are a lot of other people and dogs around |
17:21:19 | FromGitter | <kayabaNerve> narimiran: "Windows, Linux, BSD and Mac OS X" "C, C++ or JavaScript" |
17:22:14 | narimiran | kayabaNerve heh, we discussed oxford comma and the conclusion was that we should be consistent and not use it anywhere, sorry (so my example with it will be gone) |
17:22:45 | * | salewski joined #nim |
17:23:29 | salewski | I have posted second draft to the forum. Have added REPL and hot code reloading as suggested by pablo, |
17:23:45 | * | kapilp quit (Quit: Connection closed for inactivity) |
17:23:59 | FromGitter | <kayabaNerve> So instead of fixing oxford commas, you deleted them |
17:24:00 | FromGitter | <kayabaNerve> Why |
17:24:01 | FromGitter | <kayabaNerve> Why |
17:24:02 | salewski | but I dont know if it already works, maybe you can remove it again. Maybe text is a bit long still, |
17:24:09 | narimiran | ...delilah |
17:24:13 | salewski | but it is easy and fast to read. |
17:24:20 | narimiran | salewski: thanks, will take a look |
17:24:30 | salewski | Bye. |
17:28:08 | * | salewski quit (Quit: WeeChat 2.3) |
17:29:05 | FromGitter | <Varriount> @zacharycarter Nice to hear that you're working in game development. :) |
17:30:59 | FromGitter | <data-man> @salewski optimisations -> optimizations ? |
17:44:45 | FromGitter | <zacharycarter> @Varriount thanks! Took me a while but I'm happy to finally have entered the industry :) |
17:49:24 | * | zyklon joined #nim |
17:49:32 | * | uvegbot quit (Quit: Konversation terminated!) |
17:52:52 | * | marcazar joined #nim |
17:59:15 | * | rockcavera joined #nim |
18:02:16 | lqdev[m] | so the VS Code Nim extension gets stuck on `Nim: check project` and crashes my PC because of abnormally high disk usage |
18:02:17 | lqdev[m] | hooray |
18:04:42 | lqdev[m] | are there any good VS Code alternatives with decent Nim support that aren't Vim? |
18:05:39 | Mister_Magister | Hello. i want to run execShellCmd to generate some image using imagemagic but i want to protect myself from nasty users strings so i would like to escape it somehow. Any ideas? |
18:07:05 | lqdev[m] | oh shit, it seems there's a terrible memory leak with Nim and nimsuggest, I can't explain why but it consumes all of my memory in seconds |
18:07:27 | FromGitter | <zacharycarter> Nimsuggest definitely leaks |
18:07:33 | leorize | Mister_Magister: there's quoteShell in the os module |
18:07:39 | Mister_Magister | thanks! |
18:07:55 | FromGitter | <zacharycarter> it's a known issue with no fix pending currently |
18:08:11 | lqdev[m] | but it leaks so fast it takes like 30 seconds to crash my whole PC because of a lack of free memory |
18:08:22 | leorize | except if you use my neovim plugin :p |
18:08:33 | leorize | then it won't leak as much :p |
18:08:39 | narimiran | lqdev[m]: does it happen when you have some macro with illegal synax? |
18:08:42 | * | Vladar joined #nim |
18:09:07 | lqdev[m] | perhaps? no idea. it only happens with a project that uses NPeg |
18:09:07 | narimiran | i've seen that take some cpu and consume memory, but never as fast as you say |
18:09:13 | FromGitter | <kayabaNerve> lqdev[m]: How much mem do you have? |
18:09:26 | narimiran | Zevv: NPeg crashes vscode!? ^ |
18:09:29 | lqdev[m] | kayabaNerve: 16GB |
18:09:33 | FromGitter | <kayabaNerve> Dang |
18:10:04 | lqdev[m] | leorize: I don't want to use Vim, I'm used to the GUI experience too much |
18:10:33 | leorize | there are neovim gui's around |
18:10:42 | leorize | some of them are on par with vscode |
18:10:52 | narimiran | lqdev[m]: i switched to neovim + leorize's plugin from vscode and GUI experience, and i like it very much |
18:10:53 | leorize | I'm kinda allergic to electron so I don't use them :p |
18:11:36 | narimiran | but i had some prior experience with vim and i used vim keybindings in vscode, so that part wasn't a problem for me |
18:11:48 | FromGitter | <kayabaNerve> I just use Atom |
18:11:56 | FromGitter | <zacharycarter> I just don't use nimsuggest |
18:12:13 | lqdev[m] | my experience with Atom was sub-par, I didn't have any autocomplete with Nim |
18:12:17 | FromGitter | <zacharycarter> I know Arne and a few others use Emacs |
18:12:22 | * | lqdev[m] uploaded an image: image.png (4KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/YuNDCyatLsbwadeqccydiPCH > |
18:12:25 | lqdev[m] | would you look at this monster |
18:12:34 | lqdev[m] | and it got even worse |
18:12:40 | FromGitter | <kayabaNerve> lqdev[m]: The Nim plugin does almost nothing for me. |
18:12:41 | narimiran | congrats, you win! |
18:12:43 | lqdev[m] | I killed it when it reached over 8GB |
18:13:10 | leorize | hmm, isn't nimsuggest programmed to die after 4gb? |
18:13:11 | narimiran | lqdev[m]: did you use some over-complicated npeg stuff? |
18:13:19 | lqdev[m] | nope |
18:13:21 | FromGitter | <kayabaNerve> It doesn't have autocomplete. It doesn't have jump to X. It sometimes shows errors/hints and sometimes doesn't. |
18:13:23 | lqdev[m] | @kayabaNerve: it doesn't do much for me as well, it's a problem with this specific project |
18:13:26 | narimiran | leorize: yep, but this is not nimsuggest, i think |
18:13:47 | narimiran | it is probably some compile-time monster happening |
18:13:50 | FromGitter | <kayabaNerve> I miss Aporia |
18:13:55 | FromGitter | <zacharycarter> @kayabaNerve - I think you have to set VSCode up so that the Nim plugin knows where there nimsuggest binary is |
18:13:58 | FromGitter | <kayabaNerve> Not even because I liked the GUI that much |
18:14:00 | FromGitter | <kayabaNerve> Because it works |
18:14:13 | FromGitter | <kayabaNerve> @zacharycarter I refuse to use a MS IDE |
18:14:39 | Mister_Magister | leorize: but that won't do. i want to put text in parameter that is inside "" and want to escape that text so it won't escape my "" |
18:14:54 | FromGitter | <kayabaNerve> I like text editors + terminals. The comment here is the Atom Nim plugin doesn't work. :P |
18:15:22 | FromGitter | <zacharycarter> oh |
18:15:29 | leorize | Mister_Magister: quote shell can produce an entire shell command |
18:15:34 | FromGitter | <zacharycarter> Atom is electron too no? |
18:15:40 | Mister_Magister | i could replace it with regex and remove everything that is not a char |
18:15:48 | Mister_Magister | leorize: hmm |
18:15:51 | FromGitter | <kayabaNerve> I just prefer Atom over every other text editor I've ever used so... it balances out. |
18:15:56 | FromGitter | <zacharycarter> Also VSCode is supposed to be an editor - not an IDE |
18:15:57 | FromGitter | <Varriount> @zacharycarter I'm *finally* finishing up University - I'm working on https://github.com/Varriount/commandant for my final course this summer (an independent project course). |
18:16:00 | lqdev[m] | this is the parser: https://github.com/liquid600pgm/rod/blob/master/src/rod/parser.nim |
18:16:01 | FromGitter | <kayabaNerve> Electron was built as Atom |
18:16:09 | leorize | Mister_Magister: oh, it's quoteShellCommand |
18:16:26 | Mister_Magister | leorize: i used it but it changed text to '"; RM -RF --NO-PRESERVE-ROOT /' which won't do |
18:16:29 | Mister_Magister | it will escape "" |
18:16:51 | leorize | stop quoting :p |
18:16:53 | FromGitter | <kayabaNerve> "Initially developed for GitHub's Atom editor, Electron has since been adopted by companies all over the world." |
18:16:58 | Mister_Magister | leorize: i need quote |
18:17:00 | leorize | the point of that proc is so that you don't have to quote |
18:17:16 | FromGitter | <zacharycarter> @Varriount - awesome!!! The project sounds neat! |
18:17:16 | Mister_Magister | the parameter is |
18:17:18 | Mister_Magister | -draw "text 0,0 'SADASSAJDKJLJASKLDJASLKDJASLD'" |
18:17:26 | Mister_Magister | so ' or " will escape |
18:17:54 | Mister_Magister | leorize: let's go different approch. can i replace text using regex? |
18:18:40 | leorize | yes, but that's just overkill |
18:18:48 | leorize | so what's your full command that you need to run? |
18:18:58 | leorize | that you afraid would escape? |
18:20:16 | Mister_Magister | how did you use that bot to test nim |
18:20:20 | Mister_Magister | !eval ? |
18:20:21 | NimBot | Compile failed: in.nim(1, 2) Error: invalid indentation |
18:20:25 | leorize | yep |
18:20:47 | Mister_Magister | !eval echo escape( |
18:20:48 | NimBot | Compile failed: in.nim(1, 13) Error: invalid indentation |
18:20:51 | Mister_Magister | missclick |
18:21:01 | Mister_Magister | !eval echo escape("\"") |
18:21:03 | NimBot | Compile failed: in.nim(1, 6) Error: undeclared identifier: 'escape' |
18:21:16 | Mister_Magister | !eval import strutils; echo escape("\"") |
18:21:19 | NimBot | "\"" |
18:21:46 | Mister_Magister | i think that would be proper function to do the job |
18:21:53 | Mister_Magister | but i'm getting multiple definition of `nsuEscape'; /home/foidbgen/.cache/nim/bot_d/stdlib_strutils.c.o:stdlib_strutils.c:(.text+0x5e33): first defined here collect2: error: ld returned 1 exit status |
18:22:08 | leorize | that's not how you should do it... |
18:22:15 | leorize | shell have weird escaping rules |
18:22:39 | leorize | try adding the `-f` param to Nim |
18:22:50 | Mister_Magister | my command is in short convert file.png -draw "text 0,0 'SADASSAJDKJLJASKLDJASLKDJASLD'" img1b.jpg |
18:23:03 | Mister_Magister | and i want to allow users to put text there |
18:23:23 | leorize | !eval import os; echo quoteShellCommand ["convert", "file.png", "text 0,0 'SADASSAJDKJLJASKLDJASLKDJASLD'", "img1b.jpg"] |
18:23:25 | NimBot | Compile failed: in.nim(1, 17) Error: type mismatch: got <proc (args: openarray[string]): string{.noSideEffect, gcsafe, locks: 0.}> |
18:23:44 | leorize | !eval import os; echo quoteShellCommand(["convert", "file.png", "text 0,0 'SADASSAJDKJLJASKLDJASLKDJASLD'", "img1b.jpg"]) |
18:23:47 | NimBot | convert file.png 'text 0,0 '"'"'SADASSAJDKJLJASKLDJASLKDJASLD'"'"'' img1b.jpg |
18:24:00 | Mister_Magister | well that won't do |
18:24:08 | leorize | why? |
18:24:13 | Mister_Magister | to many """? |
18:24:15 | Mister_Magister | also |
18:24:29 | leorize | try running that exact command on your shell |
18:24:34 | leorize | it'll behave just as you expected |
18:24:40 | Mister_Magister | !eval import os; echo quoteShellCommand(["convert", "file.png", "text 0,0 ''; rm -rf /; ''", "img1b.jpg"]) |
18:24:43 | NimBot | convert file.png 'text 0,0 '"'"''"'"'; rm -rf /; '"'"''"'"'' img1b.jpg |
18:24:52 | Mister_Magister | u think that won't escape? |
18:25:01 | Mister_Magister | u can run it |
18:25:23 | leorize | just did |
18:25:27 | * | clyybber joined #nim |
18:25:43 | Mister_Magister | and it escaped |
18:26:00 | leorize | nope |
18:26:01 | Mister_Magister | command failed |
18:26:30 | Mister_Magister | https://paste.opensuse.org/view//27287799 |
18:26:50 | leorize | !eval import os; discard execShellCmd quoteShellCommand(["echo", "text 0,0 ''; rm -rf /; ''"]) |
18:26:53 | NimBot | text 0,0 ''; rm -rf /; '' |
18:27:19 | leorize | Mister_Magister: ^ there, no weird injections possible |
18:27:21 | Mister_Magister | no that's wrong parameter |
18:28:02 | leorize | wait, so you wanted the user to be able to inject more than one param? |
18:28:09 | Mister_Magister | no no only one param |
18:28:15 | Mister_Magister | in place of SADASSAJDKJLJASKLDJASLKDJASLD |
18:28:18 | Mister_Magister | only text |
18:28:30 | Mister_Magister | removing other chars will be simple enough tbh |
18:29:03 | leorize | !eval import os; discard execShellCmd quoteShellCommand(["echo", "text 0,0 " & "; rm -rf /"]) |
18:29:04 | FromGitter | <jrfondren> `for c in suspicious_user_content: if c notin {'a'..'z', 'A'..'Z', '0'..'9', '-', '.'}: complain()` |
18:29:06 | NimBot | text 0,0 ; rm -rf / |
18:29:34 | Mister_Magister | kiiind of |
18:29:42 | leorize | !eval import os; discard execShellCmd quoteShellCommand(["echo", "text 0,0 " & quoteShell "; rm -rf /"]) |
18:29:45 | NimBot | text 0,0 '; rm -rf /' |
18:29:48 | Mister_Magister | you can't replace with regex? |
18:29:55 | FromGitter | <jrfondren> you can. |
18:29:57 | leorize | you can, but it's slow |
18:30:19 | FromGitter | <jrfondren> anyway, if your only concern is that the shell not interpret your command in any way, then don't use execShellCmd |
18:30:28 | Mister_Magister | i would need to write some function like you did leorize and clear bad characters |
18:30:35 | FromGitter | <jrfondren> os osproc.startProcess |
18:30:52 | FromGitter | <jrfondren> then the user can give binary data for all you care. as long as command you're running is OK with it. |
18:31:48 | Mister_Magister | not sure as i have to connect text they give me with parameter strign |
18:33:19 | Mister_Magister | if the text was standalone parameter that would be easy but it isn't |
18:33:52 | FromGitter | <jrfondren> that's not a problem at all. |
18:34:12 | FromGitter | <jrfondren> `"connected text " & userstuff` can just be one of the parameters. |
18:34:22 | leorize | you can see my example just handled it well |
18:34:32 | FromGitter | <jrfondren> unix processes are passed arguments as an array, not a string. |
18:35:02 | Mister_Magister | so startProcess has no way of injecting second command? |
18:35:20 | FromGitter | <jrfondren> if you don't tell it to process your command with the shell, the shell is not involved. |
18:35:20 | leorize | as long as you don't pass poEvalCommand, yes |
18:35:44 | FromGitter | <jrfondren> and shell metacharacters have no meaning, and are just passed to the program as part of its arguments, as if you'd gone through this whole quoting rigamarole. |
18:35:51 | Mister_Magister | let's try it |
18:36:00 | Mister_Magister | the startProcess |
18:37:36 | FromGitter | <jrfondren> you'll probably want poUsePath and poParentStreams |
18:37:48 | Mister_Magister | what do you mean? |
18:38:06 | leorize | read the docs :p |
18:39:33 | Mister_Magister | i mean what you mean |
18:39:34 | Mister_Magister | xd |
18:41:02 | Mister_Magister | no such command huh |
18:42:46 | FromGitter | <jrfondren> you'll probably want poUsePath and poParentStreams |
18:43:14 | Mister_Magister | xdd |
18:43:27 | Calinou | how do I pass an openarray[string] to a function? |
18:43:38 | Calinou | I used to be able to pass just a string, but it seems the Nim compiler now wants me to pass that typer |
18:43:40 | Calinou | -r |
18:43:44 | FromGitter | <jrfondren> pass it an array[##, string] or a seq[string] |
18:44:05 | FromGitter | <jrfondren> sure it wasn't a varargs before? |
18:44:15 | leorize | ["string"] :p |
18:44:21 | Calinou | it's execProcess() from osproc |
18:45:38 | Calinou | https://0x0.st/zaUI.txt |
18:45:41 | Calinou | that's what I get |
18:45:47 | Calinou | (the 2nd argument is the culprit) |
18:45:58 | FromGitter | <jrfondren> where's your code? |
18:45:59 | Calinou | that is, if I try to use ["string"] as the 2nd argumen,t |
18:46:13 | Calinou | https://github.com/Calinou/godot-size-benchmarks/blob/master/src/godot_size_benchmarks.nim#L108-L114 |
18:46:14 | FromGitter | <jrfondren> oh, last line |
18:46:50 | Calinou | I'm using execProcess 3 times and they're all throwing errors |
18:46:55 | Calinou | it worked back in March :P |
18:47:03 | FromGitter | <jrfondren> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ced8227faac64393400aaa5] |
18:47:04 | Calinou | (I'm on 0.19.6 now) |
18:47:11 | FromGitter | <jrfondren> the `[godot]` is fine |
18:50:28 | * | natrys quit (Ping timeout: 245 seconds) |
18:51:32 | Calinou | the compiler doesn't want me to use either an array or a sequence to match an openArray[string] |
18:51:42 | FromGitter | <jrfondren> that's not the problem |
18:52:02 | FromGitter | <jrfondren> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ced835282c2dc79a511622a] |
18:53:32 | Calinou | oh, right |
18:54:41 | Calinou | oh, so I need to use key-value pairs for parameters now, I guess |
18:55:02 | FromGitter | <jrfondren> no. |
18:55:07 | FromGitter | <jrfondren> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ced840b7c1dab468c617a1e] |
18:55:13 | FromGitter | <jrfondren> env:, that's the one with StringTableRef |
18:55:56 | FromGitter | <jrfondren> ah but I can imagine why you think it's a problem with parameters |
18:56:04 | FromGitter | <jrfondren> sconsFlags are your params to `godot`? |
18:56:31 | FromGitter | <jrfondren> or rather, `godot` is the first parameter and you have a list of flags to pass as well |
18:56:39 | Calinou | yeah |
18:56:42 | FromGitter | <jrfondren> pass them in a single openArray[string], not two of them. |
18:57:04 | Calinou | oh, so the cwd argument was removed? |
18:57:14 | Mister_Magister | how to get output from startProcess because it's not working |
18:57:36 | FromGitter | <jrfondren> Mister, where do you want your output? |
18:57:48 | Mister_Magister | to shell |
18:57:49 | leorize | narimiran: should I proceed with adding azure pipelines to Nim? |
18:57:58 | Mister_Magister | like echo |
18:58:25 | FromGitter | <jrfondren> jrfondren @jrfondren 13:37 ⏎ you'll probably want poUsePath and poParentStreams |
18:58:57 | Calinou | now, what would be the best way to run each command in the right directory in a cross-platform way? |
18:59:15 | FromGitter | <jrfondren> @Calinou, `execProcess(scons, args=@[godot] & sconsFlags, options={poUsePath, poStdErrToStdOut})` |
18:59:28 | Calinou | godot isn't an arg, it's the CWD |
18:59:32 | narimiran | leorize: if you can setup it to completely replace our current travis+appveyor, that would be great. btw, how does the output look like? e.g. i like appveyor more than travis - it is much easier to see which tests failed |
18:59:46 | Mister_Magister | @jrfondren am i stupid? lol |
19:00:52 | FromGitter | <jrfondren> @Calinou, don't think there's any way but to repeatedly os.setCurrentDir |
19:01:17 | * | natrys joined #nim |
19:01:26 | leorize | narimiran: https://dev.azure.com/alaviss/Nim/_build/results?buildId=8 |
19:02:06 | FromGitter | <jrfondren> @Calinou, the old code probably did that for you, so doing it yourself should at least be marginally more efficient |
19:02:26 | FromGitter | <jrfondren> since you can restore your old working directory just once instead of N times. |
19:03:05 | * | rnrwashere quit (Remote host closed the connection) |
19:03:51 | * | rnrwashere joined #nim |
19:03:55 | * | rnrwashere quit (Remote host closed the connection) |
19:04:07 | * | rnrwashere joined #nim |
19:04:21 | Mister_Magister | @jrfondren sadly command using startProcess is not working |
19:04:57 | FromGitter | <jrfondren> I'm sure it's not a moral failing. what's the problem? |
19:06:08 | Mister_Magister | wait i just fixed it xd sorry for disturbing |
19:06:13 | Calinou | thanks for the help :) trying to run the script now |
19:07:08 | FromGitter | <jrfondren> np. I'm a little out of it so it took me a while to see what you were doing. |
19:07:34 | Calinou | this is still easier than doing it all in Bash :P |
19:07:52 | Calinou | plus, it's much easier to make it work natively on Windows (if I ever need that) |
19:08:44 | Mister_Magister | @jrfondren you said it won't escape the command but it did! one parameter is "text 190,410 '" & toUpper(command.params) & "'" and if i put ' inside command.params it will escape parameter |
19:09:40 | FromGitter | <jrfondren> what do you mean by 'escape'? |
19:09:41 | * | couven92 quit (Quit: Client disconnecting) |
19:10:21 | Mister_Magister | in command it looks like convert -text "text 190,410 ' text ' " |
19:10:30 | FromGitter | <jrfondren> what's escaped about that? |
19:10:36 | Mister_Magister | if you put ' instead of text it will interpret the text as parameter |
19:10:53 | Mister_Magister | and that's what's happening |
19:12:07 | Mister_Magister | and i can't use escape function from strutils for some reason |
19:12:53 | Mister_Magister | multiple definition of `nsuEscape'; /home/foidbgen/.cache/nim/bot_d/stdlib_strutils.c.o:stdlib_strutils.c:(.text+0x5e33): first defined here collect2: error: ld returned 1 exit status |
19:13:20 | FromGitter | <jrfondren> well that's a serious problem on its own, but it's unrelated |
19:13:37 | FromGitter | <jrfondren> how are you invoking startProcess? |
19:13:53 | Mister_Magister | discard startProcess("convert", "", ["PiS.png", "-font", "font.ttf", "-pointsize", "81", "-fill", "white", "-draw", "text 190,410 '" & toUpper(command.params) & "'", $command.message.messageId], nil, {poUsePath, poParentStreams}) |
19:14:21 | Araq | don't 'include' stdlib modules |
19:14:46 | Mister_Magister | o dpnm |
19:14:48 | Mister_Magister | i don't |
19:14:56 | FromGitter | <jrfondren> yeah, that's not going to pass anything to the shell. convert's going to get "text 190,410 'blah''" (sans quotes) as a param, supposing that command.params == "blah'" |
19:15:32 | FromGitter | <jrfondren> I don't know convert though. if convert itself has an expression language there that requires some kind of escaping, obviously you'll have to do that still |
19:15:40 | Mister_Magister | and if the command.params is like ' -color black it will change color |
19:15:48 | Mister_Magister | because it will interpret -color as paramter |
19:16:06 | Mister_Magister | becaue ' in string will escape parameter ' ' |
19:16:14 | FromGitter | <jrfondren> that's convert being weird then, because startProcess absolutely isn't passing -color as a separate param based on command.params |
19:16:30 | FromGitter | <jrfondren> convert might be a bash script :/ |
19:16:31 | Mister_Magister | @jrfondren the problem is ending parameter |
19:16:38 | Mister_Magister | not the convert |
19:16:50 | Mister_Magister | if user put ' blah command wil lfail |
19:17:05 | FromGitter | <jrfondren> that's absolutely something convert is doing |
19:17:18 | FromGitter | <jrfondren> strace your Nim script and look at the exec() syscall. |
19:17:22 | Mister_Magister | from the beginning i want to escape ' and " tho |
19:17:37 | Mister_Magister | there is no command to do that? |
19:17:51 | FromGitter | <jrfondren> aye, so the conclusion is that startProcess won't help you and you'll need to do this yourself. |
19:18:10 | FromGitter | <jrfondren> well you said strutils had a command you wanted to use. |
19:18:14 | Mister_Magister | and we are back to my first question |
19:18:19 | Mister_Magister | how do i escape characters |
19:18:29 | Mister_Magister | @jrfondren but can't compile |
19:18:38 | FromGitter | <jrfondren> then ask a question about that. it works fine for me. |
19:19:05 | Mister_Magister | i have problem when i'm using escape from strutils multiple definition of `nsuEscape'; /home/foidbgen/.cache/nim/bot_d/stdlib_strutils.c.o:stdlib_strutils.c:(.text+0x5e33): first defined here collect2: error: ld returned 1 exit status |
19:19:19 | FromGitter | <jrfondren> escapes still may not work though. convert is *already* completely out in the woods with its current behavior. I wouldn't trust it at all. |
19:20:41 | FromGitter | <jrfondren> !eval import strutils; echo "hello '".escape |
19:20:44 | NimBot | "hello \'" |
19:21:53 | FromGitter | <rishavs> Vladar, are you there on IRC? |
19:22:01 | FromGitter | <jrfondren> sure you're not using `include` elsewhere? it may not be enough for this one part you're looking at to have `import` |
19:22:20 | Mister_Magister | maybe my lib somehow but doubt |
19:23:13 | FromGitter | <jrfondren> rather than use escapes and hope that convert doesn't have bugs in addition to the completely buggy argument handling already, I suggest using a regex or set[char] to require only valid characters in the text you're including |
19:23:33 | Mister_Magister | i will just replace(s, "'", "") |
19:23:34 | * | rnrwashere quit (Read error: Connection reset by peer) |
19:23:37 | Mister_Magister | and go to sleep xd |
19:24:01 | FromGitter | <jrfondren> see if \x27 doesn't break it still |
19:25:15 | FromGitter | <jrfondren> `\x27 -color black` and `\047 -color black` |
19:25:16 | Zevv | someone called? |
19:25:29 | * | rnrwashere joined #nim |
19:25:34 | Vladar | rishavs: what's up? |
19:26:41 | Zevv | narimiran: wow, I crashed vscode? |
19:26:44 | Zevv | how? |
19:27:07 | FromGitter | <rishavs> Hey, i was going through the bounce tut for ng2. In the part where I add the fonts to the title scree, i am getting this error ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ced8b8bb76eac527a654f5e] |
19:27:37 | narimiran | Zevv: "<lqdev[m]> perhaps? no idea. it only happens with a project that uses NPeg" |
19:27:47 | Zevv | cool |
19:28:11 | narimiran | zevv: "<lqdev[m]> but it leaks so fast it takes like 30 seconds to crash my whole PC because of a lack of free memory" |
19:28:18 | Zevv | woohoo \o/ |
19:28:29 | Zevv | fix your frigging editor then! |
19:28:43 | Zevv | My vim works just fine |
19:28:45 | Mister_Magister | @jrfondren nope it doesn't |
19:29:12 | FromGitter | <jrfondren> that's good at least |
19:29:12 | Zevv | so, how do I reproduce this? I just install vscode .deb |
19:29:18 | Zevv | and now it does not know what Nim is |
19:29:39 | Mister_Magister | @jrfondren actually replace(toUpper(command.params), "\'", "\\'") does the job |
19:29:42 | Mister_Magister | aka escaping it |
19:29:55 | Mister_Magister | so all i had to do is to escape characters |
19:29:56 | FromGitter | <jrfondren> ................ what |
19:29:59 | narimiran | Zevv: this is the code: https://github.com/liquid600pgm/rod/blob/master/src/rod/parser.nim |
19:30:06 | Mister_Magister | nothing |
19:30:11 | Mister_Magister | works :) thanks :) |
19:30:53 | FromGitter | <jrfondren> isn't that strutils.replace that you're using there? |
19:30:54 | narimiran | Zevv: there is nim plugin for vscode, but maybe this can be reproduced without vscode? |
19:31:10 | FromGitter | <rishavs> Vladar, i was going through the bounce tut for ng2. In the part where I add the fonts to the title scree, i am getting this error ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ What library am i to initialize there? I do have the sdl_ttf dll in my bin folder [https://gitter.im/nim-lang/Nim?at=5ced8c7e5de053468bd47997] |
19:31:50 | Zevv | narimiran: Ah, yes, nim c parser.nim already blows stuff up |
19:32:06 | narimiran | as i expected :) |
19:32:15 | Zevv | lemmesee |
19:32:23 | narimiran | lqdev[m]: are you here, btw? |
19:32:41 | Vladar | rishavs: hmm, and the path to the font exist, I assume? Might be some missed init proc. Can you drop your code into pastebin or something, so I could look at it? |
19:33:55 | FromGitter | <rishavs> path is correct, because if I try to mess that up the error becomes `CRITICAL: Can't load font data/fnt/FSEsX300.ttf: Couldn't open data/fnt/FSEsX300.ttf` ⏎ I will copy paste the code into pastebin and get back to you |
19:37:12 | Zevv | liquid600pgm: you here? |
19:37:28 | FromGitter | <rishavs> Vladar, I have added the code to a repl https://repl.it/repls/ElderlyBountifulDevices |
19:38:07 | * | matt-m quit (Ping timeout: 248 seconds) |
19:40:49 | Zevv | narimiran: the grammar explodes exponentally in its implementation and it generates a zillion lines of Nim |
19:41:00 | * | matt-m joined #nim |
19:41:03 | narimiran | as i expected :) |
19:41:29 | Zevv | I'll have to put some safeguard in I guess |
19:41:49 | narimiran | "<narimiran> lqdev[m]: did you use some over-complicated npeg stuff?", one and a half hour ago |
19:44:13 | Vladar | rishavs: if you didn't rename the font, it looks like you have a typo in the font file name (data.nim:20 and data.nim:24). Could you check it before I go deeper? |
19:45:00 | FromGitter | <rishavs> My bad. I just added that typo to get the normal path error |
19:45:17 | FromGitter | <rishavs> bounce.zip (https://files.gitter.im/nim-lang/Nim/MkKw/bounce.zip) |
19:45:51 | FromGitter | <rishavs> Added a zip of my project folder in case you want to compile it. Not sure if you can see it in IRC |
19:45:52 | * | Jesin quit (Quit: Leaving) |
19:45:54 | Vladar | rishavs: also, loadData() call should be _after_ game init |
19:46:50 | Vladar | so you are calling ttf procs before the initialization (that happens in game.init()) |
19:48:37 | Vladar | let me know if this helps |
19:49:09 | FromGitter | <rishavs> That fixed it! After placing the loaddata func call correctly, the error disappeared |
19:49:25 | Vladar | awesome ) |
19:49:40 | FromGitter | <rishavs> Thanks! the error made me think that I was missing some dependency which is not there in the tut |
19:51:14 | Zevv | narimiran: how did you hear of this memory-eating problem? |
19:51:50 | Vladar | rishavs: unmet lib deps usually crash the program before it gets to the actual game logic, in my experience. |
19:52:43 | FromGitter | <rishavs> 👍 got it! |
19:53:17 | narimiran | i think either you mentioned it some time ago about npeg specifically or just the general well-known "macros can explode at CT if you're not careful" |
19:53:58 | * | elrood quit (Remote host closed the connection) |
19:56:35 | Mister_Magister | how can i make round return int? without .0 at the end |
19:56:40 | * | matt-m_ joined #nim |
19:56:49 | * | nsf quit (Quit: WeeChat 2.4) |
19:56:51 | narimiran | Mister_Magister: you convert the result to int? :) |
19:56:57 | Mister_Magister | but how |
19:57:00 | Zevv | no, I mean, who reported it just now |
19:57:05 | narimiran | int round(3.2) |
19:57:13 | Zevv | oh wait, lqdev == liquid600pgm |
19:57:17 | Zevv | lqdev[m]: you here? |
19:57:39 | Zevv | don't change your nick dude, I have enough trouble to keep people apart in real life already |
19:58:00 | narimiran | yeah, lqdev[m] reported it two hours ago, see the logs |
19:58:21 | narimiran | off i go, see y'all tomorrow |
19:58:27 | Zevv | ciao! |
19:58:55 | Mister_Magister | int(somethin_ |
19:58:57 | Mister_Magister | cool |
19:59:25 | * | matt-m quit (Ping timeout: 268 seconds) |
20:00:12 | * | Trustable quit (Remote host closed the connection) |
20:01:50 | * | Jesin joined #nim |
20:02:46 | * | narimiran quit (Ping timeout: 246 seconds) |
20:07:47 | * | matt-m_ quit (Ping timeout: 258 seconds) |
20:10:45 | * | absolutejam joined #nim |
20:11:37 | * | absolutejam left #nim (#nim) |
20:12:22 | * | absolutejam joined #nim |
20:12:53 | * | absolutejam quit (Client Quit) |
20:15:22 | * | couven92 joined #nim |
20:15:35 | * | ShalokShalom quit (Remote host closed the connection) |
20:16:28 | Zevv | narimiran[m] / lqdev[m]: I now added a safeguard that prevents exponential grammar explosions, and added a note in the docs on how to prevent that. |
20:19:00 | * | cybj quit (Ping timeout: 252 seconds) |
20:20:33 | * | cybj joined #nim |
20:22:41 | * | sealmove joined #nim |
20:25:49 | * | shadowbane quit (Quit: Konversation terminated!) |
20:35:01 | * | coffeeturtle joined #nim |
20:40:35 | * | coffeeturtle quit (Remote host closed the connection) |
20:49:59 | FromDiscord_ | <DeltaPHC> When you have a ref object type, is using the `new` proc required, or does it do that implicitly when you do `MyObjectRef(field: foo, ...)`? |
20:51:56 | FromGitter | <alehander42> the last thing is enough |
20:52:13 | * | rnrwashere quit (Remote host closed the connection) |
21:13:24 | * | Vladar quit (Remote host closed the connection) |
21:22:46 | * | sealmove quit (Quit: WeeChat 2.4) |
21:27:21 | * | marcazar quit (Quit: Leaving) |
21:32:44 | dom96 | marcazar: not sure if you'll read IRC logs, but you /just/ missed me :) |
21:35:41 | * | deech_ joined #nim |
21:40:19 | * | laaron quit (Remote host closed the connection) |
21:40:43 | * | laaron joined #nim |
21:41:38 | * | rnrwashere joined #nim |
21:42:28 | dom96 | So now that Rust will use the `future.await` syntax, should we also support it? |
21:45:25 | FromDiscord_ | <DeltaPHC> If it already works in prefix notation, then doesn't UFCS already allow .await? |
21:46:18 | FromDiscord_ | <DeltaPHC> (I haven't used async stuff in Nim) |
21:49:58 | * | solitudesf- joined #nim |
21:49:59 | * | solitudesf quit (Remote host closed the connection) |
21:51:58 | * | vlad1777d quit (Ping timeout: 246 seconds) |
21:58:20 | FromDiscord_ | <DeltaPHC> I'm still learning, but Nim seems pretty flexible in both its syntax and metaprogramming features. I wouldn't be surprised if you can use existing mechanisms to do postfix await |
21:59:11 | * | rnrwashere quit (Remote host closed the connection) |
22:01:28 | * | apodo quit (Ping timeout: 272 seconds) |
22:04:30 | * | Jesin quit (Quit: Leaving) |
22:05:06 | * | deech_ quit (Remote host closed the connection) |
22:06:14 | * | Jesin joined #nim |
22:07:27 | FromDiscord_ | <DeltaPHC> That being said, there's definitely been a lot of controversy about Rust's decision. I think it's well reasoned, even if opinions aren't unanimous |
22:08:04 | * | solitudesf- quit (Ping timeout: 246 seconds) |
22:14:59 | * | sealmove joined #nim |
22:18:30 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
22:30:24 | * | kapilp joined #nim |
22:52:13 | * | natrys quit (Quit: natrys) |
23:05:57 | * | rnrwashere joined #nim |
23:08:56 | * | krux02 quit (Remote host closed the connection) |
23:16:53 | * | Jesin quit (Quit: Leaving) |
23:17:58 | * | Jesin joined #nim |
23:30:31 | * | smitop joined #nim |
23:47:51 | * | clyybber quit (Quit: WeeChat 2.4) |
23:58:24 | Calinou | heh, nice to see DeltaPHC in here :P |
23:58:48 | * | couven92 quit (Quit: Client Disconnecting) |