<< 01-11-2016 >>

00:01:30*yglukhov quit (Ping timeout: 244 seconds)
00:01:39*Matthias247 quit (Read error: Connection reset by peer)
00:03:25*ftsf joined #nim
00:05:15vlad1777dDo somebody knows statement in Nim, which is analog to Python's "pass"?
00:05:47vlad1777dI read about "discard", but is it only for throwing away procedure's result value?
00:06:04FromGitter<Araq> discard works for pass too
00:06:28vlad1777dFromGitter, thank you
00:06:34FromGittervlad1777d, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
00:08:53vlad1777dFromGitter, Then you cannot understand gratitude, clever bot =)
00:08:54FromGittervlad1777d, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim
00:21:55*NimBot joined #nim
00:22:27*bjz joined #nim
00:22:59*vlad1777d_ joined #nim
00:25:16*vlad1777d quit (Ping timeout: 244 seconds)
00:40:53vlad1777d_How is better to write (works both variants): "line.isNilOrEmpty()" or "line.isNilOrEmpty" ?
00:43:39*subsetpark quit (Quit: Connection closed for inactivity)
00:46:28libmanvlad1777d_: learning to let of of empty ()s is a rite of passage :P
00:46:43libman*to let GO
00:48:03*maattdd quit (Read error: Connection reset by peer)
00:48:46vlad1777d_libman, do you mean (I understand English now very well) that I must not write them and left old Pythonic traditions by this way?
00:49:43*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:51:20libmanThe word "must" doesn't apply. https://github.com/nim-lang/Nim/wiki/Style-Guide-for-Nim-Code doesn't mention it, so "should" probably doesn't apply either.
00:51:40*libman quit (Remote host closed the connection)
00:53:11vlad1777d_libman, thank you =)
01:01:44mccQuestion: in this sample code, line 16 http://pastie.org/10953566 is it weird that I am able to modify actor.at[0] even though actor should be immutable (ie: it is a "let")?
01:02:31mccIn testing, it appears if instead of using the Vec2 I make a ref object there, it treats "actor.at" as immutable in that case
01:02:45mcci don't fully understand the (array[2, float](actor.at))[0] syntax i'm using there, i copied it from glm
01:05:11cheatfate_mcc, this string is actually cast[array[2, float]](actor.at)[0]
01:05:26cheatfate_and array[2, float] is mutable
01:05:34mccok, got it
01:11:05*Snircle joined #nim
01:12:36*bjz joined #nim
01:22:09*vendethiel joined #nim
01:23:48*vendethiel- quit (Ping timeout: 260 seconds)
01:24:44*brson quit (Quit: leaving)
01:26:58*ftsf quit (Ping timeout: 250 seconds)
01:27:08*chemist69 quit (Ping timeout: 245 seconds)
01:39:54vlad1777d_Thank you all for help me with learning Nim tonight. Good night.
01:40:01*vlad1777d_ quit (Quit: Leaving)
01:54:23*chemist69 joined #nim
01:59:24*yglukhov joined #nim
02:06:19*yglukhov quit (Ping timeout: 268 seconds)
02:15:28*chemist69 quit (Ping timeout: 245 seconds)
02:18:22*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:25:24*bjz quit (Ping timeout: 256 seconds)
02:28:58*chemist69 joined #nim
02:31:06*bjz joined #nim
02:33:58*ftsf joined #nim
03:03:41*PMunch quit (Quit: leaving)
03:06:33*kulelu88 quit (Quit: Leaving)
03:48:34*dddddd quit (Remote host closed the connection)
04:03:45*yglukhov joined #nim
04:08:32*yglukhov quit (Ping timeout: 256 seconds)
04:16:14*chemist69 quit (Ping timeout: 250 seconds)
04:18:26*chemist69 joined #nim
04:24:44*beatmox quit (Remote host closed the connection)
05:05:46*yglukhov joined #nim
05:10:25*yglukhov quit (Ping timeout: 260 seconds)
05:41:35*eizua joined #nim
05:47:30*pafmaf joined #nim
06:02:15*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:03:10*desophos quit (Read error: Connection reset by peer)
06:15:54*beatmox joined #nim
06:23:24*ftsf quit (Quit: :q!)
06:25:33*pafmaf quit (Ping timeout: 260 seconds)
06:38:36*djellemah_ joined #nim
06:43:32*gokr joined #nim
06:45:16*dmi0 quit (Ping timeout: 260 seconds)
06:45:47*dmi0 joined #nim
07:16:36*chemist69 quit (Ping timeout: 260 seconds)
07:17:01*chemist69 joined #nim
07:27:48*enthus1ast quit (Ping timeout: 260 seconds)
07:27:56*enthus1ast_ quit (Ping timeout: 250 seconds)
07:48:40*xet7 quit (Quit: Leaving)
07:49:52*xet7 joined #nim
07:52:38*vlad1777d joined #nim
07:57:23*vlad1777d quit (Remote host closed the connection)
08:00:57*zombiefisch is now known as qwertfisch
08:06:23*Matthias247 joined #nim
08:12:06*yglukhov joined #nim
08:12:31*couven92 joined #nim
08:24:25*Andris_zbx joined #nim
08:26:12*GustavoLapasta joined #nim
09:20:33*chemist69 quit (Ping timeout: 260 seconds)
09:32:28*Arrrr joined #nim
09:33:45*PMunch joined #nim
09:35:33*PMunch quit (Client Quit)
09:35:50*PMunch joined #nim
09:36:43*couven92 quit (Ping timeout: 245 seconds)
09:39:58*couven92 joined #nim
09:42:14*cheatfate_ is now known as cheatfate
09:44:56*dmi0 quit (Ping timeout: 260 seconds)
09:45:54*Salewski joined #nim
09:47:12Salewskivlad, for your sequence to tuple question: When t is a tuple with two string fields:
09:47:16Salewski(t[0], t[1]) = "aaa bbb".split
09:47:37*chemist69 joined #nim
09:47:46SalewskiThat is what I can currently remember, there are more ways...
09:48:35SalewskiOf course seq and tuple are very different structures. For assignment at least data content has to match somehow.
09:49:49SalewskiWhen you really can't buy Doms book in your country, that would be bad. You may contact Manning, there may be a way.
09:50:00AraqSalewski: are you here to complain about broken builds? :-)
09:51:13SalewskiIf you just do not want to buy it, you may read the tutorial and other free resources.
09:53:01SalewskiAraq, do not understand your question. Just saw your response from yesterday to vlad, does not show very well how friendly you are most of the time :-)
09:54:01Araqtook me 4 commits to get travis to work again
09:54:23AraqI wasn't really aware we start from 0.13 csources
09:54:31Araqon some old Ubuntu
09:55:25Araqimpressive 0.13 can build up to 0.15.2
09:55:56SalewskiNo Ubuntu for me. My box is Gentoo, and I build Nim from git. But we have a Nim package for Gentoo indeed.
09:57:40*enthus1ast joined #nim
09:58:22Araqwould like to get rid of this devel/master split, but who knows where 'git pull origin devel' ended up in
10:01:30*arnetheduck joined #nim
10:01:52*enthus1ast quit (Ping timeout: 244 seconds)
10:03:24*enthus1ast joined #nim
10:06:07*enthus1ast_ joined #nim
10:08:08SalewskiAraq, recently someone asked how to convert a string to a seq of bytes. He had some good reasons for that, maybe reading a string and then do bit manipulation.
10:08:54SalewskiCan that be done only char for char, or is there abetter method? Structure of string and seq of byte should be very similar?
10:10:26*enthus1ast_ quit (Ping timeout: 250 seconds)
10:10:36Araqyou can 'cast' if you know what you're doing
10:11:36SalewskiAh interesting, I was guessing that it may be possible...
10:12:38SalewskiBye...
10:12:42*Salewski left #nim (#nim)
10:13:48*couven92 quit (Ping timeout: 245 seconds)
10:15:42*couven92 joined #nim
10:23:08*MrAxilus[m] quit (Remote host closed the connection)
10:23:08*zielmicha[m] quit (Remote host closed the connection)
10:23:08*prose[m] quit (Remote host closed the connection)
10:23:08*M-Quora quit (Write error: Connection reset by peer)
10:23:08*ehmry quit (Remote host closed the connection)
10:23:09*TheManiac quit (Read error: Connection reset by peer)
10:23:10*hohlerde quit (Read error: Connection reset by peer)
10:23:10*jivank[m] quit (Write error: Broken pipe)
10:35:48*enthus1ast quit (Ping timeout: 260 seconds)
10:37:34*PMunch quit (Quit: leaving)
10:37:51*enthus1ast joined #nim
10:38:09*CcxWrk_ quit (Quit: ZNC 1.6.3 - http://znc.in)
10:38:54*CcxWrk joined #nim
10:45:17Arrrrflyx does nimyaml work at compile time?
10:47:01flyxArrrr: it uses a lot of compile-time macros to generate proper serialization and deserialization procs for arbitrary types. if your question is whether you can serialize/deserialize at compile time: yes, as long as you use strings as source/destination, becaue file streams afaik do not work at compile time
10:47:22flyx(however I never tested if it actually works, so feedback is welcome)
10:49:06*zielmicha[m] joined #nim
10:57:57*jivank[m] joined #nim
10:57:57*ehmry joined #nim
10:57:57*MrAxilus[m] joined #nim
10:57:57*prose[m] joined #nim
10:58:50*dmi0 joined #nim
11:02:12*Snircle joined #nim
11:08:26*prose[m] quit (Remote host closed the connection)
11:08:26*zielmicha[m] quit (Remote host closed the connection)
11:08:26*ehmry quit (Remote host closed the connection)
11:08:26*jivank[m] quit (Remote host closed the connection)
11:08:26*MrAxilus[m] quit (Remote host closed the connection)
11:15:35*lg_ quit (Remote host closed the connection)
11:16:54*enthus1ast quit (Ping timeout: 265 seconds)
11:17:32*Trustable joined #nim
11:18:39*zielmicha[m] joined #nim
11:28:03*ehmry joined #nim
11:28:03*jivank[m] joined #nim
11:28:04*prose[m] joined #nim
11:28:04*MrAxilus[m] joined #nim
11:28:10*TheManiac joined #nim
11:28:10*hohlerde joined #nim
11:28:11*M-Quora joined #nim
11:32:28*gangstacat quit (Quit: Ĝis)
11:34:05*gangstacat joined #nim
11:51:50flyxwhy is Time defined as int32? shouldn't this better be future-proof?
11:53:03Araqwe're Posix proof instead
11:53:16Araqbut yes, it's actually implementation defined
11:54:32flyxah, because it maps to time_t?
11:54:47flyxand that's famously of undefined length
11:55:26Araqyeah, it's a 'dinstinct' type, right?
11:57:41flyxyes
11:58:44*flyx will now have some fun parsing timestamps…
12:12:04cheatfateflyx, and where is Time defined as int32?
12:12:19cheatfateTimeImpl {.importc: "time_t", header: "<time.h>".} = int, but not int32
12:12:26cheatfateTime* = distinct TimeImpl
12:14:15flyxtype TimeImpl {.importc: "time_t", header: "<time.h>".} = int32
12:14:20flyxint32 for me
12:14:25flyxwhere are you looking?
12:15:12flyxhmm, the generated documentation is specific to some compile-time switches
12:15:22cheatfatehttps://github.com/nim-lang/Nim/blob/devel/lib/pure/times.nim#L51
12:15:39flyxso it shows int32, although there are switches to have it being int64
12:16:04cheatfateit shows `int`!
12:24:05cheatfateok this is bug, could somebody with write access modify this line https://github.com/nim-lang/Nim/blob/devel/lib/pure/times.nim#L87 to have `int`
12:34:22Araqcheatfate: doesn't look like a bug to me
12:34:39Araqthe mingw we ship has a 32 bit time_t
12:34:43Araqapparently
12:37:20*Matthias247 quit (Read error: Connection reset by peer)
12:38:06cheatfateAraq, mine `gcc (GCC) 4.8.3` - sizeof(time_t) = 8
12:38:11cheatfateon 64bit platform
12:38:55Araqok, so 'int' then?
12:39:18cheatfateAraq, yep
12:39:22FromGitter<endragor> undefined sizes got to times, too :’( I also always wonder why I have to work with floats any time I need millisecond precision (which is pretty often).
12:48:24cheatfateAraq, 4.9.2 mingw gcc x86 version generates sizeof(time_t) == 4 on 64bit platform...
12:50:00cheatfateAraq, so this line needs to be 'int'
12:52:19*vendethiel quit (Ping timeout: 252 seconds)
12:52:42*vendethiel joined #nim
13:04:46flyxdo I see it correctly that the stdlib currently has no possibility to write/parse ISO 8601?
13:05:54flyxah, there's format() and parse()
13:06:01flyxI should not simply ctrl+f "ISO"
13:11:40*brechtm joined #nim
13:12:21Araqflyx: libman said format() and parse() are somewhat broken
13:12:28Araqwould be nice if you could fix it.
13:12:36Araqsomething to do with timezones
13:12:42flyxoh dear, timezones
13:13:07flyxdid he create an issue?
13:13:39flyxor do you know the day he talked about it here so I can look up what exactly the problem is?
13:15:19Araqlol, did he create an issue.
13:16:50Araqhttp://irclogs.nim-lang.org/26-10-2016.html
13:18:18Araqdoesn't look to hard to fix :-)
13:18:24flyxI'll look into it
13:19:17flyxwhile I'm at it, I wonder what this line does and why it's there: https://github.com/nim-lang/Nim/blob/master/lib/pure/times.nim#L1055
13:20:03flyxit initializes the monthday to the parsed number of the month [1..12] for some reason?
13:23:34Araqremove this line and see what happens
13:23:45Araqif it's subtle our tests will catch it
13:23:57Araqotherwise it's an ordinary bug.
13:32:18*vendethiel- joined #nim
13:33:56*vendethiel quit (Ping timeout: 250 seconds)
13:46:07*GustavoLapasta quit (Quit: Leaving)
13:48:52*gangstacat quit (Quit: Ĝis)
13:51:35flyxI believe libman's problem is that he used 'zzzz' when he should have used 'zzz' ('zzzz' does not exist)
13:51:39flyxbut I will try to replicate it
13:52:30*dddddd joined #nim
14:01:14*gangstacat joined #nim
14:03:50cheatfatemain problem of times module is time conversion between timezones
14:16:08*djellemah_ quit (Ping timeout: 250 seconds)
14:27:20flyxokay, parsing seems indeed not to properly parse the timezone
14:30:08*PMunch joined #nim
14:43:56flyxwhat happens is that toTime() completely ignores the timezone
14:44:21flyxand parse() uses toTime() to set weekday and yearday
14:44:50flyxso you will get a wrong result whenever you parse a timestamp that is not in your device's timezone
14:45:35flyxAraq: what *should* the output of getTime() be? UTC? in timezone of device?
14:47:10flyxah, I see, time_t is specified to be UTC
14:50:40*vlad1777d joined #nim
14:56:06flyxhu, where is toTime*() implemented for non-js?
15:01:59*PMunch quit (Remote host closed the connection)
15:07:57vlad1777dHEllo to all. I searched in manual tutorial, but had not found, how to delete variable? (to free memory) Something like in Python "del settings_object"
15:08:09def-vlad1777d: let it run out of scope
15:09:04vlad1777ddef- It'll deleted automatically? Is there some operator for manual deleting?
15:09:29vlad1777d(if it's in the module level)
15:10:19def-if it's on the stack then it becomes unused automatically. if it's on the heap, the gc will deallocate it when it isn't referenced anywhere anymore
15:11:00def-if you do manual memory allocation, then you also have to delete manually
15:12:33vlad1777ddef-, thank you very much. Are strings in the stack or heap?
15:12:39def-heap
15:13:20vlad1777dThanks )
15:14:24def-but I guess you could call that an implementation detail. the implementation could change to store small strings on the stack for example
15:16:10vlad1777ddef-, so I understood, that anyway, if it's not needed after some time, it'll be removed automatically.
15:20:44*brson joined #nim
15:22:41*PMunch joined #nim
15:24:32*yglukhov quit (Remote host closed the connection)
15:27:42*PMunch quit (Quit: leaving)
15:28:54*vlad1777d_ joined #nim
15:29:12*vlad1777d quit (Ping timeout: 250 seconds)
15:37:28*Trustable quit (Remote host closed the connection)
15:38:35*Trustable joined #nim
15:39:46*djellemah_ joined #nim
15:41:35*Andris_zbx quit (Remote host closed the connection)
15:49:18flyxI have learned a lot about time.h today
15:49:45flyxmostly that everything is awful and I should finish the fix of times.h because tomorrow I have forgotten everything
15:50:00flyx*times.nim of course
15:52:17*desophos joined #nim
15:56:52*desophos quit (Read error: Connection reset by peer)
16:00:35chemist69I read that nimsuggest is now part of Nim (again). How do I build it? `./koch boot -d:release` does not build it. Do I use nimble in the nimsuggest subdir?
16:01:27vlad1777d_chemist69, read install or readme file in release
16:01:33vlad1777d_there is special command
16:01:42*Arrrr quit (Quit: WeeChat 1.5)
16:01:58*vendethiel- quit (Ping timeout: 256 seconds)
16:02:23vlad1777d_chemist69, "nim e install_tools.nims"
16:03:55*vendethiel joined #nim
16:03:55Araqactually it's "koch tools"
16:06:56chemist69vlad1777d_ and Araq: thanks a lot. Am I correct that this `koch` option is currently undocumented?
16:08:12chemist69[Error] 'koch tools' only works for the tarball.
16:09:49*ehmry quit (Ping timeout: 260 seconds)
16:10:27*Jesin quit (Quit: Leaving)
16:10:49*enthus1ast joined #nim
16:10:49*ehmry joined #nim
16:12:48*Jesin joined #nim
16:13:44*libman joined #nim
16:18:16*GustavoLapasta joined #nim
16:18:42*desophos joined #nim
16:21:55Araqchemist69: oh yeah, let me change that
16:29:32*gokr quit (Ping timeout: 260 seconds)
16:36:08flyxPR for timezones done. now I seriously need something to eat
16:40:17*pregressive joined #nim
16:42:24Araqflyx: thank you.
16:45:24*Trustable quit (Ping timeout: 260 seconds)
16:46:01*Trustable joined #nim
16:46:23*Trustable quit (Client Quit)
16:47:22*GustavoLapasta quit (Quit: Leaving)
17:02:52*gokr joined #nim
17:03:41*Matthias247 joined #nim
17:13:22*couven92 quit (Ping timeout: 256 seconds)
17:15:23*couven92 joined #nim
17:25:01*yglukhov joined #nim
17:29:48*yglukhov quit (Ping timeout: 260 seconds)
17:30:42*enthus1ast quit (Ping timeout: 268 seconds)
17:32:29*enthus1ast joined #nim
17:38:08flyxseems like I broke the JS stuff
17:43:04cheatfateWe got braces support and nobody knows about it, even HN :)
17:43:07*nsf joined #nim
17:44:22flyxwell do we have a *release* that supports braces?
17:44:43Araqno, we don't and even if it's in a release
17:44:57Araqit will be based on a poll
17:45:02Araqwether we keep it or not
17:47:25cheatfateAraq, is it too hard to maintain?
17:48:05Araqno, I rarely change the parser. changing 2 parsers at the same time is about 0.001% of effort
17:51:41*brson quit (Ping timeout: 251 seconds)
17:53:25cheatfateso two parsers its like to asyncdispatches... not hard to maintain but every time you can forget to patch another parser
17:53:38cheatfateto asyncdispatches = two asyncdispatches
17:55:43*brson joined #nim
17:56:23AraqI could also merge the 2 parsers, the implementations are close enough, but it's more messy for others to deal with then
17:59:46*maattdd joined #nim
18:00:00gokrAraq: Did you talk to andlabs? And what was the issue?
18:00:05gokrJust curious
18:00:14Araqnot yet
18:00:41*brson quit (Ping timeout: 252 seconds)
18:00:55chemist69Araq: using `koch tools` gives me this error: [Error] 'koch tools' only works for the tarball.
18:01:31Araqchemist69: you're living in the past
18:01:52Araqgit pull
18:02:12chemist69I am? I am on latest devel from Github (as in two minutes ago)
18:02:52FromGitter<Araq> commit 73b76b916c96fc7
18:03:08Araqkoch improvements; implemented 'koch pushcsources'
18:03:13Araqdo you have that?
18:04:15chemist69jepp.
18:04:57*gokr quit (Ping timeout: 244 seconds)
18:05:42Araqnim c koch
18:07:36chemist69ah, I forgot to do that.
18:07:45chemist69but now I get: Error: cannot open 'dist/nimsuggest/nimsuggest.nim'
18:09:28*enthus1ast quit (Ping timeout: 260 seconds)
18:11:11*brson joined #nim
18:12:12Araqha, good catch. fixed.
18:15:08chemist69and now it worked! Thanks a lot!
18:15:30*brechtm quit (Remote host closed the connection)
18:36:24*eizua quit (Remote host closed the connection)
18:44:53dom96hey guys, what's up?
18:45:25ldleworknmu
18:45:32ldleworkdom96: a/s/l?
18:45:57flyxhum, what is `tzname` based upon, anyway? is there a standard defining three-character timezone names?
18:46:23dom96ldlework: 1uS/Klorblorg/Andromeda
18:46:38ldleworkthat's my fetish!
18:48:29flyxin http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html there is defined that std and dst have *no less than* 3 characters, but may have up to TZNAME_MAX characters
18:48:34*UNIcodeX joined #nim
18:48:36dom96That's very specific, must be a hard fetish to satisfy.
18:48:43ldleworkdom96: until now
18:49:14*dom96 runs away
18:49:19ldleworkhehe
18:49:23flyxso I think parsing/formatting "ZZZ" is completely broken and should be removed
18:49:37dom96flyx: you brave soul.
18:49:39Araqwhat does ZZZ do?
18:49:53flyxoutput whatever is written in TimeInfo.tzname
18:50:02flyxand that may come from tzname in time.h
18:50:15flyxwhich has content according to the spec I linked
18:50:26flyxand parsing ZZZ reads exactly three characters
18:50:51flyxthe problem is that there is no way to map that back to a timezone offset
18:51:51dom96then perhaps it shouldn't be available in `parse`?
18:51:54flyxso currently, if you parse something like "2016-11-01T19:50:50GMT", you will get a TimeInfo struct that has „GMT“ as tzname, but the actual timezone offset is 0
18:52:24dom96Isn't that correct?
18:52:50flyxer, yeah, for GMT yes
18:52:53flyxbad example
18:52:57flyxit will be 0 for everything
18:53:11flyxbecause it doesn't get set when parsing ZZZ
18:53:18dom96Does it read things like "GMT+1"?
18:53:31dom96I guess that's the problem
18:53:35flyxno, it reads exactly three chars
18:53:40flyxnot really
18:53:50flyxhow would you map "GMT+1" to a timezone offset?
18:53:54flyxyou need a conversion table
18:54:02flyxafaik the C lib does not provide one
18:54:10cheatfateflyx, but setting `tzname` is not threadsafe... because it will cause problems for whole process
18:54:26*yglukhov joined #nim
18:54:27flyxcheatfate: tzname is a field of TimeInfo
18:54:40flyxcheatfate: I am *not* talking about setting the global tzname from time.h
18:55:05dom96I think that we should look at how mature time libraries do it in other languages.
18:55:17flyxthe problem with ZZZ is that if you parse a timestamp with a tz offset like "+01:00", you do not have a timezone name at all
18:56:18cheatfateif you have time with +01:00 its the most easy part because you have exactly what you need...
18:56:29dom96ZZZ shouldn't parse "+01:00"
18:56:45flyxdom96: not what I meant
18:57:01flyxI meant, you parse "+01:00" with "zzz" and then dump the result with "ZZZ"
18:57:06flyxyou will get "UTC"
18:57:24AraqZZZ should parse timezones and +01:00 understand what's meant by it
18:57:32Araqor raise an exception
18:57:35flyxor perhaps your local timezone
18:58:59cheatfateflyx, and about `tzname` if you want omit confuses next time, please specify what `tzname` you are talking about
18:59:20flyxAraq: I see no possibility to figure out how to set the timezone offset from any ZZZ input in the C lib
18:59:52Araqmaybe we need our own offset field then with blackjack and hookers
18:59:58flyxmaybe.
19:00:20*brson quit (Ping timeout: 260 seconds)
19:00:33flyxthe problem is that the implementation currently depends on things like comparing tzname to "UTC" and if it doesn't match, use the local timezone
19:01:06flyxI think tzname should be purely informational and the timezone field should be used for all calculations
19:01:07*cyraxjoe joined #nim
19:02:28cheatfateAraq, implementing own `casino` can be tough task because we need to handle `/usr/share/zoneinfo` at least
19:03:00flyxthe problem is, there is no way to get a tzname from a given timezone offset, nor vice versa
19:03:15flyxso we have two things we cannot map onto each other
19:03:27Araqwe should have an enum for that so it's clear what's supported
19:03:37flyxthat would be cool
19:05:08cheatfateflyx, you can always convert timezone name to specified timezone offset, all information you need sits in `/usr/share/zoneinfo`. But its not possible to convert timezone offset to specific timezone, because many timezones can have exactly same timezone offset
19:05:41flyxcheatfate: `/usr/share/zoneinfo` is not available on all targets
19:05:52cheatfateare u sure?
19:05:56flyxWindows?
19:06:02AraqJS?
19:07:21*Trustable joined #nim
19:07:36cheatfateits only way to do this is to use system specific staff, because if you try to implement your own table of timezones <-> offsets you will be always wrong
19:07:36*dmi0 quit (Ping timeout: 250 seconds)
19:08:07cheatfateWindows has much more easy api to handle all this shit
19:08:28flyxAraq: okay, I will try to implement https://www.timeanddate.com/time/zones/ as enum
19:10:20cheatfateomg, this timezone offsets are changing... every specific country (Russia for example) can change its timezone offset value by law
19:11:09flyxah well, that's unfortunate
19:11:38cheatfatealso you need to handle dates of DST
19:11:48flyxyeah, obviously
19:12:11cheatfateAraq, javascripters uses http://momentjs.com/downloads/moment-timezone-with-data-2010-2020.min.js
19:12:59cheatfateas you can see they support dates between 2010-2020
19:13:49flyxAraq: I would like to have baseline working. so I'd like to remove "ZZZ" for now, and maybe we can later add proper support
19:15:05flyxbut as things are, what happens to tzname / timezone is currently very confusing and that's why I would really like to remove tzname alltogether and we will have the option to add some enum later
19:15:14Araqflyx: yeah. remove what's broken and perhaps introduce a "timezones" stdlib module later
19:15:56Araqdunno if it should be one module or two. Time handling is complex and times.nim is used by os.nim
19:16:06Araqso everbody compiles it all the time
19:16:22dom96Like I said, we should find a mature times library and just copy it.
19:18:13Araqdom96: the mature ones are all 20K LOC
19:18:27Araqcan't "copy" that.
19:18:29dom96we don't have to copy everything
19:18:35dom96at least not at once
19:19:04Araqthe JS lib looks quite useful
19:19:21Araqwe also need a mapping from country to timezone(s)
19:20:03cheatfateAraq, why we need country to timezone? US and Russia has like 5-6 timezones
19:23:11cheatfateeverything we need for posix systems is to read tzfiles (man tzfile(5)) and for windows its GetTimeZoneInformationForYear
19:24:07*PMunch joined #nim
19:24:38PMunchHi, can you use basic authentication with httpclient?
19:25:10dom96yes
19:25:15PMunchHow?
19:25:21dom96it's just a header isn't it?
19:25:52PMunchWell, I've normally done it with uname:passwd@url
19:25:58PMunchBut I think it's a header as well
19:31:59PMunchError: type mismatch: got (HttpClient, url: string, extraHeaders: string)
19:32:08PMunchI just get that when I try to use it..
19:32:25flyxokay, I removed tzname. only thing to update now is to update `$` and write tests
19:33:35flyxdom96, Araq: would it be okay for `$` to use format("yyyy-MM-dd'T'HH-mm-sszzz") instead of asctime? that way, it's independent of local time zone
19:34:06dom96flyx: yes, I've been wanting to change it for a while now.
19:34:08*gokr joined #nim
19:34:36dom96PMunch: take a look at the docs, extraHeaders isn't a thing for the procs working on HttpClient
19:34:46dom96the HttpClient instance has a headers table
19:36:14*cheatfate quit (Read error: Connection reset by peer)
19:58:54*brson joined #nim
20:01:10*cheatfate joined #nim
20:03:49*boop quit (Ping timeout: 248 seconds)
20:04:08hohlerdeI updated to the latest devel and now I am getting the following error while using vcc:
20:04:09hohlerdeAdditional info: Requested command not found: 'vccexe.exe
20:04:25*brechtm joined #nim
20:04:36hohlerdeIs this a known issue?
20:07:50Araqhohlerde: try this please:
20:07:57Araqnim c -o:bin/vccexe.exe tools/vccenv/vccexe
20:09:29hohlerdethx araq, that did it
20:09:41*brechtm quit (Remote host closed the connection)
20:14:47vlad1777d_Is here somebody from developers\website administrators?
20:15:11*Araq raises his hand slowly
20:16:19vlad1777d_http://nim-lang.org/docs/system.html#seq could you add to "fmWrite" mode description: """ ## If the file does not exist, it will not be## created.""" ?
20:17:11vlad1777d_Because other modes, where it's written, when file is absent, create the file. And fmWrite does it too. I, as newbie, expected IOError, so I got confused.
20:21:01flyxdom96, Araq: I have updated `$` and the test cases. they test the timezone stuff now too because `$` outputs the timezone. I consider it mergable now (assuming ci tests do not fail)
20:21:42Araqflyx: wow that was quick
20:21:51Araqvlad1777d_: our docs have an 'edit' button
20:22:02vlad1777d_And, maybe, here: http://nim-lang.org/docs/manual.html#exception-handling-except-clauses , instead of """raise newEOS("operating system failed")""", maybe it's needed to write: """raise newException(OSError, "operating system failed")"""?
20:22:31Araqedit button! :-)
20:23:02*boop joined #nim
20:23:02flyxAraq: hmm, this is surely breaking for various reasons, should I add something to news?
20:23:08vlad1777d_Araq, yes, sorry. I saw it, I didn't knew I could make this.
20:23:37vlad1777d_Araq, and in Manual there is no edit button. If that is an error - could you correct it?
20:24:39Araqthat's not an error, I don't know where to put it for documents.
20:26:06Araqflyx: next release is 0.16 with stdlib cleanups, but yes add it to the news
20:26:15flyxwill do
20:26:18vlad1777d_Araq, I don't mean button, sorry, I mean the description of rising exceptions
20:26:44vlad1777d_Maybe there is an error.
20:27:07Araqoh the manual's examples don't necessarily list valid code
20:27:25AraqnewEOS is just something that could exist to get the point across
20:27:34Araqbut I can see it's confusing :P
20:29:13*couven92 quit (Ping timeout: 245 seconds)
20:29:45*couven92 joined #nim
20:30:52vlad1777d_Yes, if you could correct it - it would be great. I thought that's the name of exception and tried to raise it like in Python: """raise IOError("cannon do ...")"""
20:32:12flyxAraq: news been added to PR
20:33:33AraqI'd like to get rid of newException though. it started as an internal "does this work"
20:33:43Araqand then people requested it to be exported
20:35:10Araqand now it's everywhere :-/
20:35:39AraqI should write a blog post "raise considered harmful"
20:35:59vlad1777d_Araq, if there's another working way to do it - it's great.
20:36:19Araqno ... :-)
20:36:44AraqI could write a template that encourages better design.
20:36:46vlad1777d_Maybe you could write it there =) Because I had some time to understand how to raise exceptions.
20:37:01vlad1777d_It would be great =)
20:38:59vlad1777d_REally, after Python such way is not very convenient. But module importing system and including possibility is better here than in Python.
20:42:04Araqraising should not be convenient, you should always at least have something like
20:42:32Araqproc reportError(msg) {.noinline.} = raise newException(ValueError, msg)
20:42:43Araqor
20:42:55Araqproc reportError(msg) {.noinline.} = quit msg
20:43:12Araqor
20:43:24Araqtemplate check(retval, msg) =
20:43:34Araq if retval != 0: reportError(msg)
20:43:35flyxlibman: you may want to have a look at https://github.com/nim-lang/Nim/pull/4984 because you said time parsing / formatting is somewhat broken and tell me if that fixes your problems
20:44:27*Trustable quit (Remote host closed the connection)
20:44:52libmanI just dropped the time zone and offset manually - https://github.com/lbmn/nim/blob/master/lib/al_str.nim#L10
20:45:41flyxzzz works now… at least the tests run properly
20:45:44Araqor even better: attach an onError callback to your 'context' object.
20:46:00libmanok
20:46:02Araqand write the code that "on error continue" works
20:46:24*Trustable joined #nim
20:46:26Araqthat reinvents a Lisp condition system, but it does it properly.
20:55:08vlad1777d_Those procedures, that you suggest, make all more comfortable =) I can make this manually too, but it's lesser convenient =)
21:02:21*brechtm joined #nim
21:08:37*PMunch quit (Quit: leaving)
21:13:17*nsf quit (Quit: WeeChat 1.6)
21:13:27*brechtm quit (Remote host closed the connection)
21:13:37*nsf joined #nim
21:16:10*nsf quit (Client Quit)
21:16:33*nsf joined #nim
21:26:52*xet7 quit (Quit: Leaving)
21:29:18*xet7 joined #nim
21:31:03*dmi0 joined #nim
21:33:19*Jesin quit (Quit: Leaving)
21:37:10*yglukhov quit (Remote host closed the connection)
21:43:38*gokr left #nim (#nim)
21:44:48*enthus1ast_ joined #nim
21:50:02FromGitter<jlp765> How do you initialize a seq variable from a range ( something like (0..10).toSeq() ) ?
21:51:50AraqtoSeq(0..10) works iirc
21:52:00*djellemah_ quit (Ping timeout: 260 seconds)
21:52:23AraqtoSeq() doesn't work with dot notation
21:52:29Araqbecause of hard to explain reasons
21:52:33Araqgood night.
21:55:25*bjz joined #nim
21:59:48*enthus1ast joined #nim
22:00:53enthus1ast_does one know a good way to strip unicode from a string?
22:02:18*Senketsu quit (Read error: Connection reset by peer)
22:02:40*Senketsu joined #nim
22:03:58*bjz quit (Read error: Connection reset by peer)
22:04:48*bjz joined #nim
22:04:54cheatfateenthus1ast_, what does it mean strip unicode from string
22:06:20*kulelu88 joined #nim
22:08:18enthus1ast_i send strings from cmd.exe -> nim websocket proxy -> chrome cmd seems to use a strange encoding, since the end result should be a chat, my idea was to let the proxy strip out chars that chrome not like, the other way would be to encode proper....
22:08:23*Trustable quit (Remote host closed the connection)
22:09:47enthus1ast_i wanted to port solution 1 and solution 2 http://blog.fgribreau.com/2012/05/how-to-fix-could-not-decode-text-frame.html
22:10:02*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:10:21enthus1ast_but for solution 2 my client needs to be smarter, wich is not alway the case / needed
22:12:24enthus1ast_so or so no solution is fine : /
22:14:27cheatfatei think you need to know first what encoding uses cmd.exe and how it encoding symbols which are sent (i dont know how -> nim websocket proxy works)
22:18:15vlad1777d_To everybody: tell me please, what is better Ned or Aporia just like text editor for Nim? Or, maybe, somebody could make work "jump to declaration" in Atom?
22:18:43cheatfatevlad1777d_, try vscode
22:19:14enthus1ast_can it debug nim cheatfate?
22:19:16cheatfatelatest sublime text3 also has jump to definition but only for files currently opened
22:19:52cheatfateenthus1ast_, i dont know i'm using st3
22:20:11vlad1777d_cheatfate, I cannot - I have not Windows
22:20:28vlad1777d_Thanks for sublime text, I'll look to it
22:20:49cheatfatehttps://code.visualstudio.com/download
22:20:56*Matthias247 quit (Read error: Connection reset by peer)
22:21:38enthus1ast_debug support of vscode-nim is on the todo list : )
22:21:56cheatfateenthus1ast_, good debugger is N1 flaw of Nim (imho)
22:22:33enthus1ast_jeah ..
22:22:56enthus1ast_but maybe i'm getting good enough with a blackbox debugger :)
22:24:36enthus1ast_cheatfate: i will fix the sending of the strings, than i still have to let the proxy somehow 'shield' dummy chrome users
22:24:43enthus1ast_thanks
22:25:14cheatfatewhat is blackbox debugger?
22:25:20*nsf quit (Quit: WeeChat 1.6)
22:25:24enthus1ast_like olly or x32dbg
22:25:39cheatfatedoes it support pdb/dwarf debug info?
22:25:57enthus1ast_im quite unshure
22:26:08cheatfateenthus1ast_, so you debugging asm?
22:26:11enthus1ast_pdb maybe, never used it
22:26:18enthus1ast_yeah ..
22:26:40cheatfategive me link at blackbox debugger please
22:26:45cheatfatewant to take a look
22:26:57enthus1ast_http://x64dbg.com/#start
22:27:23cheatfateenthus1ast_, to `shield` chrome users escape everything comes from cmd with `\uXXXXX`
22:27:40cheatfateor how html, js escaping characters
22:29:46enthus1ast_with escape you mean replace right?
22:30:53*couven92 quit (Ping timeout: 245 seconds)
22:31:35*couven92 joined #nim
22:31:57enthus1ast_oh have to read proper...
22:37:42*yglukhov joined #nim
22:43:01*yglukhov quit (Ping timeout: 252 seconds)
23:10:16*Senketsu_ joined #nim
23:13:33*Senketsu quit (Ping timeout: 260 seconds)
23:20:30*fredrik92 joined #nim
23:20:54*couven92 quit (Disconnected by services)
23:21:01*fredrik92 is now known as couven92
23:21:19*fredrik92 joined #nim
23:29:44*enthus1ast_ quit (Read error: Connection reset by peer)
23:30:14*libman quit (Remote host closed the connection)
23:51:43*enthus1ast_ joined #nim
23:59:02*vlad1777d_ quit (Quit: Leaving)