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:00 | girvo | Xe: I'm somewhat working on one, well, cleaning up the built-in httpclient anyway |
00:16:21 | girvo | Xe: though that's only because I needed a decent HTTP message parser that doesn't care about transport ;) |
00:18:05 | libman | I'm having a really bizarre bug... http://pastebin.com/JWkSNscB |
00:18:38 | libman | Nim'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:40 | libman | It looked to be working, but now I observe that for some numbers it works and for some it doesn't... |
00:20:24 | kulelu88 | girvo the messiah has arrived |
00:21:10 | * | nairobi joined #nim |
00:23:41 | * | GangstaCat quit (Quit: Leaving) |
00:24:59 | libman | http://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:57 | libman | Someone competent should write a well-tested addCommas for Nim stdlib... |
00:26:22 | libman | (or fix fmt) |
00:29:18 | libman | Bah, found it. I knew it was something stupid. Second replace argument should just be "$1," |
00:31:55 | libman | And 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:15 | ftsf_ | 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:20 | ftsf_ | is this intentional? |
05:47:12 | * | endragor quit (Remote host closed the connection) |
05:53:36 | * | endragor joined #nim |
05:54:05 | ftsf_ | "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:48 | vegansk | ftsf_, seems that the tuples with named fields will be deprecated soon. Araq, am I right? |
06:17:32 | * | nairobi joined #nim |
06:20:40 | ftsf_ | 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:08 | ftsf_ | 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:33 | hooo | fuck y'all |
07:03:38 | hooo | wrong channel sorry |
07:04:15 | hooo | ok 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:40 | hooo | dont say that nim's GC is optional, we all know that nobody writes all their nim code GC-less |
07:05:18 | ftsf_ | I don't think about the GC, and i use nim because it's nice to write in nim, unlike java |
07:05:45 | hooo | yeah but nim has no IDE, no intellinse, much less libraries and support |
07:05:53 | hooo | no debugger |
07:06:05 | ftsf_ | gdb |
07:06:22 | ftsf_ | I don't use an IDE anyway, much nicer working in a text editor |
07:06:44 | hooo | well ur wrong |
07:07:27 | ldlework | aporia, nimedit, nimlime |
07:07:37 | ftsf_ | no one forcing you to use nim |
07:07:44 | ftsf_ | but i'm enjoying it more than any other language i've used |
07:08:08 | ldlework | hooo, also you might know that Nim's GC is optional but did you also know that it is regulatable as well? |
07:08:18 | ldlework | That is, you can control how long it runs for? |
07:08:27 | ftsf_ | that is a nice feature |
07:08:50 | ldlework | If 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:04 | hooo | idlework, sounds like a GC that isnt good enough in general |
07:09:07 | ldlework | This seems to address most of the concerns I've heard over GC |
07:09:20 | ldlework | hooo, well you've lost me because I don't know how you conclude that from what I said |
07:09:33 | ldlework | Which leads me to believe you might be unreasonable and here to just troll |
07:09:35 | hooo | you said it's tuneable. Why would i need to tune a perfect GC |
07:09:44 | ldlework | I just explained why. |
07:09:47 | ftsf_ | hooo said it's perfect? |
07:09:56 | ftsf_ | no GC is perfect for every case |
07:09:58 | hooo | yeah because the GC isnt good enough in games apparently, that's what you said |
07:10:02 | girvo | hooo: 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:07 | girvo | Haven't seen that in years |
07:10:09 | ldlework | hooo, this avoids a problem that even java suffers. |
07:10:18 | hooo | girvo: please show me a project that is 100% gc-less |
07:10:40 | ldlework | the 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:57 | girvo | hooo: It's an internal project at my place of work for an embedded system |
07:11:04 | ldlework | in other words, the API that exposes the Nim GC is pretty darn easy to use |
07:11:08 | hooo | i dont want to tweak a GC, that is the entire reason i would switch to a language like Nim |
07:11:10 | hooo | or rust |
07:11:11 | girvo | Effectivley used as a "nicer C" really |
07:11:54 | girvo | Btw: there's no such thing as a perfect GC, in any language |
07:11:55 | ftsf_ | 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:58 | ldlework | hooo, 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:22 | hooo | ok 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:33 | girvo | In the same way that there's no such thing as a "sufficiently smart compiler" (yet!) |
07:12:35 | ftsf_ | and if it ever is an issue, then I can tweak it |
07:12:48 | girvo | Oh cute, moving the goal-posts when trolling is one of my favourite hobbies :D |
07:12:50 | ldlework | hooo, 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:00 | hooo | i dont use a compile-to-native language just so i can eventually be forced to tune stuff again |
07:13:52 | ftsf_ | hooo, what are you hoping to achieve? |
07:14:05 | girvo | Trolling is a art, and hooo you're a artist for sure |
07:14:22 | hooo | so 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:26 | ldlework | eh, pretty lame if you ask me |
07:14:53 | ldlework | Trolling is an art of subtley. hooo's lures are pretty mundane. |
07:15:06 | ldlework | And nothing we don't hear on a regular basis. |
07:15:09 | hooo | im not a troll, please answer the question instead of spamming the channel with accusations |
07:15:23 | ldlework | hooo, you don't seem very amenable to the answers you seek |
07:15:49 | hooo | im not going to get into a discussion about my character, if you wanna help please answer my question |
07:16:05 | ldlework | Your character has nothing to do with your behavior in the channel |
07:16:17 | ldlework | Which bears a lot on whether percieve your inquiries as genuine or not |
07:16:28 | hooo | ok i get it, you wont answer |
07:16:32 | hooo | then please stop responding |
07:17:06 | ldlework | hooo, the difference is a lack of integration of the information you recieve once its offered |
07:17:38 | ldlework | not an unwillingness to serve earnest curiosity. we're not idiots. |
07:19:33 | girvo | I'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:29 | hooo | if i wanted to use a gc why wouldnt i just use java or c# |
07:50:56 | * | endragor joined #nim |
07:51:24 | def- | hooo: you can read about other Nim features on the website and also http://nim-lang.org/learn.html |
07:52:30 | def- | hooo: also, java and c# run in a vm |
07:52:59 | Araq | he entered with "fuck y'all". if that's not a troll then I dunno who is. |
07:53:13 | Araq | wrong channel or not. |
07:53:15 | * | hendi__ quit (Ping timeout: 264 seconds) |
07:53:46 | def- | 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:24 | vegansk | How 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:46 | vegansk | After that line, not on it |
08:09:55 | Araq | well test it without unittest first then please. I seriously don't know why unittest.nim is so popular. |
08:10:40 | Araq | it does all sort of crazy things |
08:11:09 | flyx | Araq: 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:59 | Araq | yeah good point. |
08:12:00 | vegansk | It's time to write asynctest module :-) |
08:13:30 | ftsf_ | Araq, yeah that's why I used unittest |
08:13:49 | ftsf_ | https://howistart.org/posts/nim/1 actually this is why |
08:13:54 | Arrrr | What crazy things does unittest do? |
08:14:02 | ftsf_ | can blame this blog entry |
08:14:27 | * | hooo left #nim (#nim) |
08:15:02 | Araq | Arrrr: just read its code and see for yourself |
08:15:41 | * | endragor quit (Remote host closed the connection) |
08:15:43 | Araq | for me it's a stress test for nested templates, macros and system.compiles |
08:16:07 | Araq | and it shouldn't be a stress test on its own. |
08:16:28 | ftsf_ | 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:50 | flyx | yeah, 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:15 | euantor | Yeah, 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:46 | euantor | The interface it exposes is very nice too, as mentioned above |
08:20:53 | ftsf_ | Araq, is there a better unit testing module around? |
08:21:22 | Araq | I don't discourage (unit) testing at all, it's just that I think no "framework" can do it justice |
08:21:22 | ftsf_ | https://github.com/nim-lang/Nim/wiki/Testing "Use unittest" |
08:21:53 | * | endragor joined #nim |
08:22:12 | Araq | for simple tests I use 'when isMainModule' + doAssert |
08:22:27 | Araq | though doAssert's output could be much better |
08:22:53 | euantor | Yeah, I do like that approach too |
08:23:09 | Araq | for complex tests I write a tester. |
08:23:22 | euantor | I 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:35 | Araq | like testament for Nim or the unnamed tester for c2nim |
08:24:01 | Araq | ok, you can argue these are "integration tests" then but who cares. |
08:24:15 | euantor | I just wish I had more time to work on Nim stuff. Unfortunately I'm still forced to use C# at work ;) |
08:25:28 | Araq | C# 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:45 | Araq | it still shows, no 'typedef' wtf |
08:28:10 | * | GustavoLapasta joined #nim |
08:29:56 | gokr | Sidenote: 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:00 | vegansk | Found the problem :-) Method was "get", not "GET". unittest works well with asyncdispatch |
08:31:52 | Araq | don't we an enum for this reason? shouldn't "get" work too? |
08:32:33 | Araq | also 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:53 | Araq | plus knowing its implementation, I don't trust it :P |
08:33:26 | Araq | you're an expert if you know enough about a system to be scared. |
08:34:26 | vegansk | Araq, there is no enum, reqMethod field type is string |
08:35:09 | Araq | still. your server should accept "get" too, http is case insensitive |
08:36:01 | def- | 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:23 | Araq | really? oh well. |
08:36:41 | def- | http://www.ietf.org/rfc/rfc2616.txt 5.1.1 |
08:37:10 | Araq | so ironic that you cannot give an anchor to this section |
08:37:17 | def- | haha, no html |
08:38:30 | euantor | The HTTP specification is actually pretty well written, having read other specs |
08:38:46 | euantor | I was pleasantly surprised when I first looked at it |
08:39:35 | * | endragor joined #nim |
08:41:16 | * | cheatfate joined #nim |
08:41:33 | Araq | ha, I shall never respect ascii based protocols. |
08:41:34 | cheatfate | Araq, i want to ask you about https://github.com/nim-lang/Nim/pull/4645 |
08:41:52 | Araq | yes? |
08:42:27 | cheatfate | there type conversion has been made why this can cause recursion? |
08:42:27 | euantor | I deal with a lot of weird protocols, most sent over RS232 |
08:42:55 | euantor | My 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:55 | cheatfate | Araq, this is just alias function which calls appropriate variant of proc in ioselectors. |
08:48:10 | Araq | cheatfate: that seems to be a bug in the overloading resolution, easily fixed with unknown consequences |
08:48:26 | Araq | create 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:15 | cheatfate | Araq, `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:54 | Araq | oh yeah, sure. |
09:12:11 | Araq | I talked about a different bug. which seems to cause no breakage |
09:14:10 | * | ftsf_ quit (Quit: :q!) |
09:16:20 | cheatfate | so `objectA = objectB` do not cause overloading? |
09:16:59 | Araq | how would that work? |
09:17:03 | Araq | they are the same |
09:18:20 | cheatfate | but they have different names |
09:18:39 | cheatfate | :) |
09:23:38 | chemist69 | How do I define multiple dependencies in the new nimble nimscript format? |
09:23:48 | chemist69 | Using a comma separated list gives me an error: |
09:23:52 | chemist69 | requires "nim >= 0.14.2, strfmt >= 0.8.0" |
09:24:08 | euantor | `requires "nim >= 0.14.2", "strfmt >= 0.8.0"` |
09:24:11 | euantor | I believe |
09:24:25 | Araq | or multiple 'requires' calls. |
09:24:28 | euantor | Or you can use multiple lines of `requires "nim >= 0.14.2"` |
09:24:56 | Araq | "the new format" is Nim code. ;-) |
09:25:05 | * | Demon_Fox quit (Quit: Leaving) |
09:25:17 | chemist69 | Thanks, multiple lines work. |
09:26:08 | chemist69 | Using requires as a block like in const or var does not work. |
09:30:10 | Araq | where in the Nim manual do I find this "requires" block? Nimscript is 100% Nim syntax, it uses the same frontend. |
09:32:13 | chemist69 | I 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:50 | chemist69 | I am not claiming that it is stated anywhere that this should work, sorry for not being clear. |
09:34:25 | Araq | no, 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:16 | chemist69 | Okay, I understand. |
09:42:00 | Araq | maybe the docs mislead you? |
09:45:13 | * | endragor joined #nim |
09:51:29 | * | girvo joined #nim |
09:55:24 | chemist69 | No, 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:56 | cheatfate | Araq, 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:39 | cheatfate | so upcoming/asyncdispatch.nim must not be compiled |
10:01:03 | Araq | the compiler allows it if you use different modules |
10:01:12 | cheatfate | aha |
10:01:24 | Araq | and then uses scoping rules |
10:01:50 | Araq | this needs to be documented. or perhaps even removed. |
10:02:18 | Araq | what do you mean? "must not be compiled"? I merged the PR |
10:02:24 | * | girvo quit (Ping timeout: 276 seconds) |
10:02:25 | Araq | it's fine now. |
10:04:41 | cheatfate | Araq, "must not be compiled" is said before "the compiler allows it if you use different modules"... |
10:05:35 | Araq | how could it disallow it? module A does this, module B does that. where is the connection? |
10:05:55 | cheatfate | Araq, and the better way for this PR was `type AsyncEvent = distinct SelectEvent` but i will make new PR sooner |
10:09:00 | cheatfate | `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:33 | vegansk | Is there any reason why there is no recv function in asyncnet, that uses external buffer to receive data and returns Future[void]? |
10:50:18 | vegansk | Oops, 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:43 | euantor | @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:56 | Sentreen | Is there a way to extract a filename from a given File "object"? |
12:53:53 | def- | It's not really an object, just a pointer to a C FILE file handle |
12:54:05 | def- | so I would not expect a way |
12:55:04 | def- | 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:03 | Sentreen | True, though the latter is a non-issue in my case |
12:56:23 | def- | I guess you'll have to keep track of the name manually |
12:56:30 | * | nairobi joined #nim |
12:57:06 | Sentreen | I 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:24 | ftsf | Sentreen, 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:38 | gokr | daft question: Can I call a varargs proc with... a seq somehow? |
15:24:20 | hendi__ | json.nim(836) [] --> tables.nim(110) [] --> tableimpl.nim(43) rawGet |
15:24:21 | hendi__ | SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
15:24:25 | hendi__ | Any idea what might cause this? |
15:27:57 | Araq | gokr: yes via p(a) where a is the seq and p takes a varargs |
15:28:13 | Araq | the basetype must fit of course |
15:29:26 | Araq | hendi__: not without a test snippet |
15:33:23 | hendi__ | 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:02 | gokr | Araq: Thanks |
15:53:26 | hendi__ | @Araq: |
15:53:32 | hendi__ | let foo = "502 Bad Gateway" |
15:53:37 | hendi__ | let data = parseJson(foo) |
15:53:46 | hendi__ | let bar = data["msg"].getStr() |
15:54:09 | Araq | do I look like an issue tracker? |
15:54:37 | hendi__ | nvm, I'll file issue+PR |
15:54:47 | Araq | that's the spirit, ty |
15:55:14 | gokr | Araq: 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:49 | Araq | yup, in fact I'm not sure I pushed my c2nim improvements |
15:56:21 | Araq | but it was automated |
15:56:56 | * | GustavoLapasta quit (Read error: Connection reset by peer) |
15:56:59 | Araq | can push it later, it also needs to become a nimble package |
15:57:08 | gokr | Did you ever try out the "test" binary in libui? It's ... smack full of stuff |
15:57:20 | * | GustavoLapasta joined #nim |
15:57:22 | gokr | You build it with "make tester" in the build dir. |
15:58:00 | Araq | don't remember |
15:58:40 | gokr | It's not the controllgallery that you ported. |
15:58:46 | gokr | This one has TONS more. |
15:59:36 | gokr | It has cairo samples and ... lots. |
16:07:10 | * | chemist69 quit (Quit: WeeChat 1.5) |
16:09:42 | kier | I assume you can't import C preprocessor macros or C enum members with the Nim FFI? |
16:09:48 | * | chemist69 joined #nim |
16:11:05 | Araq | you can, via .header |
16:12:36 | gokr | He... nim.community - never heard of that site |
16:13:33 | gokr | (and its down now, but... google had some cached stuff) |
16:14:02 | kier | oh right |
16:14:07 | kier | they have to be declared as var though, correct? |
16:16:44 | Araq | yes |
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:25 | hendi__ | Araq, turns out the issue was in front of the computer, not within Nim |
17:35:00 | hendi__ | 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:04 | Subspice | Not 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:01 | Calinou | I think the book does cover the basics |
18:11:12 | * | girvo quit (Ping timeout: 276 seconds) |
18:11:19 | Araq | Nim in Action is appropriate and Nim is the right language for you. :-) |
18:12:23 | Subspice | Alright, 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:10 | Calinou | well, Python is not hard for example :P |
18:13:50 | Araq | well you found this IRC channel. we'll help you get your new improved Pokemon Go App implemented. |
18:14:11 | Subspice | Haha! ^_^ |
18:16:01 | * | stisa joined #nim |
18:17:00 | dom96 | Subspice: Hey! |
18:17:09 | Subspice | hello author! :) |
18:17:21 | dom96 | That should really say "This book assumes you know/have experience with at least one other programming language" |
18:17:37 | Subspice | Oh alright well in that case I can definitely use the book |
18:17:56 | dom96 | The book simply isn't a complete beginner's book |
18:18:12 | Subspice | Which makes me suer excited because I _really_ am not psyched at all about C |
18:18:20 | Subspice | super* |
18:19:46 | dom96 | Great :) |
18:20:01 | dom96 | Like Araq said, feel free to ask questions here. |
18:20:49 | kulelu88 | there was talk of Araq promising an amazing, Go-beating HTTP lib yesterday |
18:20:59 | kulelu88 | not sure how true this is :D |
18:21:08 | Subspice | =) |
18:21:16 | Subspice | Thank you |
18:21:36 | Araq | Go doesn't win these benchmarks. |
18:21:53 | Subspice | dom96: Do you think the book will be out before 2017? |
18:22:05 | Araq | I dunno where you got these ideas from, it never was 1st on any benchmark that I can remember. |
18:22:16 | dom96 | Subspice: Depends what you mean by "out" :) |
18:22:31 | dom96 | There is no chance of it being printed before 2017 |
18:22:38 | dom96 | But the ebook should be complete way before |
18:22:46 | kulelu88 | we don't want Nim to be number 1, we just Nim to be good enough to not need Go :) |
18:22:53 | dom96 | (I'm editing Chapter 9 right now) |
18:22:59 | Araq | I 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:10 | Araq | but seriously. |
18:23:41 | Subspice | Ah 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:46 | Calinou | hi dom96 |
18:23:52 | dom96 | hello Calinou! |
18:23:56 | * | nairobi quit (Remote host closed the connection) |
18:23:57 | Calinou | dom96: I'm not sure what's left exactly to do for the website… a community page, a documentation page, and then? |
18:24:07 | Calinou | needs download instructions for each platform too |
18:24:49 | kulelu88 | Araq: if raw power was what was needed, assembly would be the language of choice |
18:25:02 | Calinou | forum theming is needed too |
18:25:29 | dom96 | Calinou: news article pages (should be simple, but styling things like the article title and date will need to be done) |
18:26:07 | Calinou | yes, news need to be ported too |
18:26:19 | Araq | as far as I was told Nim's "wanted" beats Go's performance. and yes, it uses all your cores. |
18:26:31 | dom96 | Araq: Should we just move to Jekyll fully? |
18:26:45 | krux02 | kulelu88: 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:06 | dom96 | Calinou: I still would like some sort of style for "showcase panels" on the front page. |
18:27:31 | dom96 | Calinou: But I feel like that would require some extensive design work |
18:28:05 | dom96 | Calinou: 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:11 | Araq | kulelu88: "good enough" for me means async event loop + multiple processes and we have that since quite some time |
18:28:11 | Calinou | right |
18:28:24 | dom96 | Calinou: Basically the equivalent of the ugly yellow thing we have on the front page right now |
18:28:30 | Araq | but benchmarks wouldn't allow multi processing or something. |
18:28:55 | kulelu88 | I'm looking into it right now |
18:29:20 | kulelu88 | Does that mean the Nim standard HTTP lib is decent/usable for production? Araq |
18:29:21 | Calinou | dom96: if it's only visible by scrolling, is that a problem? |
18:29:27 | dom96 | Calinou: nope |
18:29:27 | Calinou | I'd rather not add a carousel |
18:29:30 | Calinou | ok |
18:29:34 | dom96 | Calinou: yeah, no carousel |
18:29:54 | dom96 | just differently coloured panels down the page |
18:30:24 | Araq | kulelu88: your forum runs with it with no known problems since months. (right, dom96?) |
18:30:30 | Araq | er |
18:30:33 | Araq | *our forum |
18:30:43 | Calinou | does Nim's HTTP stack have gzip compression support? |
18:30:49 | dom96 | indeed |
18:31:06 | dom96 | I haven't had to fix anything in the forum for years |
18:31:21 | dom96 | well, maybe that's a bit of an exaggeration |
18:31:24 | dom96 | but many months at least :) |
18:31:28 | dom96 | Calinou: nope |
18:31:37 | Calinou | :( |
18:31:42 | Calinou | no HTTP 2.0, I believe, too? |
18:31:47 | dom96 | Why would that be necessary? |
18:31:50 | * | euantor joined #nim |
18:31:51 | Calinou | speed |
18:31:52 | dom96 | Just rever proxy with nginx |
18:31:55 | dom96 | *reverse |
18:31:57 | Calinou | right |
18:32:05 | Calinou | I wasn't aware you could gzip-compress using reverse proxy |
18:32:10 | * | gokr joined #nim |
18:32:18 | Araq | why wouldn't you? |
18:32:19 | dom96 | I'm sure you can |
18:32:29 | dom96 | of course Nim<->nginx won't be gzipped |
18:32:39 | Calinou | Araq: I thought the process that was proxied to had to do the gzip compression |
18:32:41 | * | GustavoLapasta quit (Quit: Leaving) |
18:32:43 | dom96 | but nginx<->user can be trivially gzipped |
18:32:50 | federico3 | same for SSL,.you don't implement this stuff in the webapp |
18:32:57 | dom96 | yep |
18:33:11 | Araq | well actually you do. because benchmarks. |
18:34:57 | federico3 | ?? |
18:34:58 | * | brson quit (Ping timeout: 258 seconds) |
18:35:14 | dom96 | federico3: how's the package site going? |
18:36:01 | euantor | I'm working on the design, will be trying to finish that tonight |
18:42:49 | dom96 | euantor: awesome |
18:45:40 | federico3 | dom96: http://nimble.directory/pkg/nimyaml tale a look ;) |
18:45:47 | * | nairobi joined #nim |
18:46:15 | dom96 | nice nice |
18:46:38 | dom96 | still no style insensitive search though ;) |
18:48:19 | Araq | yeah, 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:47 | Araq | speaking of which ... does nimble search support it? :P |
18:49:58 | * | yglukhov joined #nim |
18:50:47 | euantor | Ideally 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:13 | dom96 | Araq: damn, I guess not. |
18:52:10 | * | GangstaCat quit (Quit: Leaving) |
18:52:13 | Araq | "full text search"? you mean with stemming and stuff? |
18:52:25 | Araq | that too hasn't been invented yet, unfortunately. |
18:52:31 | euantor | Yes |
18:52:46 | euantor | As in proper search, not just string comparison |
18:53:26 | Araq | but but but but, 'grep' doesn't know about it |
18:54:05 | euantor | Grep does regex instead, which I guess the site could also do |
18:54:32 | euantor | But 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:17 | Araq | use a non-backtracking regex implementation? |
18:55:44 | euantor | Is the one in the stdlib non-backtracking? |
18:56:00 | Araq | no, it's pcre |
18:56:11 | euantor | Didn't think so |
18:56:46 | Araq | we need a native nim regex implementation. |
18:56:46 | euantor | You 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:24 | Araq | that's what I wanted to do from the beginning but instead we got json on github |
18:58:02 | euantor | That'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:28 | euantor | Developing the web interface would also be trivial then |
18:59:08 | Araq | well reading the json is not exactly harder than reading from a database |
18:59:34 | Araq | in fact, most web apps use json for data exchange. I fail to see your point. |
18:59:41 | euantor | Yeah, but caching a JSON file locally in case the web service goes offline is easy |
19:00:04 | euantor | Oh, 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:09 | krux02 | I am currently using c2nim, and it skipps forward declarations of structs, how do I do that in Nim? |
19:44:18 | kier | https://gist.github.com/kierdavis/c6aae40e685d32c8d3c27f5993d5ce3e |
19:44:33 | kier | why do I get an error "value of type 'GateKind' has to be discarded on line 11"? |
19:46:36 | krux02 | kier: probably it works better when you do a var and then assign it instead of using an expression |
19:47:17 | kier | that does work, but it doesn't feel as clean :p |
19:48:07 | Araq | raise ...; gateNot |
19:49:14 | kier | Araq: "statement not allowed after 'return', 'break', 'raise' or 'continue'" |
19:49:33 | Araq | ah the compiler is smart and stupid at the same time |
19:49:49 | kier | hehe |
19:49:50 | Araq | krux02: use .noforward: on or rearrange things |
19:50:16 | Araq | and don't complain if noforward blows up |
19:50:26 | krux02 | ok I am warned ;) |
19:52:53 | krux02 | is there any documentation about noforward, because right now I don't even know what it is supposed to do |
19:53:53 | Araq | look at my wxWidgets wrapper |
19:55:12 | * | libman quit (Read error: Connection reset by peer) |
19:56:34 | chemist69 | kier: you could also use a table: {"NOT": gateNot, "AND": gateAnd}.toTable |
19:56:49 | chemist69 | kind = kindstr["NOT"] |
19:57:05 | Araq | 'case' statement is faster though |
19:57:21 | kier | true |
19:57:28 | chemist69 | Okay. |
19:57:34 | * | nairobi quit (Remote host closed the connection) |
20:01:37 | * | girvo joined #nim |
20:02:27 | kier | proc raiseValue[T](e: ref Exception) = raise e |
20:02:34 | kier | raiseValue[GateKind](newException(...)) |
20:03:01 | kier | (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 |