<< 11-06-2017 >>

00:16:37*enthus1ast quit (Ping timeout: 258 seconds)
00:20:50*Matthias247 quit (Read error: Connection reset by peer)
00:27:41*yingjun joined #nim
00:31:50*yingjun quit (Ping timeout: 240 seconds)
00:56:57*gokr quit (Ping timeout: 260 seconds)
01:05:13*gokr joined #nim
01:20:59*ElPresidente joined #nim
01:21:26*yglukhov joined #nim
01:25:27*yglukhov quit (Ping timeout: 240 seconds)
01:28:32*vlad1777d quit (Remote host closed the connection)
01:28:34*libman quit (Quit: Connection closed for inactivity)
01:31:52*Trustable quit (Remote host closed the connection)
01:32:53*enthus1ast joined #nim
01:34:17*ElPresidenteP joined #nim
01:36:42*ElPresidente quit (Ping timeout: 268 seconds)
01:56:47*chemist69 quit (Ping timeout: 246 seconds)
02:10:40*chemist69 joined #nim
02:24:47*ElPresidenteP quit (Ping timeout: 246 seconds)
02:29:30*yingjun joined #nim
02:34:09*yingjun quit (Ping timeout: 255 seconds)
02:34:50*ElPresidente joined #nim
02:40:02*gokr quit (Quit: Leaving.)
03:30:02*arnetheduck joined #nim
03:42:05*ElPresidente quit (Ping timeout: 258 seconds)
03:51:09FromGitter<Varriount> @zacharycarter Do you know any C libraries for handling http encodings and such?
03:52:29FromGitter<zacharycarter> @Varriount hrm not off the top of my head, I'll ask around
03:52:47FromGitter<Varriount> I'm at the "implement request authorization" part of my aws library, and the Nim http library is very low-level
03:55:16FromGitter<zacharycarter> @Varriount maybe : https://github.com/nodejs/http-parser
03:55:17FromGitter<zacharycarter> ?
03:55:57FromGitter<Varriount> Hm, that's a parser. I need an emitter
03:56:04FromGitter<zacharycarter> ah okay
03:56:38*ElPresidente joined #nim
03:57:13FromGitter<Varriount> Failing a C library, I need a good reference on how to do things like form-encoding the body of a request
03:59:15FromGitter<zacharycarter> @Varriount would https://github.com/andreaferretti/rosencrantz work?
03:59:27*Trioxin quit (Quit: Konversation terminated!)
03:59:35FromGitter<Varriount> Hm, actually, that might work.
04:00:05FromGitter<Varriount> Hopefully there's some http-encoding procedures there.
04:00:10FromGitter<Varriount> Thanks @zacharycarter !
04:00:19FromGitter<zacharycarter> anytime buddy
04:00:24*ElPresidenteP joined #nim
04:01:23FromGitter<Varriount> I get the feeling this AWS project is going to take a while... There's a lot of low-level stuff that Amazon hasn't documented about the API
04:01:30*ElPresidente quit (Ping timeout: 240 seconds)
04:01:42FromGitter<Varriount> So I have to look at the official implementations.
04:04:19*zachcarter joined #nim
04:05:38FromGitter<Varriount> @yglukhov Are you still working on your AWS library? I found https://github.com/aidansteele/aws_sdk.nim
04:07:00*yingjun joined #nim
04:11:05*Neomex quit (Quit: Leaving)
04:11:21*yingjun quit (Ping timeout: 255 seconds)
04:16:10*ElPresidenteP quit (Ping timeout: 240 seconds)
04:16:36*ElPresidente joined #nim
04:20:42*ElPresidente quit (Ping timeout: 240 seconds)
04:20:42*ElPresidenteP joined #nim
04:20:42*ElPresidenteP quit (Remote host closed the connection)
04:46:38*bahtiyar_ joined #nim
05:00:42*pilne quit (Quit: Quitting!)
05:07:22*Trioxin joined #nim
05:07:50TrioxinNim is the perfect language to code virii
05:08:00Trioxinnot that I do that
05:08:57FromGitter<Varriount> Trioxin: Wouldn't the GC be a giveaway for heuristics though?
05:09:47TrioxinVarriount, would provide some easy fingerprint?
05:11:27Trioxinyou can always obfuscate or encrypt it. There are cryptors out there you can buy to that end. How does GC make it vulnerable to detection? It's an interesting topic.
05:13:30Trioxinyou could disable the GC
05:21:25Trioxindoes the GC make it easy to disassemble Nim binaries? Like .NET reflector?
05:32:21AraqTrioxin: no it doesn't
05:44:20*Arrrr joined #nim
05:45:23Trioxindoes anyone know of a simple job queue/task manager sort of nimble package?
05:45:48TrioxinI have my own I coded but I don't like it much.
05:50:45ArrrrThat confidence
05:57:43Trioxinmeh. problem. using fastRows(): https://nim-lang.org/docs/db_mysql.html I pass in a table name like: for ipRow in dbTun.fastRows(sql"SELECT `IP` FROM ?", poolName): but there's a problem. When it inserts the string argument with ?, it adds single quotes which is only appropriate for passing string values and I'm trying to reference a table name.
05:58:27Trioxinshould I just concatenate it in or is there a better way?
06:02:17Trioxinhrm. doesn't let me
06:02:50Trioxincan't do this? for ipRow in dbTun.fastRows(sql"SELECT `IP` FROM " & poolName):
06:04:41FromGitter<Varriount> Trioxin: Hm?
06:05:16Trioxinnvm. just had to add extra () around the query string
06:14:33*WhiskyRyan joined #nim
06:34:04*zachcarter quit (Quit: zachcarter)
06:36:29*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:37:37AraqTrioxin: can you add a note to db_mysql's docs for this? it comes up quite often -.-
06:38:49*WhiskyRyan joined #nim
06:44:58*nsf joined #nim
06:52:08Trioxinaraq, sure
06:53:38Trioxinso much less lines of code for each script I port to Nim. such better performance
07:01:26*rauss quit (Quit: WeeChat 1.8)
07:05:50Trioxinyes! my api is serving up requests many times faster. finally
07:08:46TrioxinI'm not sure how I should port this last bit. It's a script that iterates through tens of thousands of mysql tables to generate 2 config files when a change is made. I want to speed up this process as it's quite slow right now in PHP. Not sure if I should keep relying on mysql or keep the configs in my program memory to write them to disk quickly.
07:09:11Trioxintens of thousands of mysql rows in several tables rather
07:09:31*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:11:21AraqI would stick to the mysql-based solution, could mean eventually you can update it incrementally instead of this batch processing
07:15:03*yglukhov joined #nim
07:28:24*couven92 joined #nim
07:37:23*bahtiyar_ quit (Quit: Lost terminal)
07:37:40*bahtiyar_ joined #nim
07:37:48*rokups joined #nim
07:45:44*vlad1777d joined #nim
07:57:58*yglukhov quit (Remote host closed the connection)
07:58:55*alxf joined #nim
08:09:37*yingjun joined #nim
08:14:05*yingjun quit (Ping timeout: 240 seconds)
08:38:23*gokr joined #nim
08:41:26*Vladar joined #nim
08:44:21*martincohen joined #nim
08:44:29martincohenhello awesome awesome people
08:50:02*gokr quit (Ping timeout: 246 seconds)
08:59:30*bahtiyar_ quit (Ping timeout: 240 seconds)
09:00:38*vendethiel joined #nim
09:03:19*bahtiyar joined #nim
09:10:11*yglukhov joined #nim
09:13:47*ofelas joined #nim
09:17:48*Trioxin quit (Ping timeout: 240 seconds)
09:20:35*nhywyll joined #nim
09:27:05FromGitter<Varriount> Hello marvelous martincohen
09:34:54martincohen<3 I have a question: is there a variant of `echo` that would add spaces to output between the items? (`echo "hello", "world" > hello world`)
09:49:22*yglukhov quit ()
09:51:21*gokr joined #nim
09:51:36ArrrrNo, but it is a good idea. Sometimes i miss that.
09:51:55ArrrrOn the other hand, it is not hard to make your own
09:52:54*yglukhov joined #nim
09:54:56martincohen@Arrrr, yep, good to know, I try to make my own then. I was just curious if there isn't already a solution in Nim's guts.
09:55:29martincohenalso it's been two days of me fighting this strange bug: https://forum.nim-lang.org/t/2995/1#18834 and I don't seem to find a good solution nor reason to the behavior
09:59:28*nhywyll quit (Quit: nhywyll)
09:59:39*nhywyll joined #nim
10:11:40*yingjun joined #nim
10:14:49*nhywyll quit (Quit: nhywyll)
10:15:03*nhywyll joined #nim
10:16:22*yingjun quit (Ping timeout: 260 seconds)
10:27:18*rokups quit (Quit: Connection closed for inactivity)
10:45:10*nhywyll quit (Remote host closed the connection)
10:45:20*nhywyll joined #nim
10:52:09*Arrrr quit (Read error: Connection reset by peer)
10:56:04*nsf quit (Quit: WeeChat 1.7.1)
11:02:52*Snircle joined #nim
11:06:47*vlad1777d quit (Remote host closed the connection)
11:07:30*bahtiyar quit (Ping timeout: 240 seconds)
11:11:32*couven92 quit (Quit: Client disconnecting)
11:18:00FromGitter<Varriount> martincohen: That looks like a compiler bug. I can't think of any reason such code would be invalid.
11:18:19FromGitter<Varriount> Untyped templates are supposed to allow untyped/undeclared expressions to be passed in.
11:20:16Araqit's not a bug, the generic requires a 'mixin' declaration
11:23:14Araqtype BatchArg = Batch or ref Batch is not a good idea, code bloat
11:26:41FromGitter<Varriount> Araq: But the template isn't event referencing the generic.
11:28:36*nhywyll quit (Quit: nhywyll)
11:28:37Araqwell alternatively you can move the 'template' to the outer scoping level and then it works too ;-)
11:28:50*vlad1777d joined #nim
11:29:34AraqI guess you can call that a bug but the problem is the generic lookup phase, not the template
11:45:42*joshbaptiste quit (Ping timeout: 240 seconds)
12:04:37*zachcarter joined #nim
12:04:51*xet7 quit (Quit: Leaving)
12:09:06*xet7 joined #nim
12:10:06*xet7 quit (Remote host closed the connection)
12:12:34*joshbaptiste joined #nim
12:13:17*rokups joined #nim
12:47:44*bahtiyar joined #nim
12:50:16*bahtiyar quit (Remote host closed the connection)
12:53:19*bahtiyar joined #nim
12:55:21*bahtiyar quit (Remote host closed the connection)
13:10:12*ofelas quit (Ping timeout: 260 seconds)
13:12:54*pilne joined #nim
13:15:25*Tiberium joined #nim
13:15:34*yingjun joined #nim
13:16:03*ofelas joined #nim
13:20:07*yingjun quit (Ping timeout: 260 seconds)
13:25:14*martin_cohen joined #nim
13:28:10*martincohen quit (Ping timeout: 240 seconds)
13:41:55FromGitter<zacharycarter> ugh I almost have hotreloading working - but for some reason after I reload my dll the main thread seems to hang
13:43:47demi-does it do this on all platforms?
13:44:35FromGitter<zacharycarter> haven't tired anything other than osx yet
13:44:38FromGitter<zacharycarter> tried*
13:48:15*onionhammer1 quit (Ping timeout: 255 seconds)
13:59:26Araqzacharycarter: do you use 'nimrtl.dll'?
14:00:54Araqcause you should
14:05:37*arnetheduck quit (Ping timeout: 260 seconds)
14:06:56FromGitter<Varriount> Araq: Do methods work in DLLs yet?
14:07:27Araqnah
14:07:43*adeohluwa joined #nim
14:08:07FromGitter<zacharycarter> @Araq yes I am - I believe so anyway
14:08:22FromGitter<zacharycarter> I think it's probably something in my update loop that is blocking things as the example I found online works fine
14:08:31*libman joined #nim
14:09:20FromGitter<Varriount> Araq: By the way, are consecutive string additions ("a" & "b" & "c") optimized at all?
14:09:36Araqyes
14:10:55Araqit's mapped to `&`("a", "b", "c") and then gets love in the codegen
14:12:54FromGitter<Varriount> Oh good.
14:13:17FromGitter<Varriount> Araq: The AWS signing protocol involves lots of appending.
14:15:17*onionhammer joined #nim
14:15:33*Trustable joined #nim
14:18:18Araqsounds like an "efficient" protocol
14:18:51FromGitter<Varriount> Araq: And *so* well documented! I only have to look at two different implementations to find all the corner cases.
14:19:17Araqwhat is AWS btw?
14:20:02FromGitter<shmup> amazon web services. a whole bunch of em
14:20:33FromGitter<shmup> https://aws.amazon.com/products/
14:23:49FromGitter<Varriount> Araq: I'm attempting to write an AWS API library.
14:24:27FromGitter<Varriount> If I can, Nim would have a much better chance of being used in workplaces.
14:24:30FromGitter<Varriount> (Like mine)
14:25:02FromGitter<Varriount> The C++ AWS library is huge and makes heavy use of templating (blech)
14:25:27*geotre joined #nim
14:25:35FromGitter<Varriount> Java, Python, C#, Javascript, and PHP are the other alternatives.
14:25:45Araqah ok, good you work on that then
14:51:35*dddddd joined #nim
15:02:13*Tiberium quit (Remote host closed the connection)
15:17:12onionhammervarriount try nimclibpp
15:17:21onionhammer;-)
15:17:24*yingjun joined #nim
15:19:43*xet7 joined #nim
15:22:32*yingjun quit (Ping timeout: 245 seconds)
15:41:01*evizaer joined #nim
15:48:27*themagician joined #nim
15:57:23evizaerI've been looking through game dev libraries the past couple of days. It seems like nimgame and frag don't really care about conciseness. Lots of extra initialization needed which must be done on separate lines. Too much discard.
15:58:06evizaerI may look through nimgame source and pull out stuff that I want and get rid of the architectural stuff that seems to lead to code bloat.
15:58:46FromGitter<Varriount> onionhammer: Can't seem to find it. Nothing appears when I search for it.
15:59:27evizaerI was hoping I'd find libraries that would make use of macros and templates to significantly reduce boilerplate, but so far I've seen plenty of boilerplate.
16:00:24evizaerDo most nimmers come from C/C++ and not python/ruby?
16:01:04FromGitter<Varriount> evizaer: Well, there's only so much you can do with templates without making things look "magical"
16:01:16Araqevizaer: I think it's 50-50 but I have no actual numbers
16:01:26Araqwas this covered by our poll last year?
16:01:28FromGitter<Varriount> evizaer: Have you looked at Jester and Rosencrantz?
16:01:54FromGitter<Varriount> Nim still tends to be a lot more concise than Java or C#
16:01:59evizaerHeard the names but didn't think they were gamedev-related. I'm only trying to do 2D stuff, btw.
16:02:31evizaerI am a professional C# dev. The C# I write is about as concise as nim.
16:03:22FromGitter<Varriount> evizaer: Ah. Those libraries are web application libraries.
16:03:24evizaerLibrary design in nim is very OO.
16:04:05evizaerI thought people would lean more towards a kind of light OO + FP style based on nim's syntax and general style.
16:04:21Araqevizaer: OO is hard to kill. :-/ I agree with your criticism.
16:04:26FromGitter<Varriount> Howso? Multiple inheritance isn't used nearly as much as it is in other languages.
16:04:47evizaerThe fact that there's a lot of incremental object construction over multiple lines, and object mutation.
16:05:20FromGitter<Varriount> As opposed to? The same thing happens in C code.
16:05:26Araqbut my Nim is MUCH more concise than my C# :P
16:05:47FromGitter<Varriount> (to the detriment of readability)^
16:06:06evizaerAs opposed to functions that return meaningful values and minimize mutation, which is a more modern style.
16:06:37evizaerOr at least naive partial use of FP principles seems to be the modern way.
16:07:00FromGitter<Varriount> evizaer: Wouldn't that put a higher burden on memory management?
16:07:35evizaerI'd rather have the runtime doing the memory management as much as possible. Nim's GC is supposedly quite good.
16:07:55evizaerand small, quickly disposed objects are the easiest to GC
16:07:57FromGitter<Varriount> Yes, but it's not as high-throughput as, say, a bump allocating GC
16:08:23evizaerif you use immutability strategies like those used by the data structures in Clojure, you can have immutability and minimal memory impact.
16:08:44evizaerIt's still not as good a memory footprint as manually mutating stuff.
16:09:09evizaerBut it's not as bad as immutability tends to cause in a GC'd OO language
16:09:12FromGitter<Varriount> evizaer: Huh. Well if you have suggestions on how to improve the standard library, they would be greatly appreciated.
16:09:22evizaerI'm still learning
16:09:52Araqmutating stuff is the first thing I do when I go for performance and it never failed to deliver. ;-)
16:09:53evizaerOO culture is probably way way too strong for changes to be made. Nim is many many steps forward from python, ruby, C++, et al.
16:10:02evizaerSo I'm more than happy to use it as it is for my imperative programming needs.
16:10:11FromGitter<Varriount> People tend to write code based on how the built-in facilities are designed.
16:10:24demi-yeah
16:10:58evizaerI think that idiomatic nim is still in the process of developing
16:11:49evizaerIt's pretty interesting to watch.
16:12:34FromGitter<Varriount> I tend towards the procedural end of things - whether this counts as object oriented, I don't know.
16:12:55FromGitter<Varriount> I do know that my code looks nothing like Java.
16:15:25evizaerI would write code that looks more like haskell than C++.
16:16:23evizaersmall records, functions that operate on them and return the resulting record.
16:17:07evizaerI think this is a very worthwhile experiment: https://github.com/andreaferretti/patty
16:17:46evizaerBut allowances have to be made for nim's current syntax and limitations, and better techniques need to be developed than simply glomming FP stuff on.
16:19:32FromGitter<Varriount> evizaer: Have you seen the concept stuff in the manual?
16:19:41evizaerYeah. It's awesome.
16:19:48evizaerIt's a dream come true for me.
16:20:25evizaerIt's the feature of nim that drove me from mildly interested to sold.
16:20:31FromGitter<Varriount> Eventually there will be a 'vtable'-like mechanism, so that a function can accept multiple concept types.
16:20:42FromGitter<Varriount> Lemme see if I can find the line...
16:20:58evizaerAre you a contributor to the language, Varriount?
16:21:01FromGitter<Varriount> https://github.com/nim-lang/Nim/blob/d7eb146d28515e9aea5ae0f98e01b09bd96b5919/doc/manual/generics.txt#L577
16:21:28FromGitter<Varriount> evizaer: Only monetarily at the moment. I also try to help people in the channel and forum.
16:21:29Araqwell vtables will bring us closer to OO, not FP
16:21:42FromGitter<Varriount> *shrug*
16:21:56FromGitter<Varriount> I think the idea is pretty interesting.
16:22:01evizaerHaskell has something like vtables in the way typeclass dictionaries are implicitly passed around
16:23:04Araqvarriount: yes the idea is interesting, but that wasn't my point. evizaer wants more FP and vtables give us more OO. ymmv
16:23:46evizaerNo, I don't want strictly more FP. But a more FP-like approach to imperative programming.
16:24:03evizaerMore expressions and composition, fewer statements and inherntance hierarchies
16:24:55evizaernim takes some interesting steps in that direction by allowing you to tag functions with what effects they cause, and the ability to tag a function as pure and have the compiler yell at you if you do impure things in it.
16:31:42*vlad1777d quit (Ping timeout: 240 seconds)
16:31:53*WhiskyRyan joined #nim
16:38:08*zachcarter quit (Quit: zachcarter)
16:42:44*vlad1777d joined #nim
16:49:11*def-pri-pub joined #nim
16:53:00*adeohluwa quit (Quit: Connection closed for inactivity)
17:00:04*xet7 quit (Read error: Connection reset by peer)
17:01:51Araqevizaer: also relevant: https://forum.nim-lang.org/t/1918/4
17:07:00*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:09:09*WhiskyRyan joined #nim
17:12:53*rokups quit (Quit: Connection closed for inactivity)
17:16:41*xet7 joined #nim
17:35:50*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:46:01*xet7 quit (Remote host closed the connection)
17:51:19*Jesin quit (Quit: Leaving)
17:52:13*nsf joined #nim
18:01:37*Jesin joined #nim
18:04:09onionhammer@Varriount https://github.com/onionhammer/clibpp
18:20:59*yingjun joined #nim
18:27:32*yingjun quit (Ping timeout: 260 seconds)
18:31:02*vlad1777d quit (Ping timeout: 260 seconds)
18:39:17*dexterk_ quit (Quit: Konversation terminated!)
18:39:29*dexterk_ joined #nim
19:13:42FromGitter<StefanSalewski> I wonder is this good Nim style, or better something like "let strkey = when compiles()..."
19:13:45FromGitter<StefanSalewski> https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/tables.nim#L150
19:15:24FromGitter<rokups> Good style is whatever is more readable
19:16:04FromGitter<StefanSalewski> Looks a bit verbose occupying 4 lines.
19:16:05*Trioxin joined #nim
19:17:31FromGitter<StefanSalewski> And I have never used that "when compiles" before, was just about stealing these 4 lines...
19:19:34FromGitter<rokups> Saving lines looks smart and badass but not necessarily readable. Stupid code is good code as it is easy to reason about.
19:24:11FromGitter<StefanSalewski> raise newException(KeyError, "key not found: " & compileOrIgnore($key))
19:24:34FromGitter<StefanSalewski> May such a compileOrIgnore makro be great?
19:25:58FromGitter<StefanSalewski> May such a macro be possible?
19:27:06FromGitter<StefanSalewski> Bye, will read the log later...
19:35:26*Matthias247 joined #nim
19:37:31FromGitter<Varriount> Araq: Any reason why low() returns 0 when a sequence is empty?
19:37:44FromGitter<Varriount> 0 isn't the lowest accessible index.
19:38:27*Trustable quit (Remote host closed the connection)
19:43:09*Neomex joined #nim
19:44:34*frankpf joined #nim
19:48:02*WhiskyRyan joined #nim
19:55:52*Vladar quit (Quit: Leaving)
19:57:24*martin_cohen quit (Quit: Leaving)
20:06:53*nsf quit (Quit: WeeChat 1.7.1)
20:24:37*yingjun joined #nim
20:28:58*yingjun quit (Ping timeout: 246 seconds)
20:31:38*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:37:03*WhiskyRyan joined #nim
20:54:00*frankpf quit (Quit: Leaving)
21:00:02*vlad1777d joined #nim
21:00:35*jsgrant_ joined #nim
21:15:18*derlafff quit (Quit: No Ping reply in 180 seconds.)
21:17:12*derlafff joined #nim
21:26:25*zachcarter joined #nim
21:28:03*yingjun joined #nim
21:32:27*yingjun quit (Ping timeout: 240 seconds)
21:44:43*ofelas quit (Quit: shutdown -h now)
22:02:17*yglukhov quit (Remote host closed the connection)
22:08:08*jsgrant_ quit (Ping timeout: 240 seconds)
22:21:24*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:22:39*Matthias247 quit (Read error: Connection reset by peer)
22:23:21*WhiskyRyan joined #nim
22:47:23libmansed -i 's/Apache2/MIT' patty.nimble
22:48:00libmans/MIT/MIT\//
22:57:14*themagician quit ()
23:02:45*yglukhov joined #nim
23:07:23*yglukhov quit (Ping timeout: 268 seconds)
23:29:58*yingjun joined #nim
23:34:27*yingjun quit (Ping timeout: 240 seconds)
23:51:46*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)