00:00:06 | dtscode | I tried like 3 different things |
00:00:17 | dom96 | --il:logs/ ? |
00:00:56 | dtscode | God damn it |
00:01:02 | dtscode | I could have sworn I tried that |
00:01:12 | dtscode | I promise I'm not completely hopeless :D |
00:01:15 | cazov | if the colon one works then the help text in the bot source is incorrect |
00:01:23 | dom96 | indeed |
00:01:29 | dom96 | correct that please |
00:01:38 | dtscode | ok |
00:02:07 | dom96 | I need to head to sleep now |
00:02:15 | dtscode | ok. Thanks for the help |
00:02:23 | vikaton | sleep tight >:D dom96 |
00:02:24 | dom96 | np, bye |
00:05:49 | * | kumul quit (Ping timeout: 264 seconds) |
00:06:16 | ozra | g'night! |
00:07:36 | ozra | And time for me too. Hack tight! |
00:09:29 | * | Jesin quit (Quit: Leaving) |
00:09:45 | onionhammer | ls |
00:10:04 | dtscode | porn/ Desktop/ Documents/ Downloads/ |
00:10:52 | onionhammer | ;:D |
00:11:06 | onionhammer | please, it would be "stuff" not "porn" ;) |
00:11:32 | flaviu | Desktop/ I can understand, there's that firefox bug, but Documents/ and Downloads/? |
00:11:41 | flaviu | Do you love typing that much? |
00:12:29 | flaviu | dtscode: You should report a bug in that ls program, it's not in alphabetical order. |
00:13:20 | dtscode | flaviu: p comes before D |
00:13:33 | dtscode | in the alphadtsbet |
00:14:17 | flaviu | Nope, the order is "Desktop Documents Downloads porn" |
00:14:39 | dtscode | Not in the alphadtsbet |
00:15:46 | * | solidsnack joined #nim |
00:30:49 | * | ozra quit (Ping timeout: 246 seconds) |
00:31:54 | * | zahary quit (Ping timeout: 245 seconds) |
00:39:56 | * | strcmp1 joined #nim |
00:46:44 | * | BitPuffin|osx quit (Remote host closed the connection) |
00:52:20 | * | solidsnack quit (Ping timeout: 246 seconds) |
01:17:04 | * | vendethiel joined #nim |
01:31:00 | * | jaco60 quit (Ping timeout: 265 seconds) |
01:32:18 | * | BitPuffin|osx joined #nim |
01:40:27 | * | vendethiel quit (Ping timeout: 276 seconds) |
01:42:20 | * | boydgreenfield joined #nim |
01:59:09 | * | boydgreenfield quit (Quit: boydgreenfield) |
02:07:44 | * | HOLYCOWBATMAN dance┌(° o °)┘ dance └(° o °)┐ |
02:08:10 | dtscode | HOLYCOWBATMAN: Note that there is #nim-offtopic |
02:08:21 | filwit | \me ~(@ o @)~ |
02:08:33 | * | filwit ~(@ o @)~ |
02:08:42 | filwit | i always get that wrong |
02:09:09 | * | boydgreenfield joined #nim |
02:13:44 | HOLYCOWBATMAN | dtscode: Note that there is #nim-offtopic |
02:14:06 | * | gokr quit (Quit: Leaving.) |
02:14:12 | dtscode | Yes. That is what I just said |
02:15:38 | * | gsingh93 quit (Ping timeout: 256 seconds) |
02:19:52 | HOLYCOWBATMAN | preaching by example is nice |
02:22:43 | * | darkf joined #nim |
02:24:56 | dtscode | I'm already in there. |
02:25:18 | dtscode | My point is things like* HOLYCOWBATMAN dance┌(° o °)┘ dance └(° o °)┐ belong in #nim-offtopic |
02:25:29 | dtscode | I don't see why you're making a bidder deal out of it than that |
02:26:13 | * | boydgreenfield quit (Quit: boydgreenfield) |
02:29:19 | HOLYCOWBATMAN | dtscode: my point is plenty of things belong in #nim-offtopic |
02:29:21 | HOLYCOWBATMAN | I don't see why you're making a bidder deal out of it than that |
02:29:50 | dtscode | Yes they do. Such as your comment. I'm not making a bigger deal out of it than that because that is my only point |
02:30:30 | HOLYCOWBATMAN | such as plenty of your comments |
02:30:45 | dtscode | No |
02:30:54 | Heartmender | the ignore list is a great thing |
02:46:25 | * | HOLYCOWBATMAN left #nim (#nim) |
02:50:24 | * | solidsnack joined #nim |
02:57:08 | * | _44535463686f646 joined #nim |
03:04:20 | * | solidsnack quit (Read error: Connection reset by peer) |
03:04:30 | * | solidsna_ joined #nim |
03:06:59 | * | Jesin joined #nim |
03:08:26 | * | Siecje left #nim (#nim) |
03:09:08 | * | dtscode quit (Read error: Connection reset by peer) |
03:15:10 | * | solidsna_ quit (Ping timeout: 272 seconds) |
03:15:16 | * | fowl joined #nim |
03:23:38 | * | jefus quit (Ping timeout: 256 seconds) |
03:33:36 | * | vikaton quit (Quit: Connection closed for inactivity) |
03:55:40 | * | BitPuffin|osx quit (Ping timeout: 258 seconds) |
03:56:06 | * | Senketsu quit (Read error: Connection reset by peer) |
04:01:02 | * | johnsoft quit (Ping timeout: 256 seconds) |
04:01:03 | * | gsingh93 joined #nim |
04:01:49 | * | johnsoft joined #nim |
04:04:40 | * | dtscode joined #nim |
04:15:12 | * | Jesin quit (Quit: Leaving) |
04:15:50 | * | jefus joined #nim |
04:17:33 | * | ddl_smurf quit (Quit: ddl_smurf) |
04:23:21 | * | johnsoft quit (Ping timeout: 240 seconds) |
04:23:51 | * | johnsoft joined #nim |
04:34:40 | * | gsingh93 quit (Ping timeout: 265 seconds) |
04:47:17 | * | ddl_smurf joined #nim |
05:00:51 | * | endragor joined #nim |
05:01:08 | * | endragor quit (Remote host closed the connection) |
05:01:45 | * | endragor joined #nim |
05:05:59 | * | cmdprmt joined #nim |
05:07:03 | cmdprmt | Who do I talk to if something is wrong with the Nim forum? |
05:09:11 | * | jackv quit (Ping timeout: 256 seconds) |
05:09:43 | * | cmdprmt quit (Client Quit) |
05:10:41 | _44535463686f646 | https://github.com/nim-lang/nimforum |
05:11:44 | _44535463686f646 | cmdprmt: ^ |
05:12:04 | _44535463686f646 | dat 3 min connection |
05:13:53 | * | strcmp1 quit (Quit: Leaving) |
05:14:50 | * | Dragonbird joined #nim |
05:18:57 | * | pregressive quit (Remote host closed the connection) |
05:31:05 | * | Jesin joined #nim |
05:36:02 | * | BlaXpirit joined #nim |
06:20:35 | * | ggVGc quit (Ping timeout: 256 seconds) |
06:22:49 | * | ggVGc joined #nim |
06:22:49 | * | ggVGc quit (Changing host) |
06:22:49 | * | ggVGc joined #nim |
06:34:15 | * | OnO joined #nim |
06:38:41 | * | jackv joined #nim |
06:40:43 | dtscode | _44535463686f646: Thats an old release of it |
06:41:44 | * | Jesin quit (Quit: Leaving) |
06:48:47 | * | gokr joined #nim |
06:48:56 | * | gokr quit (Read error: Connection reset by peer) |
07:03:10 | * | johnsoft quit (Ping timeout: 272 seconds) |
07:04:25 | * | johnsoft joined #nim |
07:06:53 | * | endragor_ joined #nim |
07:10:17 | * | endragor quit (Ping timeout: 272 seconds) |
07:14:39 | * | ErikBjare_ quit (Ping timeout: 265 seconds) |
07:16:12 | * | Dragonbird quit (Quit: This computer has gone to sleep) |
07:16:28 | * | ErikBjare_ joined #nim |
07:16:46 | * | gokr joined #nim |
07:17:13 | dtscode | <darkf> dtscode: you should tell them nimforum actually looks like ass |
07:17:16 | dtscode | apparently |
07:17:42 | darkf | dtscode: you could work on the style |
07:22:03 | * | endragor_ quit (Remote host closed the connection) |
07:23:49 | Varriount | I like the look of NimForum.... :< |
07:28:30 | dtscode | Me too |
07:30:22 | Varriount | dtscode: It's refreshingly non-phpbb like, for one thing. |
07:32:54 | BlaXpirit | mailinglist-like |
07:33:15 | dtscode | Varriount++ |
07:33:33 | Varriount | dtscode: :D |
07:35:11 | darkf | it's eerily minimalistic. |
07:35:24 | dtscode | And thats a bad thing |
07:35:35 | Varriount | darkf: What, so you want blink tags and gifs everywhere? :3 |
07:35:55 | darkf | no, I had <marquee> in mind. |
07:36:37 | Varriount | You mean, a non-standard element? https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee |
07:36:56 | * | dtscode faints |
07:42:52 | darkf | Varriount: well, blink is nonstandard now too |
07:42:59 | darkf | there are polyfills for it |
07:43:57 | * | Kingsquee quit (Ping timeout: 246 seconds) |
07:45:00 | * | Kingsquee joined #nim |
07:46:48 | * | Dragonbird joined #nim |
07:46:48 | * | Dragonbird quit (Client Quit) |
07:57:45 | filwit | everyone has their opinion about visual design |
08:05:48 | * | coffeepot joined #nim |
08:07:12 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
08:19:54 | * | pregressive joined #nim |
08:24:40 | Varriount | Hello pregressive |
08:24:45 | * | pregressive quit (Ping timeout: 276 seconds) |
08:25:21 | filwit | denied |
08:25:33 | Varriount | :( |
08:25:37 | filwit | lol |
08:26:51 | Varriount | filwit: Relevent youtube video - https://www.youtube.com/watch?v=qW5UrEgw4pw |
08:27:32 | filwit | hmm.. i never watched that one as a kid, but I remember loving Dexters Lab |
08:27:47 | filwit | anyways, I need to leave for a bit |
08:27:48 | filwit | bbl |
08:28:03 | * | yglukhov joined #nim |
08:30:57 | * | OnO joined #nim |
08:34:06 | * | intra joined #nim |
08:34:19 | * | solidsnack joined #nim |
08:35:23 | * | endragor joined #nim |
08:39:24 | * | yglukhov quit (Quit: Be back later ...) |
08:48:17 | * | ddl_smurf quit (Quit: ddl_smurf) |
09:04:54 | * | Tennis joined #nim |
09:04:54 | * | Tennis quit (Changing host) |
09:04:54 | * | Tennis joined #nim |
09:04:55 | * | jm116__ joined #nim |
09:06:21 | * | jm116__ quit (Client Quit) |
09:06:51 | * | solidsna_ joined #nim |
09:07:48 | * | solidsnack quit (Read error: Connection reset by peer) |
09:09:03 | * | ingsoc joined #nim |
09:16:20 | * | Ven joined #nim |
09:18:19 | * | rgv151 joined #nim |
09:19:39 | * | letia joined #nim |
09:19:40 | letia | hi guys |
09:20:10 | * | Demon_Fox quit (Quit: Leaving) |
09:22:19 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:22:35 | * | yglukhov joined #nim |
09:26:37 | Varriount | Hello letia |
09:28:08 | * | milosn quit (Quit: leaving) |
09:30:25 | letia | quick question: I am using readLine(stdin) to get the user input and I need to convert it into int, how do I do it? |
09:30:52 | Varriount | letia: strutils.parseint, or parseutils.parseint |
09:31:12 | letia | seems like less straighforward than int(input) :D |
09:31:20 | letia | thanks! |
09:31:27 | Varriount | letia: int(input) is conversion |
09:31:45 | Varriount | It's not a function, rather, a typesafe form of casting |
09:32:20 | letia | ok, so there are 3 ways of converting string to int, strutils, parseutils and int? |
09:32:43 | Varriount | No, just two. And the strutils version uses the parseutils version anyway. |
09:32:57 | letia | I see, thanks |
09:33:25 | Varriount | letia: something of the form `typeName(variable)` performs type *conversion*. |
09:33:44 | Varriount | Eg, converting a 32-bit int to a 64-bit int, etc. |
09:34:16 | Varriount | Parsing a string into an integer is more of a translation, rather than a straightforward conversion. |
09:37:47 | * | solidsna_ quit (Ping timeout: 256 seconds) |
09:38:40 | letia | hmm, import parseutils parseutils.parseint(input) gives error "type mismatch got (string) but expected one of parseInt( string ...." |
09:38:55 | letia | this message is confusing, I am giving parseInt a string |
09:39:07 | fowl | letia, http://nim-lang.org/docs/theindex.html#arseIn |
09:42:06 | * | solidsnack joined #nim |
09:43:13 | letia | em, ok "strutils : parseInt(s: string): int" means that I need to parseInt(mystrvar: string): int? but that gives me an error |
09:43:51 | Varriount | letia: Could you show us your code? |
09:44:28 | letia | import parseutils var limit: string = readLine(stdin) parseInt(limit: string): int |
09:45:02 | letia | "this escalated fast" (C) :) |
09:45:40 | Varriount | https://gist.github.com/Varriount/86ea867cbfbde10c69e7 |
09:46:31 | Varriount | letia: ^ |
09:49:25 | * | letia quit (Ping timeout: 246 seconds) |
09:49:42 | Varriount | Aww.. |
09:51:14 | * | filwit quit (Ping timeout: 256 seconds) |
09:53:43 | * | Ven joined #nim |
10:03:49 | * | filwit joined #nim |
10:08:57 | * | solidsnack quit (Ping timeout: 240 seconds) |
10:09:28 | * | endragor_ joined #nim |
10:10:17 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:10:36 | * | endragor quit (Ping timeout: 246 seconds) |
10:11:36 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:11:43 | * | solidsnack joined #nim |
10:19:33 | * | banister joined #nim |
10:19:39 | * | banister quit (Max SendQ exceeded) |
10:19:42 | * | solidsnack quit (Ping timeout: 246 seconds) |
10:20:51 | * | Trustable joined #nim |
10:20:53 | * | no_name_ joined #nim |
10:21:07 | * | devzerp_ joined #nim |
10:21:31 | * | devzerp quit (Ping timeout: 250 seconds) |
10:21:31 | * | no_name quit (Ping timeout: 250 seconds) |
10:21:31 | * | dtscode quit (Ping timeout: 250 seconds) |
10:21:31 | * | askatasuna quit (Ping timeout: 250 seconds) |
10:21:36 | * | yglukhov quit (Ping timeout: 252 seconds) |
10:21:51 | * | no_name_ is now known as no_name |
10:21:51 | * | devzerp_ is now known as devzerp |
10:22:50 | * | yglukhov joined #nim |
10:22:53 | * | askatasuna joined #nim |
10:25:38 | * | Trustable quit (Remote host closed the connection) |
10:37:22 | * | johnsoft quit (Ping timeout: 272 seconds) |
10:38:04 | * | endragor_ quit (Remote host closed the connection) |
10:38:15 | * | jaco60 joined #nim |
10:38:17 | * | johnsoft joined #nim |
10:40:42 | * | endragor joined #nim |
10:43:24 | * | heinrich5991_ joined #nim |
10:43:41 | * | heinrich5991 quit (Ping timeout: 258 seconds) |
10:43:42 | * | Gonzih quit (Ping timeout: 258 seconds) |
10:43:42 | * | mtj_ quit (Ping timeout: 258 seconds) |
10:43:42 | * | Gonzih joined #nim |
10:45:23 | * | heinrich5991_ is now known as heinrich5991 |
10:45:25 | fowl | Araq, making string pass for openarray[char] was easy, im trying to figure out how to make it work for openarray[T] now :/ |
10:45:51 | * | mtj_ joined #nim |
10:56:27 | * | xcombelle joined #nim |
10:56:53 | * | banister joined #nim |
10:59:49 | * | askatasuna quit (Ping timeout: 255 seconds) |
11:00:04 | Araq | fowl: string already internally has a .base of tyChar, so that shouldn't be hard to do |
11:01:13 | fowl | ah ok |
11:01:32 | fowl | got it working |
11:02:25 | Araq | lol |
11:03:38 | * | JehanII joined #nim |
11:04:12 | * | letia joined #nim |
11:04:40 | fowl | https://github.com/Araq/Nim/pull/2856 |
11:05:25 | fowl | guess i could add a test |
11:06:04 | Araq | yeah and in particular ensure the tests in types/ typerel/ and metatype/ continue to work |
11:06:30 | fowl | can i run those selectively |
11:07:19 | fowl | oh this is wrong |
11:07:36 | fowl | Error: type mismatch: got (File, string, string) |
11:07:36 | fowl | but expected one of: |
11:07:36 | fowl | system.writeln(f: File, x: varargs[Ty]) |
11:14:46 | letia | hi guys again, back to my str to int conversion. Varriount, thanks for the link. I copypasted the code yet I still get "Error: type mismatch: got (TaintedString)" |
11:16:13 | dom96 | letia: Change 'import parseutils' to 'import strutils' |
11:20:57 | fowl | Araq: come on give me a hint ;) |
11:23:00 | letia | ok, thanks, now it works, but isn't strutils use parseutils under the hood? |
11:25:32 | dom96 | don't think so |
11:25:39 | dom96 | you can use parseutils too if you want |
11:25:54 | dom96 | you need to change the way you use parseInt though because the parameters are different |
11:29:23 | Araq | fowl: no idea. you have to ensure that the resulting language is not ambiguous :P |
11:29:24 | * | jaco60 quit (Remote host closed the connection) |
11:29:43 | * | ErikBjare_ quit (Ping timeout: 244 seconds) |
11:30:05 | OnO | Araq: regarding (. ignore TR .) I think we could consider adding ability to annotate parenthesis with pragmas, so ( ... ) {.noRewrite.} |
11:30:11 | Araq | so it might be that a conversion fromt string to openArray breaks Nim's stdlib |
11:30:15 | OnO | then (. can be used to something more practival |
11:30:50 | fowl | Araq: wat? String isn't matching varargs[t] now that's an issue |
11:31:12 | fowl | Or rather it is but as a char |
11:31:39 | fowl | Passing two strings won't match |
11:31:40 | Araq | fowl: exactly. that's pretty bad. |
11:32:09 | Araq | but hey, it's easy to solve |
11:32:22 | Araq | let it only match for tyOpenArray, not for tyVarargs |
11:32:24 | fowl | So merge with fixes ^^ |
11:32:35 | fowl | How when they are checked together |
11:32:50 | Araq | you can split the check |
11:33:02 | Araq | the types are distinguished in the compiler for these reasons |
11:33:11 | Araq | so it shouldn't be hard |
11:33:26 | Araq | but I wonder if tyOpenArray has the same problem too |
11:33:52 | Araq | OnO: fine with me |
11:34:49 | fowl | Sounds ugly |
11:35:03 | fowl | I hate having two bodies of identical code |
11:35:24 | Araq | procs and templates can be used to avoid this |
11:39:10 | * | jaco60 joined #nim |
11:46:25 | * | rgv151 quit (Quit: Leaving...) |
12:03:11 | fowl | Araq, not when a case statement is involved |
12:03:23 | fowl | and i need to add another branch |
12:08:00 | * | Kingsquee quit (Quit: Konversation terminated!) |
12:12:13 | Varriount | letia: strutils does use parseutils under the hood, but not in the same way. |
12:12:58 | Varriount | letia: parseutils.parseInt requires that you pass a `var int` type in addition to the string, to store the result of the procedure. |
12:16:57 | * | TEttinger quit (Ping timeout: 264 seconds) |
12:18:04 | Varriount | Sigh... I really wish Microsoft would stop making new API's C++/C# only. |
12:18:43 | * | Ven joined #nim |
12:22:53 | * | filcuc joined #nim |
12:28:01 | Varriount | Hello Ven |
12:28:08 | Ven | hi Varriount |
12:29:05 | * | filcuc quit (Remote host closed the connection) |
12:31:24 | * | filcuc joined #nim |
12:43:28 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:50:51 | * | banister joined #nim |
12:54:46 | * | Trustable joined #nim |
12:56:03 | JehanII | Varriount: As far as I can tell, Microsoft has essentially abandoned C except as a C++ subset. |
12:56:15 | JehanII | E.g. why they're refusing to implement C99. |
12:58:22 | * | letia quit (Quit: Page closed) |
13:00:51 | * | ErikBjare_ joined #nim |
13:02:29 | * | dtscode joined #nim |
13:05:03 | * | ozra joined #nim |
13:07:18 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:11:40 | * | UberLambda joined #nim |
13:12:24 | UberLambda | Hello everyone... what to do if I get a "cannot open `modulename`" error for a package installed with Nimble? |
13:12:39 | Varriount | UberLambda: Hm. What module? |
13:12:44 | UberLambda | Specifically nim-glfw... It seems to be indexed |
13:12:50 | UberLambda | \/etc/nim.cfg(54, 3) Hint: added path: '/home/paolo/.nimble/pkgs/nim-glfw-0.2.0' [Path] |
13:14:22 | UberLambda | Varriount: any ideas? |
13:14:24 | Varriount | UberLambda: What's your import line? |
13:14:38 | * | pregressive joined #nim |
13:14:45 | UberLambda | Varriount: simply "import glfw" |
13:15:08 | Varriount | UberLambda: Odd. What method did you use to install nimble? |
13:15:23 | Varriount | And what version of the compiler are you using? |
13:15:30 | UberLambda | Varriount: I installed it from the Arch package repos and had download packages.json manually |
13:15:46 | UberLambda | Varriount: Nim Compiler Version 0.11.2 (2015-05-05) [Linux: amd64 |
13:15:58 | UberLambda | also from the Arch repos |
13:17:01 | Varriount | UberLambda: dom96 is the author of Nimble, so he might have a better idea what's wrong... Have you tried 'nimble install nimble'? |
13:17:34 | UberLambda | Varriount: tried to do that just now... nimblepkg/version.nim(141, 22) Error: use '^' instead of '-'; negative indexing is obsolete |
13:17:41 | UberLambda | Seems like nimble itself is not up-to-date... |
13:18:06 | Varriount | UberLambda: Ouch. Yeah, someone should probably fix that. |
13:18:18 | dom96 | nimble install nimble@#head |
13:18:28 | dom96 | UberLambda: How are you compiling your program? |
13:18:29 | Varriount | I have to go in a couple minutes though... |
13:18:45 | UberLambda | dom96: I'm just calling the nim compiler on the file |
13:18:59 | UberLambda | dom96: I'll try installing head now |
13:19:03 | UberLambda | Varriount: thanks BTW |
13:19:07 | dom96 | that shouldn't make a difference |
13:19:08 | * | vikaton joined #nim |
13:19:14 | dom96 | how are you importing glfw? |
13:19:23 | vikaton | Anyone here reserve windows 10? |
13:19:30 | Varriount | vikaton: I did. |
13:19:34 | vikaton | Nice |
13:19:44 | vikaton | that was a sweet move my Microsoft |
13:19:53 | JehanII | I'm still struggling with the idea of "reserving" a free update? |
13:19:55 | UberLambda | dom96: there's still the https+Linux problem though :( |
13:20:07 | Varriount | vikaton: There's a little icon in the lower-right corner of the task bar that lets you do it. |
13:20:11 | dom96 | UberLambda: i'm not sure what is going on there. |
13:20:19 | vikaton | Yeah I just found it :P |
13:20:22 | UberLambda | dom96: I'm simply copying the example on the github page of nim-glfw |
13:20:30 | JehanII | vikaton: They're taking a page out of Apple's playbook, I'm just surprised that they're willing to let go of the revenue. |
13:20:30 | vikaton | took 15 minutes to find a download site xD |
13:20:51 | Varriount | vikaton: There's no little icon for you? |
13:20:57 | JehanII | Apple can do it because they're selling hardware, but for Microsoft, their Windows sales are a huge part of their income. |
13:21:06 | vikaton | Varriount: I found it after 15 mins of searching lol |
13:21:11 | dom96 | vikaton: JehanII: I'm wondering whether my Windows 8 license key will magically be transformed into a Windows 10 license key |
13:21:25 | JehanII | dom96: No idea, either. |
13:21:41 | Varriount | JehanII: I would imagine that Office/Sharepoint/Visio is a rather large portion as well though. |
13:21:45 | UberLambda | I wonder if I can transfer my Win8 OEM to a Win10 inside a virtual machine |
13:21:57 | JehanII | Varriount: It is. But, still, we're talking billions here. |
13:22:05 | UberLambda | OEM does not seem to allow this... but I wonder if the free update will automagically let me do it |
13:22:34 | dom96 | JehanII: The new CEO is really transforming Microsoft. |
13:22:54 | JehanII | dom96: Yeah, but hopefully not in the way that Sun was transformed. :) |
13:23:04 | * | Varriount shudders |
13:23:12 | JehanII | MInd you, from a purely selfish perspective, I think it's a great thing. |
13:23:12 | dom96 | UberLambda: Somebody said that the https issue was due to it being packaged incorrectly. |
13:23:49 | dom96 | UberLambda: Anyway, show me your code. |
13:24:05 | Varriount | dom96: His import line is "import glfw" |
13:24:07 | vikaton | I wish Windows10 cmd was like *nix |
13:24:20 | * | banister joined #nim |
13:24:24 | JehanII | Ah, the upgrade is only free for one year. |
13:24:31 | * | banister quit (Max SendQ exceeded) |
13:24:34 | vikaton | wat ? |
13:24:38 | vikaton | you sure? |
13:24:42 | dom96 | UberLambda: Also, all of the output from the compiler might help. |
13:24:45 | Varriount | JehanII: Oooh, that's a neat trick. |
13:24:54 | JehanII | That makes sense. |
13:25:05 | vikaton | JehanII: No its not... |
13:25:16 | JehanII | Well, you will still be able to use it forever, you can only claim it within one year. |
13:25:20 | vikaton | It says its _not_ a trial |
13:25:25 | vikaton | ohhhh |
13:25:26 | dom96 | what if I need to reinstall Windows? |
13:25:31 | dom96 | Am I back to Windows 8 then? |
13:25:37 | JehanII | dom96: I think your license will remain upgraded. |
13:25:45 | dom96 | that would be nice. |
13:25:55 | JehanII | But that makes a lot of sense. |
13:25:58 | Varriount | JehanII: I think you mean that it can only be upgraded for free *within* a year. |
13:26:02 | dtscode | dom96: I sent a pull request to nimbot |
13:26:09 | dom96 | dtscode: yes, I already merged it. |
13:26:19 | dtscode | :D |
13:26:19 | JehanII | They'll encourage people to upgrade, which drives adoption, but they don't forgo revenue. |
13:26:23 | JehanII | Varriount: That's what I said? |
13:26:29 | dom96 | dtscode: will take me a while to deploy it. Did you test it properly? |
13:26:35 | UberLambda | dom96: https://gist.github.com/UberLambda/f2d1d9b2fb9306ccada5 |
13:26:35 | dtscode | dom96: Yeah |
13:26:44 | dtscode | Seemed to work on my machine |
13:26:49 | Varriount | JehanII: Oh, I misread. |
13:27:05 | JehanII | More interesting is that Windows 10 is supposed to be the last version of Windows, if I understand that correctly. |
13:27:12 | dtscode | I didn't test it for any bugs though that might occur on 0.11 |
13:27:13 | JehanII | And after that, all updates will be incremental. |
13:27:27 | UberLambda | FINALLY |
13:27:52 | UberLambda | ...sorry for caps, I'm addicted to rolling release |
13:28:17 | Varriount | You know, I really wish I could find a technical answer as to why Windows Update is so much slower that the update mechanisms for various Linux distros. |
13:28:20 | dom96 | UberLambda: What's the output of: ls /home/paolo/.nimble/pkgs/nim-glfw-0.2.0 ? |
13:28:44 | dom96 | Varriount: Is it? |
13:28:58 | dom96 | Varriount: Seems pretty fast to me. |
13:29:13 | UberLambda | dom96: added it to the gist |
13:29:42 | JehanII | Varriount: No idea, either. |
13:29:44 | Varriount | dom96: Hm. Maybe it's just my situation then. I often factory reset old Thinkpads, and then have to run them through Windows Update |
13:29:46 | vikaton | is Oreilly gonna make a book for Nim soon ? |
13:30:09 | Varriount | dom96: It usually takes about an hour, and about 5 reboots. |
13:30:30 | UberLambda | Windows update always screws stuff up for me |
13:30:34 | JehanII | Varriount: Ugh, I'd never had to do that, thankfully. |
13:30:38 | Varriount | dom96: Speaking of which, you need to update and reboot the VPS. |
13:30:47 | dom96 | UberLambda: ahh. Seems like def- and/or EXetoC changed the API. |
13:30:57 | Varriount | JehanII: And people wonder why I fall asleep at work. |
13:30:59 | JehanII | OS X just bumps things up to the newest version in one big update. |
13:31:06 | dom96 | UberLambda: And you have installed version 0.2 vs. the HEAD |
13:31:30 | Varriount | Or rather, nod off when resetting Thinkpads. |
13:31:31 | dom96 | UberLambda: nimble install nim-glfw@#head |
13:31:43 | UberLambda | dom96: oh, that's why then |
13:31:55 | UberLambda | dom96: any way to set it to install HEAD automatically? |
13:32:04 | dom96 | UberLambda: sadly no |
13:32:05 | UberLambda | I mean the whole of Nimble |
13:32:18 | dom96 | UberLambda: But I think I will implement that. |
13:32:26 | UberLambda | dom96: nice! Thanks for the help :) |
13:32:29 | dom96 | maybe even make it default |
13:32:36 | dom96 | it's a common gotcha |
13:33:29 | * | jaco60 cannot use easily nimble as its os is Linux :( |
13:33:57 | dom96 | Does everybody on linux have the https bug? |
13:34:14 | jaco60 | i do... |
13:34:25 | dom96 | how did you install nimble? |
13:34:41 | jaco60 | with my distro package manager... |
13:34:53 | jaco60 | (Arch linux) |
13:35:06 | dom96 | Try installing it manually. |
13:35:57 | dtscode | wait wait wait wait |
13:36:02 | dom96 | https://github.com/nim-lang/nimble/pull/136 |
13:36:07 | dtscode | w have fucking nimble repos |
13:36:08 | dtscode | ? |
13:36:11 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:36:19 | dom96 | This person seems to think it's an upstream packaging bug. |
13:36:31 | dom96 | Perhaps isolated to Arch Linux? |
13:36:37 | dom96 | dtscode: what? |
13:36:49 | dtscode | <dom96> how did you install nimble? |
13:36:49 | dtscode | <jaco60> with my distro package manager... |
13:36:54 | dtscode | Did I read that right? |
13:37:04 | dom96 | dtscode: you mean that we have a nimble package? |
13:37:08 | jaco60 | dom96, perhaps because Arch is the only distro that ships a nimble package ? |
13:37:16 | jaco60 | dtscode, yes |
13:37:19 | dom96 | jaco60: possibly. |
13:37:26 | jaco60 | pacman -Ss nimble... |
13:37:30 | dom96 | dtscode: It's not special. It's trivial to get packages onto the AUR |
13:37:35 | jaco60 | community/nimble 1:0.6-1 [installed] |
13:37:39 | dtscode | :c I want nimble packages |
13:37:51 | jaco60 | it's not AUR, it's an official package |
13:37:56 | dtscode | When I get my vps back I'm going to talk to araq about an apt repo |
13:37:59 | dom96 | oh, I see. |
13:38:01 | dom96 | It's in community |
13:38:03 | dom96 | that's different |
13:38:06 | dom96 | and awesome |
13:38:29 | jaco60 | that's why i don't understand why noone has mentionned this bug |
13:38:44 | UberLambda | Also nim... and quite recent, too |
13:39:08 | * | BlaXpirit_ joined #nim |
13:39:08 | * | BlaXpirit is now known as Guest18595 |
13:39:08 | * | Guest18595 quit (Killed (wilhelm.freenode.net (Nickname regained by services))) |
13:39:08 | * | BlaXpirit_ is now known as BlaXpirit |
13:40:12 | dom96 | jaco60: Can you try compiling nimble yourself and see if that fixes the bug? |
13:40:17 | jaco60 | there's a nimble-git in AUR... will try |
13:40:35 | dom96 | might be more reliable to compile everything yourself. |
13:40:40 | dom96 | including the nim compiler |
13:40:57 | UberLambda | Now it doesn't find some object files... but I think it's a problem of the package |
13:41:47 | * | Ven joined #nim |
13:42:12 | UberLambda | Yeah, it seems to want to find files such as "init.o" in the nimcache folder but only "nim-glfw_joystick.o" is there |
13:42:38 | * | JehanII quit (Quit: Leaving) |
13:42:48 | jaco60 | dom96, the nimble-git in AUR seems ok |
13:43:16 | dom96 | jaco60: hrmmm |
13:43:31 | jaco60 | so, it's related to the package in community |
13:43:51 | dom96 | I'll get in touch with the packager (Alexander) |
13:43:59 | dom96 | see if I can ask him to investigate. |
13:44:07 | jaco60 | ok |
13:46:05 | dom96 | done |
13:49:28 | jaco60 | argh... nimble install nimsuggest fails on "cannot open ast' |
13:49:57 | jaco60 | while compiling compiler-0.10.3 |
13:50:15 | * | yglukhov_ joined #nim |
13:50:34 | dom96 | jaco60: yeah, that package is broken. |
13:50:42 | jaco60 | ah... |
13:51:02 | dom96 | https://github.com/Araq/Nim/issues/2757 |
13:51:17 | dom96 | You can :+1: it which should help :) |
13:51:45 | * | yglukhov quit (Ping timeout: 264 seconds) |
13:53:21 | * | milosn joined #nim |
13:53:28 | UberLambda | any nim-suggest plugin for Emacs? |
13:53:45 | UberLambda | I guess I could try to write one when I have time |
13:54:48 | * | UberLambda quit (Quit: GTG) |
13:58:42 | pigmej | ah UberLambda... |
13:58:46 | pigmej | too fast exiting |
14:00:05 | * | Senketsu joined #nim |
14:03:54 | * | saml joined #nim |
14:04:23 | * | saml quit (Max SendQ exceeded) |
14:04:49 | * | saml joined #nim |
14:07:33 | * | BitPuffin|osx joined #nim |
14:14:04 | * | wb_ quit (Ping timeout: 252 seconds) |
14:34:21 | * | endragor quit (Ping timeout: 264 seconds) |
14:35:04 | * | boopisaway is now known as boop |
14:43:47 | * | kumul joined #nim |
14:46:01 | * | kumool joined #nim |
14:46:25 | * | darkf quit (Quit: Leaving) |
14:48:29 | * | kumul quit (Ping timeout: 258 seconds) |
15:01:17 | * | yglukhov__ joined #nim |
15:01:48 | * | yglukhov_ quit (Ping timeout: 246 seconds) |
15:14:38 | * | dtscode quit (Ping timeout: 272 seconds) |
15:15:53 | * | jacksnipe left #nim ("Bye!") |
15:29:21 | * | BitPuffin|osx quit (Ping timeout: 240 seconds) |
15:30:01 | * | BitPuffin|osx joined #nim |
15:32:46 | * | shodan45 joined #nim |
15:42:07 | * | banister joined #nim |
15:47:44 | * | dalarmmst joined #nim |
15:55:08 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:59:30 | * | strcmp1 joined #nim |
16:02:21 | * | gsingh93 joined #nim |
16:05:51 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:28:25 | * | Tennis quit (Quit: Leaving) |
16:32:14 | * | boydgreenfield joined #nim |
16:32:34 | * | vendethiel joined #nim |
16:34:22 | * | boydgreenfield quit (Client Quit) |
16:39:27 | * | LoneTech quit (Ping timeout: 246 seconds) |
16:43:17 | wuehlmaus | diet nim --opt:size --passL:"-static" c -d:release file.nim |
16:43:20 | wuehlmaus | cooool |
16:43:37 | wuehlmaus | works like a charme for me and produces way smaller binaries |
16:44:16 | filwit | there's other commands to get the binary smaller, like 'strip' and some compression stuff you can do.. |
16:44:41 | wuehlmaus | yes, i use strip |
16:44:52 | wuehlmaus | but dietlibc is WAAAAAY smaller |
16:44:55 | wuehlmaus | 1/10 of it |
16:45:09 | wuehlmaus | upx helps |
16:45:22 | filwit | wuehlmaus: http://hookrace.net/blog/nim-binary-size/ |
16:49:50 | wuehlmaus | filwit: great article, thank you! |
16:51:30 | wuehlmaus | but i think just the word 'diet' before the normal command line is the shortest way to get to static binaries which are very small :) |
16:51:56 | filwit | er.. i missed that in your first post |
16:56:25 | * | ChrisMAN quit (Read error: Connection reset by peer) |
16:56:56 | * | ChrisMAN joined #nim |
16:57:30 | ozra | Try "upx --ultra-brute" |
16:58:03 | ozra | diet? Gotta check that out |
17:02:19 | * | filcuc quit (Quit: Konversation terminated!) |
17:05:00 | * | kumool quit (Ping timeout: 246 seconds) |
17:05:09 | * | brson joined #nim |
17:16:39 | * | milosn quit (Quit: Lost terminal) |
17:17:55 | * | milosn joined #nim |
17:24:51 | reactormonk | fowl, make sure your code is ready to review before submitting it - if you want to "lock" stuff for you, just create an issue |
17:30:14 | * | vendethiel quit (Ping timeout: 256 seconds) |
17:33:11 | fowl | reactormonk, IRT what? |
17:33:31 | fowl | both PRs are good to go |
17:34:16 | reactormonk | fowl, https://github.com/Araq/Nim/pull/2856 - yup, now they are. |
17:48:09 | * | Matthias247 joined #nim |
17:48:34 | * | ozra quit (Ping timeout: 246 seconds) |
17:57:46 | * | vendethiel joined #nim |
18:00:04 | * | shodan45_ joined #nim |
18:00:14 | * | shodan45 quit (Remote host closed the connection) |
18:00:17 | * | ddl_smurf joined #nim |
18:00:46 | * | shodan45_ quit (Client Quit) |
18:01:19 | * | Strikecarl joined #nim |
18:01:38 | Strikecarl | Uh |
18:01:56 | Strikecarl | i'm trying to send a simple http post with "httpclient" but i get this error: |
18:02:04 | Strikecarl | Error: undeclared identifier: 'newMultipartData' |
18:02:12 | Strikecarl | Yes i did import httpclient |
18:04:38 | reactormonk | dom96, how do you poke https://github.com/michaeldv/donna_nim for -d:release ? |
18:05:02 | dom96 | reactormonk: I posted on the mailing list. |
18:05:11 | reactormonk | dom96, perfect |
18:05:35 | dom96 | Strikecarl: which version of Nim? |
18:15:50 | * | solidsnack joined #nim |
18:18:52 | * | Demon_Fox joined #nim |
18:23:15 | Strikecarl | dom96 how do i check that? |
18:23:24 | dom96 | nim -v |
18:23:24 | * | vendethiel quit (Ping timeout: 276 seconds) |
18:23:38 | Strikecarl | nim -v where |
18:23:41 | Strikecarl | cmd? |
18:24:40 | vikaton | Strikecarl: yes |
18:24:51 | vikaton | who is _44535463686f646 |
18:25:00 | Strikecarl | "Nim Compiler Version 0.10.2 (2014-12-30) [Windows: amd64]" |
18:25:16 | vikaton | That's old |
18:25:22 | vikaton | we are on 0.11.2 |
18:25:40 | vikaton | please update to the latest version Strikecarl http://nim-lang.org/download.html |
18:26:01 | Strikecarl | aight |
18:26:33 | * | solidsnack quit (Ping timeout: 250 seconds) |
18:30:20 | Strikecarl | no i get this, vikaton, Error: unhandled exception: invalid format string [ValueError] |
18:30:20 | Strikecarl | > Process terminated with exit code 1 |
18:30:48 | Strikecarl | now i get that with all my projects <.< |
18:30:53 | Strikecarl | "unhandled exception: invalid format string [ValueError]" |
18:31:25 | * | kumul joined #nim |
18:31:28 | vikaton | Strikecarl: it would help if you posted some code |
18:31:58 | Strikecarl | lemme pastebin |
18:32:16 | Strikecarl | http://pastebin.com/raw.php?i=pdGsQEWY |
18:32:26 | Strikecarl | It's uh, ye, you get what that is for. |
18:32:34 | Strikecarl | It compiled 100% and worked before. |
18:32:40 | Strikecarl | Now i updated and i get invalid format string. |
18:33:06 | vikaton | on what line? |
18:33:21 | def- | I see Nim on HN, if anyone wants to respond: https://news.ycombinator.com/item?id=9640384 |
18:33:31 | Strikecarl | rofl i just made a .nim with only echo "hey" and i get the error |
18:33:34 | Strikecarl | Error: unhandled exception: invalid format string [ValueError] |
18:33:38 | Strikecarl | theres no specific line |
18:33:53 | vikaton | well That's strange |
18:34:40 | * | yglukhov___ joined #nim |
18:34:42 | Strikecarl | lemme completely delete then reinstall |
18:35:19 | vikaton | Good idea |
18:36:57 | * | yglukhov__ quit (Ping timeout: 240 seconds) |
18:40:02 | Strikecarl | the fuck |
18:40:03 | Strikecarl | rofl |
18:40:17 | Strikecarl | something done goofed |
18:41:09 | Strikecarl | i get "file not found" when i try to compile |
18:41:15 | Strikecarl | even tho i literally just created the file |
18:41:20 | Strikecarl | i cant compile anything |
18:42:49 | filwit | fileStreams can't be used at compileTime? :( |
18:47:24 | * | solidsnack joined #nim |
18:47:50 | * | yglukhov___ quit (Read error: Connection reset by peer) |
18:48:24 | * | yglukhov___ joined #nim |
18:49:55 | * | vendethiel joined #nim |
18:50:07 | dom96 | def-: cool. |
18:50:35 | Strikecarl | Wtf someone help rofl |
18:50:41 | Strikecarl | http://i.imgur.com/ZcfMqfj.png |
18:50:46 | Strikecarl | 3rd time reinstalling EVERYTHING now |
18:50:53 | Strikecarl | i make a nim.nim or test.nim |
18:50:57 | Strikecarl | do an echo "something" |
18:51:03 | Strikecarl | and i get "file not found" when i compile.... |
18:51:10 | Strikecarl | vikaton what have you made me do cri |
18:51:15 | dom96 | Edit -> Preferences -> Tools |
18:51:27 | Strikecarl | then |
18:51:31 | dom96 | First textbox: change 'nimrod' to 'nim' |
18:51:43 | dom96 | so that it reads "$findExe(nim) c --listFullPaths $#" |
18:51:53 | Strikecarl | ye |
18:51:56 | fowl | The fact that that runs mean you still have old nimrod installed |
18:52:11 | Strikecarl | i just reinstalled nim |
18:52:13 | * | shodan45 joined #nim |
18:52:14 | Strikecarl | never reinstalled aporia :/ |
18:52:29 | fowl | The error should be can't find nimrod |
18:53:28 | Strikecarl | now i get another error |
18:53:49 | Strikecarl | you know what |
18:53:53 | Strikecarl | i'm reinstalling fucking everything |
18:53:53 | Strikecarl | brb |
18:54:06 | fowl | Just remove the old version |
18:55:41 | fowl | Oh nm |
18:57:43 | * | Strikecarl quit (Remote host closed the connection) |
18:59:58 | * | solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:02:55 | * | anthgur joined #nim |
19:09:46 | vikaton | ಠ_ಠ |
19:12:57 | * | vendethiel quit (Ping timeout: 256 seconds) |
19:13:19 | jaco60 | btw, the sublimeText plugin for nim still search for nimrod command |
19:14:01 | * | vendethiel joined #nim |
19:14:56 | fowl | jaco60, install it from git |
19:15:12 | * | dtscode joined #nim |
19:16:05 | jaco60 | fowl: you mean that the install command of Command Pallet doesn't install the last version ? |
19:16:19 | jaco60 | command palette, sorry |
19:16:29 | fowl | jaco60, it does install the last version, the last released version |
19:16:41 | jaco60 | that's what i've done |
19:16:52 | jaco60 | but the config is for nimrod, not for nim |
19:16:55 | fowl | HEAD != a released version |
19:17:00 | jaco60 | ah, ok |
19:17:12 | * | kumul quit (Ping timeout: 272 seconds) |
19:20:11 | * | Peaker joined #nim |
19:22:11 | * | anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:22:18 | * | Jehan` joined #nim |
19:22:44 | Peaker | Hey, in Nim's error messages, when I use an immutable where a mutable/var is expected, the mismatchd-type error doesn't seem to tell me that my var is mutable or not, making for confusing error messages |
19:23:17 | dom96 | Peaker: Gist your code please :) |
19:24:20 | jaco60 | fowl: wow... the HEAD NimLime version is *far* more advanced than the released version :) |
19:24:21 | Peaker | https://gist.github.com/Peaker/9e1d87e81945184871e4 |
19:24:31 | Peaker | (modified the nim by example one) |
19:24:50 | dtscode | And what is your exact error Peaker ? |
19:25:08 | Jehan` | jaco60: My understanding is that Varriount still has issues with ST3, which is holding up the release. |
19:25:28 | Peaker | https://gist.github.com/Peaker/9e1d87e81945184871e4#comment-1464833 |
19:25:28 | jaco60 | i'm using ST3... will see |
19:25:47 | * | anthgur joined #nim |
19:26:04 | Peaker | the error doesn't seem to tell me whether my CountTable is mutable or not |
19:26:14 | Peaker | (but it is relevant as it is the source of the type error) |
19:26:25 | Jehan` | dtscode, dom96: The issue is if you pass a `let` value to a procedure expecting a `var` parameter. |
19:26:46 | Peaker | for example, if I change the "let" to a "var", but make a different type error there (e.g: add a wrong string parameter to "inc") it still says the first param is a CountTable |
19:27:03 | Jehan` | You'll get a type mismatch error, which is accurate, but doesn't explain the problem very well. |
19:27:05 | dtscode | hmmmm. This smells like a bug |
19:27:06 | Peaker | and I looked inside the compiler sources -- and it seems to use typeToString, which supposedly handles the const/var/etc cases |
19:27:10 | * | thotypous quit (Ping timeout: 258 seconds) |
19:27:31 | dom96 | Peaker: indeed, these errors can always be improved. Create a bug report on github. |
19:27:31 | Peaker | but I only started toying with Nim a few hours ago, so I don't know my way inside the compiler yet :) |
19:27:45 | Jehan` | Peaker: To resolve it, switch `let` to `var` (though I think you know that already). |
19:27:49 | fowl | Peaker, well its tricky. imagine a function takes X and you pass it var X, it would say (var X, ...) vs (X, ...) and you might think the error is that your X is mutable |
19:28:31 | Jehan` | The bigger problem is that providing error messages that intuit what a human being needs to see is actually pretty hard. |
19:28:50 | Jehan` | Lots of special and corner cases. |
19:28:51 | Peaker | fowl: TMI is better than too-little-info |
19:29:11 | Peaker | can emphasize the problematic part (color it red) :) |
19:29:15 | Peaker | (the mismatching part) |
19:29:30 | Jehan` | Especially when human intuition doesn't neatly match the internal representation of code. |
19:29:49 | * | anthgur quit (Client Quit) |
19:30:11 | Jehan` | fowl: Well, you can always pass a var X to a procedure expecting X? |
19:30:23 | Jehan` | It's just the other way round that's a problem. |
19:30:26 | fowl | Jehan`, not if the error is in the ... |
19:30:50 | Jehan` | Then the error should describe that part accurately. |
19:31:10 | Jehan` | I don't see how an error message for passing an X to a var X parameter can create confusion here? |
19:32:24 | Peaker | you know how in C: foo * is convertible to const foo * but foo ** is NOT convertible to const foo ** ? Does Nim have a similar issue/prevention? |
19:32:43 | Peaker | (Curious due to the var/non-var compatibility talk :-) ) |
19:32:54 | fowl | Peaker, no because we dont have const |
19:33:14 | Peaker | you mean refs are always mutable refs? |
19:33:17 | Peaker | (you have "let"?) |
19:33:38 | fowl | let protects the ref itself, not its contents |
19:34:04 | Peaker | ah. wouldn't it be useful to have a read-only ref? |
19:34:12 | Peaker | (or ref to read-only-contents?) |
19:34:16 | vikaton | saw this on reddit: http://www.reddit.com/r/programming/comments/3842ko/go_channels_goroutines_and_gc_available_in_nim/ |
19:34:55 | dom96 | vikaton: it's on hacker news too |
19:35:16 | vikaton | mhm |
19:35:44 | dom96 | Peaker: A brand new 'func' keyword may be introduced soon to declare functions whose ref params will be read-only. |
19:37:11 | dom96 | Is it just me or does pcwalton seem to criticise Nim at every turn? https://news.ycombinator.com/item?id=9641490 |
19:37:15 | fowl | vikaton, i fixed the dining philosophers example http://rosettacode.org/wiki/Dining_philosophers#Nim |
19:37:18 | vikaton | Why is pcwalton always comm- |
19:37:23 | dom96 | vikaton: hah |
19:37:28 | vikaton | wow |
19:37:37 | dom96 | guess it's not just me. |
19:37:47 | vikaton | Yeah what's his problem :/ |
19:37:49 | dom96 | I've heard him rehash that argument 5 times now at least. |
19:38:25 | vikaton | fowl, nice! |
19:38:40 | Jehan` | dom96: Eh, there are unfortunately also Nim people who show a similar attitude towards Rust (without naming names). |
19:38:56 | dom96 | Jehan`: There are, yes. |
19:38:59 | vikaton | dom96, the thing is he brings it up on stuff that's not even mentioned in the post |
19:39:20 | dom96 | Jehan`: But are core Nim devs among those people? |
19:39:25 | Jehan` | dom96: This is really something that the communities can only try and police themselves, but it's impossible to prevent it. |
19:39:27 | * | vendethiel quit (Ping timeout: 276 seconds) |
19:39:30 | Jehan` | dom96: Not AFAIK. |
19:39:37 | Matthias247 | he's correct, but of course repeating deficits is not that nice |
19:40:11 | dom96 | I'm not an expert in these things but wouldn't Nim's threading model solve this? (A GC per-thread) |
19:40:18 | vikaton | p sure he hates Nim from the attention Nim was getting back when the Nim vs Rust thing happened |
19:40:28 | Peaker | PATH=./bin:$PATH ./koch temp c nim.foo builds nim, ends up saying "Error: cannot open 'nim.foo'" why? |
19:40:58 | Matthias247 | you could also always point out that Rusts dynamic dispatch and concurrency stories are also not very good stories |
19:40:59 | Jehan` | dom96: Right now, the problem is that Nim forces you to essentially emulate a distributed system. |
19:41:19 | _44535463686f646 | vikaton: im your father |
19:41:21 | Jehan` | If you can live with this constraint – and you often can – things are just fine. |
19:41:38 | vikaton | that's ps weird :/ |
19:41:39 | Peaker | why does "koch temp" do a lot of work only to fail much later? :( |
19:41:49 | Jehan` | I'm also trying to push Araq towards having a more general approach to shared memory via lockable heaps, which would shutdown this particular critique. |
19:42:20 | fowl | Peaker, ill try it in a min, probably PATH not getting passed to the call to nim, you can easily install nim by symlinking it into $PATH |
19:42:22 | Jehan` | Peaker: Umm? ./koch temp should build a debug version of the compiler in bin/nim_temp |
19:42:23 | dom96 | I'm pretty sure Araq is planning to offer better support for shared memory in threads. |
19:42:27 | Jehan` | If that fails, something is wrong. |
19:42:37 | Jehan` | dom96: So am I, and I dont' want to rush him. |
19:42:39 | * | anthgur joined #nim |
19:42:48 | Peaker | ah, no arguments worked, built nim_temp. I thought I was supposed to give it a file name |
19:42:56 | Peaker | and it does all its work before failing |
19:43:08 | * | fowl left #nim ("Leaving") |
19:43:11 | Jehan` | dom96: As I said, what's currently there already works for a lot of situations. |
19:43:32 | dom96 | Jehan`: Think it's worth replying to pcwalton with this information? |
19:43:38 | def- | Peaker: shouldn't that be foo.nim instead of nim.foo? |
19:43:53 | Jehan` | What's most frustrating is is that Rust and Nim really target different audiences, despite overlap in some areas. |
19:43:57 | vikaton | lol @ def- |
19:43:59 | Peaker | def-: no idea :) |
19:44:15 | dom96 | Peaker: ./koch temp c module.nim will build a new nim compiler and then call ./nim_temp c module.nim |
19:44:26 | dom96 | Peaker: i.e. it passes 'c module.nim' to the newly built compiler |
19:44:30 | Jehan` | There are problem domains where either Nim or Rust is clearly the better choice (absent ecosystem concerns and such), but the debate can get fierce in the areas where they overlap. |
19:44:41 | Peaker | As a first impression: Rust seems like C-towards-Haskell-noGC. Nim seems like Python-towards-static-and-fast |
19:44:46 | Jehan` | dom96: As to replying, I'm not sure. |
19:44:50 | Peaker | dom96: ah, thanks |
19:44:57 | Jehan` | I try to stay as much out of language advocacy as I can. |
19:45:29 | Jehan` | Because so much is subjective and really not suitable for a discussion in internet comments. |
19:46:14 | dom96 | Are all scientific fields this subjective or is Computer Science really an outlier? |
19:46:20 | Peaker | I tried https://gist.github.com/Peaker/b36982ba143c9c274a8b to "fix" the error message, but that didn't seem to change anything at all |
19:46:30 | Jehan` | dom96: No, Computer Science is normally not very subjective. |
19:46:35 | * | shodan45_ joined #nim |
19:46:42 | vikaton | we happen to be in the middle of i |
19:46:44 | vikaton | t |
19:46:44 | Jehan` | Language design is one of the oddities. Software engineering is another. |
19:46:56 | dom96 | Jehan`: Is my perception wrong due to spending too much time on Reddit/HN? |
19:47:06 | Matthias247 | dom96: I thinks that's all things in humanity. Not only science. Ask 10 people how to cook a meal and you will also get 11 answers :) |
19:47:18 | dom96 | Matthias247: hehe true. |
19:47:34 | Jehan` | dom96: Most papers that I've actually written are pretty mathematical in nature. |
19:47:47 | Jehan` | And that's not counting computer algebra stuff. |
19:47:59 | dom96 | Perhaps the problem is that there really isn't many trivial ways to objectively rate different solutions in Computer Science. |
19:48:06 | Jehan` | The internet attracts stuff that can be debated. |
19:48:17 | Jehan` | You don't get much mileage out of arguing the exact result of 2+2. |
19:48:25 | Matthias247 | but the internet exxagerates the situation. In most tech companies there will typically be very less technical discussions. Because the constraints are mostly given |
19:48:37 | Matthias247 | and be it just for "we are a java shop" |
19:48:49 | Peaker | Nim compiler seems to have a lot of sons[0], sons[1] stuff all over the place.. isn't that very ugly? Compared to having two named fields under a certain object-case? |
19:49:01 | * | shodan45 quit (Ping timeout: 255 seconds) |
19:49:35 | dom96 | Peaker: I think that is how ASTs are normally represented. |
19:49:37 | * | shodan45_ quit (Client Quit) |
19:49:50 | * | dom96 nods at Matthias247 and Jehan` |
19:50:10 | * | vikaton nods |
19:50:36 | Peaker | dom96: https://github.com/Araq/Nim/blob/devel/compiler/sigmatch.nim#L242-L246 <-- unless "if" informs the type-checker, this seems unnecessarily type-unsafe |
19:51:16 | Peaker | dom96: my reference language is Haskell, so in there I'd have something like: case n of ExprEqExpr someName someOtherName -> ... which is nicer and safer than sons[0] and sons[1], no? |
19:51:34 | Jehan` | Peaker: It doesn't, and it's not typesafe. |
19:52:13 | Peaker | Jehan`: why is it written that way? |
19:52:22 | Peaker | It's not as nice as what I'm used to at all :( |
19:53:00 | Jehan` | Peaker: Nim got its variant object types from Pascal/Modula-2. |
19:53:19 | Peaker | But it can encode safe sum types with them, no? |
19:53:33 | Peaker | (if a bit clumsy) |
19:53:37 | Jehan` | Note that there *are* runtime checks. |
19:53:46 | Jehan` | Yes, you can. |
19:53:55 | Peaker | so why wasn't it done in the compiler itself? |
19:54:13 | * | thotypous joined #nim |
19:54:17 | * | jubalh joined #nim |
19:54:27 | Jehan` | There's a tradeoff between type-safety and expressiveness here. |
19:54:45 | Jehan` | I'm not sure I necessarily agree with this tradeoff, but that's why it is the way it is, as I understand it. |
19:55:05 | def- | Peaker: not sure about this code, but fyi: the compiler was initially written in Pascal and then (half-automatically) translated to Nim |
19:55:05 | Jehan` | Note that this is just what I understand -- I may be misrepresenting Araq's intent. |
19:55:22 | Peaker | def-: oh, wow |
19:55:54 | Peaker | Jehan`: I don't think there's a tradeoff with expressiveness really -- the safe approach only removes the illegal options from being expressible |
19:56:10 | Peaker | but what def- said could explain it |
19:56:30 | Jehan` | Peaker: Well, I'm not talking about Turing-completeness, but the amount of code it takes to express the same thing. |
19:56:54 | * | vendethiel joined #nim |
19:57:19 | Jehan` | As I said, I'm not sure I agree here, but neither do I completely buy into the superiority of static type checking, either. |
19:57:29 | Peaker | Jehan`: well, with ASTs encoded as a Haskell ADT, I can just do: case node of Foo field1 field2 -> .. use fields happily .. seems more expressive and safe |
19:57:40 | Peaker | Jehan`: a bit weird to say that as a Nim user, no? :) |
19:57:46 | Jehan` | I've seen too much code for sum types that basically assumes that only one variant holds and throws an error when you access any other. |
19:58:08 | Peaker | Jehan`: I build my code with -Wall -Werror so I get a compile-time error if I don't explicitly handle all possibilities |
19:58:43 | Jehan` | Peaker: And often the "other possibilities" are just of the "this can't happen, throw an error, or do some default stuff" kind. |
19:59:16 | Peaker | Jehan`: that's OK if it is at least explicit |
19:59:28 | Jehan` | Peaker: Does it actually reduce software defects, though? |
19:59:34 | Peaker | Add a case to the data-type, get compiler guidance about what needs to be fixed |
20:00:08 | Peaker | Jehan`: when I refactor something -- and the compiler tells me everything I need to fix, I have much more confidence than if a few UTs (that don't necessarily even cover the relevant change) run |
20:00:26 | Peaker | (and of course: Types+UT >>> UT) |
20:00:31 | Jehan` | Also, again, this is not necessarily how *I* would do sum types, so please don't force me to argue something that I don't believe. |
20:00:48 | gokr | Jehan`: Did you ever read Ghilad's stuff about pluggable type systems? |
20:01:19 | Peaker | Jehan`: isn't it weird for a Nim user not to believe in static typing, though? |
20:01:22 | Jehan` | I'm only pointing out that there are genuine tradeoffs and that it's not quite as simple. That said, my ideal solution (given infinite resources) would probably be neither Nim's nor Haskell's. |
20:01:32 | Jehan` | Peaker: Static typing isn't a binary thing. |
20:02:02 | Peaker | Jehan`: I agree, I can't wait till dependent types become more mainstream :-) |
20:02:13 | Peaker | (and usable) |
20:02:17 | Jehan` | Peaker: I think dependent types are a dead end myself. |
20:02:22 | Peaker | Jehan`: why? |
20:02:31 | Jehan` | gokr: Gilead Bracha? |
20:02:37 | gokr | yeah |
20:02:42 | Peaker | Isn't it "Gilad"? |
20:02:52 | Peaker | (this is how we Israelis usually write Gilad in English) |
20:02:56 | gokr | Sorry, yes, Gilad |
20:03:00 | Jehan` | Peaker: For the same reason that any approach that came reasonably close to theorem proving capabilities hasn't worked out, ever. |
20:03:06 | gokr | I always put an h in there somewhere. |
20:03:09 | Jehan` | And I used to work on formal methods stuff. |
20:03:35 | Peaker | Jehan`: ah, "argument from failed past attempts" -- going by that, the iPhone could never happen, nor could Google, and various others who succeeded after many failed attempts |
20:03:36 | Jehan` | And gokr: Yes, though it's been a whole. |
20:03:53 | Jehan` | Peaker: Well, I'm certainly open to be surprised. |
20:04:05 | Peaker | Jehan`: Note that dependent types is still a frontier of relatively fresh/new research |
20:04:12 | Jehan` | But having seen millions of research money burned on related attempts, I'm skeptical. |
20:04:23 | Peaker | Jehan`: "burned"? There's been immense progress |
20:04:31 | Peaker | Jehan`: it's already very very impressive stuff :) |
20:04:33 | Jehan` | gokr: … though it's been some time. |
20:04:46 | Jehan` | Peaker: Sure, now teach it to the average programmer. |
20:04:59 | Jehan` | Peaker: Keep in mind that I've written entire formal specifications in Z. |
20:04:59 | gokr | I didn't look into it much myself - but just wondered. A funny sidestory: I was demoing a thing at OOPSLA and used his paper as a sample file to upload - and he came up to me afterwards and wondered if I had read that paper. :) |
20:05:16 | Peaker | Jehan`: I'm excited because of what it'll allow *me* to do. I don't really care what the average programmer would do with it (though I suspect the average programmer has underrated intelligence) |
20:05:22 | gokr | (I didn't know he was in the audience) |
20:05:37 | Jehan` | gokr: Heh. :) |
20:06:07 | Peaker | Jehan`: Being able to rule out more and more bugs at compile time excites me.. Static goodness has been a huge time saver for me |
20:06:08 | Jehan` | gokr: I am generally very interested in approaches surrounding soft typing. |
20:06:22 | gokr | Jehan`: Then it should probably be right up your alley. |
20:06:34 | Jehan` | gokr: One issue I have with strict static typing is that it is often at odds with modularity. |
20:06:48 | Peaker | Jehan`: how does Z relate to dependent types? |
20:06:57 | Jehan` | Peaker: Are you familiar with Z? |
20:07:00 | Peaker | nope |
20:07:00 | gokr | Gilad works with Newspeak at Cadence - and it runs on the same VM as Squeak/Pharo - Cog. Eliot who makes Cog works there too. |
20:07:09 | Peaker | Jehan`: Gilad's arguments about modularity and static types are based on complete ignorance, btw |
20:08:03 | gokr | Really? |
20:08:34 | Peaker | It seems he either never heard of, or does not understand, ML modules as a counter-example to his modularity claims |
20:08:49 | Jehan` | Peaker: It allows you (inter alia) to adorn types with semantic properties and has a calculus to prove properties of programs. |
20:08:49 | * | Strikecarl joined #nim |
20:09:04 | gokr | Jehan`: Think this was it: http://bracha.org/pluggableTypesPosition.pdf |
20:09:14 | Peaker | Jehan`: how does it compare to say Agda or Idris? |
20:09:29 | Strikecarl | Guys, i reinstalled nim and aporia and when i try to compile i get a popup asking for the nim executable, i choose /bin/nim.exe and i get a file not found? |
20:09:46 | Jehan` | Peaker: It's different in that it was never designed for integration with programming? |
20:09:48 | Strikecarl | Sorry if someone answered it before but i disconnected without realizing an hour ago. |
20:09:55 | Jehan` | Which doesn't change the fact that you face similar challenges. |
20:10:17 | gokr | Jehan`: Perhaps better place to start: http://lambda-the-ultimate.org/node/1311 |
20:10:32 | Jehan` | Peaker: By the way, I'm reasonably sure that Gilead Bracha knows ML, given that he has argued about the shortcoming of ML modules in the past. :) |
20:11:38 | * | yglukhov___ quit (Quit: Be back later ...) |
20:11:42 | dom96 | Strikecarl: How did you choose /bin/nim.exe? |
20:11:55 | Strikecarl | dom96 there was a popup, looked like this: |
20:12:13 | Strikecarl | http://i.imgur.com/3tSakwf.png |
20:12:15 | Strikecarl | then i clicked ok |
20:12:18 | Strikecarl | then this: http://i.imgur.com/P4XHFFE.png |
20:12:30 | Strikecarl | i just went to /bin/ then i ticked nim.exe? |
20:12:56 | dom96 | right |
20:12:59 | dom96 | and then what happened |
20:13:54 | Strikecarl | http://strikecarl.com/2015-06-01_22-13-22.mp4 |
20:16:07 | Peaker | Jehan`: have you tried Idris, Agda or Coq? |
20:16:26 | Jehan` | Peaker: Coq. |
20:16:31 | Peaker | Jehan`: If Gilad knows ML modules, then I don't understand how he could write what he did about types-vs.-modularity, which ML is trivially a counter-example of |
20:16:40 | Jehan` | I'm a bit of an OCaml guy (or at least was). |
20:16:56 | Jehan` | Anyhow, I've gotta go. |
20:17:01 | Peaker | Jehan`: k, nice talking :) |
20:17:15 | * | Jehan` quit (Quit: Leaving) |
20:17:37 | dom96 | Strikecarl: oh. Thanks for the video :). The Nim compiler cannot find a C compler (i.e. gcc). |
20:17:47 | dom96 | Strikecarl: How did you install Nim? |
20:17:55 | Strikecarl | The installer @Nim's website |
20:18:02 | Strikecarl | nim-lang.org/download.html |
20:18:55 | dom96 | You should have gcc then, that's odd. |
20:19:14 | dom96 | Is it in your Nim installation directory? |
20:19:20 | dom96 | can you find gcc.exe in there? |
20:19:41 | * | vendethiel quit (Ping timeout: 258 seconds) |
20:19:56 | Strikecarl | dom96 http://i.imgur.com/x2NC0W4.png |
20:20:37 | dom96 | Strikecarl: open Nim\config\nim.cfg |
20:20:54 | Strikecarl | Mhm dom96 |
20:21:01 | dom96 | line 100 |
20:21:17 | Strikecarl | #gcc.path = r"$nimrod\dist\mingw\bin" |
20:21:51 | dom96 | weird. Seems like an old config? Try uncommenting anyway. |
20:22:41 | * | vendethiel joined #nim |
20:22:43 | Peaker | Does anyone know Nim's compiler "globalError" vs "localError"? What are those? And what is "inCompilesContext"? |
20:23:05 | Strikecarl | dom96, now i get "Error: unhandled exception: invalid format string [ValueError]" |
20:23:12 | jaco60 | dom96, i have this line too in my .cfg file (but i'm on Linux, so i don't care...) Anyway, i have 0.11.2 |
20:23:41 | dom96 | Strikecarl: change $nimrod to $nim |
20:23:50 | Peaker | why does Nim rebuild so much of the compiler when I change a little bit and run "koch temp" ? |
20:23:59 | dom96 | jaco60: interesting. Did you fix that error? |
20:24:09 | jaco60 | no, but i've no error :) |
20:24:22 | dom96 | jaco60: How did you get rid of that error? |
20:24:30 | * | xcombelle quit (Remote host closed the connection) |
20:24:32 | jaco60 | which error ? |
20:25:39 | dom96 | jaco60: Did you not have the same error as Strikecarl a while ago? |
20:25:41 | Strikecarl | IT COMPIELD!! |
20:25:44 | Strikecarl | IT COMPILED!!! |
20:25:45 | jaco60 | no |
20:25:47 | Strikecarl | dom96 <333 |
20:26:05 | dom96 | Strikecarl: great |
20:26:48 | * | Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
20:28:01 | * | solidsnack joined #nim |
20:28:01 | * | solidsnack quit (Client Quit) |
20:31:15 | Varriount | Peaker: Much of the compiler is combined into one file. |
20:32:09 | * | UberLambda joined #nim |
20:32:12 | Varriount | Peaker: If you look, many modules are 'include'd, rather than imported. |
20:32:37 | Peaker | how can I look? |
20:34:15 | UberLambda | How are backtraces implemented? I see that stripping an application of its symbols (via strip) disables them, but I have no idea about how could this be done internally |
20:35:14 | Varriount | UberLambda: Look at the C code. If I recall correctly, a stack-trace structure is maintained somewhere. |
20:35:54 | UberLambda | Varriount: thanks, I'll have a look |
20:38:02 | Araq | hi Peaker welcome |
20:38:12 | Peaker | hi :) |
20:38:21 | Varriount | Peaker: Uh, open them in a text editor? |
20:38:37 | Peaker | Varriount: I'm a newbie with nim (despite trying to immediately hack the compiler :-) ) |
20:38:47 | Peaker | Varriount: You're talking about opening the C intermediates, right? Where are they? |
20:38:47 | Varriount | Peaker: Open the 'nim' files in the compiler directory. |
20:38:48 | * | jubalh quit (Quit: Leaving) |
20:38:57 | Varriount | No, not the C source. |
20:39:28 | Peaker | Varriount: ah, so Nim has both "import" and "include"? |
20:39:36 | Varriount | Peaker: Yes. |
20:39:56 | Varriount | Peaker: Also, Nim files are recompiled every time because the cache mechanism is broken. |
20:40:11 | Peaker | what advantage does include have over import? |
20:40:24 | Araq | it's not "broken", Varriount, but it doesn't work well either. |
20:41:15 | filwit | 'include' injects the file into it's own module space |
20:41:54 | Peaker | filwit: to what end? |
20:42:18 | filwit | it's a way of dividing up modules into smaller parts and still allowing private data to be shared |
20:42:25 | Varriount | ^ |
20:42:47 | Peaker | ah, like C++ friends? |
20:42:59 | filwit | solves a similar problem, yes |
20:43:31 | Peaker | seems weird that to access privates you have to throw away standalone compilation |
20:43:42 | Peaker | I guess for various optimizations it isn't weird |
20:43:50 | Araq | Peaker: why ASTs are the way the are ... well watch my screencast to be enlightened |
20:44:29 | filwit | looking forward to tomorrow's talk, Araq |
20:44:50 | Varriount | Is there a way to record it? |
20:44:51 | Peaker | Araq: is it the Pascal heritage? |
20:45:41 | * | sepisoad joined #nim |
20:46:43 | * | vendethiel quit (Ping timeout: 265 seconds) |
20:48:09 | Peaker | Araq: do you have a URL? I'd love a tl;dr :) |
20:49:46 | sepisoad | when is shared type qualifier going to be officially available? |
20:51:36 | vikaton | Oh my god I dying |
20:51:59 | Varriount | sepisoad: Shared type qualifier? |
20:52:09 | sepisoad | Varriount, yes |
20:53:12 | * | dtscode is now known as squirtle |
20:54:05 | Varriount | sepisoad: Which is...? |
20:54:57 | Araq | Varriount: it will be recorded |
20:56:01 | sepisoad | it is going to be a way to share a variable among threads, am i right"? |
20:56:10 | Araq | Peaker: Pascal heritage is one reason (actually it's copied from Ada, not Pascal. Pascal doesn't implement this feature properly to begin with.) but the real reason is that it's more expressive than Haskell's approach and - once flow typing works properly - as safe. |
20:57:05 | Araq | I agree that it had quite bad consequences for the compiler's code though. |
20:57:11 | Peaker | Araq: more expressive in what way? |
20:57:36 | Araq | you will see ;-) |
20:57:42 | Peaker | Araq: instead of "if", if you use "case" and have the specific constructor bind the fields into variables (instead of having a "seq" of unknown length known only in that case to be of length 2) |
20:57:57 | Peaker | that seems safer & more expressive, no? |
20:58:11 | Peaker | (more expressive as in more static invariants being expressed) |
20:58:46 | Araq | ok, well so now the question is how to define "expressive" |
20:59:08 | * | Jesin joined #nim |
20:59:44 | Araq | there are *lots* of algorithms that deal with the AST without looking at the fine structure and then having a uniform representation of a node's children really pays off. |
21:00:00 | * | vendethiel joined #nim |
21:00:28 | Peaker | Araq: but there are other solutions for that.. for example, I have an AST in Haskell, looks like: data AST child = Apply child child | Lam String child | ... |
21:00:39 | Peaker | Araq: and then I get a "free" function called "traverse" that lets me apply something to all the children |
21:00:56 | Peaker | Araq: so I get the best of both worlds (uniform way to treat all children & safe static structure) |
21:01:15 | Peaker | that AST should perhaps be called Node and not AST |
21:01:51 | Peaker | data Node child = Apply child child | Lam String child | ... ; data AST = Recursive Node ; data Recursive f = f (Recursive f) {- Recursive is actually called Fix, and it is from a library -} |
21:02:21 | Araq | yeah but your traverse only hides the non-uniform representation |
21:02:34 | Araq | the runtime costs remain |
21:03:03 | Peaker | Araq: well, you dispatch on the various cases anyway, so the main cost here seems like a bit of code bloat, no? |
21:03:38 | Araq | code bloat + it really matters how many cases your dispatch has |
21:04:19 | Araq | (yes, I'm aware that for you it's "just O(1) either way") |
21:04:21 | Peaker | how expensive is just using a code-address-table and jumping based on that? |
21:04:40 | Peaker | it's probably not much more expensive than a bunch of "if/else" branches |
21:04:46 | Peaker | (when the table becomes hot very quickly) |
21:05:47 | * | anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
21:06:35 | Araq | here is a hint: code-address-tables are usually avoided ;-) |
21:07:40 | Peaker | In nim, maybe :) They're quite common |
21:08:38 | Araq | also the most common node kind is "function application" which has a variable length of children by its nature |
21:08:59 | Peaker | data Node child = Apply [child] | ... |
21:09:05 | * | anthgur joined #nim |
21:09:08 | Peaker | you still get a free traversal |
21:09:16 | Peaker | (that walks all the children) |
21:09:35 | * | UberLambda quit (Quit: GTG) |
21:09:53 | Araq | so it's rather pointless to have a non-uniform structure |
21:10:22 | Peaker | well, you get static invariants like FooNode has exactly 2 children |
21:11:02 | Peaker | btw, I am trying to hack the Nim compiler -- to print a better error message about arg list mismatching all candidates of a call |
21:11:11 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
21:11:30 | Peaker | it seems that at the point describeArgs is called in the error message generation -- the args have already lost the information on whether they are "let" or "var" ? |
21:11:38 | Peaker | (which is weird, since type-checking definitely needed it) |
21:12:28 | filwit | Araq: thinking about that, it would be cool if it where possible to do type proofing in the same semantic sense you do not-nil checking.. eg: `if x of Y: x.yProp # we know it's a 'Y' here` |
21:13:06 | filwit | anyways, just some random thought while reading your guy's discussion.. |
21:14:18 | reactormonk | Peaker, where's the error message? |
21:14:47 | reactormonk | just go up the stack and check for any types that have a debug proc defined |
21:15:09 | Peaker | https://github.com/Araq/Nim/blob/devel/compiler/semcall.nim#L127-L129 |
21:15:49 | Peaker | reactormonk: which calls: https://github.com/Araq/Nim/blob/devel/compiler/sigmatch.nim#L254 |
21:16:05 | Peaker | I tried changing the highlighted line to use typeToString directly on arg.typ |
21:16:18 | Peaker | but the "var" vs "let" distinction is still lost, somehow! |
21:16:36 | Araq | that's not part of the type |
21:17:04 | Peaker | Araq: ah, but the same error seems to happen if I use "let" instead of "var" |
21:17:31 | Peaker | Araq: https://gist.github.com/Peaker/9e1d87e81945184871e4 |
21:18:08 | Peaker | what does "let" vs "var" checking -- how is it the same error is reported, if the "var" vs "let" distinction is not in the arg type? |
21:18:34 | Araq | well the error message used to be much better but then we got "overloading by var" |
21:18:54 | * | NhanH quit (Ping timeout: 276 seconds) |
21:19:02 | Peaker | Araq: I'm trying to understand the compiler internals that generate this error and hack on it myself :) |
21:19:21 | Araq | https://github.com/Araq/Nim/blob/devel/compiler/sigmatch.nim#L1471 |
21:19:41 | Araq | we cheat, we look at the node instead of the type here |
21:19:45 | * | NhanH joined #nim |
21:21:13 | Peaker | ah, a bit weird, since there are types for Var vs non-var, etc |
21:21:37 | Araq | yes but 'var x: int' is of type 'int', not of type 'var int' |
21:22:27 | Araq | otherwise if we ever get it 'var x: var int' would be of type 'var var int' and things would get *really* messy |
21:22:39 | Peaker | so semCall:pickBestCandidate calls sigMatch:matches which gets to the Aux thing you highlighted? |
21:22:55 | Araq | yeah |
21:23:12 | Peaker | var x: int could be syntax to mean that x : var int, no? I don't really know much nim yet :P |
21:23:41 | * | anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
21:23:48 | Araq | internally we could perhaps do that but it would be weird |
21:24:03 | Araq | since 'var int' is a 'hidden pointer to an int' |
21:24:15 | Araq | and that's not at all what 'var x: int' is |
21:24:24 | Araq | it's a slot in the stack frame. |
21:24:38 | Araq | a direct value. |
21:24:55 | Araq | a location on its own. whatever you like to call it. |
21:26:32 | Peaker | yay, I managed to make the change :) |
21:26:37 | Peaker | example1.nim(8, 22) Error: semcall-1:type mismatch: got (var CountTable[system.string], string, string) |
21:26:58 | Peaker | (showing "var" for LValue args :-) ) |
21:27:15 | Peaker | maybe a different word would make sense there, but the fact it's an lvalue is very relevant to method resolution! |
21:27:19 | * | sepisoad quit (Ping timeout: 265 seconds) |
21:27:30 | Araq | *now* it is. |
21:27:43 | Araq | it used to be not very relevant. |
21:28:13 | Peaker | So should I make a pull request? is "var" sensible there? |
21:28:22 | Peaker | Maybe some other notation? |
21:28:41 | Araq | I don't see the point in doing it this way |
21:28:49 | Araq | instead you should produce something like: |
21:28:50 | Peaker | how should it be done? |
21:29:35 | Araq | "mismatch for argument 1 as it is not an lvalue" |
21:30:25 | Araq | people want the compiler to tell the *positions* that mismatched |
21:30:39 | Araq | (which is quite some work to detect ...) |
21:30:45 | Peaker | that's a much bigger pull request :) |
21:30:56 | Araq | indeed |
21:31:39 | Peaker | At least showing the relevant info in the error is an improvement, IMO (though of course what you said would be much better) |
21:31:46 | * | Trustable quit (Remote host closed the connection) |
21:32:02 | Araq | well but 'var' will be confusing, perhaps use 'lvalue' ? |
21:32:26 | Araq | but isn't the *absense* of an lvalue the reason for the type error? |
21:32:52 | Peaker | well, in that particular example, yes. But now absence of the "lvalue" in the error means it is an rvalue |
21:33:02 | Araq | ha, lol |
21:33:06 | Peaker | (I have a different example, where I make a different type error where it *is* an lvalue) |
21:33:09 | Araq | nobody will know |
21:33:22 | Araq | you really need to generate a proper explanation. |
21:33:28 | Peaker | well, can add "lval" or "rval" prefix there :) |
21:33:34 | Peaker | (for everything) |
21:33:41 | Araq | no! |
21:33:47 | Araq | that makes things worse |
21:34:03 | Araq | usually it's just irrelevant information |
21:34:34 | vikaton | Araq, you think maybe orielly will write a book for Nim ? |
21:34:35 | Peaker | I guess you have to generate the error at the mismatch site |
21:34:36 | Peaker | in the Aux function |
21:34:48 | Peaker | and not in describeArgs |
21:34:59 | Araq | vikaton: I think I'll write a book for O'Reilly ... |
21:35:15 | vikaton | Nice |
21:35:26 | Araq | Peaker: ha yeah, but it's on the critical path |
21:36:28 | Peaker | Araq: can it be re-run if all candidates mismatch, with a different compile-time param? |
21:36:34 | Peaker | Araq: that says "collect errors this time"? |
21:37:01 | Peaker | (i.e: have the compiler duplicate the code for the signature matching functions for the hot path and error path) |
21:37:14 | Peaker | (and the error path collects information) |
21:39:03 | Araq | yeah something like that but I think you can get away without all this code duplication |
21:40:07 | Peaker | as in machine code duplication? does it matter that the cold path is duplicated? It's not going to sit in the icache |
21:40:19 | Peaker | (and iiuc, source code need not be duplicated here) |
21:40:28 | * | squirtle is now known as charmander |
21:43:12 | Araq | I mean that you don't have modify 'typeRel' cause nobody cares where in the *recursion* the error really was |
21:49:22 | * | anthgur joined #nim |
21:55:16 | * | Jehan` joined #nim |
22:01:36 | * | BlaXpirit quit (Quit: Quit Konversation) |
22:05:47 | * | phI||Ip quit (Ping timeout: 256 seconds) |
22:07:34 | * | phI||Ip joined #nim |
22:14:57 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:15:40 | * | wb joined #nim |
22:23:33 | * | Sornaensis quit (Excess Flood) |
22:24:14 | * | Sornaensis joined #nim |
22:25:59 | * | ingsoc quit (Quit: Leaving.) |
22:27:38 | * | C0ri0lis joined #nim |
22:28:04 | * | C0ri0lis left #nim (#nim) |
22:29:14 | * | banister joined #nim |
22:39:07 | * | TEttinger joined #nim |
22:40:21 | * | anthgur quit (Ping timeout: 256 seconds) |
22:41:37 | * | boop is now known as boopisaway |
22:41:56 | * | Peaker left #nim ("Leaving") |
22:45:50 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:48:24 | * | Jehan` quit (Quit: Leaving) |
22:51:18 | * | ozra joined #nim |
22:59:44 | * | boopisaway is now known as boop |
23:02:10 | * | ozra quit (Ping timeout: 246 seconds) |
23:06:34 | * | kumul joined #nim |
23:21:49 | * | vendethiel quit (Ping timeout: 272 seconds) |
23:24:01 | * | IronY is now known as Ir0nY |
23:27:29 | * | Ir0nY is now known as IronY |
23:43:52 | * | vbtt_ joined #nim |
23:44:27 | * | boop is now known as boopisaway |
23:45:37 | vbtt_ | Hi Je |
23:45:58 | vbtt_ | nm |
23:48:04 | * | ntjnsz quit (Remote host closed the connection) |
23:53:30 | * | Kingsquee joined #nim |
23:53:56 | * | fowl joined #nim |
23:57:13 | * | wuehlmaus quit (Quit: Lost terminal) |
23:57:16 | * | pregressive quit () |