<< 01-06-2015 >>

00:00:06dtscodeI tried like 3 different things
00:00:17dom96--il:logs/ ?
00:00:56dtscodeGod damn it
00:01:02dtscodeI could have sworn I tried that
00:01:12dtscodeI promise I'm not completely hopeless :D
00:01:15cazovif the colon one works then the help text in the bot source is incorrect
00:01:23dom96indeed
00:01:29dom96correct that please
00:01:38dtscodeok
00:02:07dom96I need to head to sleep now
00:02:15dtscodeok. Thanks for the help
00:02:23vikatonsleep tight >:D dom96
00:02:24dom96np, bye
00:05:49*kumul quit (Ping timeout: 264 seconds)
00:06:16ozrag'night!
00:07:36ozraAnd time for me too. Hack tight!
00:09:29*Jesin quit (Quit: Leaving)
00:09:45onionhammerls
00:10:04dtscodeporn/ Desktop/ Documents/ Downloads/
00:10:52onionhammer;:D
00:11:06onionhammerplease, it would be "stuff" not "porn" ;)
00:11:32flaviuDesktop/ I can understand, there's that firefox bug, but Documents/ and Downloads/?
00:11:41flaviuDo you love typing that much?
00:12:29flaviudtscode: You should report a bug in that ls program, it's not in alphabetical order.
00:13:20dtscodeflaviu: p comes before D
00:13:33dtscodein the alphadtsbet
00:14:17flaviuNope, the order is "Desktop Documents Downloads porn"
00:14:39dtscodeNot 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:10dtscodeHOLYCOWBATMAN: Note that there is #nim-offtopic
02:08:21filwit\me ~(@ o @)~
02:08:33*filwit ~(@ o @)~
02:08:42filwiti always get that wrong
02:09:09*boydgreenfield joined #nim
02:13:44HOLYCOWBATMANdtscode: Note that there is #nim-offtopic
02:14:06*gokr quit (Quit: Leaving.)
02:14:12dtscodeYes. That is what I just said
02:15:38*gsingh93 quit (Ping timeout: 256 seconds)
02:19:52HOLYCOWBATMANpreaching by example is nice
02:22:43*darkf joined #nim
02:24:56dtscodeI'm already in there.
02:25:18dtscodeMy point is things like* HOLYCOWBATMAN dance┌(° o °)┘ dance └(° o °)┐ belong in #nim-offtopic
02:25:29dtscodeI don't see why you're making a bidder deal out of it than that
02:26:13*boydgreenfield quit (Quit: boydgreenfield)
02:29:19HOLYCOWBATMANdtscode: my point is plenty of things belong in #nim-offtopic
02:29:21HOLYCOWBATMANI don't see why you're making a bidder deal out of it than that
02:29:50dtscodeYes 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:30HOLYCOWBATMANsuch as plenty of your comments
02:30:45dtscodeNo
02:30:54Heartmenderthe 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:03cmdprmtWho 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_44535463686f646https://github.com/nim-lang/nimforum
05:11:44_44535463686f646cmdprmt: ^
05:12:04_44535463686f646dat 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:43dtscode_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:13dtscode<darkf> dtscode: you should tell them nimforum actually looks like ass
07:17:16dtscodeapparently
07:17:42darkfdtscode: you could work on the style
07:22:03*endragor_ quit (Remote host closed the connection)
07:23:49VarriountI like the look of NimForum.... :<
07:28:30dtscodeMe too
07:30:22Varriountdtscode: It's refreshingly non-phpbb like, for one thing.
07:32:54BlaXpiritmailinglist-like
07:33:15dtscodeVarriount++
07:33:33Varriountdtscode: :D
07:35:11darkfit's eerily minimalistic.
07:35:24dtscodeAnd thats a bad thing
07:35:35Varriountdarkf: What, so you want blink tags and gifs everywhere? :3
07:35:55darkfno, I had <marquee> in mind.
07:36:37VarriountYou mean, a non-standard element? https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee
07:36:56*dtscode faints
07:42:52darkfVarriount: well, blink is nonstandard now too
07:42:59darkfthere 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:45filwiteveryone 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:40VarriountHello pregressive
08:24:45*pregressive quit (Ping timeout: 276 seconds)
08:25:21filwitdenied
08:25:33Varriount:(
08:25:37filwitlol
08:26:51Varriountfilwit: Relevent youtube video - https://www.youtube.com/watch?v=qW5UrEgw4pw
08:27:32filwithmm.. i never watched that one as a kid, but I remember loving Dexters Lab
08:27:47filwitanyways, I need to leave for a bit
08:27:48filwitbbl
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:40letiahi 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:37VarriountHello letia
09:28:08*milosn quit (Quit: leaving)
09:30:25letiaquick 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:52Varriountletia: strutils.parseint, or parseutils.parseint
09:31:12letiaseems like less straighforward than int(input) :D
09:31:20letiathanks!
09:31:27Varriountletia: int(input) is conversion
09:31:45VarriountIt's not a function, rather, a typesafe form of casting
09:32:20letiaok, so there are 3 ways of converting string to int, strutils, parseutils and int?
09:32:43VarriountNo, just two. And the strutils version uses the parseutils version anyway.
09:32:57letiaI see, thanks
09:33:25Varriountletia: something of the form `typeName(variable)` performs type *conversion*.
09:33:44VarriountEg, converting a 32-bit int to a 64-bit int, etc.
09:34:16VarriountParsing 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:40letiahmm, import parseutils parseutils.parseint(input) gives error "type mismatch got (string) but expected one of parseInt( string ...."
09:38:55letiathis message is confusing, I am giving parseInt a string
09:39:07fowlletia, http://nim-lang.org/docs/theindex.html#arseIn
09:42:06*solidsnack joined #nim
09:43:13letiaem, ok "strutils : parseInt(s: string): int" means that I need to parseInt(mystrvar: string): int? but that gives me an error
09:43:51Varriountletia: Could you show us your code?
09:44:28letiaimport parseutils var limit: string = readLine(stdin) parseInt(limit: string): int
09:45:02letia"this escalated fast" (C) :)
09:45:40Varriounthttps://gist.github.com/Varriount/86ea867cbfbde10c69e7
09:46:31Varriountletia: ^
09:49:25*letia quit (Ping timeout: 246 seconds)
09:49:42VarriountAww..
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:25fowlAraq, 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:04Araqfowl: string already internally has a .base of tyChar, so that shouldn't be hard to do
11:01:13fowlah ok
11:01:32fowlgot it working
11:02:25Araqlol
11:03:38*JehanII joined #nim
11:04:12*letia joined #nim
11:04:40fowlhttps://github.com/Araq/Nim/pull/2856
11:05:25fowlguess i could add a test
11:06:04Araqyeah and in particular ensure the tests in types/ typerel/ and metatype/ continue to work
11:06:30fowlcan i run those selectively
11:07:19fowloh this is wrong
11:07:36fowlError: type mismatch: got (File, string, string)
11:07:36fowlbut expected one of:
11:07:36fowlsystem.writeln(f: File, x: varargs[Ty])
11:14:46letiahi 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:13dom96letia: Change 'import parseutils' to 'import strutils'
11:20:57fowlAraq: come on give me a hint ;)
11:23:00letiaok, thanks, now it works, but isn't strutils use parseutils under the hood?
11:25:32dom96don't think so
11:25:39dom96you can use parseutils too if you want
11:25:54dom96you need to change the way you use parseInt though because the parameters are different
11:29:23Araqfowl: 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:05OnOAraq: regarding (. ignore TR .) I think we could consider adding ability to annotate parenthesis with pragmas, so ( ... ) {.noRewrite.}
11:30:11Araqso it might be that a conversion fromt string to openArray breaks Nim's stdlib
11:30:15OnOthen (. can be used to something more practival
11:30:50fowlAraq: wat? String isn't matching varargs[t] now that's an issue
11:31:12fowlOr rather it is but as a char
11:31:39fowlPassing two strings won't match
11:31:40Araqfowl: exactly. that's pretty bad.
11:32:09Araqbut hey, it's easy to solve
11:32:22Araqlet it only match for tyOpenArray, not for tyVarargs
11:32:24fowlSo merge with fixes ^^
11:32:35fowlHow when they are checked together
11:32:50Araqyou can split the check
11:33:02Araqthe types are distinguished in the compiler for these reasons
11:33:11Araqso it shouldn't be hard
11:33:26Araqbut I wonder if tyOpenArray has the same problem too
11:33:52AraqOnO: fine with me
11:34:49fowlSounds ugly
11:35:03fowlI hate having two bodies of identical code
11:35:24Araqprocs and templates can be used to avoid this
11:39:10*jaco60 joined #nim
11:46:25*rgv151 quit (Quit: Leaving...)
12:03:11fowlAraq, not when a case statement is involved
12:03:23fowland i need to add another branch
12:08:00*Kingsquee quit (Quit: Konversation terminated!)
12:12:13Varriountletia: strutils does use parseutils under the hood, but not in the same way.
12:12:58Varriountletia: 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:04VarriountSigh... 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:01VarriountHello Ven
12:28:08Venhi 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:03JehanIIVarriount: As far as I can tell, Microsoft has essentially abandoned C except as a C++ subset.
12:56:15JehanIIE.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:24UberLambdaHello everyone... what to do if I get a "cannot open `modulename`" error for a package installed with Nimble?
13:12:39VarriountUberLambda: Hm. What module?
13:12:44UberLambdaSpecifically nim-glfw... It seems to be indexed
13:12:50UberLambda\/etc/nim.cfg(54, 3) Hint: added path: '/home/paolo/.nimble/pkgs/nim-glfw-0.2.0' [Path]
13:14:22UberLambdaVarriount: any ideas?
13:14:24VarriountUberLambda: What's your import line?
13:14:38*pregressive joined #nim
13:14:45UberLambdaVarriount: simply "import glfw"
13:15:08VarriountUberLambda: Odd. What method did you use to install nimble?
13:15:23VarriountAnd what version of the compiler are you using?
13:15:30UberLambdaVarriount: I installed it from the Arch package repos and had download packages.json manually
13:15:46UberLambdaVarriount: Nim Compiler Version 0.11.2 (2015-05-05) [Linux: amd64
13:15:58UberLambdaalso from the Arch repos
13:17:01VarriountUberLambda: dom96 is the author of Nimble, so he might have a better idea what's wrong... Have you tried 'nimble install nimble'?
13:17:34UberLambdaVarriount: tried to do that just now... nimblepkg/version.nim(141, 22) Error: use '^' instead of '-'; negative indexing is obsolete
13:17:41UberLambdaSeems like nimble itself is not up-to-date...
13:18:06VarriountUberLambda: Ouch. Yeah, someone should probably fix that.
13:18:18dom96nimble install nimble@#head
13:18:28dom96UberLambda: How are you compiling your program?
13:18:29VarriountI have to go in a couple minutes though...
13:18:45UberLambdadom96: I'm just calling the nim compiler on the file
13:18:59UberLambdadom96: I'll try installing head now
13:19:03UberLambdaVarriount: thanks BTW
13:19:07dom96that shouldn't make a difference
13:19:08*vikaton joined #nim
13:19:14dom96how are you importing glfw?
13:19:23vikatonAnyone here reserve windows 10?
13:19:30Varriountvikaton: I did.
13:19:34vikatonNice
13:19:44vikatonthat was a sweet move my Microsoft
13:19:53JehanIII'm still struggling with the idea of "reserving" a free update?
13:19:55UberLambdadom96: there's still the https+Linux problem though :(
13:20:07Varriountvikaton: There's a little icon in the lower-right corner of the task bar that lets you do it.
13:20:11dom96UberLambda: i'm not sure what is going on there.
13:20:19vikatonYeah I just found it :P
13:20:22UberLambdadom96: I'm simply copying the example on the github page of nim-glfw
13:20:30JehanIIvikaton: 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:30vikatontook 15 minutes to find a download site xD
13:20:51Varriountvikaton: There's no little icon for you?
13:20:57JehanIIApple can do it because they're selling hardware, but for Microsoft, their Windows sales are a huge part of their income.
13:21:06vikatonVarriount: I found it after 15 mins of searching lol
13:21:11dom96vikaton: JehanII: I'm wondering whether my Windows 8 license key will magically be transformed into a Windows 10 license key
13:21:25JehanIIdom96: No idea, either.
13:21:41VarriountJehanII: I would imagine that Office/Sharepoint/Visio is a rather large portion as well though.
13:21:45UberLambdaI wonder if I can transfer my Win8 OEM to a Win10 inside a virtual machine
13:21:57JehanIIVarriount: It is. But, still, we're talking billions here.
13:22:05UberLambdaOEM does not seem to allow this... but I wonder if the free update will automagically let me do it
13:22:34dom96JehanII: The new CEO is really transforming Microsoft.
13:22:54JehanIIdom96: Yeah, but hopefully not in the way that Sun was transformed. :)
13:23:04*Varriount shudders
13:23:12JehanIIMInd you, from a purely selfish perspective, I think it's a great thing.
13:23:12dom96UberLambda: Somebody said that the https issue was due to it being packaged incorrectly.
13:23:49dom96UberLambda: Anyway, show me your code.
13:24:05Varriountdom96: His import line is "import glfw"
13:24:07vikatonI wish Windows10 cmd was like *nix
13:24:20*banister joined #nim
13:24:24JehanIIAh, the upgrade is only free for one year.
13:24:31*banister quit (Max SendQ exceeded)
13:24:34vikatonwat ?
13:24:38vikatonyou sure?
13:24:42dom96UberLambda: Also, all of the output from the compiler might help.
13:24:45VarriountJehanII: Oooh, that's a neat trick.
13:24:54JehanIIThat makes sense.
13:25:05vikatonJehanII: No its not...
13:25:16JehanIIWell, you will still be able to use it forever, you can only claim it within one year.
13:25:20vikatonIt says its _not_ a trial
13:25:25vikatonohhhh
13:25:26dom96what if I need to reinstall Windows?
13:25:31dom96Am I back to Windows 8 then?
13:25:37JehanIIdom96: I think your license will remain upgraded.
13:25:45dom96that would be nice.
13:25:55JehanIIBut that makes a lot of sense.
13:25:58VarriountJehanII: I think you mean that it can only be upgraded for free *within* a year.
13:26:02dtscodedom96: I sent a pull request to nimbot
13:26:09dom96dtscode: yes, I already merged it.
13:26:19dtscode:D
13:26:19JehanIIThey'll encourage people to upgrade, which drives adoption, but they don't forgo revenue.
13:26:23JehanIIVarriount: That's what I said?
13:26:29dom96dtscode: will take me a while to deploy it. Did you test it properly?
13:26:35UberLambdadom96: https://gist.github.com/UberLambda/f2d1d9b2fb9306ccada5
13:26:35dtscodedom96: Yeah
13:26:44dtscodeSeemed to work on my machine
13:26:49VarriountJehanII: Oh, I misread.
13:27:05JehanIIMore interesting is that Windows 10 is supposed to be the last version of Windows, if I understand that correctly.
13:27:12dtscodeI didn't test it for any bugs though that might occur on 0.11
13:27:13JehanIIAnd after that, all updates will be incremental.
13:27:27UberLambdaFINALLY
13:27:52UberLambda...sorry for caps, I'm addicted to rolling release
13:28:17VarriountYou 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:20dom96UberLambda: What's the output of: ls /home/paolo/.nimble/pkgs/nim-glfw-0.2.0 ?
13:28:44dom96Varriount: Is it?
13:28:58dom96Varriount: Seems pretty fast to me.
13:29:13UberLambdadom96: added it to the gist
13:29:42JehanIIVarriount: No idea, either.
13:29:44Varriountdom96: 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:46vikatonis Oreilly gonna make a book for Nim soon ?
13:30:09Varriountdom96: It usually takes about an hour, and about 5 reboots.
13:30:30UberLambdaWindows update always screws stuff up for me
13:30:34JehanIIVarriount: Ugh, I'd never had to do that, thankfully.
13:30:38Varriountdom96: Speaking of which, you need to update and reboot the VPS.
13:30:47dom96UberLambda: ahh. Seems like def- and/or EXetoC changed the API.
13:30:57VarriountJehanII: And people wonder why I fall asleep at work.
13:30:59JehanIIOS X just bumps things up to the newest version in one big update.
13:31:06dom96UberLambda: And you have installed version 0.2 vs. the HEAD
13:31:30VarriountOr rather, nod off when resetting Thinkpads.
13:31:31dom96UberLambda: nimble install nim-glfw@#head
13:31:43UberLambdadom96: oh, that's why then
13:31:55UberLambdadom96: any way to set it to install HEAD automatically?
13:32:04dom96UberLambda: sadly no
13:32:05UberLambdaI mean the whole of Nimble
13:32:18dom96UberLambda: But I think I will implement that.
13:32:26UberLambdadom96: nice! Thanks for the help :)
13:32:29dom96maybe even make it default
13:32:36dom96it's a common gotcha
13:33:29*jaco60 cannot use easily nimble as its os is Linux :(
13:33:57dom96Does everybody on linux have the https bug?
13:34:14jaco60i do...
13:34:25dom96how did you install nimble?
13:34:41jaco60with my distro package manager...
13:34:53jaco60(Arch linux)
13:35:06dom96Try installing it manually.
13:35:57dtscodewait wait wait wait
13:36:02dom96https://github.com/nim-lang/nimble/pull/136
13:36:07dtscodew have fucking nimble repos
13:36:08dtscode?
13:36:11*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:36:19dom96This person seems to think it's an upstream packaging bug.
13:36:31dom96Perhaps isolated to Arch Linux?
13:36:37dom96dtscode: what?
13:36:49dtscode<dom96> how did you install nimble?
13:36:49dtscode<jaco60> with my distro package manager...
13:36:54dtscodeDid I read that right?
13:37:04dom96dtscode: you mean that we have a nimble package?
13:37:08jaco60dom96, perhaps because Arch is the only distro that ships a nimble package ?
13:37:16jaco60dtscode, yes
13:37:19dom96jaco60: possibly.
13:37:26jaco60pacman -Ss nimble...
13:37:30dom96dtscode: It's not special. It's trivial to get packages onto the AUR
13:37:35jaco60community/nimble 1:0.6-1 [installed]
13:37:39dtscode:c I want nimble packages
13:37:51jaco60it's not AUR, it's an official package
13:37:56dtscodeWhen I get my vps back I'm going to talk to araq about an apt repo
13:37:59dom96oh, I see.
13:38:01dom96It's in community
13:38:03dom96that's different
13:38:06dom96and awesome
13:38:29jaco60that's why i don't understand why noone has mentionned this bug
13:38:44UberLambdaAlso 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:12dom96jaco60: Can you try compiling nimble yourself and see if that fixes the bug?
13:40:17jaco60there's a nimble-git in AUR... will try
13:40:35dom96might be more reliable to compile everything yourself.
13:40:40dom96including the nim compiler
13:40:57UberLambdaNow 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:12UberLambdaYeah, 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:48jaco60dom96, the nimble-git in AUR seems ok
13:43:16dom96jaco60: hrmmm
13:43:31jaco60so, it's related to the package in community
13:43:51dom96I'll get in touch with the packager (Alexander)
13:43:59dom96see if I can ask him to investigate.
13:44:07jaco60ok
13:46:05dom96done
13:49:28jaco60argh... nimble install nimsuggest fails on "cannot open ast'
13:49:57jaco60while compiling compiler-0.10.3
13:50:15*yglukhov_ joined #nim
13:50:34dom96jaco60: yeah, that package is broken.
13:50:42jaco60ah...
13:51:02dom96https://github.com/Araq/Nim/issues/2757
13:51:17dom96You can :+1: it which should help :)
13:51:45*yglukhov quit (Ping timeout: 264 seconds)
13:53:21*milosn joined #nim
13:53:28UberLambdaany nim-suggest plugin for Emacs?
13:53:45UberLambdaI guess I could try to write one when I have time
13:54:48*UberLambda quit (Quit: GTG)
13:58:42pigmejah UberLambda...
13:58:46pigmejtoo 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:17wuehlmausdiet nim --opt:size --passL:"-static" c -d:release file.nim
16:43:20wuehlmauscooool
16:43:37wuehlmausworks like a charme for me and produces way smaller binaries
16:44:16filwitthere's other commands to get the binary smaller, like 'strip' and some compression stuff you can do..
16:44:41wuehlmausyes, i use strip
16:44:52wuehlmausbut dietlibc is WAAAAAY smaller
16:44:55wuehlmaus1/10 of it
16:45:09wuehlmausupx helps
16:45:22filwitwuehlmaus: http://hookrace.net/blog/nim-binary-size/
16:49:50wuehlmausfilwit: great article, thank you!
16:51:30wuehlmausbut 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:56filwiter.. 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:30ozraTry "upx --ultra-brute"
16:58:03ozradiet? 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:51reactormonkfowl, 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:11fowlreactormonk, IRT what?
17:33:31fowlboth PRs are good to go
17:34:16reactormonkfowl, 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:38StrikecarlUh
18:01:56Strikecarli'm trying to send a simple http post with "httpclient" but i get this error:
18:02:04StrikecarlError: undeclared identifier: 'newMultipartData'
18:02:12StrikecarlYes i did import httpclient
18:04:38reactormonkdom96, how do you poke https://github.com/michaeldv/donna_nim for -d:release ?
18:05:02dom96reactormonk: I posted on the mailing list.
18:05:11reactormonkdom96, perfect
18:05:35dom96Strikecarl: which version of Nim?
18:15:50*solidsnack joined #nim
18:18:52*Demon_Fox joined #nim
18:23:15Strikecarldom96 how do i check that?
18:23:24dom96nim -v
18:23:24*vendethiel quit (Ping timeout: 276 seconds)
18:23:38Strikecarlnim -v where
18:23:41Strikecarlcmd?
18:24:40vikatonStrikecarl: yes
18:24:51vikatonwho is _44535463686f646
18:25:00Strikecarl"Nim Compiler Version 0.10.2 (2014-12-30) [Windows: amd64]"
18:25:16vikatonThat's old
18:25:22vikatonwe are on 0.11.2
18:25:40vikatonplease update to the latest version Strikecarl http://nim-lang.org/download.html
18:26:01Strikecarlaight
18:26:33*solidsnack quit (Ping timeout: 250 seconds)
18:30:20Strikecarlno i get this, vikaton, Error: unhandled exception: invalid format string [ValueError]
18:30:20Strikecarl> Process terminated with exit code 1
18:30:48Strikecarlnow i get that with all my projects <.<
18:30:53Strikecarl"unhandled exception: invalid format string [ValueError]"
18:31:25*kumul joined #nim
18:31:28vikatonStrikecarl: it would help if you posted some code
18:31:58Strikecarllemme pastebin
18:32:16Strikecarlhttp://pastebin.com/raw.php?i=pdGsQEWY
18:32:26StrikecarlIt's uh, ye, you get what that is for.
18:32:34StrikecarlIt compiled 100% and worked before.
18:32:40StrikecarlNow i updated and i get invalid format string.
18:33:06vikatonon what line?
18:33:21def-I see Nim on HN, if anyone wants to respond: https://news.ycombinator.com/item?id=9640384
18:33:31Strikecarlrofl i just made a .nim with only echo "hey" and i get the error
18:33:34StrikecarlError: unhandled exception: invalid format string [ValueError]
18:33:38Strikecarltheres no specific line
18:33:53vikatonwell That's strange
18:34:40*yglukhov___ joined #nim
18:34:42Strikecarllemme completely delete then reinstall
18:35:19vikatonGood idea
18:36:57*yglukhov__ quit (Ping timeout: 240 seconds)
18:40:02Strikecarlthe fuck
18:40:03Strikecarlrofl
18:40:17Strikecarlsomething done goofed
18:41:09Strikecarli get "file not found" when i try to compile
18:41:15Strikecarleven tho i literally just created the file
18:41:20Strikecarli cant compile anything
18:42:49filwitfileStreams 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:07dom96def-: cool.
18:50:35StrikecarlWtf someone help rofl
18:50:41Strikecarlhttp://i.imgur.com/ZcfMqfj.png
18:50:46Strikecarl3rd time reinstalling EVERYTHING now
18:50:53Strikecarli make a nim.nim or test.nim
18:50:57Strikecarldo an echo "something"
18:51:03Strikecarland i get "file not found" when i compile....
18:51:10Strikecarlvikaton what have you made me do cri
18:51:15dom96Edit -> Preferences -> Tools
18:51:27Strikecarlthen
18:51:31dom96First textbox: change 'nimrod' to 'nim'
18:51:43dom96so that it reads "$findExe(nim) c --listFullPaths $#"
18:51:53Strikecarlye
18:51:56fowlThe fact that that runs mean you still have old nimrod installed
18:52:11Strikecarli just reinstalled nim
18:52:13*shodan45 joined #nim
18:52:14Strikecarlnever reinstalled aporia :/
18:52:29fowlThe error should be can't find nimrod
18:53:28Strikecarlnow i get another error
18:53:49Strikecarlyou know what
18:53:53Strikecarli'm reinstalling fucking everything
18:53:53Strikecarlbrb
18:54:06fowlJust remove the old version
18:55:41fowlOh 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:46vikatonಠ_ಠ
19:12:57*vendethiel quit (Ping timeout: 256 seconds)
19:13:19jaco60btw, the sublimeText plugin for nim still search for nimrod command
19:14:01*vendethiel joined #nim
19:14:56fowljaco60, install it from git
19:15:12*dtscode joined #nim
19:16:05jaco60fowl: you mean that the install command of Command Pallet doesn't install the last version ?
19:16:19jaco60command palette, sorry
19:16:29fowljaco60, it does install the last version, the last released version
19:16:41jaco60that's what i've done
19:16:52jaco60but the config is for nimrod, not for nim
19:16:55fowlHEAD != a released version
19:17:00jaco60ah, 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:44PeakerHey, 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:17dom96Peaker: Gist your code please :)
19:24:20jaco60fowl: wow... the HEAD NimLime version is *far* more advanced than the released version :)
19:24:21Peakerhttps://gist.github.com/Peaker/9e1d87e81945184871e4
19:24:31Peaker(modified the nim by example one)
19:24:50dtscodeAnd what is your exact error Peaker ?
19:25:08Jehan`jaco60: My understanding is that Varriount still has issues with ST3, which is holding up the release.
19:25:28Peakerhttps://gist.github.com/Peaker/9e1d87e81945184871e4#comment-1464833
19:25:28jaco60i'm using ST3... will see
19:25:47*anthgur joined #nim
19:26:04Peakerthe error doesn't seem to tell me whether my CountTable is mutable or not
19:26:14Peaker(but it is relevant as it is the source of the type error)
19:26:25Jehan`dtscode, dom96: The issue is if you pass a `let` value to a procedure expecting a `var` parameter.
19:26:46Peakerfor 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:03Jehan`You'll get a type mismatch error, which is accurate, but doesn't explain the problem very well.
19:27:05dtscodehmmmm. This smells like a bug
19:27:06Peakerand 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:31dom96Peaker: indeed, these errors can always be improved. Create a bug report on github.
19:27:31Peakerbut I only started toying with Nim a few hours ago, so I don't know my way inside the compiler yet :)
19:27:45Jehan`Peaker: To resolve it, switch `let` to `var` (though I think you know that already).
19:27:49fowlPeaker, 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:31Jehan`The bigger problem is that providing error messages that intuit what a human being needs to see is actually pretty hard.
19:28:50Jehan`Lots of special and corner cases.
19:28:51Peakerfowl: TMI is better than too-little-info
19:29:11Peakercan emphasize the problematic part (color it red) :)
19:29:15Peaker(the mismatching part)
19:29:30Jehan`Especially when human intuition doesn't neatly match the internal representation of code.
19:29:49*anthgur quit (Client Quit)
19:30:11Jehan`fowl: Well, you can always pass a var X to a procedure expecting X?
19:30:23Jehan`It's just the other way round that's a problem.
19:30:26fowlJehan`, not if the error is in the ...
19:30:50Jehan`Then the error should describe that part accurately.
19:31:10Jehan`I don't see how an error message for passing an X to a var X parameter can create confusion here?
19:32:24Peakeryou 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:43Peaker(Curious due to the var/non-var compatibility talk :-) )
19:32:54fowlPeaker, no because we dont have const
19:33:14Peakeryou mean refs are always mutable refs?
19:33:17Peaker(you have "let"?)
19:33:38fowllet protects the ref itself, not its contents
19:34:04Peakerah. wouldn't it be useful to have a read-only ref?
19:34:12Peaker(or ref to read-only-contents?)
19:34:16vikatonsaw this on reddit: http://www.reddit.com/r/programming/comments/3842ko/go_channels_goroutines_and_gc_available_in_nim/
19:34:55dom96vikaton: it's on hacker news too
19:35:16vikatonmhm
19:35:44dom96Peaker: A brand new 'func' keyword may be introduced soon to declare functions whose ref params will be read-only.
19:37:11dom96Is it just me or does pcwalton seem to criticise Nim at every turn? https://news.ycombinator.com/item?id=9641490
19:37:15fowlvikaton, i fixed the dining philosophers example http://rosettacode.org/wiki/Dining_philosophers#Nim
19:37:18vikatonWhy is pcwalton always comm-
19:37:23dom96vikaton: hah
19:37:28vikatonwow
19:37:37dom96guess it's not just me.
19:37:47vikatonYeah what's his problem :/
19:37:49dom96I've heard him rehash that argument 5 times now at least.
19:38:25vikatonfowl, nice!
19:38:40Jehan`dom96: Eh, there are unfortunately also Nim people who show a similar attitude towards Rust (without naming names).
19:38:56dom96Jehan`: There are, yes.
19:38:59vikatondom96, the thing is he brings it up on stuff that's not even mentioned in the post
19:39:20dom96Jehan`: But are core Nim devs among those people?
19:39:25Jehan`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:30Jehan`dom96: Not AFAIK.
19:39:37Matthias247he's correct, but of course repeating deficits is not that nice
19:40:11dom96I'm not an expert in these things but wouldn't Nim's threading model solve this? (A GC per-thread)
19:40:18vikatonp sure he hates Nim from the attention Nim was getting back when the Nim vs Rust thing happened
19:40:28PeakerPATH=./bin:$PATH ./koch temp c nim.foo builds nim, ends up saying "Error: cannot open 'nim.foo'" why?
19:40:58Matthias247you could also always point out that Rusts dynamic dispatch and concurrency stories are also not very good stories
19:40:59Jehan`dom96: Right now, the problem is that Nim forces you to essentially emulate a distributed system.
19:41:19_44535463686f646vikaton: im your father
19:41:21Jehan`If you can live with this constraint – and you often can – things are just fine.
19:41:38vikatonthat's ps weird :/
19:41:39Peakerwhy does "koch temp" do a lot of work only to fail much later? :(
19:41:49Jehan`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:20fowlPeaker, 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:22Jehan`Peaker: Umm? ./koch temp should build a debug version of the compiler in bin/nim_temp
19:42:23dom96I'm pretty sure Araq is planning to offer better support for shared memory in threads.
19:42:27Jehan`If that fails, something is wrong.
19:42:37Jehan`dom96: So am I, and I dont' want to rush him.
19:42:39*anthgur joined #nim
19:42:48Peakerah, no arguments worked, built nim_temp. I thought I was supposed to give it a file name
19:42:56Peakerand it does all its work before failing
19:43:08*fowl left #nim ("Leaving")
19:43:11Jehan`dom96: As I said, what's currently there already works for a lot of situations.
19:43:32dom96Jehan`: Think it's worth replying to pcwalton with this information?
19:43:38def-Peaker: shouldn't that be foo.nim instead of nim.foo?
19:43:53Jehan`What's most frustrating is is that Rust and Nim really target different audiences, despite overlap in some areas.
19:43:57vikatonlol @ def-
19:43:59Peakerdef-: no idea :)
19:44:15dom96Peaker: ./koch temp c module.nim will build a new nim compiler and then call ./nim_temp c module.nim
19:44:26dom96Peaker: i.e. it passes 'c module.nim' to the newly built compiler
19:44:30Jehan`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:41PeakerAs a first impression: Rust seems like C-towards-Haskell-noGC. Nim seems like Python-towards-static-and-fast
19:44:46Jehan`dom96: As to replying, I'm not sure.
19:44:50Peakerdom96: ah, thanks
19:44:57Jehan`I try to stay as much out of language advocacy as I can.
19:45:29Jehan`Because so much is subjective and really not suitable for a discussion in internet comments.
19:46:14dom96Are all scientific fields this subjective or is Computer Science really an outlier?
19:46:20PeakerI tried https://gist.github.com/Peaker/b36982ba143c9c274a8b to "fix" the error message, but that didn't seem to change anything at all
19:46:30Jehan`dom96: No, Computer Science is normally not very subjective.
19:46:35*shodan45_ joined #nim
19:46:42vikatonwe happen to be in the middle of i
19:46:44vikatont
19:46:44Jehan`Language design is one of the oddities. Software engineering is another.
19:46:56dom96Jehan`: Is my perception wrong due to spending too much time on Reddit/HN?
19:47:06Matthias247dom96: 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:18dom96Matthias247: hehe true.
19:47:34Jehan`dom96: Most papers that I've actually written are pretty mathematical in nature.
19:47:47Jehan`And that's not counting computer algebra stuff.
19:47:59dom96Perhaps the problem is that there really isn't many trivial ways to objectively rate different solutions in Computer Science.
19:48:06Jehan`The internet attracts stuff that can be debated.
19:48:17Jehan`You don't get much mileage out of arguing the exact result of 2+2.
19:48:25Matthias247but 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:37Matthias247and be it just for "we are a java shop"
19:48:49PeakerNim 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:35dom96Peaker: 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:36Peakerdom96: 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:16Peakerdom96: 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:34Jehan`Peaker: It doesn't, and it's not typesafe.
19:52:13PeakerJehan`: why is it written that way?
19:52:22PeakerIt's not as nice as what I'm used to at all :(
19:53:00Jehan`Peaker: Nim got its variant object types from Pascal/Modula-2.
19:53:19PeakerBut it can encode safe sum types with them, no?
19:53:33Peaker(if a bit clumsy)
19:53:37Jehan`Note that there *are* runtime checks.
19:53:46Jehan`Yes, you can.
19:53:55Peakerso why wasn't it done in the compiler itself?
19:54:13*thotypous joined #nim
19:54:17*jubalh joined #nim
19:54:27Jehan`There's a tradeoff between type-safety and expressiveness here.
19:54:45Jehan`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:05def-Peaker: not sure about this code, but fyi: the compiler was initially written in Pascal and then (half-automatically) translated to Nim
19:55:05Jehan`Note that this is just what I understand -- I may be misrepresenting Araq's intent.
19:55:22Peakerdef-: oh, wow
19:55:54PeakerJehan`: I don't think there's a tradeoff with expressiveness really -- the safe approach only removes the illegal options from being expressible
19:56:10Peakerbut what def- said could explain it
19:56:30Jehan`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:19Jehan`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:29PeakerJehan`: 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:40PeakerJehan`: a bit weird to say that as a Nim user, no? :)
19:57:46Jehan`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:08PeakerJehan`: I build my code with -Wall -Werror so I get a compile-time error if I don't explicitly handle all possibilities
19:58:43Jehan`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:16PeakerJehan`: that's OK if it is at least explicit
19:59:28Jehan`Peaker: Does it actually reduce software defects, though?
19:59:34PeakerAdd a case to the data-type, get compiler guidance about what needs to be fixed
20:00:08PeakerJehan`: 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:26Peaker(and of course: Types+UT >>> UT)
20:00:31Jehan`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:48gokrJehan`: Did you ever read Ghilad's stuff about pluggable type systems?
20:01:19PeakerJehan`: isn't it weird for a Nim user not to believe in static typing, though?
20:01:22Jehan`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:32Jehan`Peaker: Static typing isn't a binary thing.
20:02:02PeakerJehan`: I agree, I can't wait till dependent types become more mainstream :-)
20:02:13Peaker(and usable)
20:02:17Jehan`Peaker: I think dependent types are a dead end myself.
20:02:22PeakerJehan`: why?
20:02:31Jehan`gokr: Gilead Bracha?
20:02:37gokryeah
20:02:42PeakerIsn't it "Gilad"?
20:02:52Peaker(this is how we Israelis usually write Gilad in English)
20:02:56gokrSorry, yes, Gilad
20:03:00Jehan`Peaker: For the same reason that any approach that came reasonably close to theorem proving capabilities hasn't worked out, ever.
20:03:06gokrI always put an h in there somewhere.
20:03:09Jehan`And I used to work on formal methods stuff.
20:03:35PeakerJehan`: 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:36Jehan`And gokr: Yes, though it's been a whole.
20:03:53Jehan`Peaker: Well, I'm certainly open to be surprised.
20:04:05PeakerJehan`: Note that dependent types is still a frontier of relatively fresh/new research
20:04:12Jehan`But having seen millions of research money burned on related attempts, I'm skeptical.
20:04:23PeakerJehan`: "burned"? There's been immense progress
20:04:31PeakerJehan`: it's already very very impressive stuff :)
20:04:33Jehan`gokr: … though it's been some time.
20:04:46Jehan`Peaker: Sure, now teach it to the average programmer.
20:04:59Jehan`Peaker: Keep in mind that I've written entire formal specifications in Z.
20:04:59gokrI 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:16PeakerJehan`: 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:22gokr(I didn't know he was in the audience)
20:05:37Jehan`gokr: Heh. :)
20:06:07PeakerJehan`: 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:08Jehan`gokr: I am generally very interested in approaches surrounding soft typing.
20:06:22gokrJehan`: Then it should probably be right up your alley.
20:06:34Jehan`gokr: One issue I have with strict static typing is that it is often at odds with modularity.
20:06:48PeakerJehan`: how does Z relate to dependent types?
20:06:57Jehan`Peaker: Are you familiar with Z?
20:07:00Peakernope
20:07:00gokrGilad 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:09PeakerJehan`: Gilad's arguments about modularity and static types are based on complete ignorance, btw
20:08:03gokrReally?
20:08:34PeakerIt seems he either never heard of, or does not understand, ML modules as a counter-example to his modularity claims
20:08:49Jehan`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:04gokrJehan`: Think this was it: http://bracha.org/pluggableTypesPosition.pdf
20:09:14PeakerJehan`: how does it compare to say Agda or Idris?
20:09:29StrikecarlGuys, 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:46Jehan`Peaker: It's different in that it was never designed for integration with programming?
20:09:48StrikecarlSorry if someone answered it before but i disconnected without realizing an hour ago.
20:09:55Jehan`Which doesn't change the fact that you face similar challenges.
20:10:17gokrJehan`: Perhaps better place to start: http://lambda-the-ultimate.org/node/1311
20:10:32Jehan`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:42dom96Strikecarl: How did you choose /bin/nim.exe?
20:11:55Strikecarldom96 there was a popup, looked like this:
20:12:13Strikecarlhttp://i.imgur.com/3tSakwf.png
20:12:15Strikecarlthen i clicked ok
20:12:18Strikecarlthen this: http://i.imgur.com/P4XHFFE.png
20:12:30Strikecarli just went to /bin/ then i ticked nim.exe?
20:12:56dom96right
20:12:59dom96and then what happened
20:13:54Strikecarlhttp://strikecarl.com/2015-06-01_22-13-22.mp4
20:16:07PeakerJehan`: have you tried Idris, Agda or Coq?
20:16:26Jehan`Peaker: Coq.
20:16:31PeakerJehan`: 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:40Jehan`I'm a bit of an OCaml guy (or at least was).
20:16:56Jehan`Anyhow, I've gotta go.
20:17:01PeakerJehan`: k, nice talking :)
20:17:15*Jehan` quit (Quit: Leaving)
20:17:37dom96Strikecarl: oh. Thanks for the video :). The Nim compiler cannot find a C compler (i.e. gcc).
20:17:47dom96Strikecarl: How did you install Nim?
20:17:55StrikecarlThe installer @Nim's website
20:18:02Strikecarlnim-lang.org/download.html
20:18:55dom96You should have gcc then, that's odd.
20:19:14dom96Is it in your Nim installation directory?
20:19:20dom96can you find gcc.exe in there?
20:19:41*vendethiel quit (Ping timeout: 258 seconds)
20:19:56Strikecarldom96 http://i.imgur.com/x2NC0W4.png
20:20:37dom96Strikecarl: open Nim\config\nim.cfg
20:20:54StrikecarlMhm dom96
20:21:01dom96line 100
20:21:17Strikecarl#gcc.path = r"$nimrod\dist\mingw\bin"
20:21:51dom96weird. Seems like an old config? Try uncommenting anyway.
20:22:41*vendethiel joined #nim
20:22:43PeakerDoes anyone know Nim's compiler "globalError" vs "localError"? What are those? And what is "inCompilesContext"?
20:23:05Strikecarldom96, now i get "Error: unhandled exception: invalid format string [ValueError]"
20:23:12jaco60dom96, 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:41dom96Strikecarl: change $nimrod to $nim
20:23:50Peakerwhy does Nim rebuild so much of the compiler when I change a little bit and run "koch temp" ?
20:23:59dom96jaco60: interesting. Did you fix that error?
20:24:09jaco60no, but i've no error :)
20:24:22dom96jaco60: How did you get rid of that error?
20:24:30*xcombelle quit (Remote host closed the connection)
20:24:32jaco60which error ?
20:25:39dom96jaco60: Did you not have the same error as Strikecarl a while ago?
20:25:41StrikecarlIT COMPIELD!!
20:25:44StrikecarlIT COMPILED!!!
20:25:45jaco60no
20:25:47Strikecarldom96 <333
20:26:05dom96Strikecarl: 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:15VarriountPeaker: Much of the compiler is combined into one file.
20:32:09*UberLambda joined #nim
20:32:12VarriountPeaker: If you look, many modules are 'include'd, rather than imported.
20:32:37Peakerhow can I look?
20:34:15UberLambdaHow 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:14VarriountUberLambda: Look at the C code. If I recall correctly, a stack-trace structure is maintained somewhere.
20:35:54UberLambdaVarriount: thanks, I'll have a look
20:38:02Araqhi Peaker welcome
20:38:12Peakerhi :)
20:38:21VarriountPeaker: Uh, open them in a text editor?
20:38:37PeakerVarriount: I'm a newbie with nim (despite trying to immediately hack the compiler :-) )
20:38:47PeakerVarriount: You're talking about opening the C intermediates, right? Where are they?
20:38:47VarriountPeaker: Open the 'nim' files in the compiler directory.
20:38:48*jubalh quit (Quit: Leaving)
20:38:57VarriountNo, not the C source.
20:39:28PeakerVarriount: ah, so Nim has both "import" and "include"?
20:39:36VarriountPeaker: Yes.
20:39:56VarriountPeaker: Also, Nim files are recompiled every time because the cache mechanism is broken.
20:40:11Peakerwhat advantage does include have over import?
20:40:24Araqit's not "broken", Varriount, but it doesn't work well either.
20:41:15filwit'include' injects the file into it's own module space
20:41:54Peakerfilwit: to what end?
20:42:18filwitit's a way of dividing up modules into smaller parts and still allowing private data to be shared
20:42:25Varriount^
20:42:47Peakerah, like C++ friends?
20:42:59filwitsolves a similar problem, yes
20:43:31Peakerseems weird that to access privates you have to throw away standalone compilation
20:43:42PeakerI guess for various optimizations it isn't weird
20:43:50AraqPeaker: why ASTs are the way the are ... well watch my screencast to be enlightened
20:44:29filwitlooking forward to tomorrow's talk, Araq
20:44:50VarriountIs there a way to record it?
20:44:51PeakerAraq: is it the Pascal heritage?
20:45:41*sepisoad joined #nim
20:46:43*vendethiel quit (Ping timeout: 265 seconds)
20:48:09PeakerAraq: do you have a URL? I'd love a tl;dr :)
20:49:46sepisoadwhen is shared type qualifier going to be officially available?
20:51:36vikatonOh my god I dying
20:51:59Varriountsepisoad: Shared type qualifier?
20:52:09sepisoadVarriount, yes
20:53:12*dtscode is now known as squirtle
20:54:05Varriountsepisoad: Which is...?
20:54:57AraqVarriount: it will be recorded
20:56:01sepisoadit is going to be a way to share a variable among threads, am i right"?
20:56:10AraqPeaker: 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:05AraqI agree that it had quite bad consequences for the compiler's code though.
20:57:11PeakerAraq: more expressive in what way?
20:57:36Araqyou will see ;-)
20:57:42PeakerAraq: 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:57Peakerthat seems safer & more expressive, no?
20:58:11Peaker(more expressive as in more static invariants being expressed)
20:58:46Araqok, well so now the question is how to define "expressive"
20:59:08*Jesin joined #nim
20:59:44Araqthere 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:28PeakerAraq: 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:39PeakerAraq: and then I get a "free" function called "traverse" that lets me apply something to all the children
21:00:56PeakerAraq: so I get the best of both worlds (uniform way to treat all children & safe static structure)
21:01:15Peakerthat AST should perhaps be called Node and not AST
21:01:51Peakerdata 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:21Araqyeah but your traverse only hides the non-uniform representation
21:02:34Araqthe runtime costs remain
21:03:03PeakerAraq: well, you dispatch on the various cases anyway, so the main cost here seems like a bit of code bloat, no?
21:03:38Araqcode bloat + it really matters how many cases your dispatch has
21:04:19Araq(yes, I'm aware that for you it's "just O(1) either way")
21:04:21Peakerhow expensive is just using a code-address-table and jumping based on that?
21:04:40Peakerit's probably not much more expensive than a bunch of "if/else" branches
21:04:46Peaker(when the table becomes hot very quickly)
21:05:47*anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…)
21:06:35Araqhere is a hint: code-address-tables are usually avoided ;-)
21:07:40PeakerIn nim, maybe :) They're quite common
21:08:38Araqalso the most common node kind is "function application" which has a variable length of children by its nature
21:08:59Peakerdata Node child = Apply [child] | ...
21:09:05*anthgur joined #nim
21:09:08Peakeryou still get a free traversal
21:09:16Peaker(that walks all the children)
21:09:35*UberLambda quit (Quit: GTG)
21:09:53Araqso it's rather pointless to have a non-uniform structure
21:10:22Peakerwell, you get static invariants like FooNode has exactly 2 children
21:11:02Peakerbtw, 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:30Peakerit 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:38Peaker(which is weird, since type-checking definitely needed it)
21:12:28filwitAraq: 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:06filwitanyways, just some random thought while reading your guy's discussion..
21:14:18reactormonkPeaker, where's the error message?
21:14:47reactormonkjust go up the stack and check for any types that have a debug proc defined
21:15:09Peakerhttps://github.com/Araq/Nim/blob/devel/compiler/semcall.nim#L127-L129
21:15:49Peakerreactormonk: which calls: https://github.com/Araq/Nim/blob/devel/compiler/sigmatch.nim#L254
21:16:05PeakerI tried changing the highlighted line to use typeToString directly on arg.typ
21:16:18Peakerbut the "var" vs "let" distinction is still lost, somehow!
21:16:36Araqthat's not part of the type
21:17:04PeakerAraq: ah, but the same error seems to happen if I use "let" instead of "var"
21:17:31PeakerAraq: https://gist.github.com/Peaker/9e1d87e81945184871e4
21:18:08Peakerwhat 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:34Araqwell 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:02PeakerAraq: I'm trying to understand the compiler internals that generate this error and hack on it myself :)
21:19:21Araqhttps://github.com/Araq/Nim/blob/devel/compiler/sigmatch.nim#L1471
21:19:41Araqwe cheat, we look at the node instead of the type here
21:19:45*NhanH joined #nim
21:21:13Peakerah, a bit weird, since there are types for Var vs non-var, etc
21:21:37Araqyes but 'var x: int' is of type 'int', not of type 'var int'
21:22:27Araqotherwise if we ever get it 'var x: var int' would be of type 'var var int' and things would get *really* messy
21:22:39Peakerso semCall:pickBestCandidate calls sigMatch:matches which gets to the Aux thing you highlighted?
21:22:55Araqyeah
21:23:12Peakervar 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:48Araqinternally we could perhaps do that but it would be weird
21:24:03Araqsince 'var int' is a 'hidden pointer to an int'
21:24:15Araqand that's not at all what 'var x: int' is
21:24:24Araqit's a slot in the stack frame.
21:24:38Araqa direct value.
21:24:55Araqa location on its own. whatever you like to call it.
21:26:32Peakeryay, I managed to make the change :)
21:26:37Peakerexample1.nim(8, 22) Error: semcall-1:type mismatch: got (var CountTable[system.string], string, string)
21:26:58Peaker(showing "var" for LValue args :-) )
21:27:15Peakermaybe 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:30Araq*now* it is.
21:27:43Araqit used to be not very relevant.
21:28:13PeakerSo should I make a pull request? is "var" sensible there?
21:28:22PeakerMaybe some other notation?
21:28:41AraqI don't see the point in doing it this way
21:28:49Araqinstead you should produce something like:
21:28:50Peakerhow should it be done?
21:29:35Araq"mismatch for argument 1 as it is not an lvalue"
21:30:25Araqpeople want the compiler to tell the *positions* that mismatched
21:30:39Araq(which is quite some work to detect ...)
21:30:45Peakerthat's a much bigger pull request :)
21:30:56Araqindeed
21:31:39PeakerAt 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:02Araqwell but 'var' will be confusing, perhaps use 'lvalue' ?
21:32:26Araqbut isn't the *absense* of an lvalue the reason for the type error?
21:32:52Peakerwell, in that particular example, yes. But now absence of the "lvalue" in the error means it is an rvalue
21:33:02Araqha, lol
21:33:06Peaker(I have a different example, where I make a different type error where it *is* an lvalue)
21:33:09Araqnobody will know
21:33:22Araqyou really need to generate a proper explanation.
21:33:28Peakerwell, can add "lval" or "rval" prefix there :)
21:33:34Peaker(for everything)
21:33:41Araqno!
21:33:47Araqthat makes things worse
21:34:03Araqusually it's just irrelevant information
21:34:34vikatonAraq, you think maybe orielly will write a book for Nim ?
21:34:35PeakerI guess you have to generate the error at the mismatch site
21:34:36Peakerin the Aux function
21:34:48Peakerand not in describeArgs
21:34:59Araqvikaton: I think I'll write a book for O'Reilly ...
21:35:15vikatonNice
21:35:26AraqPeaker: ha yeah, but it's on the critical path
21:36:28PeakerAraq: can it be re-run if all candidates mismatch, with a different compile-time param?
21:36:34PeakerAraq: that says "collect errors this time"?
21:37:01Peaker(i.e: have the compiler duplicate the code for the signature matching functions for the hot path and error path)
21:37:14Peaker(and the error path collects information)
21:39:03Araqyeah something like that but I think you can get away without all this code duplication
21:40:07Peakeras in machine code duplication? does it matter that the cold path is duplicated? It's not going to sit in the icache
21:40:19Peaker(and iiuc, source code need not be duplicated here)
21:40:28*squirtle is now known as charmander
21:43:12AraqI 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:37vbtt_Hi Je
23:45:58vbtt_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 ()