00:01:00 | * | jinshil joined #nim |
00:03:54 | * | Pisuke joined #nim |
00:06:27 | * | MyMind quit (Ping timeout: 240 seconds) |
00:07:54 | * | endragor joined #nim |
00:08:36 | * | pilne joined #nim |
00:11:57 | * | endragor quit (Ping timeout: 240 seconds) |
00:24:17 | * | def-pri-pub joined #nim |
00:33:50 | * | endragor joined #nim |
00:34:52 | FromGitter | <gogolxdong> you are really good at associating |
00:36:22 | * | rauss joined #nim |
00:38:25 | * | endragor quit (Ping timeout: 248 seconds) |
00:43:47 | * | gangstacat quit (Quit: Leaving) |
00:59:37 | * | endragor joined #nim |
01:01:43 | * | Vindaar joined #nim |
01:04:09 | * | endragor quit (Ping timeout: 252 seconds) |
01:08:06 | * | def-pri-pub quit (Quit: leaving) |
01:09:53 | * | arnaud2 quit (Ping timeout: 248 seconds) |
01:25:35 | * | endragor joined #nim |
01:30:09 | * | endragor quit (Ping timeout: 248 seconds) |
01:36:04 | * | chemist69 quit (Ping timeout: 255 seconds) |
01:42:52 | * | yglukhov joined #nim |
01:47:50 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:50:01 | * | chemist69 joined #nim |
02:17:16 | * | def-pri-pub joined #nim |
02:17:16 | * | def-pri-pub quit (Changing host) |
02:17:16 | * | def-pri-pub joined #nim |
02:27:06 | * | ShalokShalom quit (Remote host closed the connection) |
02:31:36 | * | sz0 quit (Quit: Connection closed for inactivity) |
02:37:53 | * | ipjk quit (Quit: Leaving) |
03:07:10 | * | endragor joined #nim |
03:12:07 | * | endragor quit (Ping timeout: 260 seconds) |
03:12:32 | mahmudov | yardanico http://ix.io/znm |
03:12:52 | mahmudov | is it normal? |
03:13:14 | mahmudov | SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
03:16:15 | def-pri-pub | mahmudov: could use some sample code |
03:19:50 | mahmudov | i used it https://gist.github.com/Yardanico/8389b4dae193fe175e5272249138bccf |
03:20:30 | * | arnaud2 joined #nim |
03:20:44 | mahmudov | def-pri-pub which? |
03:27:47 | * | dddddd quit (Remote host closed the connection) |
03:32:04 | * | def-pri-pub quit (Quit: leaving) |
03:45:50 | * | yglukhov joined #nim |
03:50:20 | * | yglukhov quit (Ping timeout: 240 seconds) |
04:19:41 | * | endragor joined #nim |
04:24:17 | FromGitter | <Varriount> @dom96 More likely it's meant to show Rust as the 'King' of programming languages. |
04:24:31 | * | endragor quit (Ping timeout: 248 seconds) |
04:32:00 | * | xaxisx quit (Ping timeout: 248 seconds) |
04:35:11 | * | mahmudov quit (Remote host closed the connection) |
04:35:18 | FromGitter | <Yardanico> mahmudov: look at the github issue |
04:37:43 | FromGitter | <Yardanico> https://github.com/nim- ⏎ lang/Nim/issues/6268 |
04:37:55 | FromGitter | <Yardanico> There's a solution in comments |
04:38:09 | FromGitter | <Yardanico> But honestly openweatherapi isn't the best |
04:38:22 | FromGitter | <Yardanico> There is darksky, which is much better |
04:39:46 | FromGitter | <Yardanico> dom96: wow, you have 5 rating on your comment :) |
04:59:59 | * | endragor joined #nim |
05:04:31 | * | endragor quit (Ping timeout: 248 seconds) |
05:13:21 | * | arnaud2 quit (Ping timeout: 240 seconds) |
05:17:28 | * | cspar_ joined #nim |
05:18:35 | * | cspar quit (Ping timeout: 240 seconds) |
05:26:03 | * | endragor joined #nim |
05:30:20 | * | endragor quit (Ping timeout: 240 seconds) |
05:36:02 | * | xaxisx joined #nim |
05:38:48 | * | pilne quit (Remote host closed the connection) |
05:47:48 | * | yglukhov joined #nim |
05:51:05 | * | rauss quit (Quit: WeeChat 1.9) |
05:52:21 | * | yglukhov quit (Ping timeout: 252 seconds) |
05:56:34 | * | skrylar joined #nim |
05:56:40 | skrylar | moop |
06:06:44 | * | endragor joined #nim |
06:33:43 | * | nsf joined #nim |
06:44:23 | * | Arrrr joined #nim |
06:44:23 | * | Arrrr quit (Changing host) |
06:44:23 | * | Arrrr joined #nim |
06:57:31 | skrylar | meh. i think the matrix math code should be usable now |
07:07:08 | * | Yardanico joined #nim |
07:12:21 | * | yglukhov joined #nim |
07:13:03 | * | yglukhov quit (Remote host closed the connection) |
07:13:15 | * | yglukhov joined #nim |
07:13:37 | * | gokr joined #nim |
07:17:11 | * | lguzzon joined #nim |
07:18:16 | * | lguzzon quit (Client Quit) |
07:22:23 | * | ShalokShalom joined #nim |
07:34:08 | Yardanico | Should I make a PR to add this proc to system module? https://gist.github.com/Yardanico/07e8cbc5abf8fb19a99bd957e3e8904a |
07:34:22 | Yardanico | it allows you to write something like yourarray[] = 0 |
07:34:26 | Yardanico | so all values will be set t 0 |
07:34:28 | Yardanico | *to 0 |
07:39:39 | * | endragor quit (Remote host closed the connection) |
07:45:43 | * | PMunch joined #nim |
07:53:04 | skrylar | Yardanico, the answer to "should i make a PR" is almost always yes because a PR is already a question |
07:53:29 | skrylar | the worst that happens is you get told "no" or something |
07:53:38 | Yardanico | skrylar, well, I don't know where to put this proc in (position |
07:53:50 | Yardanico | maybe somewhere near slicing procs? |
07:56:41 | Yardanico | and also - should I add a test? |
07:59:40 | PMunch | Preferably, tests are always good :) |
08:01:06 | Yardanico | well this proc is very small for any errors :) |
08:01:45 | PMunch | What is it? |
08:01:46 | skrylar | if you make the PR people can comment directly on the pr tho :\ |
08:02:07 | Yardanico | yeah |
08:02:08 | Yardanico | I'll do it |
08:02:16 | Yardanico | PMunch, https://gist.github.com/Yardanico/07e8cbc5abf8fb19a99bd957e3e8904a |
08:02:40 | Yardanico | like "mydata[] = 5" |
08:03:01 | PMunch | Aah, that could be practical |
08:03:15 | PMunch | As long as people simply don't misspell their index :P |
08:03:16 | Yardanico | should I add a example? :P |
08:03:29 | PMunch | The more documentation the better |
08:03:32 | Yardanico | ok |
08:03:43 | PMunch | Have you written a proper doc-string? You can add an example there |
08:04:10 | PMunch | With ..code-block: or something like that |
08:04:12 | Yardanico | yes |
08:04:33 | Yardanico | I've already used code blocks in simple API wrapper |
08:05:04 | * | nattefrost joined #nim |
08:05:25 | * | endragor joined #nim |
08:05:38 | Yardanico | https://github.com/nim-lang/Nim/pull/6271 |
08:07:42 | Yardanico | oh wait |
08:07:44 | Yardanico | I'm a noob |
08:09:01 | Yardanico | there's no ..< defined, so use arg.len-1 instead |
08:09:15 | Yardanico | (i mean it's not defined at that position in system) |
08:09:15 | * | vlad1777d_ joined #nim |
08:10:09 | * | endragor quit (Ping timeout: 248 seconds) |
08:10:13 | Yardanico | I get ~560 thousands iters/sec while setting all values in "var data: array[8000, int]" to 5 |
08:13:34 | Yardanico | I've never thought that it can be so easy to add some procedure to standart library of the language |
08:15:39 | skrylar | well nim is neat. |
08:15:49 | skrylar | mostly because of the universal a(b) = a.b thing |
08:15:59 | skrylar | so anything you bolt on for yourself can always look like it belongs there |
08:16:04 | Yardanico | yeah |
08:16:19 | Yardanico | also I'm amazed that "go to definition" works even for things like this procedure |
08:16:27 | Yardanico | (nimsuggest is great) |
08:16:43 | Yardanico | you just ctrl+click on []=, and VScode sends you to system.nim |
08:16:45 | skrylar | yea we need to bother devs to have a parser in the libs tho |
08:16:51 | skrylar | Go does it that way and that's why they have so many tools |
08:18:00 | PMunch | A parser? |
08:18:52 | skrylar | go has a package where you can just import the compiler's parser and tell it to parse a random go file, it gives you the ast |
08:19:11 | skrylar | so stuff like gofix just asks for the same parser go uses when they do their weird full ast transform things outside of macros |
08:20:20 | PMunch | You mean like parseStmt? |
08:20:31 | skrylar | if that exists, sure |
08:20:38 | PMunch | Just read your file into a string and use that on it and you get the full AST |
08:21:20 | Yardanico | and yeah, you can import nim compiler too :) |
08:22:37 | skrylar | dealing with quaternions right now x.x |
08:25:07 | * | chemist69 quit (Ping timeout: 255 seconds) |
08:29:35 | * | couven92 joined #nim |
08:31:31 | * | endragor joined #nim |
08:36:49 | * | endragor quit (Ping timeout: 276 seconds) |
08:39:10 | * | chemist69 joined #nim |
08:42:25 | * | Yardanico quit (Quit: Leaving) |
08:43:10 | * | Yardanico joined #nim |
08:59:32 | * | dom96|w joined #nim |
09:01:54 | * | jinshil quit (Quit: Good-bye!) |
09:10:52 | * | maxcroud joined #nim |
09:12:00 | * | Yardanico quit (Ping timeout: 252 seconds) |
09:13:52 | FromGitter | <krux02> quaternions are somewhat confusing, but yet very cool |
09:15:44 | * | Cacao_ joined #nim |
09:16:00 | Cacao_ | Hiya |
09:16:42 | Cacao_ | Can someone explain me something? |
09:16:53 | Cacao_ | i am stuck |
09:17:08 | couven92 | Cacao_, always: Just aks, if someone can help, we'll answer |
09:17:15 | dom96|w | Yes, don't "ask to ask" |
09:17:17 | couven92 | s/aks/ask |
09:17:28 | Cacao_ | cool, ok then, my question is |
09:17:30 | maxcroud | Hello! According to code of sameIdentifier proc https://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality Nim don't account en dashes in identifier names. But that's not true for me 0.17.0 |
09:18:06 | couven92 | maxcroud, example? |
09:18:35 | Cacao_ | 8=====D :D |
09:18:39 | Cacao_ | i will rape everyone |
09:18:45 | * | Cacao_ left #nim (#nim) |
09:18:57 | PMunch | maxcroud, that page is wrong.. It's supposed to be a hyphen, not an en dash.. |
09:19:15 | maxcroud | couven92:var a–b = true |
09:19:28 | maxcroud | var ab = false |
09:19:44 | PMunch | maxcroud, as I said. hyphen, not en-dash |
09:19:50 | PMunch | var a-b = true |
09:20:05 | PMunch | var ab = false # fails with identifier already used or something like that |
09:20:35 | maxcroud | Hm, but in manual there is en dash, isn't it? |
09:20:41 | PMunch | Yes |
09:20:57 | couven92 | i'll do a pr immediately |
09:20:59 | PMunch | But it is wrong, probably a bug with the ASCII -> HTML conversion |
09:21:00 | * | dom96|w quit (Read error: Connection reset by peer) |
09:21:35 | maxcroud | Just to clarify, hyphen is after zero on keyboard? |
09:21:36 | * | Yardanico joined #nim |
09:21:58 | couven92 | maxcroud, no, that depends very muhc on your keyboard! :P |
09:22:08 | PMunch | Depends on your layout |
09:22:16 | couven92 | On mine it's left to the right shift |
09:22:17 | PMunch | Mine is between S and < |
09:22:40 | maxcroud | Sorry :D |
09:22:43 | PMunch | maxcroud, does your keyboard have an en-dash button? |
09:22:57 | maxcroud | No |
09:23:30 | maxcroud | I mean, hyphen and "minus" operator are different? |
09:23:34 | * | endragor joined #nim |
09:23:35 | PMunch | No |
09:23:37 | PMunch | They are the same |
09:24:07 | maxcroud | So my example with hyphen doesn't compile |
09:24:13 | PMunch | 0x2D in ASCII |
09:24:15 | FromGitter | <krux02> well there different - things |
09:24:16 | couven92 | no, minus in the mathematical operator, hyphen is the name of the actual character, in the US they sometimes also call it the dash |
09:24:24 | FromGitter | <krux02> but normally when you type - it is just a minus |
09:24:46 | FromGitter | <BigEpsilon> Hi, I wrote a post on reddit to explain what may be the advantages of using nim compared to rust, if you want to upvote https://www.reddit.com/r/programming/comments/6viswu/d_as_a_better_c/dm20dwp/ |
09:25:44 | maxcroud | Thanks for explanation |
09:25:52 | PMunch | couven92, technically minus and hyphen could be considered separate characters. It's just that when typewriters came along they didn't want to/couldn't have buttons for everything. |
09:26:03 | FromGitter | <krux02> "but it you take into consideration" |
09:26:04 | couven92 | maxcroud, PMunch, @krux02: actually according to https://en.wikipedia.org/wiki/Hyphen Hyphen is the shortest of all these type-symbols... appearently the actual minus sign is longer than hyphen |
09:26:12 | PMunch | Really old keyboard could even lack two different keys for O and 0 |
09:26:30 | FromGitter | <krux02> well that would only typewriters do |
09:26:32 | PMunch | Oops, got to go. Back soon |
09:27:03 | skrylar | rust doesn't work |
09:27:07 | PMunch | Huh, in the manual/lexing.txt file the dash is also an en-dash. |
09:27:11 | PMunch | That's weird |
09:27:19 | skrylar | its supposed to enforce a specific memory model but that model isn't able to actually maintain a GUI |
09:27:27 | skrylar | i used it around 0.8-0.9 and broke it |
09:28:08 | * | endragor quit (Ping timeout: 240 seconds) |
09:29:21 | FromGitter | <krux02> well all programming languages that pretent something that isn't actually how things are, are essentially lying |
09:29:40 | FromGitter | <BigEpsilon> @krux02 thanks for the correction |
09:30:07 | FromGitter | <krux02> np |
09:33:09 | couven92 | maxcroud: PR https://github.com/nim-lang/Nim/pull/6272 will update the documentation once it's merged |
09:35:12 | Yardanico | if I have a sequence of NimNodes, how do I convert it to seq[string] to pass it to quote do? |
09:35:25 | Yardanico | my procedure accepts seq[string] |
09:35:43 | couven92 | Yardanico, call repr on all nodes? |
09:35:50 | couven92 | not really sure what you want to do? |
09:36:08 | * | endragor joined #nim |
09:36:24 | Yardanico | couven92, ok, this sequence of nimnodes contains nimnodes like @[$("one"), $(2)] |
09:36:41 | Yardanico | so I'm creating a call to $ to stringify it |
09:36:52 | Yardanico | and then I need to pass this resulting sequence to proc which accepts seq[string] |
09:38:01 | * | arnetheduck quit (Remote host closed the connection) |
09:38:16 | couven92 | wait what is your NimNode? `$("one")`, `("one")` or `"one"` |
09:38:55 | Yardanico | NimNode is a "Call: Ident !"$" IntLit 5" |
09:38:58 | Yardanico | they're like this |
09:39:04 | couven92 | okay |
09:39:14 | Yardanico | Call(Ident(!"$"), IntLit(5)) |
09:39:33 | * | arnetheduck joined #nim |
09:39:49 | * | maxcroud quit (Ping timeout: 260 seconds) |
09:40:56 | couven92 | Yardanico, can't you just call `newTree(nnkBracketExpr)` and then add your nodes to it? Then do a `prefix("@", bracketExpr)` |
09:41:10 | Yardanico | couven92, ah, probably I can |
09:43:03 | couven92 | Yardanico, ah, it's nnkBracket, not nnkBracketExpr |
09:43:05 | * | maxcroud joined #nim |
09:43:24 | couven92 | Yardanico, https://play.nim-lang.org/?gist=afdf1f2a4bfe1d1af321e3e74c882643 |
09:44:37 | Yardanico | yay, thanks! |
09:45:30 | Yardanico | I'm porting python's "print" to Nim :D |
09:45:37 | Yardanico | it's a bit of tricky |
09:45:52 | Yardanico | because it accepts any number of arguments, and then some named arguments |
09:45:55 | maxcroud | couven92: https://github.com/nim-lang/Nim/pull/6272 there is a minus |
09:46:55 | FromGitter | <krux02> uh |
09:46:58 | FromGitter | <krux02> not sure |
09:47:07 | FromGitter | <krux02> a-b is not a single adentifier |
09:47:13 | FromGitter | <krux02> it is a minus b |
09:47:35 | maxcroud | yes |
09:47:43 | FromGitter | <krux02> so you need the en-dash to actually join identifiers, don't you? |
09:48:00 | maxcroud | I don't need this option at all :) |
09:48:44 | maxcroud | I just want to figure out what symbols Nim omits in identifiers by default |
09:49:32 | FromGitter | <krux02> well the endash cannot be typed |
09:49:39 | FromGitter | <krux02> so you could simply ignore it |
09:49:54 | maxcroud | I checked every dash-like symbols from wikipedia |
09:50:17 | couven92 | @krux02 if you accent-quote it? |
09:51:01 | maxcroud | couven92: I did so |
09:52:28 | FromGitter | <krux02> well then you can even put spaces in it |
09:52:41 | couven92 | hmm... Araq? |
09:53:31 | couven92 | maxcroud, @krux02: https://play.nim-lang.org/?gist=1d19b4ff7c35e3bf1ee4fd933d08d937 |
09:53:38 | couven92 | it really is en-dash! |
09:54:11 | FromGitter | <krux02> but it is also space |
09:54:48 | FromGitter | <krux02> so this part is out of date |
09:55:27 | couven92 | @krux02 oh like this? :O |
09:55:41 | maxcroud | what is the version of Nim this playground uses? |
09:55:55 | Yardanico | 0.17.0 |
09:56:20 | maxcroud | https://play.nim-lang.org/?gist=cb9f8a347429f5ef650a17a46a0b5f9c |
09:56:21 | Yardanico | ah |
09:56:22 | Yardanico | I'm wrong |
09:56:24 | Yardanico | 0.16.0 |
09:56:29 | maxcroud | Okay |
09:56:30 | Yardanico | ping zacharycarter |
09:56:45 | Yardanico | "echo NimVersion" echoes 0.16.0 |
09:56:49 | maxcroud | This gist doesn't work with 0.17.0 |
09:57:39 | maxcroud | I mean it works, but shouldn't accordint to manual |
09:57:47 | couven92 | Yardanico, btw, this is how I replicated you problem: https://play.nim-lang.org/?gist=e69e1434d0fb99df409b1bd2f797eb10 |
09:58:17 | FromGitter | <krux02> well I created a keyboard shortcut in emacs to open a new file "/tmp/scratch.nim". and a keyboard shortcut to host the buffer content on ix.io |
09:58:24 | FromGitter | <krux02> so no playgrount required :P |
09:58:36 | FromGitter | <krux02> does the playground have a web api? |
09:58:44 | FromGitter | <krux02> so that I can use that to host nim code? |
09:58:53 | Yardanico | what do you mean by "host"? |
09:58:58 | Yardanico | it uses gist for storing code |
09:59:17 | FromGitter | <krux02> ah, ok, then I need the gist web api |
09:59:56 | FromGitter | <krux02> I really prefer to edit and compile locally than in the browser, but I really like to share, too. |
10:00:12 | Yardanico | well playground code is open-source |
10:00:23 | Yardanico | https://github.com/zacharycarter/nim-playground |
10:00:46 | FromGitter | <krux02> cool, did not know he did the playground |
10:01:12 | Yardanico | well it's only 135 lines of nim code |
10:01:20 | PMunch | couven92, good thing you fixed it. Weird how something like that would make it in there in the first place.. |
10:04:00 | PMunch | I have a system-global keyboard shortcut to take the current selection and make an ix.io link out of it which it places in my clipboard :) |
10:04:13 | PMunch | Very practical for sharing code snippets |
10:04:32 | Yardanico | guys, python's print in nim: https://play.nim-lang.org/?gist=ef01c377c45e615fdc163dd53d328f7f |
10:04:37 | Yardanico | gist link - https://gist.github.com/ef01c377c45e615fdc163dd53d328f7f |
10:04:55 | Yardanico | I was trying to do it without macro, but no success :) |
10:06:25 | PMunch | Huh, that's cool |
10:07:04 | * | dom96|w joined #nim |
10:07:07 | Yardanico | also, I've found that nnkArglist is the thing that I need by trial-and-error |
10:08:31 | Yardanico | well one thing - I can't keep "end" named like this, so I changed it to "endl" |
10:08:41 | dom96|w | Are you sure you need a macro for this? |
10:08:59 | Yardanico | dom96|w, how you would do it without a macro? |
10:09:02 | FromGitter | <krux02> you don't need a macro for that |
10:09:21 | Yardanico | it should accept any number of objects with any type, and then some keyword arguments |
10:09:28 | FromGitter | <krux02> just look at how mkstring from scala works |
10:09:34 | dom96|w | proc print(data: varargs[string, `$`], sep = " ", endl = "\n") |
10:10:14 | Yardanico | it didn't work when I tried to do this, lol |
10:10:17 | Yardanico | thanks :) |
10:10:31 | Yardanico | ah |
10:11:01 | Yardanico | you can't do that: print(1, 2, 3, 4) |
10:11:04 | Yardanico | with this proc |
10:11:20 | dom96|w | why not? |
10:11:23 | Yardanico | i'm not sure why |
10:11:34 | dom96|w | is it because of the default args? |
10:12:15 | Yardanico | Error: type mismatch: got (int literal(1), int literal(2), int literal(3), int literal(4)) |
10:12:15 | Yardanico | but expected one of: |
10:12:15 | Yardanico | proc print(data: varargs[string, `$`]; sep = " "; endl = "\x0A") |
10:12:26 | * | xet7 joined #nim |
10:12:28 | Yardanico | probably it is |
10:12:48 | Yardanico | there's no way to make "sep" an explicit keyword-named argument |
10:15:03 | Yardanico | well I'm fine with that |
10:15:13 | skrylar | i'm sure someone would say "wrap glm" to that i say no |
10:15:40 | FromGitter | <krux02> skrylar what is your issue? |
10:15:56 | FromGitter | <krux02> I wrote the nim glm for the most part |
10:16:43 | FromGitter | <krux02> and I tested quaternions, and did things wrong, yes, but I corrected them. |
10:16:55 | FromGitter | <krux02> Is there still a bug in quaternions? |
10:17:10 | maxcroud | https://github.com/nim-lang/Nim/commit/b652b3cd52bf284baa5b5152443fdc6cf2d404fc |
10:17:25 | couven92 | PMunch, I reverted, we discovered that endash was right all along |
10:17:46 | maxcroud | couven92: en-dash is removed |
10:19:28 | PMunch | Who would use an en-dash in their code? |
10:20:48 | maxcroud | One of the million maybe |
10:20:50 | FromGitter | <krux02> nobody it isn't even ASCII |
10:20:57 | FromGitter | <krux02> and not on any keyboard I know |
10:21:09 | FromGitter | <krux02> some word processors can replace it |
10:21:26 | PMunch | Yeah, that's why I was wondering why it was an ignored character like _ in Nim identifiers.. |
10:21:52 | FromGitter | <krux02> me too |
10:22:07 | FromGitter | <krux02> I think it is just confusing and should be removed from the language and the documentation |
10:22:34 | FromGitter | <krux02> in the documentation this en dash is just noise, no value in there |
10:22:44 | FromGitter | <krux02> you can't type it and you probably will never see code that uses it |
10:22:50 | PMunch | Apparently it has been removed from the language, just the documentation lagging behind |
10:23:01 | FromGitter | <krux02> take it out and make the language a better language |
10:23:49 | FromGitter | <krux02> ok then you can make the PR to remove the en-dash in the documentatino |
10:24:00 | FromGitter | <krux02> that would be an improvement |
10:24:10 | PMunch | couven92, made it but he reverted it because he thought it was still in |
10:24:38 | Yardanico | you can revert revert |
10:24:44 | couven92 | :D |
10:24:48 | couven92 | okay then... |
10:25:45 | * | endragor quit (Remote host closed the connection) |
10:25:45 | * | ShalokShalom_ joined #nim |
10:26:51 | couven92 | https://github.com/nim-lang/Nim/pull/6272 reopenend, and added the commit that removes endash from the docs |
10:28:21 | * | ShalokShalom quit (Ping timeout: 240 seconds) |
10:29:23 | FromGitter | <krux02> couven92, I think you could also remove the regular expression to make it simpler |
10:29:43 | FromGitter | <krux02> don't require users to understand regular expressions to understand that documentation |
10:31:02 | couven92 | @krux02 added |
10:33:03 | FromGitter | <krux02> thanks this PR will space the future generation of nim users from this confusion |
10:33:09 | FromGitter | <krux02> it did confuse me |
10:35:44 | couven92 | @krux02 what? can't you read regexp by heart? :P Fun fact: I spent two hours the other day writing a regexp subst. The final expression spanned two entire lines on my 2560px-wide screen |
10:36:57 | PMunch | Haha couven92 what on earth was that for? |
10:37:56 | couven92 | PMunch, converting all 5000 Windows Error code C defines into nim const defs. And before you ask: No I could not use c2nim for that |
10:38:14 | Yardanico | :D https://gist.github.com/Yardanico/f5a8efeaf230d963739a9905c010c6d6 |
10:38:16 | * | endragor joined #nim |
10:38:23 | Yardanico | (I only added replacing '' by "" in py2nim) |
10:38:26 | Yardanico | and reading from stdin/file |
10:38:47 | couven92 | PMunch, https://github.com/couven92/nim-windowssdk/blob/master/src/windowssdk/shared/winerror.nim |
10:38:56 | skrylar | hmm. i appear to have done something weird |
10:39:13 | * | skrylar wonders if anything bad happens from using 3x3 matrices and converting them to 4x4 in the end, instead of using 4x4s the whole time |
10:39:56 | couven92 | skrylar, eigenvalue and determinant calculations are more difficult for 4x4 iirc? |
10:40:12 | skrylar | couven92, no idea. i'm just doing basic 3d stuff for GL |
10:40:43 | skrylar | there are less flops if you use a smaller matrix and add transform last, but you do pay a copying cost at the end |
10:40:59 | couven92 | hmmm, I see |
10:41:39 | skrylar | i may go throw in the code for 4x4 stuff at some later point. there's no reason not to allow both, i just didn't want to fiddle with it yet |
10:42:45 | * | endragor quit (Ping timeout: 252 seconds) |
10:50:25 | skrylar | ah. figured it out |
10:50:37 | skrylar | if you want to rotate an object around an off-center point you do need the 4x4s all the way |
10:56:35 | * | Vladar joined #nim |
10:59:08 | * | Yardanico quit (Remote host closed the connection) |
11:04:41 | * | haha_ joined #nim |
11:16:04 | * | ShalokShalom_ is now known as ShalokShalom |
11:16:57 | Zevv | newbe request, probably discussed a lot of times: wouldn't it be nice if seq.del would return the deleted item? let v = someseq.del(0) |
11:17:33 | Zevv | or is this a typical case of "just make that yourself and stop whining"? |
11:17:49 | Araq | we have someseq.pop() |
11:18:11 | Araq | and deques in the stdlib, maybe you use the wrong data structure? |
11:18:30 | Zevv | pop it is. I missed that, it was a bit hidden in the noise of the 'system' doc page |
11:18:46 | Zevv | seq is good enough in this case, both add and del are O(1), and order does not matter for me |
11:18:54 | Zevv | just to keep a pool of HTTP clients around to allow for keepalive |
11:19:08 | Araq | ok |
11:19:11 | Zevv | thanks |
11:30:35 | FromGitter | <ephja> Araq: "var x: T" gives me a sym for T, but how do I get it in the "var x: module.T" case which yields idents instead? must I go through 'x'? |
11:31:19 | Araq | sym.owner? |
11:40:43 | FromGitter | <ephja> Araq: Hmm I dunno. here's what I'm trying to do: 1. retrieve all the symbols in module 'a ' where sym.flags * {sfExported} == {sfExported} 2. find all the symbols in module 'b' that are owned by module 'a' |
11:42:44 | FromGitter | <krux02> well in c++ you never need a stack, because std::vector serves the same purpose, but you should push and pop and the end, not the beginning. Nim is the same |
11:44:45 | * | BitPuffin|osx joined #nim |
11:45:01 | FromGitter | <ephja> that's an unnecessarily complicated set operation in this case :p |
11:47:08 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:51:19 | Araq | ephja: what is it you're trying to accomplish? |
11:55:02 | FromGitter | <ephja> Araq: module 'a' consists of bindings and I need to ensure that the high level interface 'b' references all the exported symbols. I don't want to take the (pre-semantic pass) parseStmt approach (my pass comes after the semantic pass) |
11:56:59 | * | krux02 joined #nim |
11:58:19 | krux02 | hello people I am back, yay ... |
11:59:36 | couven92 | krux02, the dark days of Gitter are over? |
12:03:58 | FromGitter | <ephja> I'm going to test this with much smaller files |
12:03:59 | krux02 | well I use both |
12:04:11 | krux02 | hard to say what I prefer |
12:04:24 | krux02 | gitter has nice things, this is nicer to type ni |
12:04:28 | krux02 | more resposnive |
12:04:46 | couven92 | yeah, I agree :) |
12:05:00 | krux02 | we live in a world where computers have terraflops in computational power and yet they struggle to render text |
12:05:59 | krux02 | the most important thing in any application beyond simplicity and functionality is spot on responsiveness |
12:06:03 | krux02 | any web app fails that |
12:10:07 | FromGitter | <ephja> I haven't experienced any such issues |
12:23:45 | * | dom96|w joined #nim |
12:30:35 | * | Yardanico joined #nim |
12:31:40 | * | xaxisx_ joined #nim |
12:34:39 | * | xaxisx quit (Ping timeout: 248 seconds) |
12:35:24 | krux02 | well it isn't that bad |
12:35:45 | krux02 | but comparet do what computers actually can to, it is really bad |
12:35:49 | krux02 | but noth worth whining about |
12:35:52 | krux02 | http://ix.io/znF |
12:36:11 | krux02 | i like macros |
12:36:22 | krux02 | they allow me to waste my time and not focus of what is actually important |
12:48:54 | FromGitter | <ephja> are statements like "when false and foo" folded to "when false"? |
12:52:58 | Araq | ephja: I doubt it :-) |
12:54:06 | * | arnaud2 joined #nim |
12:54:46 | * | Snircle joined #nim |
12:56:59 | krux02 | ephja, well the argument to when is evaluated at compile time, and the second argument is not evaluated. |
12:57:34 | krux02 | but that optimization also doesn't matter, because it is only evaluated once, so there is not point in compile time optimizing something |
12:57:58 | Yardanico | also, I've never had any issues with it, but what's the performance of Nim VM? |
12:58:16 | Yardanico | is it faster than other VMs? |
12:58:27 | krux02 | well, I never benchmarked it, but I would guess it somewhere like python |
12:58:33 | krux02 | so not especially fast |
12:59:02 | krux02 | there is no jit to native code happening like in Java or JavaScript |
12:59:18 | * | Vladar quit (Quit: Leaving) |
12:59:52 | krux02 | well the best answer I can give you, is: it shouldn't matter, don't do performance critical stuff at compile time |
13:00:36 | ehmry | I thought the VM was only used (or should be used) during compiliation |
13:00:39 | Yardanico | well yeah, I've never had any issues with it |
13:00:40 | Yardanico | ehmry, it is |
13:00:48 | Yardanico | ah |
13:00:53 | skrylar | ideally a module that does need to do something at compile time should only be getting built the once |
13:00:53 | Yardanico | also for nimscript probably? |
13:01:20 | Yardanico | also if you want performance-critical stuff at compile-time, you can create another program :) |
13:01:44 | krux02 | yes you call call other processes, but not really native functions |
13:02:29 | krux02 | the vm does not have the same memory layout as native nim and therefore very different performance characteristics |
13:02:36 | krux02 | just to straight forward things in the vm |
13:02:45 | krux02 | don't try to be too smart there |
13:06:04 | ehmry | as I recall you cannot cast or take address of variables, so high performance libraries tend not to work |
13:06:45 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
13:07:17 | ehmry | I tried to implement a hash function that would work at compile time and it got a bit complicated |
13:07:36 | krux02 | well I once used the tables module from compile time |
13:07:39 | krux02 | it was a mess |
13:07:41 | krux02 | nothing worked |
13:07:43 | krux02 | horrible |
13:08:12 | krux02 | it created issues and it was eventually fixed but it left a scar on how reliable the nimvm is |
13:08:30 | krux02 | the VM has bugs |
13:08:34 | Yardanico | well nim vm is quite complicated AFAIK |
13:08:49 | krux02 | and not just here and there, it is flawed and it needs a lot of work to get stable |
13:08:55 | * | rauss joined #nim |
13:09:43 | krux02 | as a programmer I don't care if it is complicated or simple, all I care about is that it works correctly and as expected, and that doesn't work |
13:10:12 | krux02 | it doesn't take a lot of effort to find differences of the VM and native nim code |
13:10:54 | ehmry | its still an improvement over other compiled languages |
13:11:35 | Yardanico | lool |
13:11:41 | Yardanico | I just read at slant: |
13:11:43 | Yardanico | "Go is blazing fast, but easier to write than Python, JS, Ruby, or many other dynamic languages." |
13:11:50 | Yardanico | "easier to write than Python, JS, Ruby" |
13:12:20 | krux02 | http://ix.io/znL |
13:12:28 | Araq | krux02: design a better VM. |
13:12:49 | * | skrylar quit (Ping timeout: 240 seconds) |
13:13:14 | Araq | can't be hard since you know everything better than me anyway |
13:13:15 | krux02 | Araq: I am already contributing to Nim as much as I can afford, still I want to point out the things that are the ugly side of Nim |
13:13:32 | krux02 | the bad parts that could be a good reason to stay away from Nim |
13:13:51 | krux02 | We all should be aware of it. |
13:14:03 | * | dom96|w joined #nim |
13:14:26 | rauss | +1 |
13:15:04 | rauss | Knowledge is power |
13:15:41 | Araq | "aware" of what? outdated bugs? |
13:16:13 | krux02 | Araq: What do you think is the most important reason to stay away from Nim? |
13:17:05 | Araq | a pessimistic community that doesn't understand software development tradeoffs |
13:17:06 | ehmry | i don't see how anyone is forced to use the VM if its an extra feature |
13:17:35 | Yardanico | ehmry, well macros depend on VM if i'm not wrong |
13:17:51 | Yardanico | and every constant procedure call |
13:18:00 | Zevv | krux02: I'm about to introduce Nim to my colleagues, so please enlighten me about these dark corners |
13:18:03 | Zevv | better to know in advance |
13:19:10 | ehmry | if you can't use a constant call or a macro its not really a regression in respect to other languages |
13:19:34 | Yardanico | yeah |
13:19:56 | krux02 | well the worst experience ist realld the, because the documentation praises the VM as something where I can execute any code. And that is simply not true. The code that I can execute on the VM is a subset of Nim. |
13:20:24 | Araq | I did a DFA minimization algorithm in Nim's VM. it was not buggy, it was too slow! |
13:20:33 | Araq | so I used staticExec as a workaround. |
13:21:19 | Araq | krux02: I don't see where we praise "run arbitrary Nim code at compiletime" |
13:24:12 | krux02 | I just try to find it again, but I remember it from the very beginning when I staretd learning Nim |
13:24:15 | * | relax joined #nim |
13:26:28 | krux02 | Araq: "you can write any kind of Nim code and the compiler will run it at compile time." |
13:27:01 | Araq | where is that? |
13:27:03 | Yardanico | it's about macros |
13:27:04 | Yardanico | https://nim-lang.org/docs/tut2.html#macros |
13:27:12 | Yardanico | ah |
13:27:24 | krux02 | ^ |
13:27:26 | krux02 | thanks |
13:29:19 | krux02 | I think here should be at least a few words about the limitations of the VM. |
13:29:58 | Yardanico | there's a mention of FFI |
13:30:15 | krux02 | yes, but that's not all |
13:30:29 | krux02 | no pointers because of a different memory model and different performance characteristics |
13:30:56 | Araq | I haven't written this paragraph :P |
13:31:02 | Araq | will change it |
13:31:03 | Araq | thanks |
13:31:13 | krux02 | ok thank you, too |
13:31:30 | * | mahmudov joined #nim |
13:34:30 | couven92 | any way to get the file directory in a config file? |
13:34:46 | couven92 | or get the directory of the file being compiled through config? |
13:36:25 | mahmudov | thnks yardanico pyloor code worked well. |
13:36:34 | mahmudov | pyloor's* |
13:37:44 | Yardanico | mahmudov, but I also suggest you to try "darksky" weather api |
13:37:58 | Yardanico | https://darksky.net/ |
13:38:01 | mahmudov | https://gist.github.com/milisarge/cc60d3cab7c70763f0d5b6780e9e677e |
13:39:45 | mahmudov | +1 yardanico |
13:42:09 | Yardanico | but it requires one additional api to use |
13:42:23 | Yardanico | google geocoding api |
13:42:38 | Yardanico | because darksky accepts latitude and longtitude coordinates |
13:42:52 | Yardanico | and if you want user to query his city - use google geocoding api :) |
13:45:51 | mahmudov | exactly i stored this code as an weather api usage example :) |
13:46:36 | Yardanico | also I forgot why I couldn't use json.to, maybe I was too lazy |
13:46:53 | mahmudov | but what is the wrong with: |
13:46:54 | mahmudov | humidity = int round day["humidity"].getFNum() |
13:47:01 | Yardanico | nothing wrong? |
13:47:16 | mahmudov | that dom96 says "i miss the day" |
13:47:43 | Yardanico | he meant that some time ago function calls without round brackets were not possible |
13:48:03 | mahmudov | ah ok i understood :) |
13:48:46 | Yardanico | mahmudov, you can also remove async features if you don't need them |
13:50:09 | * | ofelas joined #nim |
13:50:10 | dom96|w | yeah... IMO this borders on abuse of the language |
13:50:32 | dom96|w | So much so that I want to have another discussion about restricting it |
13:50:43 | dom96|w | But I'm sure Araq will tell me that it's this way for a good reason. |
13:51:22 | Araq | ignorance is a poor starting point for a discussion |
13:51:57 | Yardanico | well sometimes (like here) you would write it as int(round(day["temp"]["day"].getFNum())) - 273 which I don't like very much |
13:52:18 | Araq | f g h # f(g(h)) or f(g, h) ??? --> the only consistent meaning is f(g(h)) and that's what Nim choose |
13:53:17 | * | Arrrr quit (Read error: Connection reset by peer) |
13:54:39 | mahmudov | hm but more than one or two,using () looks stable way |
13:55:19 | Araq | e f g, h # hmm, e(f(g, h)) or e(f(g), h)? |
13:55:35 | Araq | replace 'e' with 'echo' to see what happens here |
13:56:11 | Araq | and the restriction that exists here is that it's only valid as a statement, not as an expression |
13:56:39 | Yardanico | Araq, it would be second one? e(f(g), h)? |
13:56:39 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
13:57:08 | Araq | in other words: command call statements work as in Python, command call expresions are restricted to a single argument already |
13:57:12 | * | dom96|w joined #nim |
14:05:05 | dom96|w | My point is that there should only be one level of nesting of this. |
14:05:20 | dom96|w | humidity = int round(day["humidity"].getFNum()) |
14:05:26 | dom96|w | That's fine |
14:05:29 | mahmudov | +1 |
14:05:31 | dom96|w | humidity = int round day["humidity"].getFNum() |
14:05:33 | dom96|w | is too much |
14:09:46 | krux02 | dom96|w: I could break an example in the nimble readme.md |
14:09:51 | krux02 | cd `nimble path argument_parser` |
14:10:23 | krux02 | when nimble spams to stdout hints and stuff to stdout this simply doesn't work |
14:10:56 | * | dddddd joined #nim |
14:11:20 | dom96|w | krux02: fixed in HEAD |
14:11:38 | krux02 | ok thanks |
14:11:44 | crem | Someone told that seq and strings are going to be non-nil by default. Any estimation when will that happen? |
14:12:10 | krux02 | crem: well I am working on a PR, but araq said it will not be merged before the next release |
14:12:36 | crem | Which is still this year or later? |
14:12:40 | krux02 | at it will be more a "you wouldn't see that there is still a nil value" than actually non nil |
14:12:49 | krux02 | don't know |
14:12:57 | krux02 | and it is non trivial to implement |
14:13:02 | krux02 | because reasons |
14:13:05 | crem | ok! |
14:14:06 | Yardanico | crem, just "var data: seq[int]" would create an empty seq which will not SIGSEGV (if I understood it correctly) |
14:14:28 | Araq | dom96|w: only one level of nesting? what happened to our beloved "consistency" argument? |
14:14:54 | crem | Yardanico: you mean currently? |
14:15:14 | euantor | yeah, having arbitrary rules like that would just confuse things - allow completely or disallow completely makes more sense to me |
14:15:27 | Yardanico | crem, not currently, but after this change |
14:15:45 | crem | Sounds good. |
14:18:29 | Yardanico | and same for strings too |
14:18:32 | dom96|w | Araq: so consistency is the only reason for this? |
14:20:38 | Araq | well this is real consistency at work here, parsers are recursive beasts. it's not the usual "there is proc foo for Tables, now we need it for Button too or else I will claim Nim is designed like Bash" |
14:22:36 | Araq | "so consistency is the only reason why if statements can be nested?" do you see the problem with this question? |
14:24:07 | * | gokr quit (Ping timeout: 260 seconds) |
14:25:01 | Araq | https://tech.ahrefs.com/skylake-bug-a-detective-story-ab1ad2beddcd |
14:25:14 | * | PMunch quit (Quit: Leaving) |
14:26:53 | Yardanico | lol, I've read translation of this on habrahabr |
14:27:21 | Yardanico | ah no |
14:27:48 | dom96|w | Araq That's fair, and just like with if statements you shouldn't nest them too much |
14:28:02 | dom96|w | One level should be the sane limit |
14:31:41 | * | couven92 quit (Quit: Client disconnecting) |
14:33:08 | * | Melody_ joined #nim |
14:33:16 | Melody_ | Hello |
14:33:30 | Yardanico | hi |
14:33:47 | * | yglukhov quit (Remote host closed the connection) |
14:33:57 | Melody_ | If i suck your dick then you gonna stop programming in this shitty language? |
14:34:09 | Yardanico | ah, guys, it's Cider |
14:34:15 | Melody_ | XD |
14:34:24 | Melody_ | Rust is the best |
14:34:26 | Yardanico | I knew it because he used "smuxi" |
14:34:37 | Melody_ | oh XD |
14:34:59 | Melody_ | Really, guys, Nim isn't even stable |
14:34:59 | * | maxcroud quit (Ping timeout: 260 seconds) |
14:35:23 | Melody_ | stop using Nim |
14:35:43 | krux02 | Melody_: I use Nim because of the metaprogramming that is possible in Nim |
14:35:48 | dom96|w | Araq ban this person please |
14:35:57 | Melody_ | btw, the forum isn't fully protected, it is easy to bypass cloudflare |
14:36:05 | Melody_ | how? |
14:36:09 | Melody_ | with the forum's email |
14:36:16 | Melody_ | when you get the verification email |
14:36:16 | krux02 | I actually started my project in Rust but early saw that Rust is not suitable |
14:36:21 | Melody_ | you can see the forum's ip |
14:36:23 | Melody_ | XD |
14:36:27 | Melody_ | in the email |
14:36:33 | Melody_ | just checking the headers |
14:36:51 | dom96|w | Melody_ noob |
14:36:56 | krux02 | Melody_: well here are the developers of Nim with a lot of investment in this language, you will not convince anybody |
14:37:00 | * | Melody_ left #nim (#nim) |
14:37:24 | Yardanico | I think we have a new persistent troll |
14:37:37 | Yardanico | Does he have a plugin to automatically leave then someone gets op mode? |
14:37:38 | relax | validation! |
14:37:52 | Yardanico | also, about forum - I think he's true about it |
14:38:14 | * | yglukhov joined #nim |
14:38:24 | Yardanico | yeah |
14:38:26 | Yardanico | he is |
14:38:42 | Yardanico | "DigitalOcean Amsterdam" |
14:38:42 | krux02 | I don't think he is a troll, I think he is in the "this is the true programming language" state |
14:39:00 | krux02 | he started to believe |
14:39:19 | krux02 | young and inexperienced |
14:39:44 | Yardanico | so probably mail server needs to be moved onto another vps/ip |
14:40:05 | relax | have you there been troubles with DoS attacks? |
14:40:06 | dom96|w | he's not |
14:40:10 | * | chemist69 quit (Ping timeout: 276 seconds) |
14:40:20 | Yardanico | dom96|w, why? |
14:40:31 | Yardanico | relax, cloudflare is mostly for bot protection |
14:40:40 | Yardanico | and for anti DoS too |
14:41:28 | Yardanico | dom96|w, this IP is already mentioned in some posts/github issues, so it's safe to post it here: 178.62.143.63 |
14:41:32 | Yardanico | redirects to nim forum |
14:41:48 | Yardanico | oh wait |
14:42:49 | * | yglukhov quit (Ping timeout: 240 seconds) |
14:43:25 | Yardanico | it really seems so |
14:43:49 | Yardanico | IP address of nim-lang.org and forum is 104.28.18.79 which is cloudflare |
14:44:38 | krux02 | dom96|w: I just pulled the latest version of nimble |
14:44:58 | krux02 | nimble path still produces a lot of clutter and I cant compile my project anymore because of that |
14:45:46 | krux02 | https://github.com/krux02/nimAntTweakBar/blob/master/AntTweakBar.nim#L25 |
14:45:51 | krux02 | that line doesn't work anymore |
14:46:32 | dom96|w | latest version or HEAD? |
14:46:39 | dom96|w | there is a difference |
14:48:02 | crem | I've just occasinally clicked on "Andreas Rumpf" link in bottom-right corner of forum, and it leads to non-existant nim-lang.org/blog/, should be nim-lang.org/blog.html |
14:49:10 | krux02 | dom96|w: I did './koch tools' in the devel brach in nim |
14:49:22 | krux02 | so the main nim repository |
14:50:14 | * | relax quit (Ping timeout: 255 seconds) |
14:51:56 | krux02 | don't just fix the broken link, check if there is a systematic error |
14:52:22 | * | relax joined #nim |
14:53:03 | * | chemist69 joined #nim |
14:55:12 | Yardanico | why not make "blog" equal to "blog.html"? |
14:55:21 | Yardanico | or all links like that |
14:59:07 | * | xet7 quit (Ping timeout: 260 seconds) |
15:02:47 | dom96|w | Yardanico: that's an old VPS that I need to shut down, there is some stuff still running there but it's not used. |
15:02:54 | dom96|w | krux02: checked `nimble -v`? |
15:02:58 | dom96|w | it should show the git commit now |
15:03:48 | * | nsf quit (Quit: WeeChat 1.9) |
15:04:08 | Yardanico | dom96|w, good to know it |
15:05:19 | * | arnetheduck quit (Ping timeout: 240 seconds) |
15:05:41 | * | BitPuffin|osx quit (Ping timeout: 240 seconds) |
15:17:51 | * | yglukhov joined #nim |
15:20:30 | * | krux02 quit (Ping timeout: 252 seconds) |
15:20:57 | * | cspar_ quit (Ping timeout: 240 seconds) |
15:21:00 | * | gokr joined #nim |
15:21:22 | * | ShalokShalom quit (Ping timeout: 255 seconds) |
15:21:34 | * | PMunch joined #nim |
15:22:09 | * | yglukhov quit (Ping timeout: 252 seconds) |
15:24:18 | * | Trustable joined #nim |
15:33:36 | * | yglukhov joined #nim |
15:34:38 | * | krux02 joined #nim |
15:49:10 | * | Trustable quit (Remote host closed the connection) |
15:49:23 | Yardanico | Also guys - if you want to test your app on another platform - I have macOS (Sierra), Linux (Arch), and Windows 10, so I can test on all 3 major OSes :) |
15:49:46 | Yardanico | but not *legal* macOS, it's a hackintosh |
16:02:42 | * | gokr quit (Ping timeout: 260 seconds) |
16:03:16 | * | Vladar joined #nim |
16:05:41 | * | ShalokShalom joined #nim |
16:21:03 | * | cspar joined #nim |
16:41:05 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:46:16 | krux02 | how do I get a temp file? |
16:49:43 | * | haha_ quit (Quit: haha_) |
16:52:39 | * | haha_ joined #nim |
16:55:01 | * | haha_ quit (Client Quit) |
16:59:46 | * | nattefrost quit (Remote host closed the connection) |
17:01:25 | * | haha_ joined #nim |
17:10:19 | FromGitter | <zacharycarter> O.o my talk on Nim is tomorrow |
17:10:21 | FromGitter | <zacharycarter> finally |
17:12:04 | FromGitter | <krux02> cool |
17:14:47 | * | Moo joined #nim |
17:14:50 | * | Moo left #nim (#nim) |
17:15:21 | * | Moo joined #nim |
17:15:23 | Moo | Araq XD FUCK YOU! |
17:15:25 | * | Moo left #nim (#nim) |
17:15:37 | * | arnaud2 quit (Ping timeout: 260 seconds) |
17:16:23 | Yardanico | 190.8.32.137 |
17:16:29 | Yardanico | but his IP is dynamic sadly :( |
17:19:21 | Demos[m] | huh it looks like getTmpDir may return a dos style filepath |
17:19:48 | Demos[m] | yup |
17:20:31 | Demos[m] | it just returns $env:TEMP |
17:22:49 | Demos[m] | is it reasonable to switch this to GetTempPath from the kernel32 |
17:24:52 | FromGitter | <zacharycarter> def-: are you around by any chance? |
17:26:25 | * | nsf joined #nim |
17:31:01 | * | haha_ quit (Quit: haha_) |
17:32:17 | Demos[m] | problem: ospaths needs to work in nims |
17:38:50 | Yardanico | Demos[m], I don't know about nims, but ospaths works at compile-time |
17:39:08 | Demos[m] | yeah that's what I mean |
17:39:13 | Demos[m] | so it can't call into the winapi |
17:42:34 | * | arnaud2 joined #nim |
17:45:11 | Demos[m] | oh JFC is this a special case in windows |
17:45:16 | Demos[m] | I think I debutgged this before |
17:50:21 | * | nhywyll joined #nim |
17:53:35 | * | gokr joined #nim |
17:59:01 | FromGitter | <Jipok> hey, can anyone briefly tell about arduino+nim? |
17:59:18 | rauss | Jipok: What about it? |
17:59:25 | FromGitter | <Jipok> https://github.com/gokr/ardunimo |
17:59:40 | FromGitter | <Jipok> is relevant? |
18:00:00 | gokr | I haven't pursued it - but... it worked. |
18:00:22 | rauss | Jipok: Yes. gokr is the best person to ask, as he has done the most (publically) with it. I've tried some of his examples is all |
18:00:32 | gokr | rauss: Oh, cool |
18:01:07 | gokr | I am actually right now working with LoRaWAN and a bunch of Sodaq ONEs. They have a fairly decent CPU, but haven't had time to try Nim on it. |
18:01:13 | gokr | The ESP32 would be fun though. |
18:02:32 | FromGitter | <Jipok> Just this status |
18:02:37 | FromGitter | <Jipok> Latest commit 61abf08 on 25 Feb 2016 |
18:02:51 | FromGitter | <Jipok> I got scared off |
18:03:00 | Yardanico | well if it works - why commit to it ? :) |
18:03:15 | Yardanico | maybe it doesn't work now thought (because some things changed) |
18:03:21 | Yardanico | but it would be easy to fix |
18:03:50 | gokr | I just lost the time I had playing with it |
18:04:15 | gokr | The thing is - it works just fine - but it takes time to wrap libraries. |
18:04:28 | gokr | Ok, gotta go - have to play Zelda with my daughter ;) |
18:06:07 | * | haha_ joined #nim |
18:11:38 | * | krux02 quit (Remote host closed the connection) |
18:14:44 | * | couven92 joined #nim |
18:27:27 | * | haha_ quit (Quit: haha_) |
18:27:49 | * | Vladar quit (Quit: Leaving) |
18:28:29 | * | Jesin quit (Quit: Leaving) |
18:37:03 | * | sleepyqt joined #nim |
18:41:18 | * | endragor joined #nim |
18:42:30 | * | miran joined #nim |
18:43:11 | miran | hi guys, new user here (just started couple of hours before, currently comparing some basic examples with pyhon) |
18:43:24 | * | dom96|w joined #nim |
18:44:00 | miran | is there a way to do what is in python: [True] * 5 ? |
18:44:17 | * | haha_ joined #nim |
18:44:20 | * | haha_ quit (Client Quit) |
18:44:30 | Demos[m] | well you could absolutely define that operator |
18:45:02 | * | haha_ joined #nim |
18:45:22 | Demos[m] | however cycle in sequtils seems good |
18:45:24 | miran | i've done this: newSeq[bool](5), which gives [False] * 5 |
18:45:38 | Demos[m] | @[true].cycle(5) |
18:45:55 | Demos[m] | or true.repeat(5) |
18:46:31 | Yardanico | miran, yeah, Nim's type, almost similar for list is sequence (seq) |
18:46:43 | Yardanico | but seq can hold only elements of one type |
18:47:08 | miran | thank you guys, i didn't know about sequtils module |
18:47:13 | Yardanico | and you can define `*` yourself :) |
18:47:58 | miran | i'll leave my defining of operators for some other time, when i learn nim basics ;) |
18:48:20 | Yardanico | btw, I started implementing some simplest python functions in nim |
18:48:29 | Demos[m] | yeah, defining that just to look like python would probably be confusing anyway |
18:48:45 | Yardanico | but please don't use them unless you REALLY need to (better to use nim's original procs) |
18:48:46 | Yardanico | https://github.com/Yardanico/nimpylib |
18:48:47 | * | dom96|w quit (Ping timeout: 246 seconds) |
18:48:50 | Yardanico | just playing around :) |
18:49:13 | Yardanico | py2.nim isn't mine, it's author is Araq |
18:49:54 | Yardanico | pylib currently implements print, input, range, str/int/float/bool type conversion |
18:50:04 | Yardanico | but really don't use it now, better to learn nim first |
18:52:39 | miran | speaking of nim/python: any way to do seq[2..5] = value? |
18:54:15 | miran | oh, it can be done with repeat, again |
18:57:14 | * | Jesin joined #nim |
18:59:17 | * | xet7 joined #nim |
19:02:57 | * | hobomatic joined #nim |
19:17:21 | Yardanico | how does bool(5) work in Nim? |
19:17:24 | Yardanico | where is it defined? |
19:18:22 | * | askatasuna quit (Ping timeout: 264 seconds) |
19:22:04 | * | vlad1777d_ quit (Remote host closed the connection) |
19:23:59 | * | vlad1777d joined #nim |
19:26:41 | * | couven92 quit (Ping timeout: 240 seconds) |
19:27:58 | * | miran quit (Quit: Leaving) |
19:33:18 | * | haha_ quit (Quit: haha_) |
19:35:21 | * | arnaud2 quit (Ping timeout: 240 seconds) |
19:38:05 | * | vlad1777d quit (Ping timeout: 240 seconds) |
19:44:10 | * | arnaud2 joined #nim |
19:51:31 | * | vlad1777d joined #nim |
19:58:33 | Demos[m] | bool is a type and bool(5) is a cast |
19:59:15 | Demos[m] | didn't even know you could do that in python without numpy |
20:05:28 | Yardanico | Demos[m], but how it's able to cast 5 to bool enum which has only false = 0, true = 1 values? |
20:06:35 | Demos[m] | the size of bool is actually 1 byte |
20:08:26 | * | ShalokShalom quit (Remote host closed the connection) |
20:10:26 | Demos[m] | huh |
20:10:38 | Demos[m] | not sure when it will cast and when it will refuse to do so |
20:11:02 | Yardanico | Demos[m], well yeah you're right |
20:11:14 | Yardanico | ah |
20:11:15 | Yardanico | no |
20:11:22 | Yardanico | echo bool(351125125) |
20:11:23 | Yardanico | true |
20:12:49 | Demos[m] | it seems to die any time I try and do something questionable with that cast |
20:13:00 | Demos[m] | and it always dies in the VM |
20:17:34 | * | ofelas quit (Quit: shutdown -h now) |
20:17:48 | * | Sentreen quit (Ping timeout: 240 seconds) |
20:19:22 | * | relax quit (Ping timeout: 260 seconds) |
20:19:57 | * | relax joined #nim |
20:26:31 | dom96 | It must just be treating any non-zero value as true |
20:31:07 | * | Sentreen joined #nim |
20:42:13 | * | BitPuffin|osx joined #nim |
20:46:45 | * | Yardanico quit (Remote host closed the connection) |
20:58:31 | * | endragor quit (Remote host closed the connection) |
21:06:04 | * | sz0 joined #nim |
21:06:12 | * | rauss quit (Quit: WeeChat 1.9) |
21:06:40 | * | mahmudov quit (Remote host closed the connection) |
21:17:27 | * | gangstacat joined #nim |
21:27:54 | * | relax quit (Ping timeout: 252 seconds) |
21:29:57 | hobomatic | while doing some project euler exercises, I ran into this when messing around with higher order iterators: https://pastebin.com/UbVKFMw9 |
21:30:18 | hobomatic | not sure if its a known issue, so i figured I'd ask about it here before making an issue |
21:37:10 | hobomatic | maybe my closure pragmas are doing something spooky? IDK |
21:37:54 | * | couven92 joined #nim |
21:39:13 | dom96 | hobomatic: c code gen errors are always an issue |
21:39:16 | dom96 | so report it :) |
21:39:37 | hobomatic | alrightr |
21:40:08 | * | endragor joined #nim |
21:44:57 | * | endragor quit (Ping timeout: 252 seconds) |
21:51:05 | * | PMunch quit (Quit: leaving) |
21:54:12 | * | Jesin quit (Quit: Leaving) |
21:54:57 | * | big_num joined #nim |
22:18:38 | * | ShalokShalom joined #nim |
22:22:50 | * | nsf quit (Quit: WeeChat 1.9) |
22:26:03 | * | ShalokShalom quit (Remote host closed the connection) |
22:40:16 | * | vlad1777d quit (Remote host closed the connection) |
22:40:43 | TheManiac | Does anyone know if you can use `osproc` to implement something like a shell pipeline? |
22:41:46 | TheManiac | stackoverflow suggests I need to copy the output stdout of process 1 to the input stdin of process 2 using C's `dup2`, but is there a way to do it without delving into C? |
22:42:07 | TheManiac | (I roughly understand C syntax, but have little to no experience actually using it to do low level stuff like that) |
22:42:58 | * | vlad1777d joined #nim |
22:44:26 | TheManiac | so would rather stay in nim :) |
22:45:38 | * | mahmudov joined #nim |
22:46:17 | dom96 | well you can always wrap C's `dup2` |
22:48:46 | TheManiac | actually, following the code, seems like `posix.nim` has already done that for me |
22:56:13 | * | xet7 quit (Quit: Leaving) |
22:58:23 | * | couven92 quit (Quit: Client Disconnecting) |
23:01:55 | FromGitter | <zacharycarter> I have some questions I think that might be asked about my presentation tomorrow |
23:02:02 | FromGitter | <zacharycarter> are database connections in the various db modules pooled? |
23:02:18 | FromGitter | <zacharycarter> or are there implementations of connection pools? |
23:03:52 | dom96 | they aren't AFAIK |
23:04:00 | dom96 | the db modules are fairly light |
23:04:44 | FromGitter | <zacharycarter> thanks |
23:05:09 | FromGitter | <zacharycarter> actually I guess that was the only question I had so far |
23:11:51 | * | vlad1777d quit (Ping timeout: 252 seconds) |
23:18:27 | * | nhywyll quit (Ping timeout: 252 seconds) |
23:24:24 | * | vlad1777d joined #nim |
23:26:25 | * | BitPuffin|osx quit (Remote host closed the connection) |
23:33:24 | * | yglukhov quit (Remote host closed the connection) |
23:40:06 | FromGitter | <zacharycarter> how can I dump a variable with the nodejs backend? |
23:42:24 | FromGitter | <zacharycarter> nm |
23:43:04 | * | jinshil joined #nim |
23:47:53 | FromGitter | <zacharycarter> hrm ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=599f65a9ba0f0f6e38dda8e0] |
23:48:06 | FromGitter | <zacharycarter> that logs - [Function: Application] |
23:48:12 | FromGitter | <zacharycarter> yet I can't invoke koa() |
23:56:28 | * | ShalokShalom joined #nim |