<< 23-06-2016 >>

00:12:18*flyx quit (Ping timeout: 258 seconds)
00:13:28*gokr quit (Ping timeout: 244 seconds)
00:14:48*yglukhov joined #nim
00:18:14*sp33der89 quit (Remote host closed the connection)
00:19:12*yglukhov quit (Ping timeout: 258 seconds)
00:49:56*brson quit (Ping timeout: 250 seconds)
00:54:54*OnO quit (Ping timeout: 272 seconds)
01:01:31*OnO joined #nim
01:09:51*fredrik92 quit (Quit: Shutting down...)
01:15:58*mahasamoot joined #nim
01:19:40*lautzu quit (Quit: updates)
01:45:30*flyx joined #nim
01:47:34*chemist69 quit (Ping timeout: 250 seconds)
01:50:51*abruanese quit (Quit: ZNC 1.6.3+deb1 - http://znc.in)
01:58:22*kingofoz quit (Ping timeout: 244 seconds)
01:58:42*ephja quit (Ping timeout: 276 seconds)
01:58:47*brson joined #nim
02:00:14*GangstaCat quit (Quit: Leaving)
02:01:16*brson_ joined #nim
02:01:31*chemist69 joined #nim
02:04:03*brson quit (Ping timeout: 244 seconds)
02:12:23*brson_ quit (Quit: leaving)
02:16:56*yglukhov joined #nim
02:19:57*flyx quit (Ping timeout: 258 seconds)
02:21:25*yglukhov quit (Ping timeout: 252 seconds)
02:27:03*flyx joined #nim
02:34:15*vendethiel- joined #nim
02:34:48*vendethiel quit (Ping timeout: 250 seconds)
02:48:19*flyx quit (Ping timeout: 258 seconds)
02:48:34*flyx joined #nim
02:51:35*myp joined #nim
02:57:50*mtj__ quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
02:58:06*mtj_ joined #nim
03:00:41*dmitry_p joined #nim
03:41:30*veganskaway is now known as vegansk
03:56:18*dmitry_p quit (Quit: Leaving)
03:59:00*kingofoz joined #nim
05:07:15*Demon_Fox quit (Quit: Leaving)
05:07:46*pandada8 quit (Ping timeout: 250 seconds)
05:08:28*der-landgraf quit (Quit: WeeChat 1.5)
05:13:01*bjz joined #nim
05:13:08*pandada8 joined #nim
05:15:29*bjz_ joined #nim
05:18:22*bjz quit (Ping timeout: 272 seconds)
05:19:03*endragor joined #nim
05:20:54*mahasamoot quit (Ping timeout: 244 seconds)
05:22:39*der-landgraf joined #nim
05:39:33*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:18:19*endragor_ joined #nim
06:21:33*endragor quit (Ping timeout: 240 seconds)
06:23:30*zds quit (Quit: Connection closed for inactivity)
06:33:53veganskAraq, hi! How can I compare two tyGenericBody PTypes?
06:34:14veganskI found the problem place for issue 88
06:34:32Araqdunno, compare the pointers t.lastSon?
06:35:12veganskAnd now I need to know relations between BaseClass and ChildClass tyGenericBody
06:36:06veganskThe problem is that current implementation compares pointers. But we need to know about their relations, not equality
06:39:03*endragor_ quit (Remote host closed the connection)
06:39:05veganskAraq, here is the problem line for issue 88: https://github.com/nim-lang/Nim/blob/devel/compiler/sigmatch.nim#L953
06:39:32*endragor joined #nim
06:40:01veganskWe need to find relation between f.sons[0] and a.sons[0]. Not the equality
06:51:02veganskAraq, I found relation for direct subclass : ``a.sons[0].lastSon.lastSon.sons[0] == f.sons[0]``. Is it normal way for it?
06:53:35Araqwell typeRel computes the subtype relation
06:53:56Araqyou just need to invoke it recursively and ensure it return tySubtype or better
06:54:17veganskNo, it returns isNone for this situation :-(
06:54:26veganskalready checked
07:02:25*cheatfate_ joined #nim
07:02:25*cheatfate quit (Read error: Connection reset by peer)
07:08:04*KaiXBerg joined #nim
07:23:03*yglukhov joined #nim
07:24:51*Trustable joined #nim
07:27:33*yglukhov quit (Ping timeout: 240 seconds)
07:28:10*cheatfate_ quit (Quit: Leaving)
07:28:28*cheatfate joined #nim
07:35:02*PMunch joined #nim
07:36:08*desophos quit (Read error: Connection reset by peer)
07:43:21*euantor joined #nim
07:43:41*girvo quit (Quit: leaving)
07:43:42*euant joined #nim
07:47:14*euantor quit (Client Quit)
07:47:27*euant quit (Client Quit)
07:47:47*euantor joined #nim
07:47:53*euant joined #nim
07:48:11*dom96 quit (Changing host)
07:48:11*dom96 joined #nim
07:49:55Araqvegansk: well find out why. you need to dig deeper, I'm sorry.
07:50:00*Varriount joined #nim
07:50:07VarriountHey everyone - I've submitted a Hacker News link to Andrea's Rosencrantz web framework.
07:50:21Varriounthttps://news.ycombinator.com/item?id=11959437
07:50:36Araqhttp://ci.nim-lang.org/ federico3 gave us this
07:50:48Araqtesting selected Nimble packages
07:51:51VarriountDoes it need a Windows build slave or anything? If so, I think my desktop can handle a bit more. :P
07:52:43VarriountAlso, I like the look. No 3 Mb javascript+css file to download.
07:56:59*endragor quit (Remote host closed the connection)
07:57:27veganskAraq, ok, and please look at PR https://github.com/nim-lang/Nim/pull/4381 one more time. Maybe it's not so bad ;-) At least, it works in all cases
07:58:00veganskWho selects packages for ci?
07:59:33dom96Varriount: upvoted
07:59:36Araqthere is no telling what it *also* accepts that it shouldn't. it doesn't fix it properly.
07:59:59dom96This is interesting https://docs.google.com/document/d/1F6oELZcO_ejX2oVk20hmiBWd4lQugfFahn7OOOOyKsw/edit
08:00:08Araqplease give me the other solution (maybe in a different PR)
08:00:29Araqand let me see why it breaks with the Data constructor
08:00:42dom96I wanted to create a similar survey for a while now
08:01:21AraqI know it sucks that the proper fix implies even more fixes in the compiler, but I like to thing it improves quality overall
08:01:31Araq*think
08:03:47Araqalternatively you can try to remove tyContainer and use tyGenericBody consistently in the compiler.
08:04:07Araqsince your PR is essentially saying "ok, tyContainer doesn't work"
08:05:36veganskOk. Here it is: https://github.com/nim-lang/Nim/pull/4396
08:09:18veganskI will return to that issue later. Now issue 88 is the showstopper for me
08:10:01euantdom96: that is an interesting read actually, thanks for sharing it
08:10:15dom96euant: np :)
08:10:56*arnetheduck joined #nim
08:11:03euantAlso surprised at the 47.2% using Vim
08:11:22*endragor joined #nim
08:11:25euantSomebody was telling me in the Nim forums recently that emacs/Vim are rarely used ;)
08:12:10dom96hah
08:13:24wuehlmauslie, sweet lie :)
08:13:30euantOn another note, that PR I submitted yesterday with the many changes wasn't actually line endings when I looked at it. Nimble had taken it upon itself to reorder the entries within almost all of the projects for some reason.
08:13:41dom96Varriount: You should submit it to reddit too
08:14:04dom96euant: yeah, I saw that. Very strange.
08:15:26dom96On an offtopic note: you guys excited about the UK EU referendum?
08:15:38PMunchI would love to see a similar survey for Nim dom96
08:16:00dom96PMunch: Awesome. I shall create one :)
08:16:18PMunchIt will certainly be interesting to see what they decide, and what will become of the EU if they leave
08:17:03cheatfateBrexit is a bad idea
08:17:12dom96It will be interesting and scary for me, since I'm still not a UK citizen, if they leave.
08:17:14euantdom96: I'm not sure excited is the right word, perhaps apprehensive?
08:17:20*KaiXBerg quit (Ping timeout: 250 seconds)
08:17:23PMunchIf the UK leaves I feel Germany and some of the other big players might leave as well.
08:17:42euantEither way, I voted via postal vote a week or two ago, I knew then what I know now: leaving the EU would be a terrible decision
08:17:44dom96euant: true.
08:18:05cheatfatePMunch, i dont think so, just because Germany already have changed currency
08:18:27PMunchcheatfate, that's true. It would be painful for them to switch back..
08:19:00PMunchBut they are already pretty mad about having to support countries in the EU they don't feel are "pulling their weight"
08:19:17PMunchOr at least so it seems in the media
08:19:59cheatfateBut i think Scotland and Nothern Ireland will exit GB if GB exits EU
08:20:02euantI can hardly blame them for that
08:20:09dom96I don't think they would leave. It feels like Germany is at the centre of Europe, almost like a leader of it all.
08:20:10euantI can certainly see where they're coming from.
08:20:29euantWIthout Germany, the whole thing would fall apart in my opinion
08:21:03dom96cheatfate: If Northern Ireland leaves GB then it will become a very scary place indeed, and I live here!
08:21:05euantThe UK like to make a lot of noise, but other than that we don't seem to be all too involved. If I remember correctly, a lot of our MEPs have abstained from a lot of European votes in the past
08:21:50euantScotland are talking about another referendum if brexit happens too, so maybe NI and Scotland can team up and stay in the EU somehow?
08:21:54AraqGermany will never leave the EU.
08:21:59Araqnever ever.
08:22:11flyxGermany makes far too much money from it.
08:22:41*bjz joined #nim
08:23:38dom96The only way I see Northern Ireland leaving GB is if it becomes part of the Republic of Ireland.
08:23:49Araqthe Germans are happy to rename their country to "EU" if that's what it takes and be the only member of it.
08:24:05dom96Which will reinstate the troubles again I bet.
08:24:17Araqbecause we lost the war. and that's all that matters here.
08:26:33flyxpersonally, I think GB should either leave the EU or become an actual member instead of insisting on being treated specially
08:26:35cheatfateEU was very good idea, but too slow, any decision of problem must be resolved by 27 parliaments in every country... so one country can block whole EU
08:27:03euantPersonally I think the EU is a good idea, but I don't believe the Euro is
08:27:06cheatfateand i think this is main problem of EU
08:27:11AraqIn Deutschland kann es keine Revolution geben, weil man dazu den Rasen betreten müsste.
08:27:17flyxEU doesn't really work unless you have an actual economic and foreign politics union.
08:27:54Araq^ Stalin said it best. ;-)
08:30:18flyxalso, Bismarck: Das Wort Europa höre ich oft aus dem Mund von Politikern, die es nicht wagen, ihre Forderungen direkt vorzubringen.
08:31:31*yglukhov joined #nim
08:36:29*fredrik92 joined #nim
08:37:09*fredrik92 quit (Client Quit)
08:45:18*arnetheduck quit (Ping timeout: 250 seconds)
08:46:27dom96Do you guys have any other question ideas for the Nim community survey (other than the ones in the Rust survey)?
08:47:15Araqjust ensure to ask about sexuality and skin color. because skin color doesn't matter.
08:48:31euantNothing I can think of personally
08:50:25dom96Araq: hrm?
08:54:01Araqdom96: in other words, don't ask political things.
08:54:52dom96Araq: Rust asked "Are you part of an underrepresented demographic in technology?", do you think that's acceptable?
08:55:34Araqno, it's not acceptable.
08:55:37*fredrik92 joined #nim
08:55:47Araqit's a political agenda.
08:56:04euantYeah, I don't really see why you need to ask that in a survey about a programming language?
08:56:57dom96ok
08:57:06dom96I won't ask it
08:57:49Araqdom96: you *need* to ask "in your opinion, what's missing for Nim to reach version 1"
08:57:55dom96ok
08:58:12dom96What answers should be available for this?
08:58:19Araqa blank line.
08:58:36Araqpeople should write their thoughts, don't influence them :P
09:00:33dom96I think most people will be too lazy
09:00:39dom96Can I add some answers + a text box?
09:01:48Araqok ok, fine.
09:02:07Araqkeep it under 10 questions please, long surveys are horrible
09:03:53dom96...
09:03:58dom96I already have far more than 10
09:04:06dom96but I'm keeping all of them optional
09:05:05Araqwhat? really? :-)
09:06:32dom96yeah, if people don't feel like finishing it all they can submit only some answers.
09:07:14AraqI don't think people work this way.
09:07:33Araqbut fine, since it's about Nim and people love Nim, they will take their time.
09:10:53dom96Of course they will
09:10:56dom96Plus, people love me.
09:11:03dom96They will answer anything I give them :P
09:14:08flyxask them whether P=NP
09:19:14cheatfateAraq, what is `xor` operation for sets?
09:20:07Araqcheatfate: good question. non-existing 'flip' operator for sets?
09:20:32dom96flyx: hah
09:20:44Araqflyx: let N=1, P=NP is trivially true.
09:23:23cheatfateAraq, so there no such operation like `xor`?
09:27:40Araqthere used to be -+- for "symmetric set difference" iirc
09:27:46Araqwhich was mapped to xor
09:28:21Araqsince A \ B is (A - B) + (B - A)
09:28:41Araqyou can re-introduce it, but why do you need it?
09:29:08cheatfatejust adopting my code ioselectors.nim to your `sets`
09:29:20AraqI removed -+- since it was buggy and never used anywhere at all.
09:30:13AraqI know you're adapting ioselectors. but what do you use the 'xor' for?
09:31:29*gokr joined #nim
09:31:33cheatfatenm i have already replaced it :)
09:31:35yglukhovAraq: could you please have a look at https://github.com/nim-lang/Nim/issues/4395 ? Am i doing it wrong?
09:32:16cheatfateAraq, do you have windows with vcc? because i think you need take a look on bunch of warnings generated by `vcc` when compiling asynchttpserver.nim
09:33:07*zodiak quit (Ping timeout: 258 seconds)
09:36:36Araqcheatfate: yes.
09:38:43cheatfateAraq, could you check warnings and say `they all safe and could not smash stack for some reason`?
09:39:34Araqcheatfate: later, ok?
09:39:55cheatfatebecause for month or 2 i've got very strange SIGSEGVs which happening with `vcc` and not `mingw` or happens with `mingw` and not with `vcc` and can be resolved with just adding `echo variable` to code
09:39:58cheatfateAraq, ok
09:40:06Araqwhat about 'callSoon'?
09:40:29Araqshouldn't that be used to prevent deep stacks?
09:41:46Araqand why is it necessary? you should make futures call 'callSoon' automatically once some recursion counter > threshold
09:42:33cheatfateAraq, problem not in callSoon...
09:42:50cheatfatei have problems in simple tests like 3 calls to await
09:42:58cheatfateand got smashed stack
09:43:17cheatfatebut code works perfectly under linux or bsd
09:43:20cheatfatebut not on windows
09:46:00Araqwrapped something wrong in winlean.nim?
09:53:37yglukhovgiven a symbol of type proc, how do i get the type of n-th arg?
09:56:03Araqyglukhov: this bug is not easy to fix and keep compatibility
09:56:28Araqmacros.getType doesn't return something that can be used in a type() environment
09:56:45yglukhovAraq: i would be greatful for a workaround as well. because otherwise i'm stuck :(
09:58:29Araqok, cleanest solution is this:
09:58:44Araqadd new magics to ast.nim, mVar, mPtr, mRef
09:59:22yglukhovdo you think it's not possible with current compiler?
09:59:32Araqmake atomicTypeX in vmdeps.nim:66 set these magics to the produced symbols
09:59:55Araqhandle these magics in semtypes.nim, line 1245 following
10:00:15AraqI cannot think of a simple workaround for what you're trying to accomplish
10:00:24Araqand the fix is not that hard, try it please
10:00:49Araq3 files in the compiler are affected
10:01:22yglukhovAraq: do you think my code in the issue is conceptionally correct? Because i doubt it.
10:01:41yglukhovspecifically the need to wrap to type()
10:01:59yglukhovbecause t[i] should already be a type, no?
10:02:17Araqyes but type() doesn't produce the bug
10:02:24Araqthe bug is in getType()
10:02:35Araqso you will have problems either way
10:03:11Araqand my solution is the proper way to fix things and keeps compatibility
10:04:07yglukhovcan you describe the other way which breaks compatibility?
10:04:17Araqalright alright, I will do it. just a sec.
10:05:23yglukhovno, i mean, maybe we should really consider fixing getType? but i can't argue on that because i don't understand it enough.
10:06:58yglukhovtbh i don't think backwards compatibility of getType should be of great concern, really. (a) It was introduced not so long ago and (b) nim is under 1.0.
10:10:55AraqI am fixing getType.
10:25:27dom96Araq: PMunch: (and anybody else interested), here it is: http://goo.gl/forms/OgDIs6enJ4GjiZi32
10:25:30dom96Don't advertise it yet
10:25:35dom96I want your feedback first
10:28:11Araq"What programming languages are you most comfortable with?" add Delphi/Pascal to the list of options ;-)
10:29:33dom96done
10:29:34def-dom96: when you hit the back button all the previous page inputs are removed, but I guess that's not your fault
10:30:14dom96def-: they stay saved for me
10:30:33def-maybe a firefox problem or my own system, nevermind then
10:31:14euantin the editors question, change "VIsual Code" to "Visual Studio Code"
10:31:38dom96euant: ahh yes, good catch.
10:31:50dom96fixed
10:33:46*gokr quit (Ping timeout: 272 seconds)
10:33:48dom96I'm also gonna add "I've never heard of Nim until this survey" as one of the answers for "I don't currently use Nim because..."
10:34:56euantFilled in and submitted anyway
10:35:00dom96Also "The Nim website is ugly"
10:35:09*Satyajit quit (Quit: https://fnordserver.eu)
10:35:17euantThe website could do with a little work, yeah
10:35:27euantLike some support for mobile devices - especially the forum
10:36:19*ephja joined #nim
10:38:30dom96indeed
10:39:44dom96euant: hrm, did you really submit it? I don't see your response.
10:40:12euantyep, pretty sure
10:40:35euantOh, maybe not. THe thank you page actually has a submit button, oops
10:40:49euantNow I have ;)
10:41:13veganskdom96, add Nim's manual to the learning resources
10:41:22dom96euant: maybe I should rename it
10:43:41yglukhovdom96: you forgot to mention rust in "What programming languages are you most comfortable with?". intentionally? ;)
10:43:57dom96hah no
10:44:01dom96Also forgot PHP
10:44:32Araqyou forgot lots of languages. the list is mostly "hipster" languages :P
10:45:07euantYeah, I added PHP in "Other"
10:45:38dom96I'll likely need to clear all responses (sorry euant
10:45:38dom96)
10:46:45euantI'll respond when it's public, it's not a problem
10:46:58dom96cool
10:47:00euantSo long as you broadcast it on Twitter and the forums, I'll see it
10:47:01dom96Added PHP and Rust
10:47:04dom96anything else?
10:47:21veganskdom96, haskell?
10:47:27euantI wouldn't just keep adding languages, as otherwise you'll end up with a list several pages long ;)
10:47:52dom96yeah, but common ones are a must
10:48:09Araqdon't list any language
10:48:11dom96plus I always get annoyed when surveys don't have my language of choice
10:48:14Araqmake people write them out
10:48:27AraqC# is not that much work to type anyway
10:48:33dom96Araq: meh, people are lazy
10:48:43Araqthere are no long names when it comes to programming languages
10:48:51Araqif you're lucky they include a vowel
10:50:00Araqyes indeed, it tends to annoy people their language of choice is not listed. hence, list no-one.
10:50:04Araqtotally fair.
10:50:58dom96and then we'll get people writing "Csharp"
10:51:15dom96federico3 wants me to add "What do you use Nim for? (application domains)"
10:51:19*dom96 thinks that's a good idea
10:51:34*elrood joined #nim
10:51:44Araqso what, Csharp is still understandable
10:51:49*Satyajit joined #nim
10:52:43dom96Araq: The multi-choice is staying
10:52:46euantAraq: I think the problem comes when using Google's built in graph tools - it'll show "C#" and "Csharp" as two separate things
10:52:56dom96indeed
10:53:06dom96Now, any other problems/feedback?
10:53:22AraqI could pick 'other' and write Csharp.
10:53:26PMunchJust got back from lunch and saw you highlighted me Araq, is the survey ready to be taken now?
10:53:47Araqbut fine, I'm used to the fact that nobody ever listens to me.
10:53:57federico3also "what aspects of Nim do you find most useful? ...and weak points?"
10:54:12dom96PMunch: I highlighted you
10:54:15dom96It's not ready yet
10:54:18dom96I just want your feedback
10:54:30PMunchOh okay :)
10:54:38PMunchI like the control question :P
10:54:45dom96PMunch: :D
10:54:49dom96Saw it used somewhere else.
10:55:26PMunchMaybe the editor section should have multiple choices?
10:55:39*Araq will write Csharp
10:55:55PMunchI use Atom for projects but I create files in /tmp and open them in Vim to use as a pseudo-REPL
10:56:39dom96PMunch: sure
10:56:49PMunchI'm going to set up an automatic compile-and-run on write command thanks to wuehlmaus so it would be even more useful :)
10:56:52dom96federico3: okay, ideas for the answers?
10:57:20PMunchMaybe just text fields? Otherwise it could be leading
10:57:40PMunchShould the operating system categories include BSD?
10:57:53dom96PMunch: covered by "Other"
10:58:01PMunchOh i guess that's true
10:58:24PMunchBut it would be harder to graph since people might differentiate between OpenBSD/FreeBSD etc
10:58:31dom96Hrm, I guess we could just have text fields. But it might be nice to offer answers like "Generics"
10:58:48dom96PMunch: That's fine, it will be a minority anyway.
10:59:04*Araq will write perl6, Perl6
10:59:08federico3dom96: for which question?
10:59:15Araqcause perl6 is just an implementation for Perl6
10:59:23PMunchdom96, How do you know until the survey is done :P
10:59:32Araqnot to be confused with perl-6 which is the 6th version of perl
10:59:33dom96federico3: For the most useful?
10:59:50dom96Araq: You write whatever you like
11:00:00*Araq spent some time with Larry Wall ...
11:01:06PMunchMaybe add a "No, but I'm planning to" option for the Nim in action book question? I've only recently started using Nim and I plan on reading it (and possibly buying it).
11:01:08dom96PMunch: I can time travel :P
11:01:16dom96PMunch: okay
11:01:20PMunchHaha :P
11:01:21Araqseriously. why do I have ants in my bathroom?
11:01:32PMunchThen why do the survey at all dom96, just give us the answers!
11:02:09dom96Araq: Because they want to be your friend
11:02:33dom96PMunch: Because that would create a paradox!
11:02:34Araqthe bathroom is in the first floor...
11:02:50PMunchdom96, oh shit, guess you're right. Better avoid that
11:03:03federico3dom96: development speed / execution speed / memory usage / readabilty / debugging tools / testing tools / packaging / documentation / security /
11:03:04Araqcrawling through my walls
11:03:16dom96federico3: awesome, thanks
11:03:28dom96federico3: now, what about for the weakness question?
11:04:06federico3dom96: same answers, so that people can flag each aspect as a pro or a con?
11:04:20federico3dom96: also "why does Araq has ants in his bathroom?"
11:04:30dom96federico3: haha
11:04:55dom96federico3: hrm, okay
11:05:02PMunchWeaknesses: Araq's ants
11:05:44PMunchI hope you're deleting the results from the current survey by the way. I'm just skipping through it :P
11:06:00dom96PMunch: yeah, I will clear it all before publicising it.
11:06:26federico3I feel we are not really asking what's Nim good and bad for in terms of application, e.g. microcontrollers, 3D engines, phone "apps"...
11:06:39cheatfateAraq, sorry for interruption... why i can't simply change my "result: ReadyKey[T]" to "result: var ReadyKey[T]"
11:06:53PMunchHmm, for the domain questions I don't think "None of the above, I'm a student" is a good choice
11:07:09cheatfateError: expression has no address
11:07:19PMunchI'm a student and I use Nim for hobby and school projects which would fit in one or multiple of those categories
11:07:40dom96PMunch: true
11:07:43dom96I'll remove it
11:07:53federico3...and what people would want to use it for e.g. "microtrading - but the language is not stable enough"
11:08:35dom96I think that's covered by the domain question
11:08:41PMunchMaybe keep an option with student
11:08:54dom96PMunch: Just "Student"?
11:09:01PMunchHmm
11:09:04dom96I dunno
11:09:07dom96I'd rather just remove it
11:09:27PMunchI guess for "What domain do you work in currently" student would be nice
11:09:46PMunchBut it can be removed from "What domain do you use Nim in"
11:09:59euantThat question didn't really have an answer to fit my role either ;)
11:10:00PMunchThat way you can sort on students
11:10:00dom96ahh yes
11:10:04dom96that makes sense
11:10:23dom96ok
11:10:29euantSo it should definitely stay multiple choice and have an "other" field
11:10:29dom96added the most appealing/most displeasing questions
11:10:54PMunchWill they show for people who have said they haven't tried Nim?
11:11:02*kingofoz quit (Ping timeout: 244 seconds)
11:11:06PMunchIf so then a "I don't know" option would be nice
11:11:10dom96which questions?
11:11:23dom96feel free to try it
11:11:24PMunchThe appealing/displeasing ones
11:11:54dom96No, they shouldn't
11:12:16*kingofoz joined #nim
11:12:45PMunchOh nice, there are multiple paths :)
11:13:04PMunch"I've never heard of Nim until I got this survey" doesn't sound right
11:13:28dom96suggestions for an alternative?
11:13:33PMunchI didn't know about Nim prior to this survey?
11:13:40PMunchOr something similar
11:13:45PMunchThe sentence just seemed weird
11:13:52dom96ok
11:14:39dom96done
11:17:30dom96Ready for publication? :D
11:19:25dom96Araq: ^
11:19:35dom96Hrm, he must be away dealing with ants.
11:20:14PMunchHaha
11:20:19PMunchIt sounds good
11:20:30dom96Varriount: Looks like your HN post made it to the front page! :D
11:42:26*Arrrr joined #nim
12:13:22*bjz_ joined #nim
12:13:43*bjz quit (Ping timeout: 244 seconds)
12:25:05jeffcAnyone run into this issue before: `lib/pure/strutils.nim(833, 14) Error: could not resolve: line[j .. j + < len(padding)]`
12:25:17jeffctrying to compile for no-os, no-gc (targeting a microcontroller)
12:25:26jeffcUsing 14.2
12:30:12PMunchUhm, jeffc what is that supposed to do?
12:30:55PMunchj..j doesn't seem right
12:31:29PMunchAnd I'm not sure if < works like that in later versions of Nim, at least wuehlmaus mentioned something about it the other day
12:34:16dom96I think the issue is that slicing strings depends on the GC.
12:41:37*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:42:02*bjz joined #nim
12:47:01PMunchdom96, I've been meaning to ask about this. How would you do things like string slicing then? In C you could simply use something like malloc + memcpy
12:47:57dom96Same as you would in C ;)
12:48:01PMunchIs there a way to do such copying in Nim? Just from one array to another, which as little overhead as possible (running a loop to copy the elements separately isn't really a neat solution)
12:48:07PMunchdom96, through FFI?
12:48:19dom96yeah, I think so
12:51:11PMunchAnd a C array?
12:53:40dom96Nim array is equivalent to a C array
12:54:22dom96PMunch: actually, just use this http://nim-lang.org/docs/system.html#copyMem,pointer,pointer,Natural
12:54:39PMunchOh, I didn't realize that
12:54:49PMunchBut they have to be known at compile time right?
12:55:22PMunchSo you can't do array[variable]
12:55:39jeffcPMunch: Not my code, that's in the standard library
12:55:48PMunchThat's nice
12:55:53dom96PMunch: indeed, but you can create an unchecked array
12:55:59PMunchThose functions are exactly what I was looking for :)
12:56:02PMunchUnchecked?
12:56:03dom96that has no bounds
12:56:21PMunchHmm, sounds unsafe :P But I guess so are C arrays..
12:56:23dom96Depends what you want to do
12:56:29PMunchObviously
12:56:31dom96Do you want to malloc an array?
12:56:41PMunchLet's say I did
12:56:53PMunchFor creating a data structure for example
12:57:25PMunchSimple linked list in Nim for example (disregarding that it's not really necessary to create one :P)
12:57:35jeffcWhat sort of sucks is that I don't do any string slicing at runtime, but some of my assertion templates were depending on generating filenames at compile time
12:57:51jeffcIt used to work, but broke some time between 13.x and now
12:58:06dom96jeffc: ahh, then that's a regression, create a bug report please.
12:58:11jeffcWill do
12:59:02dom96PMunch: well I dunno, you need to give me a bit more details.
12:59:56PMunchDon't actually have any specific cases for this, just wondering
13:00:18PMunchBut let's say I wanted to create a persistent data type
13:00:19dom96If you want to allocate untraced memory then you're on your own
13:00:24PMunchThey need to copy arrays around
13:00:28dom96Nim wraps some functions for you
13:00:34dom96like alloc and stuff
13:00:43PMunchOkay, I guess that's fair :P
13:07:41*KaiXBerg joined #nim
13:38:35dom96Damn guys, 7 people responded to the survey.
13:38:46dom96I hope you guys don't mind re-doing it.
13:38:55dom96Why is Araq away now :\
13:39:35*renesac_ joined #nim
13:47:39veganskdom96, If you want to change survey, can you change the type of ``most feature`` survey to multiselect? Nim has more then one killer feature :-)
13:54:37*bjz quit (Max SendQ exceeded)
13:55:47*bjz joined #nim
13:57:37*vegansk is now known as veganskaway
14:14:48*pregressive joined #nim
14:33:17*abruanese joined #nim
14:37:30renesac_I'm trying to compile some old nim code, but I get the following error:
14:37:43renesac_memviews.nim(112, 22) Error: for a 'var' type a variable needs to be passed
14:37:56renesac_https://gist.github.com/ReneSac/7059622360bf59ad4415e3c08998bacf
14:38:10renesac_even if I change addr() to unsafeAddr() the error is the same
14:38:31renesac_I tried to force the seq to be allocated on the heap too...
14:38:50renesac_I think it used to work one year ago
14:39:06renesac_what I'm doing wrong?
14:41:38*gokr joined #nim
14:54:09*gokr quit (Ping timeout: 276 seconds)
14:55:27*nicanaca0 quit (Read error: Connection reset by peer)
14:57:24*nd_ joined #nim
14:57:56dom96veganskaway: done
15:09:34Araqrenesac_: dunno, maybe I can later look into it. your code seems fine
15:11:36renesac_please do when you have time, this is kinda blocking me because I have other code depending on that
15:11:42renesac_any idea for an workaround?
15:12:57Araqwell you need to pass a variable to proc view
15:13:20Araqa const wouldn't do
15:13:36renesac_I'm doing that
15:14:03renesac_in my other code the strings to be converted are read from a file
15:14:54renesac_and in that test I tried to use "s.add(int times.getTime())" to force the s to be on the heap
15:16:51Araqtemplate view*(data: var string | var MemView | var seq): expr = # looks suspicious
15:17:01Araqwhy overload this thing yet *again*?
15:17:57renesac_can I give a "default parameter" for a Slice[int]?
15:18:55*endragor quit (Ping timeout: 260 seconds)
15:19:00Araqsure, should work
15:19:17renesac_I'm looking at the converters now
15:19:25renesac_ok, got it to compile w/o the converters
15:19:50Araqoh
15:21:49renesac_updated the gist with the code that compiles
15:22:19renesac_it seems I also need to implement a equivalent to: proc `^`[T](x: int; y: openArray[T]): int
15:22:38renesac_but that is another problem
15:22:46dom96Okay guys. The survey is ready! http://goo.gl/forms/XJ3TPsaiIQe5HlTB2
15:22:55*brson joined #nim
15:23:11dom96Depending on the amount of responses I will keep it open for around a month.
15:23:26dom96well, nah, maybe like 2 weeks.
15:23:57renesac_thanks for the help, do you think I can release that as a nimble package?
15:24:10renesac_or it is too wrong/dangerous?
15:25:25euant@dom96: nice, are you going to publish something on Twitter too?
15:25:34dom96euant: yep, doing it all now.
15:26:48dom96I think I will write a post on the Nim site about it.
15:29:14*KaiXBerg quit (Quit: Page closed)
15:29:23renesac_ideally, the compiler could support this safely for limited uses, and accept one of these any place it accepts an openarray, but I guess this means a lot of effort
15:30:10renesac_for now, it seems better than the unchecked arrays people use to interface with C functions
15:31:22*nsf quit (Quit: WeeChat 1.5)
15:34:32*Demon_Fox joined #nim
15:36:30PMunchdom96, survey answered :)
15:36:38dom96Thanks!
15:37:27PMunchNo problem, looking forward to checking out the results
15:38:11*_stowa joined #nim
15:44:48*PMunch quit (Quit: leaving)
15:46:20*_stowa quit (K-Lined)
15:50:03*yglukhov quit (Ping timeout: 276 seconds)
15:55:20dom96http://nim-lang.org/news/2016_06_23_launching_the_2016_nim_community_survey.html
15:58:24dom96And tweeted
16:03:14*euant quit (Quit: Leaving)
16:03:14*euantor quit (Quit: Leaving)
16:05:58dom96and NimForumd
16:06:00dom96bbl
16:08:48*fredrik92 quit (Ping timeout: 272 seconds)
16:37:30*euantor joined #nim
16:40:06*kingofoz quit (Ping timeout: 276 seconds)
16:48:59*yglukhov joined #nim
16:49:16*euantor quit (Remote host closed the connection)
16:49:40*nsf joined #nim
16:55:31*sdw_ left #nim (#nim)
17:26:44*euantor joined #nim
17:37:51*desophos joined #nim
17:50:52*euantor quit ()
17:58:08*PMunch joined #nim
18:04:59*mostworst joined #nim
18:06:34*xet7 quit (Quit: Leaving)
18:10:33cheatfateAraq, i'm thinking to remove windows part of ioselectors.nim, do we really need this old and very slow windows select?
18:11:04AraqI guess we don't not.
18:11:14Araqasyncdispatch uses something different on win, right?
18:12:45cheatfateyep it uses completion ports and also has workaround for addRead/addWrite
18:15:24*yglukhov quit (Remote host closed the connection)
18:16:44*yglukhov joined #nim
18:23:15*yglukhov quit (Remote host closed the connection)
18:26:22Araqcool, then simply remove it.
18:27:42PMunchHmm, in the learnxinyminutes it suggests using discard """ Multiline stuff """ as a way to comment out code. Is there an other (better?) way?
18:28:07cheatfateAraq, dom96 i want to create PR with only ioselectors.nim + test for it (but i dont know where i can place it, maybe in async?)
18:28:33AraqPMunch: #[ nested comments have arrived ]#
18:28:46PMunchWooo!
18:28:52Araqcheatfate: yes.
18:34:53cheatfateAraq, about testfile, i know we are testing on linux, but for ioselectors.nim testing on linux is just 25% of coverage...
18:50:19*desophos quit (Remote host closed the connection)
18:50:30*regtools quit (Ping timeout: 244 seconds)
19:07:43*TheLemonMan joined #nim
19:10:18PMunchHmm, I've got a function in xlib which requires a char * to data, how would I pass that?
19:15:37*Arrrr quit (Ping timeout: 252 seconds)
19:16:14*mostworst quit (Ping timeout: 260 seconds)
19:30:47*GangstaCat joined #nim
19:35:14PMunchOkay think I got that figured, but now I have a different issue
19:42:27*Arrrr joined #nim
19:42:28*Arrrr quit (Changing host)
19:42:28*Arrrr joined #nim
19:47:19*desophos joined #nim
19:47:50PMunchHmm, anyone here with experience in Xlib programming?
19:50:10cheatfate:) I told you use xcb :)
19:50:36cheatfateAraq, where i can place my tioselectors.nim?
19:55:37*yglukhov joined #nim
19:56:36*mostworst joined #nim
19:57:15*mtj__ joined #nim
19:57:41*mtj__ quit (Remote host closed the connection)
19:58:16*mtj__ joined #nim
19:58:24Araqcheatfate: tests/async
19:58:39*edub4rt quit (Ping timeout: 264 seconds)
19:58:55*mtj_ quit (Ping timeout: 260 seconds)
19:59:35*mtj__ quit (Remote host closed the connection)
20:03:43*mtj_ joined #nim
20:09:04PMunchcheatfate, hmm I guess you did
20:09:23PMunchRight now I'm trying to do something like OnTopReplica on Windows does
20:09:26*edub4rt joined #nim
20:09:40PMunchBasically copy a part from the buffer of one window into a different window
20:15:31*desophos quit (Remote host closed the connection)
20:16:22*desophos joined #nim
20:21:55*ddl_smurf quit (Quit: ddl_smurf)
20:24:39PMunchcheatfate, are there any xcb wrappers for Nim?
20:25:08cheatfatePMunch, nope :(
20:25:20PMunchHmm
20:25:26PMunchThat makes it a bit tedious..
20:25:30PMunchDoesn't it?
20:25:49cheatfatePMunch, and i'm wrong with xcb, its better to start with wayland already :)
20:26:18PMunchWell, as I'm not using Wayland that would be a bad idea :P
20:27:55*NimBot joined #nim
20:28:01*abruanese joined #nim
20:28:04*ekarlso- joined #nim
20:28:08*Amun_Ra joined #nim
20:28:09PMunchHmm, is freenode having trouble again?
20:28:15*ephja joined #nim
20:28:16*nsf joined #nim
20:28:40*cyraxjoe joined #nim
20:29:37*desophos quit (Remote host closed the connection)
20:30:09*alexsystemf__ quit (Ping timeout: 258 seconds)
20:30:17*Heartmender joined #nim
20:30:41*Heartmender is now known as Guest84502
20:32:37*brson joined #nim
20:34:01*alexsystemf__ joined #nim
20:39:25*Arrrr quit (Quit: WeeChat 1.4)
20:39:31PMunchhttp://pastebin.com/bid7QN24
20:39:53PMunchThat's my code so far. It SIGSEGVs
20:40:49PMunchAccording to GDB at the XGetSubImage part, in the _XSetImage function it calls
20:44:29cheatfateAraq, ioselectors.nim PR completed https://github.com/nim-lang/Nim/pull/4402
20:45:34*Matthias247 joined #nim
20:54:06dom96btw guys, I posted the news about the survey on HN
20:57:49PMunchNice, anything on r/programming?
20:59:42*mostworst quit (Ping timeout: 246 seconds)
21:04:05PMunchHmm, I've got var data = cast[ptr char](alloc(3*100*100)) any way I can print that out or compare it to nil to ensure it was actually allocated?
21:05:20*mostworst joined #nim
21:12:30*desophos joined #nim
21:13:40*desophos quit (Remote host closed the connection)
21:18:48dom96PMunch: just posted on Reddit
21:19:01PMunchI saw it was posted in r/Nim :)
21:25:57elroodPMunch, recheck your createImage call, especially bitmap_pad
21:26:18vktecHelp! Why can't I use my struct as a key in a HashSet? I get this error[1] when calling `incl` on it.
21:26:20vktec[1] Error: type mismatch
21:28:42*mostworst quit (Ping timeout: 276 seconds)
21:30:34PMunchelrood, thanks :) Changed it back to 32 (converted all 32s to 24 by accident when I was playing with depth) and now it runs
21:30:41PMunchBut it doesn't appear to do much..
21:30:59*ics joined #nim
21:31:05*desophos joined #nim
21:33:59PMunchEureka! I was missing a XCopyArea
21:38:00PMunchHmm, when I switch to a different workspace and then back (triggering a new expose event) it SIGSEGVs at the alloc
21:41:13PMunchAh, dealloc before I leave the event
21:41:23vktecAny ideas on how to use a struct in a HashSet?
21:42:53Araqvktec: give it a hash function
21:43:14vktecAraq: How do I do that?
21:43:40*brechtm joined #nim
21:43:53brechtmHi
21:44:05vktecAraq: Should I hash all the properties and combine that?
21:44:29brechtm/Users/brechtm/Documents/Code/ray-dog/nimcache/logging.c:31:21: error: use of undeclared identifier 'a'
21:44:29brechtm NSLog(CFSTR("%s"), a);
21:45:04brechtmAnything I can do about this?
21:45:33brechtmI'm using nim 0.14.2
21:46:56PMunchbrechtm, I think we'll need source to help you there..
21:47:12PMunchIt simply seems like a was never declared
21:47:48brechtmOops... I was assuming logging was part of nim's library.
21:48:00brechtmI'm working with someone else's code...
21:48:44brechtmI know it compiled with nim 0.12
21:49:14brechtm proc NSLog_imported(a: cstring) =
21:49:14brechtm {.emit: "NSLog(CFSTR(\"%s\"), a);" .}
21:49:24brechtmI think this might be the origin
21:50:22PMunchOkay, and if you call that with NSLog_imported("string")?
21:50:46PMunchOr maybe rather "string".cstring
21:51:31brechtmhttps://github.com/yglukhov/nim-sdl-template/blob/master/src/nimx/logging.nim
21:52:13vktecAraq: Does `hash()` need to return a string/int/whatever unique to that set of attributes? I assume that's the case.
21:53:07PMunchOh okay brechtm so if you call it by log("this", "is", "cool") it should work
21:53:32brechtmPMunch: I'm not sure which call is causing the problem
21:53:47PMunchDoes it throw that error at compiletime?
21:54:28brechtmyes, clang does
21:54:40PMunchHmm, strange
21:54:43PMunchThen I'm not sure
21:56:54brechtmPMunch: thanks in any case!
21:58:43brechtmHeh, I changed "a" to "a0" (which is the argument name in logging.c) and it compiles
22:00:27brechtmWhy would the current nim version append a 0 to the argument name?
22:03:32brechtmAh, reading about the emit pragma, I think the 'a' argument should be enclosed in backtick quotes
22:03:46Araqbrechtm: it's a regression
22:03:52Araqand happened to work
22:04:00Araqit always needed to be in backticks
22:04:09Araqplease submit a PR to this repo
22:04:23brechtmAraq: thanks
22:04:30brechtmAraq: the repo seems to be unmaintained
22:04:40Araqfork it
22:04:52brechtmalready done long ago :-)
22:05:07brechtmjust coming back to this little game project now
22:05:31brechtmnow it's bulding with the current nim, so I can get on with it :-)
22:08:11*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
22:13:39vktecHmmmm.... I have a proc that initializes my struct type. It calls .init() on a HashSet property of said struct, but later on, when I try to call .incl() on that HashSet, I get an AssertionError saying that the set needs to be initialized. Any ideas?
22:15:14PMunchbrechtm, thanks for bringing this up by the way. I was thinking of something similar the other day :)
22:15:45vktecOh, that's wierd! In my init proc, isValid for the HashSet is set to true, but in the proc trying to use .incl, it's set to false...
22:16:03vktec*weird
22:16:19Araqvktec: make your init proc take a 'var' param
22:16:24PMunchbrechtm, is that your fork? I would like to follow it
22:17:03brechtmPMunch: https://github.com/brechtm/nim-sdl-template
22:17:35vktecAraq: It returns a new object, unlike HashSet.init
22:17:42vktecSo shouldn't need that
22:17:49vktecI think I found the issue though
22:17:58PMunchbrechtm, don't be surprised if I add some things to it in the future :)
22:18:04PMunchBut for now I'm off to be
22:18:05PMunchd
22:18:10*WickedShell joined #nim
22:18:13*PMunch quit (Quit: leaving)
22:18:19brechtmPMunch: I want to make a simple top-down game and came across this cross-platform project
22:18:30brechtmoops
22:23:29*vktec facepalms
22:23:34vktecI made such a stupid mistake
22:23:53vktecI forgot to return the new object from one of my initializer procs
22:23:56vktecXD
22:24:17*renesac_ quit (Ping timeout: 250 seconds)
22:26:48*xet7 joined #nim
22:28:06*yglukhov quit (Remote host closed the connection)
22:28:26*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:28:44*elrood quit (Quit: Leaving)
22:28:47*bjz joined #nim
22:29:16*bjz quit (Client Quit)
22:30:56Araqvktec: use 'result'!
22:31:25vktecAraq: Ah, good idea, thanks
22:32:49*zaquest joined #nim
22:36:12*desophos quit ()
22:36:32*pregressive quit (Remote host closed the connection)
22:36:47vktecI'm trying to split a string like "\"1,2,3\", \"foo,bar\"" at the ',' outside of the inner quotes. What's the best way to achieve this effect in Nim? Regexes are the obvious solution, but I'm wondering if there's a more efficent way.
22:40:57*sparrk joined #nim
22:41:10*sparrk quit (Client Quit)
22:44:58*bjz joined #nim
22:46:34Araqpegs and regexes are equally unusable for parsing things properly
22:47:46Araqpick your poison, I don't think you want to use my highly experimental 'lexim' project or the undocumented strscans.scanp
22:48:04Araqnah, seriously, try pegs.
22:49:30*Trustable quit (Remote host closed the connection)
22:51:17*bjz quit (Ping timeout: 244 seconds)
22:58:25*desophos joined #nim
23:03:11*brechtm quit (Read error: No route to host)
23:06:11*ephja quit (Ping timeout: 240 seconds)
23:10:45*desophos_ joined #nim
23:10:57*desophos quit (Disconnected by services)
23:10:59*desophos_ is now known as desophos
23:16:00*Matthias247 quit (Read error: Connection reset by peer)
23:20:23*fredrik92 joined #nim
23:25:41fredrik92dom96, PMunch got me to answer the survey as well! ;-)
23:26:01dom96fredrik92: yay!
23:26:32dom96It's funny, I'm watching the Nim survey results and the UK EU referendum results at the same time.
23:28:07fredrik92how's the referendum going?
23:28:37*yglukhov joined #nim
23:28:53fredrik92oh
23:28:53dom96Close. Leave is currently leading but only 5/382 local councils declared so far.
23:29:23fredrik92Yeah, Google actually has the poll results intergated in the search!!! :-D
23:30:19dom96ooh
23:30:20*Senketsu joined #nim
23:30:45dom96that's awesome
23:30:59dom96The Pound is down 6% lol
23:33:03*yglukhov quit (Ping timeout: 240 seconds)
23:37:47dom96So far 11 people failed my survey control test.
23:38:05fredrik92that's encouraging...
23:39:50*fvs joined #nim
23:39:53vktecIs there a "raw" string in Nim, to make regexes easier to represent, or do I have to manually escape everything?
23:43:29vktecAha! Looks like """regex""" does the job
23:46:10fvsJust discovered (if in ..) as in > if ord(c) in 32..126:
23:47:14fvslife = good
23:51:30*ddl_smurf joined #nim
23:51:38def-vktec: there's also r"foo" and re"foo"
23:52:06def-http://nim-lang.org/docs/manual.html#lexical-analysis-raw-string-literals
23:52:12def-http://nim-lang.org/docs/re.html#re,string