<< 24-08-2016 >>

00:01:45*endragor quit (Ping timeout: 258 seconds)
00:03:30*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:14:58*endragor joined #nim
00:16:00girvoXe: I'm somewhat working on one, well, cleaning up the built-in httpclient anyway
00:16:21girvoXe: though that's only because I needed a decent HTTP message parser that doesn't care about transport ;)
00:18:05libmanI'm having a really bizarre bug... http://pastebin.com/JWkSNscB
00:18:38libmanNim's strfmt doesn't do thousandth separator for some reason, so I wrote an addCommas() from an example
00:18:47*nsf joined #nim
00:19:37*endragor quit (Ping timeout: 265 seconds)
00:19:40libmanIt looked to be working, but now I observe that for some numbers it works and for some it doesn't...
00:20:24kulelu88girvo the messiah has arrived
00:21:10*nairobi joined #nim
00:23:41*GangstaCat quit (Quit: Leaving)
00:24:59libmanhttp://libman.org/img/bak/20160823-WeirdBug.jpg
00:25:12*nairobi quit (Ping timeout: 240 seconds)
00:25:18*nsf quit (Quit: WeeChat 1.5)
00:25:57libmanSomeone competent should write a well-tested addCommas for Nim stdlib...
00:26:22libman(or fix fmt)
00:29:18libmanBah, found it. I knew it was something stupid. Second replace argument should just be "$1,"
00:31:55libmanAnd it works, but only with nre
00:40:03*gokr quit (Ping timeout: 240 seconds)
00:44:35*desophos quit (Read error: Connection reset by peer)
00:45:03*ftsf_ joined #nim
00:47:01*castlelore joined #nim
00:51:28*ftsf_ quit (Ping timeout: 250 seconds)
00:56:38*endragor joined #nim
00:57:08*libman quit (Remote host closed the connection)
00:58:49*desophos joined #nim
01:01:00*endragor quit (Ping timeout: 250 seconds)
01:02:51*ftsf_ joined #nim
01:14:00*ftsf_ quit (Ping timeout: 250 seconds)
01:15:42*endragor joined #nim
01:19:58*endragor quit (Ping timeout: 244 seconds)
01:26:13*ftsf_ joined #nim
01:40:39*chemist69 quit (Ping timeout: 264 seconds)
01:48:20*cheatfate__ joined #nim
01:49:18*cheatfate_ quit (Read error: Connection reset by peer)
01:51:19*cheatfate__ is now known as cheatfate
01:51:26*cheatfate quit (Client Quit)
01:54:11*chemist69 joined #nim
01:54:56*endragor joined #nim
01:59:24*endragor quit (Ping timeout: 260 seconds)
02:28:40*brson quit (Quit: leaving)
02:29:04*mcc joined #nim
02:54:21*vegansk joined #nim
03:03:20*nairobi joined #nim
03:07:26*nairobi quit (Ping timeout: 244 seconds)
03:43:16*endragor joined #nim
03:47:39*endragor quit (Remote host closed the connection)
03:57:18*desophos quit (Read error: Connection reset by peer)
03:57:22*endragor joined #nim
04:00:37*bjz joined #nim
04:04:39*MyMind quit (Read error: Connection reset by peer)
04:05:45*MyMind joined #nim
04:07:25*kulelu88 quit (Quit: Leaving)
04:20:35*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:24:58*bjz joined #nim
04:30:28*bjz quit (Ping timeout: 265 seconds)
04:31:59*bjz joined #nim
05:13:28*chemist69 quit (Ping timeout: 250 seconds)
05:15:45*chemist69 joined #nim
05:21:29*gokr joined #nim
05:24:41*onionhammer quit (Ping timeout: 265 seconds)
05:28:37*castlelore quit (Read error: Connection reset by peer)
05:31:21*endragor quit (Remote host closed the connection)
05:31:33*endragor joined #nim
05:32:25*gokr quit (Ping timeout: 265 seconds)
05:35:31*onionhammer joined #nim
05:44:15ftsf_hmm tried using the marshal module, it stores and loads stuff fine, but i noticed the tuple field names are not used, just "Field0", etc
05:44:20ftsf_is this intentional?
05:47:12*endragor quit (Remote host closed the connection)
05:53:36*endragor joined #nim
05:54:05ftsf_"Different tuple-types are equivalent if they specify fields of the same type and of the same name in the same order" - from the manual, seems to suggest that the field name is important, but it seems not
05:56:39*gokr joined #nim
06:00:21*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:04:47*gokr quit (Ping timeout: 258 seconds)
06:06:18*bjz joined #nim
06:10:48veganskftsf_, seems that the tuples with named fields will be deprecated soon. Araq, am I right?
06:17:32*nairobi joined #nim
06:20:40ftsf_aww i like them
06:21:21*nairobi_ joined #nim
06:22:03*nairobi quit (Ping timeout: 276 seconds)
06:22:54*endragor quit (Remote host closed the connection)
06:26:59*Trustable joined #nim
06:34:24*Aidan_R joined #nim
06:35:12*Aidan_R quit (Client Quit)
06:37:11*nairobi_ quit (Read error: Connection timed out)
06:37:56*gokr joined #nim
06:38:03*nairobi joined #nim
06:39:31*Arrrr joined #nim
06:39:31*Arrrr quit (Changing host)
06:39:31*Arrrr joined #nim
06:40:08ftsf_hmm repr(mytuple) has the same result with Field0, Field1, but $mytuple shows the field names
06:40:18*nairobi quit (Remote host closed the connection)
06:47:01*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:57:07*hendi__ joined #nim
06:57:27*mcc quit (Quit: Connection closed for inactivity)
06:59:23*brechtm joined #nim
07:02:59*nairobi joined #nim
07:03:31*hooo joined #nim
07:03:33hooofuck y'all
07:03:38hooowrong channel sorry
07:04:15hooook what i wanted to ask: why should i use nim if it uses a GC? obviously the nim GC wont be as good as a GC like java which ppl have worked on for 30 years
07:04:40hooodont say that nim's GC is optional, we all know that nobody writes all their nim code GC-less
07:05:18ftsf_I don't think about the GC, and i use nim because it's nice to write in nim, unlike java
07:05:45hoooyeah but nim has no IDE, no intellinse, much less libraries and support
07:05:53hooono debugger
07:06:05ftsf_gdb
07:06:22ftsf_I don't use an IDE anyway, much nicer working in a text editor
07:06:44hooowell ur wrong
07:07:27ldleworkaporia, nimedit, nimlime
07:07:37ftsf_no one forcing you to use nim
07:07:44ftsf_but i'm enjoying it more than any other language i've used
07:08:08ldleworkhooo, also you might know that Nim's GC is optional but did you also know that it is regulatable as well?
07:08:18ldleworkThat is, you can control how long it runs for?
07:08:27ftsf_that is a nice feature
07:08:50ldleworkIf you were making a game for example, you could compute how much frametime you have left over for your target FPS and allow the GC to run exactly for that duration
07:09:04hoooidlework, sounds like a GC that isnt good enough in general
07:09:07ldleworkThis seems to address most of the concerns I've heard over GC
07:09:20ldleworkhooo, well you've lost me because I don't know how you conclude that from what I said
07:09:33ldleworkWhich leads me to believe you might be unreasonable and here to just troll
07:09:35hoooyou said it's tuneable. Why would i need to tune a perfect GC
07:09:44ldleworkI just explained why.
07:09:47ftsf_hooo said it's perfect?
07:09:56ftsf_no GC is perfect for every case
07:09:58hoooyeah because the GC isnt good enough in games apparently, that's what you said
07:10:02girvohooo: I've written a heck of a lot of code in Nim without GC. Solid trolling though, that's some old-school IRC trolling behaviour lol
07:10:07girvoHaven't seen that in years
07:10:09ldleworkhooo, this avoids a problem that even java suffers.
07:10:18hooogirvo: please show me a project that is 100% gc-less
07:10:40ldleworkthe JVM is very configurable but to get the same benefit its much harder to tweak the JVM for this case
07:10:45*nsf joined #nim
07:10:57girvohooo: It's an internal project at my place of work for an embedded system
07:11:04ldleworkin other words, the API that exposes the Nim GC is pretty darn easy to use
07:11:08hoooi dont want to tweak a GC, that is the entire reason i would switch to a language like Nim
07:11:10hoooor rust
07:11:11girvoEffectivley used as a "nicer C" really
07:11:54girvoBtw: there's no such thing as a perfect GC, in any language
07:11:55ftsf_i'm making a realtime game in nim and using the GC with default settings, no issues no thought to it, runs super fast.
07:11:58ldleworkhooo, well no GC is "perfect" in the sense that you never have to think about it, if you're actually worried about the use cases wherein any GC at all would bear upon its performance
07:12:22hooook so ur telling me that if i write a program "gc-less" in Nim it will be just as great and easy to write as a gc'ed Nim?
07:12:33girvoIn the same way that there's no such thing as a "sufficiently smart compiler" (yet!)
07:12:35ftsf_and if it ever is an issue, then I can tweak it
07:12:48girvoOh cute, moving the goal-posts when trolling is one of my favourite hobbies :D
07:12:50ldleworkhooo, they literally just explained the specific use-case in which GC-less Nim works fine as a nicer C
07:13:00*ldlework pokes Xe
07:13:00hoooi dont use a compile-to-native language just so i can eventually be forced to tune stuff again
07:13:52ftsf_hooo, what are you hoping to achieve?
07:14:05girvoTrolling is a art, and hooo you're a artist for sure
07:14:22hoooso where are the nim sample programs? am i supposed to learn 2 languages now, where one of them is hidden and barely documented? where is this documentation for how to write gc-less Nim?
07:14:26ldleworkeh, pretty lame if you ask me
07:14:53ldleworkTrolling is an art of subtley. hooo's lures are pretty mundane.
07:15:06ldleworkAnd nothing we don't hear on a regular basis.
07:15:09hoooim not a troll, please answer the question instead of spamming the channel with accusations
07:15:23ldleworkhooo, you don't seem very amenable to the answers you seek
07:15:49hoooim not going to get into a discussion about my character, if you wanna help please answer my question
07:16:05ldleworkYour character has nothing to do with your behavior in the channel
07:16:17ldleworkWhich bears a lot on whether percieve your inquiries as genuine or not
07:16:28hooook i get it, you wont answer
07:16:32hooothen please stop responding
07:17:06ldleworkhooo, the difference is a lack of integration of the information you recieve once its offered
07:17:38ldleworknot an unwillingness to serve earnest curiosity. we're not idiots.
07:19:33girvoI'm done for today! catch you all tomorrow <3
07:23:16*endragor joined #nim
07:25:31*girvo quit (Ping timeout: 265 seconds)
07:27:51*endragor quit (Ping timeout: 265 seconds)
07:28:52*space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…)
07:32:01*girvo joined #nim
07:36:00*space-wizard joined #nim
07:40:42*girvo quit (Ping timeout: 276 seconds)
07:44:50*girvo joined #nim
07:45:55*endragor joined #nim
07:47:17*endragor quit (Remote host closed the connection)
07:47:29hoooif i wanted to use a gc why wouldnt i just use java or c#
07:50:56*endragor joined #nim
07:51:24def-hooo: you can read about other Nim features on the website and also http://nim-lang.org/learn.html
07:52:30def-hooo: also, java and c# run in a vm
07:52:59Araqhe entered with "fuck y'all". if that's not a troll then I dunno who is.
07:53:13Araqwrong channel or not.
07:53:15*hendi__ quit (Ping timeout: 264 seconds)
07:53:46def-Oh, I guess I should read back in log before answering
07:54:20*nairobi quit (Ping timeout: 244 seconds)
07:57:43*nairobi joined #nim
07:59:23*girvo quit (Ping timeout: 258 seconds)
08:00:26*girvo joined #nim
08:01:07*yglukhov joined #nim
08:06:24veganskHow can I use asyncdispatch with unittest? In my test, it hangs on this line: https://gist.github.com/vegansk/2b3a652cdb64c32d0c35f67419b3a49d#file-test_http-nim-L12
08:09:46veganskAfter that line, not on it
08:09:55Araqwell test it without unittest first then please. I seriously don't know why unittest.nim is so popular.
08:10:40Araqit does all sort of crazy things
08:11:09flyxAraq: surely because people sooner or later search for a unit testing framework and only find unittest
08:11:17*girvo quit (Ping timeout: 250 seconds)
08:11:59Araqyeah good point.
08:12:00veganskIt's time to write asynctest module :-)
08:13:30ftsf_Araq, yeah that's why I used unittest
08:13:49ftsf_https://howistart.org/posts/nim/1 actually this is why
08:13:54ArrrrWhat crazy things does unittest do?
08:14:02ftsf_can blame this blog entry
08:14:27*hooo left #nim (#nim)
08:15:02AraqArrrr: just read its code and see for yourself
08:15:41*endragor quit (Remote host closed the connection)
08:15:43Araqfor me it's a stress test for nested templates, macros and system.compiles
08:16:07Araqand it shouldn't be a stress test on its own.
08:16:28ftsf_that said, the interface it exposes is quite pleasant to use
08:17:56*space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:18:50flyxyeah, the code was quite… interesting when I had a look at it yesterday. but users do not care how it is implemented as long as it works
08:19:21*nairobi quit (Read error: Connection reset by peer)
08:19:57*nairobi joined #nim
08:20:15euantorYeah, I use the unittest module because I come from other languages where unit tests are encouraged, and the core module is the first thing that comes up when searching Google
08:20:17*nairobi quit (Remote host closed the connection)
08:20:46euantorThe interface it exposes is very nice too, as mentioned above
08:20:53ftsf_Araq, is there a better unit testing module around?
08:21:22AraqI don't discourage (unit) testing at all, it's just that I think no "framework" can do it justice
08:21:22ftsf_https://github.com/nim-lang/Nim/wiki/Testing "Use unittest"
08:21:53*endragor joined #nim
08:22:12Araqfor simple tests I use 'when isMainModule' + doAssert
08:22:27Araqthough doAssert's output could be much better
08:22:53euantorYeah, I do like that approach too
08:23:09Araqfor complex tests I write a tester.
08:23:22euantorI tend to use unit tests to test single procs and types, then have a `when isMainModule` section that tests the overall logic together
08:23:35Araqlike testament for Nim or the unnamed tester for c2nim
08:24:01Araqok, you can argue these are "integration tests" then but who cares.
08:24:15euantorI just wish I had more time to work on Nim stuff. Unfortunately I'm still forced to use C# at work ;)
08:25:28AraqC# is an impressive language. I just wish they didn't start off with Java as the foundation.
08:25:32*Arrrr quit (Ping timeout: 240 seconds)
08:25:39*bjz joined #nim
08:25:45Araqit still shows, no 'typedef' wtf
08:28:10*GustavoLapasta joined #nim
08:29:56gokrSidenote: I was skimming the unit test library of Racket the other day, Racket seems to have lots of solid stuff to look at.
08:30:00veganskFound the problem :-) Method was "get", not "GET". unittest works well with asyncdispatch
08:31:52Araqdon't we an enum for this reason? shouldn't "get" work too?
08:32:33Araqalso unittest does work well these days but it took some effort to get there and when it fails it's hard to find the cause
08:32:53Araqplus knowing its implementation, I don't trust it :P
08:33:26Araqyou're an expert if you know enough about a system to be scared.
08:34:26veganskAraq, there is no enum, reqMethod field type is string
08:35:09Araqstill. your server should accept "get" too, http is case insensitive
08:36:01def-Araq: http header names are case-insensitive, but http methods are case sensitive
08:36:15*endragor quit (Remote host closed the connection)
08:36:23Araqreally? oh well.
08:36:41def-http://www.ietf.org/rfc/rfc2616.txt 5.1.1
08:37:10Araqso ironic that you cannot give an anchor to this section
08:37:17def-haha, no html
08:38:30euantorThe HTTP specification is actually pretty well written, having read other specs
08:38:46euantorI was pleasantly surprised when I first looked at it
08:39:35*endragor joined #nim
08:41:16*cheatfate joined #nim
08:41:33Araqha, I shall never respect ascii based protocols.
08:41:34cheatfateAraq, i want to ask you about https://github.com/nim-lang/Nim/pull/4645
08:41:52Araqyes?
08:42:27cheatfatethere type conversion has been made why this can cause recursion?
08:42:27euantorI deal with a lot of weird protocols, most sent over RS232
08:42:55euantorMy day job is writing systems to integrate with building management systems, fire alarms and healthcare systems. Some of the protocols we see can be truly bizarre
08:43:26*Arrrr joined #nim
08:43:26*Arrrr quit (Changing host)
08:43:26*Arrrr joined #nim
08:43:46*nairobi joined #nim
08:45:55cheatfateAraq, this is just alias function which calls appropriate variant of proc in ioselectors.
08:48:10Araqcheatfate: that seems to be a bug in the overloading resolution, easily fixed with unknown consequences
08:48:26Araqcreate a test case for it
08:50:41*girvo joined #nim
08:55:18*girvo quit (Ping timeout: 244 seconds)
09:05:07*kunev quit (Ping timeout: 244 seconds)
09:05:56*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:07:41*kunev joined #nim
09:08:15cheatfateAraq, `AsyncEvent` was declared as `AsyncEvent = SelectEvent` (without distinct) maybe i forgot to add `distinct` so why this overload not works?
09:10:27*bjz joined #nim
09:11:54Araqoh yeah, sure.
09:12:11AraqI talked about a different bug. which seems to cause no breakage
09:14:10*ftsf_ quit (Quit: :q!)
09:16:20cheatfateso `objectA = objectB` do not cause overloading?
09:16:59Araqhow would that work?
09:17:03Araqthey are the same
09:18:20cheatfatebut they have different names
09:18:39cheatfate:)
09:23:38chemist69How do I define multiple dependencies in the new nimble nimscript format?
09:23:48chemist69Using a comma separated list gives me an error:
09:23:52chemist69requires "nim >= 0.14.2, strfmt >= 0.8.0"
09:24:08euantor`requires "nim >= 0.14.2", "strfmt >= 0.8.0"`
09:24:11euantorI believe
09:24:25Araqor multiple 'requires' calls.
09:24:28euantorOr you can use multiple lines of `requires "nim >= 0.14.2"`
09:24:56Araq"the new format" is Nim code. ;-)
09:25:05*Demon_Fox quit (Quit: Leaving)
09:25:17chemist69Thanks, multiple lines work.
09:26:08chemist69Using requires as a block like in const or var does not work.
09:30:10Araqwhere in the Nim manual do I find this "requires" block? Nimscript is 100% Nim syntax, it uses the same frontend.
09:32:13chemist69I just thought that maybe two consecutive calls to `requires` could be replaced by a block, like it is possible for `const` or `var`
09:33:50chemist69I am not claiming that it is stated anywhere that this should work, sorry for not being clear.
09:34:25Araqno, my point is: the idea is that you would not have these thoughts since there is no new syntax at all
09:34:52*endragor quit (Remote host closed the connection)
09:37:16chemist69Okay, I understand.
09:42:00Araqmaybe the docs mislead you?
09:45:13*endragor joined #nim
09:51:29*girvo joined #nim
09:55:24chemist69No, I now saw that requires is just a procedure defined in the nimscript module, not a keyword like const or var. Please just forget what I wrote before... :)
09:56:33*girvo quit (Ping timeout: 276 seconds)
09:57:11*girvo joined #nim
09:58:56cheatfateAraq, its funny because compiler don't allow overloading of `not distinct` types... overload.nim(21, 18) Error: ambiguous call; both overload.overloadProc(bt: BaseType) and overload.overloadProc(osbt: OverloadSimpleType) match for: (BaseType)
10:00:39cheatfateso upcoming/asyncdispatch.nim must not be compiled
10:01:03Araqthe compiler allows it if you use different modules
10:01:12cheatfateaha
10:01:24Araqand then uses scoping rules
10:01:50Araqthis needs to be documented. or perhaps even removed.
10:02:18Araqwhat do you mean? "must not be compiled"? I merged the PR
10:02:24*girvo quit (Ping timeout: 276 seconds)
10:02:25Araqit's fine now.
10:04:41cheatfateAraq, "must not be compiled" is said before "the compiler allows it if you use different modules"...
10:05:35Araqhow could it disallow it? module A does this, module B does that. where is the connection?
10:05:55cheatfateAraq, and the better way for this PR was `type AsyncEvent = distinct SelectEvent` but i will make new PR sooner
10:09:00cheatfate`OverloadType = OtherType` overloading cant be compiled when all happens in one module... i thought upcoming async must be failed with same error, but you said compiler allow it when declaration made in different modules
10:13:37*cheatfate quit (Quit: Leaving)
10:45:32*vendethiel- quit (Ping timeout: 265 seconds)
10:49:33veganskIs there any reason why there is no recv function in asyncnet, that uses external buffer to receive data and returns Future[void]?
10:50:18veganskOops, it must return Future[int], not Future[void]
10:58:14*girvo joined #nim
11:03:30*girvo quit (Ping timeout: 276 seconds)
11:04:15*endragor quit (Remote host closed the connection)
11:04:37*nairobi_ joined #nim
11:07:04*nairobi quit (Ping timeout: 252 seconds)
11:12:39*Arrrr quit (Quit: WeeChat 1.5)
11:14:08*endragor joined #nim
11:14:08*recook joined #nim
11:15:03*recook quit (Client Quit)
11:21:28*nairobi_ quit (Read error: No route to host)
11:21:42*brechtm_ joined #nim
11:21:47*nairobi joined #nim
11:22:03*brechtm quit (Ping timeout: 264 seconds)
11:28:09*nairobi quit (Ping timeout: 260 seconds)
11:35:03*nairobi joined #nim
11:41:10*girvo joined #nim
11:45:39*girvo quit (Ping timeout: 260 seconds)
11:54:43euantor@Araq I just watched your video from PolyConf 16 about async voodoo. Great talk, really helped understand how the async stuff works. I don't recall seeing it on the site at any point though, was this intentional? is it because the video is on a channel not controlled by Nim?
11:59:02*brechtm joined #nim
12:02:06*brechtm_ quit (Ping timeout: 250 seconds)
12:09:02*nairobi quit (Remote host closed the connection)
12:10:19*nairobi joined #nim
12:16:59*nairobi quit (Remote host closed the connection)
12:18:40*arnetheduck joined #nim
12:30:55*sangress_ joined #nim
12:31:56*nairobi joined #nim
12:34:18*nairobi quit (Remote host closed the connection)
12:39:05*nairobi joined #nim
12:42:00*girvo joined #nim
12:42:25*nairobi_ joined #nim
12:43:36*nairobi quit (Ping timeout: 276 seconds)
12:46:51*girvo quit (Ping timeout: 276 seconds)
12:51:56SentreenIs there a way to extract a filename from a given File "object"?
12:53:53def-It's not really an object, just a pointer to a C FILE file handle
12:54:05def-so I would not expect a way
12:55:04def-And even if you could, it might not even be a valid filename anymore. Maybe the file was moved to another location and in the old place there is a totally different file, but the handle is still open
12:56:03SentreenTrue, though the latter is a non-issue in my case
12:56:23def-I guess you'll have to keep track of the name manually
12:56:30*nairobi joined #nim
12:57:06SentreenI was hoping to avoid that, but I don't really see another way. Thanks
12:58:22*nairobi_ quit (Read error: Connection timed out)
12:58:24ftsfSentreen, yeah, file handles are detached from their names, a file can have many names, or none anyway.
13:05:02*krux02 joined #nim
13:11:42*nsf quit (Quit: WeeChat 1.5)
13:12:57*nairobi quit (Read error: Connection timed out)
13:14:01*nairobi joined #nim
13:30:14*nairobi quit (Read error: Connection timed out)
13:31:17*PMunch joined #nim
13:31:38*nairobi joined #nim
13:42:53*girvo joined #nim
13:45:02*hendi__ joined #nim
13:47:03*girvo quit (Ping timeout: 240 seconds)
14:14:24*pregressive joined #nim
14:18:58*GangstaCat joined #nim
14:24:56*arnetheduck quit (Ping timeout: 244 seconds)
14:43:49*girvo joined #nim
14:48:12*girvo quit (Ping timeout: 244 seconds)
15:21:33*chemist69 quit (Quit: WeeChat 1.5)
15:23:38gokrdaft question: Can I call a varargs proc with... a seq somehow?
15:24:20hendi__json.nim(836) [] --> tables.nim(110) [] --> tableimpl.nim(43) rawGet
15:24:21hendi__SIGSEGV: Illegal storage access. (Attempt to read from nil?)
15:24:25hendi__Any idea what might cause this?
15:27:57Araqgokr: yes via p(a) where a is the seq and p takes a varargs
15:28:13Araqthe basetype must fit of course
15:29:26Araqhendi__: not without a test snippet
15:33:23hendi__Araq, trying to build a minimal test case
15:37:43*endragor quit (Remote host closed the connection)
15:40:30*chemist69 joined #nim
15:40:41*brson joined #nim
15:44:39*girvo joined #nim
15:46:15*gokr quit (Ping timeout: 265 seconds)
15:47:17*nairobi quit (Remote host closed the connection)
15:48:30*gokr joined #nim
15:49:00*girvo quit (Ping timeout: 244 seconds)
15:53:02gokrAraq: Thanks
15:53:26hendi__@Araq:
15:53:32hendi__let foo = "502 Bad Gateway"
15:53:37hendi__let data = parseJson(foo)
15:53:46hendi__let bar = data["msg"].getStr()
15:54:09Araqdo I look like an issue tracker?
15:54:37hendi__nvm, I'll file issue+PR
15:54:47Araqthat's the spirit, ty
15:55:14gokrAraq: And... the libui wrapper - do you have scripts to run it or? I think he did a lot of work after you generated it.
15:55:49Araqyup, in fact I'm not sure I pushed my c2nim improvements
15:56:21Araqbut it was automated
15:56:56*GustavoLapasta quit (Read error: Connection reset by peer)
15:56:59Araqcan push it later, it also needs to become a nimble package
15:57:08gokrDid you ever try out the "test" binary in libui? It's ... smack full of stuff
15:57:20*GustavoLapasta joined #nim
15:57:22gokrYou build it with "make tester" in the build dir.
15:58:00Araqdon't remember
15:58:40gokrIt's not the controllgallery that you ported.
15:58:46gokrThis one has TONS more.
15:59:36gokrIt has cairo samples and ... lots.
16:07:10*chemist69 quit (Quit: WeeChat 1.5)
16:09:42kierI assume you can't import C preprocessor macros or C enum members with the Nim FFI?
16:09:48*chemist69 joined #nim
16:11:05Araqyou can, via .header
16:12:36gokrHe... nim.community - never heard of that site
16:13:33gokr(and its down now, but... google had some cached stuff)
16:14:02kieroh right
16:14:07kierthey have to be declared as var though, correct?
16:16:44Araqyes
16:22:26*nairobi joined #nim
16:26:35*nairobi quit (Ping timeout: 250 seconds)
16:43:17*space-wizard joined #nim
16:44:50*sangress_ quit (Ping timeout: 264 seconds)
16:45:33*girvo joined #nim
16:47:49*kulelu88 joined #nim
16:49:52*girvo quit (Ping timeout: 240 seconds)
16:54:44*brechtm quit (Remote host closed the connection)
16:55:51*yglukhov quit (Ping timeout: 265 seconds)
16:56:09*endragor joined #nim
17:00:41*endragor quit (Ping timeout: 265 seconds)
17:05:24*girvo joined #nim
17:09:55*girvo quit (Ping timeout: 250 seconds)
17:11:56*gokr quit (Ping timeout: 250 seconds)
17:28:54*Trustable quit (Remote host closed the connection)
17:34:25hendi__Araq, turns out the issue was in front of the computer, not within Nim
17:35:00hendi__I'll try to come up with some documentation to help other nim noobs avoid this gotcha
17:36:20*yglukhov joined #nim
17:36:31*hendi__ is now known as hendi
17:41:18*yglukhov quit (Ping timeout: 276 seconds)
17:43:36*namnguyen quit (Remote host closed the connection)
17:55:34*endragor joined #nim
17:55:52*ofelas quit (Quit: shutdown -h now)
17:59:38*namnguyen joined #nim
17:59:48*ofelas joined #nim
17:59:55*namnguyen quit (Remote host closed the connection)
18:00:02*endragor quit (Ping timeout: 250 seconds)
18:00:16*Subspice joined #nim
18:04:50*euantor quit (Quit: Connection closed for inactivity)
18:06:18*girvo joined #nim
18:06:55*nairobi joined #nim
18:10:04SubspiceNot sure if this is the right place to ask this but is Nim in Action appropriate for someone who has only worked through K&R and done a few small games in C (pong, tetris, etc)?
18:10:29*namnguyen joined #nim
18:11:01CalinouI think the book does cover the basics
18:11:12*girvo quit (Ping timeout: 276 seconds)
18:11:19AraqNim in Action is appropriate and Nim is the right language for you. :-)
18:12:23SubspiceAlright, excellent :) I asked because I read this on the Manning website: "About the reader: This book assumes you’re a working developer proficient with another language like Java, Ruby, Python, C#, or C++."
18:13:10Calinouwell, Python is not hard for example :P
18:13:50Araqwell you found this IRC channel. we'll help you get your new improved Pokemon Go App implemented.
18:14:11SubspiceHaha! ^_^
18:16:01*stisa joined #nim
18:17:00dom96Subspice: Hey!
18:17:09Subspicehello author! :)
18:17:21dom96That should really say "This book assumes you know/have experience with at least one other programming language"
18:17:37SubspiceOh alright well in that case I can definitely use the book
18:17:56dom96The book simply isn't a complete beginner's book
18:18:12SubspiceWhich makes me suer excited because I _really_ am not psyched at all about C
18:18:20Subspicesuper*
18:19:46dom96Great :)
18:20:01dom96Like Araq said, feel free to ask questions here.
18:20:49kulelu88there was talk of Araq promising an amazing, Go-beating HTTP lib yesterday
18:20:59kulelu88not sure how true this is :D
18:21:08Subspice=)
18:21:16SubspiceThank you
18:21:36AraqGo doesn't win these benchmarks.
18:21:53Subspicedom96: Do you think the book will be out before 2017?
18:22:05AraqI dunno where you got these ideas from, it never was 1st on any benchmark that I can remember.
18:22:16dom96Subspice: Depends what you mean by "out" :)
18:22:31dom96There is no chance of it being printed before 2017
18:22:38dom96But the ebook should be complete way before
18:22:46kulelu88we don't want Nim to be number 1, we just Nim to be good enough to not need Go :)
18:22:53dom96(I'm editing Chapter 9 right now)
18:22:59AraqI mean ok, libman from time to time post some links here and apparently never even looks at them and claims Go the winner
18:23:10Araqbut seriously.
18:23:41SubspiceAh ok, I was asking about the printed version. Although I may be able to get in on the action sooner, assuming I can get that iPad I may be given relatively soon...
18:23:46Calinouhi dom96
18:23:52dom96hello Calinou!
18:23:56*nairobi quit (Remote host closed the connection)
18:23:57Calinoudom96: I'm not sure what's left exactly to do for the website… a community page, a documentation page, and then?
18:24:07Calinouneeds download instructions for each platform too
18:24:49kulelu88Araq: if raw power was what was needed, assembly would be the language of choice
18:25:02Calinouforum theming is needed too
18:25:29dom96Calinou: news article pages (should be simple, but styling things like the article title and date will need to be done)
18:26:07Calinouyes, news need to be ported too
18:26:19Araqas far as I was told Nim's "wanted" beats Go's performance. and yes, it uses all your cores.
18:26:31dom96Araq: Should we just move to Jekyll fully?
18:26:45krux02kulelu88: I wrote not that long ago a few macros that gave Nim to power of Go's interface type, so one more step in the direction to not need go anymore ;)
18:27:06dom96Calinou: I still would like some sort of style for "showcase panels" on the front page.
18:27:31dom96Calinou: But I feel like that would require some extensive design work
18:28:05dom96Calinou: A panel showing our sponsors is a must, with a link to our sponsors page (which is another page you need to create :))
18:28:11Araqkulelu88: "good enough" for me means async event loop + multiple processes and we have that since quite some time
18:28:11Calinouright
18:28:24dom96Calinou: Basically the equivalent of the ugly yellow thing we have on the front page right now
18:28:30Araqbut benchmarks wouldn't allow multi processing or something.
18:28:55kulelu88I'm looking into it right now
18:29:20kulelu88Does that mean the Nim standard HTTP lib is decent/usable for production? Araq
18:29:21Calinoudom96: if it's only visible by scrolling, is that a problem?
18:29:27dom96Calinou: nope
18:29:27CalinouI'd rather not add a carousel
18:29:30Calinouok
18:29:34dom96Calinou: yeah, no carousel
18:29:54dom96just differently coloured panels down the page
18:30:24Araqkulelu88: your forum runs with it with no known problems since months. (right, dom96?)
18:30:30Araqer
18:30:33Araq*our forum
18:30:43Calinoudoes Nim's HTTP stack have gzip compression support?
18:30:49dom96indeed
18:31:06dom96I haven't had to fix anything in the forum for years
18:31:21dom96well, maybe that's a bit of an exaggeration
18:31:24dom96but many months at least :)
18:31:28dom96Calinou: nope
18:31:37Calinou:(
18:31:42Calinouno HTTP 2.0, I believe, too?
18:31:47dom96Why would that be necessary?
18:31:50*euantor joined #nim
18:31:51Calinouspeed
18:31:52dom96Just rever proxy with nginx
18:31:55dom96*reverse
18:31:57Calinouright
18:32:05CalinouI wasn't aware you could gzip-compress using reverse proxy
18:32:10*gokr joined #nim
18:32:18Araqwhy wouldn't you?
18:32:19dom96I'm sure you can
18:32:29dom96of course Nim<->nginx won't be gzipped
18:32:39CalinouAraq: I thought the process that was proxied to had to do the gzip compression
18:32:41*GustavoLapasta quit (Quit: Leaving)
18:32:43dom96but nginx<->user can be trivially gzipped
18:32:50federico3same for SSL,.you don't implement this stuff in the webapp
18:32:57dom96yep
18:33:11Araqwell actually you do. because benchmarks.
18:34:57federico3??
18:34:58*brson quit (Ping timeout: 258 seconds)
18:35:14dom96federico3: how's the package site going?
18:36:01euantorI'm working on the design, will be trying to finish that tonight
18:42:49dom96euantor: awesome
18:45:40federico3dom96: http://nimble.directory/pkg/nimyaml tale a look ;)
18:45:47*nairobi joined #nim
18:46:15dom96nice nice
18:46:38dom96still no style insensitive search though ;)
18:48:19Araqyeah, we need to remove this feature from Nim. nobody can implement x.replace("_","").tolower() in his favourite editor. that's just technology from the future which doesn't exist. yadda yadda yadda
18:48:41*nairobi quit (Remote host closed the connection)
18:49:47Araqspeaking of which ... does nimble search support it? :P
18:49:58*yglukhov joined #nim
18:50:47euantorIdeally it'd use full text search on a database really, which would probably be better once the package index grows to much larger sizes
18:51:13dom96Araq: damn, I guess not.
18:52:10*GangstaCat quit (Quit: Leaving)
18:52:13Araq"full text search"? you mean with stemming and stuff?
18:52:25Araqthat too hasn't been invented yet, unfortunately.
18:52:31euantorYes
18:52:46euantorAs in proper search, not just string comparison
18:53:26Araqbut but but but, 'grep' doesn't know about it
18:54:05euantorGrep does regex instead, which I guess the site could also do
18:54:32euantorBut then how do you handle when a single user uses a stupidly complex pattern with backtracks all over that takes up CPU time?
18:54:52*nairobi joined #nim
18:55:17Araquse a non-backtracking regex implementation?
18:55:44euantorIs the one in the stdlib non-backtracking?
18:56:00Araqno, it's pcre
18:56:11euantorDidn't think so
18:56:46Araqwe need a native nim regex implementation.
18:56:46euantorYou could easily cheat for search by putting the package list into a MySQL or Postgres database and using their full text search capabilities
18:57:24Araqthat's what I wanted to do from the beginning but instead we got json on github
18:58:02euantorThat's probably how I would have designed it, and still provide a JSON interface so the package list can be cached locally
18:58:09*GangstaCat joined #nim
18:58:28euantorDeveloping the web interface would also be trivial then
18:59:08Araqwell reading the json is not exactly harder than reading from a database
18:59:34Araqin fact, most web apps use json for data exchange. I fail to see your point.
18:59:41euantorYeah, but caching a JSON file locally in case the web service goes offline is easy
19:00:04euantorOh, you mean for the web service. True
19:00:28*nairobi quit (Remote host closed the connection)
19:00:47*girvo joined #nim
19:05:34*girvo quit (Ping timeout: 252 seconds)
19:12:38*dddddd joined #nim
19:14:50*Subspice quit ()
19:15:26*endragor joined #nim
19:18:27*nairobi joined #nim
19:19:46*endragor quit (Ping timeout: 250 seconds)
19:21:47*nsf joined #nim
19:21:51*nairobi quit (Remote host closed the connection)
19:22:10*nairobi joined #nim
19:22:19*libman joined #nim
19:23:06*yglukhov quit (Read error: Connection reset by peer)
19:23:42*yglukhov joined #nim
19:25:52*nairobi_ joined #nim
19:26:34*nairobi quit (Ping timeout: 265 seconds)
19:27:04*nairobi_ quit (Remote host closed the connection)
19:28:01*nairobi joined #nim
19:28:44*yglukhov quit (Remote host closed the connection)
19:29:20*yglukhov joined #nim
19:33:54*yglukhov quit (Ping timeout: 265 seconds)
19:41:09krux02I am currently using c2nim, and it skipps forward declarations of structs, how do I do that in Nim?
19:44:18kierhttps://gist.github.com/kierdavis/c6aae40e685d32c8d3c27f5993d5ce3e
19:44:33kierwhy do I get an error "value of type 'GateKind' has to be discarded on line 11"?
19:46:36krux02kier: probably it works better when you do a var and then assign it instead of using an expression
19:47:17kierthat does work, but it doesn't feel as clean :p
19:48:07Araqraise ...; gateNot
19:49:14kierAraq: "statement not allowed after 'return', 'break', 'raise' or 'continue'"
19:49:33Araqah the compiler is smart and stupid at the same time
19:49:49kierhehe
19:49:50Araqkrux02: use .noforward: on or rearrange things
19:50:16Araqand don't complain if noforward blows up
19:50:26krux02ok I am warned ;)
19:52:53krux02is there any documentation about noforward, because right now I don't even know what it is supposed to do
19:53:53Araqlook at my wxWidgets wrapper
19:55:12*libman quit (Read error: Connection reset by peer)
19:56:34chemist69kier: you could also use a table: {"NOT": gateNot, "AND": gateAnd}.toTable
19:56:49chemist69kind = kindstr["NOT"]
19:57:05Araq'case' statement is faster though
19:57:21kiertrue
19:57:28chemist69Okay.
19:57:34*nairobi quit (Remote host closed the connection)
20:01:37*girvo joined #nim
20:02:27kierproc raiseValue[T](e: ref Exception) = raise e
20:02:34kierraiseValue[GateKind](newException(...))
20:03:01kier(should be a ": T" return type in the first line)
20:06:12*girvo quit (Ping timeout: 258 seconds)
20:07:55*GangstaCat quit (Quit: Leaving)
20:09:34*libman joined #nim
20:13:01*nairobi joined #nim
20:19:46*yglukhov joined #nim
20:21:59*libman quit (Read error: Connection reset by peer)
20:28:44*nairobi quit (Read error: Connection timed out)
20:29:44*nairobi joined #nim
20:33:19*hendi quit (Ping timeout: 244 seconds)
20:34:14*nairobi quit (Ping timeout: 265 seconds)
20:34:52*nairobi joined #nim
20:37:31*brson joined #nim
20:39:12*libman joined #nim
20:51:04*Trustable joined #nim
20:51:26*nairobi quit (Read error: Connection timed out)
20:52:23*nairobi joined #nim
21:02:33*girvo joined #nim
21:06:48*girvo quit (Ping timeout: 250 seconds)
21:08:22*jonafato- is now known as jonafato
21:09:12*pregressive quit ()
21:10:02*nairobi quit (Remote host closed the connection)
21:24:09*Jesin quit (Quit: Leaving)
21:36:42*Trustable quit (Remote host closed the connection)
21:43:58*cheatfate joined #nim
22:03:24*girvo joined #nim
22:08:04*girvo quit (Ping timeout: 260 seconds)
22:13:15*girvo joined #nim
22:17:34*girvo quit (Ping timeout: 250 seconds)
22:19:04*desophos joined #nim
22:28:40*girvo joined #nim
22:33:11*girvo quit (Ping timeout: 244 seconds)
22:52:58*cheatfate quit (Ping timeout: 250 seconds)
22:54:59*stisa quit (Quit: quitting...)
22:56:13*girvo joined #nim
23:08:45*PMunch quit (Quit: leaving)
23:10:19*girvo quit (Ping timeout: 252 seconds)
23:12:00*girvo joined #nim
23:17:06*endragor joined #nim
23:18:04*girvo quit (Ping timeout: 260 seconds)
23:21:15*endragor quit (Ping timeout: 244 seconds)
23:24:54*yglukhov quit (Remote host closed the connection)
23:34:43*libman quit (Quit: Leaving.)
23:34:55*libman joined #nim
23:45:36*girvo joined #nim
23:47:41*Demon_Fox joined #nim
23:56:33*mcc joined #nim
23:56:56*michael_campbell quit (Quit: ZNC 1.6.1 - http://znc.in)
23:58:54*endragor joined #nim