<< 30-08-2017 >>

00:00:31*Snircle_ quit (Ping timeout: 276 seconds)
00:00:47Araqsounds awful
00:00:56Araqbut it's aws, I don't know it
00:01:09FromGitter<zacharycarter> well it's compute time on demand
00:01:11*mindB quit (Ping timeout: 276 seconds)
00:01:11*Demos[m] quit (Ping timeout: 276 seconds)
00:01:44FromGitter<zacharycarter> so I pay for hundreds of seconds of compute time
00:01:52FromGitter<zacharycarter> hundredths of a second*
00:01:57FromGitter<FridgeSeal> Lambda is amazing. There's subsecond billing (in batches of 100ms) and a free tier that includes (depending on the chosen tier of hardware) nearly a million seconds a month
00:02:05*Demos[m] joined #nim
00:02:11*mindB joined #nim
00:03:16FromGitter<zacharycarter> so like my company has this problem of not building reusable things that are useful and instead, we rebuild the same useful crap over and over in a bad way
00:03:27FromGitter<zacharycarter> one thing we need and don't have is zip code to lat long translation
00:04:27FromGitter<zacharycarter> so what everyone ends up doing is standing up a DB with the mapping in it, or wasting runtime performance loading a huge dataset into memory
00:05:13FromGitter<FridgeSeal> I'm fairly sure the Google Maps API has a zip-to-gps functionality in there somewhere.
00:05:20FromGitter<zacharycarter> it does but do you want to pay for that?
00:05:40FromGitter<zacharycarter> I'm betting lambda is cheaper
00:05:52FromGitter<zacharycarter> maybe not I don't know
00:06:02FromGitter<FridgeSeal> Yeah fair enough. I use their address-to-gps api
00:06:08FromGitter<Ajusa> How well does Nim support multithreading? I am converting a program from D to nim, and D has built in multithreading for "foreach" loops. Any way to achieve the same with nim?
00:06:18FromGitter<zacharycarter> anyway n ow we have an on demand zip to lat long service
00:06:25FromGitter<FridgeSeal> But my usage is small enough that we happily fit within their free tier lol.
00:06:28FromGitter<zacharycarter> and we pay only for the copmute time
00:06:34FromGitter<zacharycarter> yeah this is going into a national product
00:06:40FromGitter<FridgeSeal> Ahhhh yeah
00:07:19FromGitter<zacharycarter> it's my sneaky (hopefully) way of getting Nim into my company
00:07:28FromGitter<FridgeSeal> Hahahaha
00:08:53FromGitter<Ajusa> Right now, the single threaded Nim version takes roughly 5-6 times longer than the D version to do the same thing. The logic is pretty much identical
00:09:06FromGitter<zacharycarter> yes nim supports multithreading
00:09:16FromGitter<zacharycarter> take a look at parallel and spawn in the manual
00:09:31FromGitter<zacharycarter> https://nim-lang.org/docs/manual.html#parallel-spawn
00:10:36AraqAjusa, use -d:release and learn some Nim
00:11:50FromGitter<Ajusa> -d:release made it 3 times slower than D. Thanks for the advice guys! I'll get back on whether I was able to get multi threading to improve the speed.
00:12:27FromGitter<zacharycarter> you can also throw in C compiler optimization flags
00:12:42FromGitter<zacharycarter> but I'd look into parallel and spawn
00:12:49FromGitter<zacharycarter> and no problem, good luck!
00:13:01*yglukhov joined #nim
00:13:14FromGitter<zacharycarter> https://serverless.com/ is nice
00:13:27FromGitter<Ajusa> Thanks! I am still in hs, so I may not understand a lot of stuff. I'll ask you guys here if I really need help with something :D
00:13:30FromGitter<zacharycarter> I should make a github repo with an example AWS Nim app
00:13:37FromGitter<zacharycarter>  @Ajusa
00:14:20FromGitter<FridgeSeal> Serverless is fantastic, but I really wish they'd named it something else lol. The number of times I've tried to look for things to do with the framework and not the technology or vice versa is insane.
00:14:35FromGitter<zacharycarter> yeah haha
00:14:59*couven92 quit (Read error: Connection reset by peer)
00:15:19FromGitter<zacharycarter> think I'm going to do gamedev tonight though instead
00:15:23FromGitter<zacharycarter> I need to start working on a game
00:16:41FromGitter<FridgeSeal> Talking of multithreading/parallelism, I'm keen to have a go with Nim's parallel - Python's approach of multi-processing is kind of silly, especially seeing as you need to serialise to disk whatever you want to pass to the worker functions...
00:17:13*yglukhov quit (Ping timeout: 240 seconds)
00:17:37FromGitter<Ajusa> Okay, I am getting this error which I don't quite understand: Error: cannot prove: i > i; required for (i)..(i) disjoint from (i)..(i)
00:17:53FromGitter<zacharycarter> can you share code please?
00:18:10FromGitter<zacharycarter> https://play.nim-lang.org has gist functionality you can share there
00:18:25FromGitter<zacharycarter> may also because you need --threads:on
00:19:02FromGitter<Ajusa> I have that enabled and the experimental pragma
00:19:38FromGitter<zacharycarter> gotcha, please post your code at your convenience then and someone will have a look at it
00:19:47FromGitter<Ajusa> https://play.nim-lang.org/?gist=ab574cd5dcb4bafbfba9c64d274515d4
00:19:54FromGitter<Ajusa> that is only the relevant excerpt
00:21:00FromGitter<Ajusa> https://github.com/Ajusa/simtest ⏎ that is the entire source code. It isn't very large, but it is a lot of math with constants that might not make sense
00:21:38FromGitter<zacharycarter> thanks, btw you don't need to check in the nimcache directory
00:21:42FromGitter<zacharycarter> just fyi
00:21:47FromGitter<Ajusa> yeah, my bad xD
00:22:30FromGitter<zacharycarter> all good :)
00:22:50FromGitter<zacharycarter> looking at your code now i'll let you know what I find!
00:24:10FromGitter<Ajusa> Thank you very much! You guys are really helpful
00:26:59FromGitter<Ajusa> Actually, I got it to work by using sequence.high
00:27:07FromGitter<zacharycarter> ha cool :D
00:27:09FromGitter<zacharycarter> was going to say
00:27:09FromGitter<zacharycarter> https://play.nim-lang.org/?gist=7999a7f432e23e4c14a41f6d5b59eb9d
00:27:14FromGitter<zacharycarter> just got it working as well
00:27:18FromGitter<Ajusa> But now it is much, much slower. Will threading do that?
00:27:42FromGitter<Ajusa> Threading has a positive effect in D, so I wouldn't expect it to vary with the language?
00:27:43FromGitter<zacharycarter> it shouldn't
00:28:08FromGitter<zacharycarter> benchmarks are tricky though
00:28:28FromGitter<zacharycarter> and you can do something in language A that in language B might be very expensive
00:28:42FromGitter<zacharycarter> as every language is different
00:29:02FromGitter<Ajusa> I figured that Nim would be faster just because I was using gcc over D's compiler, which is dmd
00:29:15FromGitter<zacharycarter> Nim can definitely be faster than D
00:29:18FromGitter<Ajusa> In single threaded, it is much faster from what I remember
00:29:22FromGitter<FridgeSeal> Slightly off topic: Phase space and pulse size, I'm guessing you're doing something like spectrum analysis? The transformation looks sort of similar to one of the integral transforms (laplace, etc) but it's been a while since I did that sort of maths
00:30:23FromGitter<Ajusa> The math is a bit over my head, I am helping a professor with research. I am trying to model an electron beam (like one in an electron microscope) and have it move through space and lenses
00:31:08FromGitter<Ajusa> The code accounts for just splitting the beam into millions of electron phasespaces
00:31:39FromGitter<Ajusa> I am trying to optimize the split as much as possible, before moving on to the operations
00:34:36AraqNim's float is not D's float
00:35:18AraqNim's float is 64bits, D's is 32bits, caches are not used as effectively, 2x slowdown? just a guess though
00:35:59FromGitter<Ajusa> I compiled it with the -m64 flag for D, so it should be 64bit?
00:36:11FromGitter<Ajusa> Lemme try running it with float32 on nim
00:39:29Araqfloat in D is always 32bits, independent of -m64
00:39:41FromGitter<Ajusa> Forcing everything to float32 made it actually slower than the default float464
00:39:45FromGitter<Ajusa> *float64
00:40:26FromGitter<Ajusa> it went from 684ms to 703ms (float to float32)
00:41:30FromGitter<Ajusa> Also, thanks for that info, I was unaware of that. ⏎ The reason I am trying to optimize this is because this could potentially be asked to calculate over 10^12 splits, which shouldn't take months ideally
00:43:18FromGitter<Ajusa> Right now, 10^6 takes 684ms on Nim, and 213ms on D. Not trying to start a language comparison here, I just want to know if it is possible for me to switch this project to Nim and preserve (at least) the speed of the D version. The D version is using multithreading to calculate value for an array.
00:43:50FromGitter<zacharycarter> it's possible if you know what you're doing
00:44:06FromGitter<zacharycarter> you have to be doing a couple of things
00:44:13FromGitter<zacharycarter> a) writing efficient Nim code
00:44:26FromGitter<zacharycarter> b) using the optimization options available to you
00:45:53FromGitter<zacharycarter> I don't know what your D code looks like or what it is doing
00:46:33FromGitter<zacharycarter> I haven't really closely read through your code but I'll do that now and see what I can produce for you
00:48:04FromGitter<Ajusa> https://github.com/Ajusa/simulator ⏎ I literally copy pasted over the split method, and then went through by hand to make it fit Nim's syntax. I have not done much optimization to the Nim one, which is my fault. I should have put in more effort before asking here, so I could be more prepared. Thank you very much for taking some time to help me, it is very much appreciated. :D
00:49:19FromGitter<zacharycarter> fyi - http://blog.johnnovak.net/2017/04/22/nim-performance-tuning-for-the-uninitiated/
00:49:26FromGitter<zacharycarter> can read that while I'm working on this :)
00:49:35FromGitter<Ajusa> Oh wow, thanks!
00:49:42FromGitter<zacharycarter> np!
00:50:07FromGitter<Ajusa> Part of the problem with googling for help in Nim is that I end up finding tutorials for the game of Nim, and how it can be written in x language lol
00:50:48FromGitter<zacharycarter> hahaha truth
00:57:53*endragor joined #nim
01:02:22*endragor quit (Ping timeout: 260 seconds)
01:03:33FromGitter<FridgeSeal> Yeah it's either that, or something to do with Intel/processor architecture support for a weather model
01:11:33FromGitter<Ajusa> I'm an idiot
01:11:49FromGitter<codenoid> me too
01:11:58FromGitter<Ajusa> I was using an optimized version of the exp function for this, and I neglected to port that one over to nim.
01:12:23FromGitter<Ajusa> dlang multithreaded is 200ms, nim is 275ms
01:13:08FromGitter<Ajusa> That's actually amazing, seeing as how I don't have any sort of threading for the nim version. Nor have I used any crazy nim specific stuff.
01:13:27FromGitter<zacharycarter> my machine is doing a whacky and not cooperating
01:13:34FromGitter<zacharycarter> but I'm glad you figured it out :)
01:14:43FromGitter<Ajusa> Thanks! Now, I gotta read the docs and understand how to make multithreading faster, and see if there are any speed hacks I can use that Nim has. I read through the blog post you linked. It was very interesting, even though it doesn't help me with my case. The techniques that the author describes are very useful though!
01:19:10*Pisuke joined #nim
01:23:21FromGitter<Ajusa> Also, I thought that float32 would improve speed, not make it slower... Is there anything I might be doing wrong? I just went through and changed each instance of float to float32. Is there a compiler flag that I don't know about to do this?
01:25:32FromGitter<zacharycarter> I don't think so I think what you did is what you should have done
01:25:39FromGitter<zacharycarter> float32 will reserve less memory
01:26:23FromGitter<Ajusa> Yeah, I think I noticed that when testing. I read through (https://forum.nim-lang.org/t/1267/3)[this], and listened to Araq above, when expecting speed improvements.
01:27:33FromGitter<zacharycarter> Araq can and will let you know but it's late where he is, he's the author of the language
01:29:05FromGitter<Ajusa> I know :D ⏎ This isn't my first foray into Nim. I am not asking him for help, just wondering if I did what he asked me to do properly
01:30:20FromGitter<zacharycarter> oh gotcha :) well I think you did, but not 100% sure - until then you could always post a thread in the forum
01:31:03FromGitter<Ajusa> I'll do that in a few days if I am unable to optimize further
02:15:39*yglukhov joined #nim
02:17:13*relax quit (Ping timeout: 240 seconds)
02:17:16*vlad1777d quit (Remote host closed the connection)
02:21:07*yglukhov quit (Ping timeout: 260 seconds)
02:21:57*def-pri-pub joined #nim
02:24:36*Ven`` joined #nim
02:34:05*Ven`` quit (Ping timeout: 240 seconds)
02:40:35*dddddd quit (Remote host closed the connection)
02:48:50*pilne quit (Quit: Quitting!)
03:04:24*def-pri-pub quit (Quit: leaving)
03:09:15*Nobabs27 joined #nim
03:15:23*francisl joined #nim
03:23:50*Nobabs27 quit (Quit: Leaving)
03:37:21*mahmudov quit (Read error: No route to host)
03:37:23*endragor joined #nim
03:57:28*gangstacat joined #nim
04:18:47*yglukhov joined #nim
04:23:05*yglukhov quit (Ping timeout: 240 seconds)
04:34:02*BigEpsilon joined #nim
04:42:53*francisl quit (Quit: francisl)
04:49:59*rauss quit (Quit: WeeChat 1.9)
04:50:50*rauss joined #nim
05:09:12FromGitter<Varriount> Oh, an optimization challenge? Count me in.
05:12:24*cspar quit (Read error: Connection reset by peer)
05:12:49*cspar joined #nim
05:14:14*miran joined #nim
05:22:38FromGitter<BigEpsilon> Hi, I need a little help. I'm trying to add support for integer type template parameters to c2nim (ie: template<int T, size_t N> ...). ⏎ I'm almost there but on little problem remains: ⏎ A definition such ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/nim-lang/Nim?at=59a64b9e210ac26920d6ea0b]
05:25:12FromGitter<BigEpsilon> (the code is not clean I'll refactor it once it works)
05:27:12*miran quit (Ping timeout: 260 seconds)
05:34:09*Vindaar quit (Ping timeout: 252 seconds)
05:34:35*BigEpsilon quit (Ping timeout: 240 seconds)
05:39:25*miran joined #nim
05:54:23*BigEpsilon joined #nim
06:00:58*yglukhov joined #nim
06:18:26FromGitter<Araq> @BigEpsilon can you confirm it's not a "renderer" glitch?
06:18:35FromGitter<Araq> (compiler/renderer.nim)
06:28:13FromGitter<BigEpsilon> I'll check that, it may be that
06:29:21*miran quit (Ping timeout: 248 seconds)
06:40:43*yglukhov quit (Remote host closed the connection)
06:41:39*nsf joined #nim
06:43:51*tdc joined #nim
06:44:44*yglukhov joined #nim
06:55:30*Vladar joined #nim
06:57:30*endragor quit (Remote host closed the connection)
06:59:59*BitPuffin|osx joined #nim
07:04:32*PMunch joined #nim
07:17:56*endragor joined #nim
07:23:01*endragor quit (Ping timeout: 255 seconds)
07:26:39*endragor joined #nim
07:48:18*Yardanico joined #nim
08:08:49*yglukhov quit (Remote host closed the connection)
08:08:52euantorWould there be any objections to adding alternative versions of base 64 encode/decode to the base 64 module that doesn't split output into lines? I'd also like to add a verison that uses the "URL" encoding specified in RFC 4648 that uses URL safe identifiers.
08:09:23Yardanicoeuantor, maybe you can then use cgi.encodeUrl to encode base64 into safe url?
08:09:30euantorThe version that doesn't add line breaks should also help us in this rather stupid benchmark (tested last night): https://github.com/kostya/benchmarks#base64
08:09:55euantorI'm not sure, I've not looked at the `cgi` module
08:10:28Yardanicofunny thing, all these languages are using only 1 file
08:10:36Yardanicoand rust needs a separate directory :)
08:10:42euantoryep
08:11:12euantormy basic tetsing (encode only) last night showed quite a big difference in time for the version without splitting output into lines
08:12:16Yardanicoeuantor, hmmm, ok, maybe we can add a optional bool argument?
08:12:18Yardanicoto encode/decode
08:12:53euantorOr an overloaded version that takes only 1 argument
08:13:06euantor(for encode, I've not looked at decode yet)
08:13:13Yardanicoeuantor, wait, did you try to pass empty newLine to encode?
08:13:20Yardanicohttps://github.com/nim-lang/Nim/blob/master/lib/pure/base64.nim#L110
08:13:42YardanicoI'll test it locally now
08:13:50euantornot yet, but this is the block that I removed and saw a speed benefit: https://github.com/nim-lang/Nim/blob/master/lib/pure/base64.nim#L72
08:13:59euantorI only tried for about 10 minutes late last night
08:14:39YardanicoOk, with default arguments I get ~1.3 seconds both for encode/decode
08:15:20Yardanicohmm this doesn't help
08:15:31euantorYeah, now try removing the block above - it helped quite a lot for me
08:15:31Yardanicowhy this behaviour was added?
08:15:36Yardanicoeuantor, I'll try now
08:15:53euantorSome of the RFCs define a line length. There are several different RFCs over the years for base 64
08:16:07euantorhttps://en.wikipedia.org/wiki/Base64#Implementations_and_history
08:16:17Yardanicowell now I have 0.86 seconds for encode and 1.31 for decode
08:16:38Yardanicoit's with clang
08:16:50Yardanicowith gcc it's 0.92 seconds and 1.71 seconds, lol
08:16:55Yardanicogcc seems to be slower than clang here
08:17:18euantorYeah, I need to look at decode and see if it can be improved at all. I'm going to look at it properly tonight if there's no objections to adding some more implementations
08:17:47Yardanicowell I think base64 implementation in nim is not the most optimized
08:18:09Yardanicobecause no one needed to optimize it before :)
08:19:30euantorI'll try and have a look at that at the same time. I looked at Go's implementaiton and it's pretty slow
08:24:06Yardanicowell as I think it can be optimized with unsafe features at least :)
08:24:09Yardanicobut maybe there's a better way
08:25:23Yardanicobut yeah, maybe this can be made optional
08:25:33Yardanicoother languages don't add line breaks usually
08:26:14FromGitter<BigEpsilon> @Araq , its definitly a bug in compile/render : https://play.nim-lang.org/?gist=27255bf05b55900d75c438a31c05a9aa ⏎ I think I found the problem, I'll do a PR after some tests
08:34:07Araqmuhaha and then people ask why I don't use debuggers, I don't debug, I am all knowing. :P
09:06:54*Arrrr joined #nim
09:06:54*Arrrr quit (Changing host)
09:06:54*Arrrr joined #nim
09:10:42*BitPuffin|osx quit (Remote host closed the connection)
09:33:58*Matthias247 joined #nim
09:34:06*BitPuffin|osx joined #nim
09:45:17*livcd joined #nim
09:46:37livcdDo you guys have somewhere a comparison of Nim and Go (or any other lang?) thanks!
09:46:44*vlad1777d joined #nim
09:47:09Yardanicolivcd, well there's a small comparasion of python/nim and c/nim
09:47:27Yardanicohttps://github.com/nim-lang/Nim/wiki/Nim-for-C-programmers and https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers
09:48:47livcdthanks!
09:49:35Yardanicolivcd, main nim features (at least for me): speed, metaprogramming, C/C++ ffi
09:49:43Yardanicoand python-like syntax :)
09:50:24livcdI prefer ruby like syntax but Nim seems interesting anyway :-)
09:50:48livcdWhat about parallelism ?
09:51:17Yardanicolivcd, threads (with local-thread heap), and https://nim-lang.org/docs/manual.html#parallel-spawn
09:52:04Yardanicoalso there's async/await like library
09:52:27Yardanicohttps://nim-lang.org/docs/asyncdispatch.html
09:53:16livcdwhat about talking to WinAPi I found some community maintained packages
09:53:31livcdanyway thanks for spoon feeding me Yardanico :-)
09:53:45Yardanicolivcd, a small wrapper https://nim-lang.org/docs/winlean.html
09:53:52Yardanicoand full (very huge) wrapper - https://github.com/nim-lang/oldwinapi
09:56:34euantorAnd if there's just a couple of APIs you need, calling out to them is extremely easy
09:56:42Yardanicoyeah
09:57:08*vlad1777d quit (Remote host closed the connection)
09:57:26Araqtoo bad varriount lost his work on the "newwinapi"
09:57:59*odc joined #nim
09:58:11Yardanicowell maybe it shouldn't be called oldwinapi ? :)
09:58:14Yardanicomaybe "hugewinapi" :D
09:59:00Yardanicoplease tell me that oldwinapi is not hand-written wrapper
10:00:51livcdwell i have not even started with nim tutorial. I use Go on windows and translate the necessary parts for winapi manually
10:01:00livcdbut yeah I'd like to try nim :-)
10:01:11Yardanicolivcd, what are you using winapi for?
10:01:59livcdYardanico: classic stuff. Adding users / removing users / getting list of users. net shares etc etc
10:02:08Yardanicolivcd, ah
10:02:25Yardanicojust want to say that you'll use low-level types for integrating with winapi
10:02:29Yardanicolike raw pointers
10:02:46Yardanicoin Nim (and I think the same in Go unless there's a high-level wrapper )
10:03:05livcdyup it's the same in Go
10:03:36*couven92 joined #nim
10:04:52Araqhi couven92, there are problems with Nim's android support :-)
10:05:07couven92Oooh! Do tell! :D
10:05:26FromGitter<Ajusa> I think I will make a post on the forum about my program, to optimize it. I really just don't know how to add doubles faster lol
10:05:43FromGitter<Ajusa> And 32bit doubles are slower than 64 bit doubles
10:07:15YardanicoAjusa: can you post your code on gist ?
10:07:20Yardanicoand share it here too :)
10:08:17YardanicoAraq, are you trying to make Nim compiler work on Android without Termux?
10:08:20FromGitter<Ajusa> Ah, yes. I had posted it above, so I'll just put links to the GitHub page: www.github.com/ajusa/simtest
10:08:27couven92Araq, should I just clone devel on my Android and run, or is there sth specific you want me to have a look at?
10:08:58FromGitter<Ajusa> The D version that I am trying to be faster than using Nim is www.github.com/ajusa/simulator
10:09:22*yglukhov joined #nim
10:10:09FromGitter<Ajusa> Right now, Nim is about 20% slower than D, but the D code uses multithreading. When I added that to the Nim code, it became several times slower
10:11:54Yardanicowell straight rewrites from one language to another are almost always slower :) I'm not good at optimizing Nim code, but I'll have a look
10:11:54AraqYardanico, couven92: the termux dependency is really bad, yes but there are also other issues
10:12:41YardanicoAraq, well it would be way harder to make it work without termux
10:12:42Araqthe sigtimedwait() uses a syscall that 4.x doesn't support anymore (?)
10:13:01FromGitter<Ajusa> I just don't know where to start optimizing. I need faster double math and faster loops, but those should already be optimized by the compiler :P
10:13:03Yardanicofor example we'll need to provide C compiler or precompile Nim for android
10:13:22couven92okay... Hmmm... I'll go into my thinking-box and try to figure it out
10:13:56*yglukhov quit (Ping timeout: 255 seconds)
10:14:00YardanicoAjusa: also, ; are not needed in Nim :)
10:14:27FromGitter<Ajusa> Yeah, I know XD. You can tell I copy pasted it from D
10:14:53AraqAjusa, just look at the generated assembler code
10:15:18Yardanicowell I can't get it to compile because of disjoint check
10:15:20Araqquote from my collegue, "Also, people in those PRs test over Android 6.0, but people don't compile real apps over Android 6.0, since it means you discard 50% of the current market."
10:16:06*tdc quit (Read error: Connection reset by peer)
10:16:07euantorThe android ecosystem is a mess
10:16:15YardanicoAjusa: what number of splits to I need to enter?
10:16:26FromGitter<Ajusa> I have been doing a million
10:16:34FromGitter<Ajusa> for testing. Takes about 300ms on my laptop
10:16:59*tdc joined #nim
10:18:15FromGitter<Yardanico> Nim or D version? Takes 300ms
10:20:01FromGitter<Ajusa> Nim is 261ms, D is 219ms
10:21:13*Yardanico quit (Ping timeout: 240 seconds)
10:21:29ArrrrDo you compile with -d:release? I don't know if D has an equivalent option
10:22:25FromGitter<Ajusa> Yeah, -:release. With D, I do -O -release, which produces the fastest binaries
10:23:25*Yardanico joined #nim
10:24:08FromGitter<Yardanico> can you please test this version?
10:24:08FromGitter<Yardanico> https://gist.github.com/Yardanico/7359c34d62fb096120720f94059ef568
10:24:25FromGitter<Yardanico> I got a ~70ms speedup by using implicit result variable
10:24:44FromGitter<Yardanico> this version doesn't use threading at all
10:25:11FromGitter<Yardanico> also what compiler are you using?
10:25:15FromGitter<Yardanico> mingw or vcc?
10:25:20FromGitter<Ajusa> Mingw
10:25:38FromGitter<Yardanico> well you should probably also try VCC, because *maybe* it can produce faster binaries
10:25:45FromGitter<Yardanico> Visual studio compiler
10:25:55FromGitter<Yardanico> but at least test this version
10:26:05*ShalokShalom_ joined #nim
10:26:49*yaiyan is now known as Ieuan
10:26:57FromGitter<Ajusa> woah
10:27:01FromGitter<Yardanico> what?
10:27:07FromGitter<Ajusa> Now its about 10 percent faster than D
10:27:09FromGitter<Yardanico> yay
10:27:11FromGitter<Ajusa> :D
10:27:32FromGitter<Yardanico> you just should use implicit "result" variable everywhere unless you need "return" statement because it exits from the current function
10:27:48FromGitter<Yardanico> so instead of creating new result variable you just use "result"
10:27:53FromGitter<Ajusa> Ah, okay. That's the main thing I noticed in your code
10:27:59FromGitter<Ajusa> Didn't know about that
10:28:16FromGitter<Yardanico> well so nim without threading is faster than D with threading, hmm
10:28:33*Ieuan is now known as Yaiyan
10:28:49*ShalokShalom quit (Ping timeout: 248 seconds)
10:29:06FromGitter<Ajusa> Yeah. And the D version is definitely much faster with threading
10:29:53FromGitter<Yardanico> ok, we need to try to make nim version parallel too
10:30:14FromGitter<Ajusa> Without threading, the D version is 650ms, while Nim is 180ms. With threading, D is about 200ms
10:30:26Yardanicolol
10:30:31Yardanicostrange
10:30:40YardanicoI'll try to make nim version parallel too
10:30:44FromGitter<Ajusa> Yeah, I tried doing that earlier, but Nim slowed down by a factor of 10
10:31:00Yardanicoalso you don't need to specify types everywhere in Nim :) maybe you've noticed
10:31:10Yardanicothis doesn't have any impact on performance but still
10:31:49FromGitter<zacharycarter> remember you can use C optimization tricks with Nim too
10:32:10FromGitter<zacharycarter> including compiler flags, optimizing loops etc
10:33:50FromGitter<zacharycarter> sorry not for loops but if else I meant
10:33:53FromGitter<zacharycarter> and I'm not sure you can do that
10:34:03FromGitter<zacharycarter> but you can definitely pass compiler optimization flags I know that much
10:35:36FromGitter<zacharycarter> yeah you can
10:35:41FromGitter<zacharycarter> unlikely and likely are already defined - https://github.com/nim-lang/csources/blob/master/c_code/nimbase.h#L458
10:36:14FromGitter<Ajusa> Passing in -O3 helps a bit. I'll look more into gcc compiler flags
10:36:26Yardanicowell nim passes -O3 by default
10:36:31Yardanicoin release mode
10:36:49FromGitter<zacharycarter> does it? oh my bad
10:36:56FromGitter<Ajusa> Without O3 it is 3ms slower, not really much of a difference
10:37:03FromGitter<zacharycarter> meh
10:37:07Yardanicowell times can vary between runs
10:37:12FromGitter<Ajusa> I noticed a discussion on that when I was looking around for optimize
10:37:14FromGitter<Ajusa> Yeah
10:37:35FromGitter<zacharycarter> likely / unlikely is the only other thing I can suggest off the top of my head
10:37:41FromGitter<zacharycarter> other folks may have more
10:38:33ArrrrI'd like to see that parallel version
10:40:36FromGitter<ephja> @zacharycarter I dunno if it has a positive effect on x86
10:41:46FromGitter<zacharycarter> gotcha @ephja
10:42:07FromGitter<zacharycarter> thanks for the tip
10:43:07FromGitter<Ajusa> I'll put up my parallel version on another branch in a few minutes
10:43:32Yardanicowell maybe cost of creating thread is higher than benefits
10:43:48FromGitter<zacharycarter> here's a parallel version
10:43:55Yardanicoalso - why do you need two loops in split?
10:44:03Yardanicoit doesn't make any difference in speed, but
10:44:14FromGitter<zacharycarter> https://gist.github.com/303e72605d16ceb4c18eb7689ac36445
10:44:36Yardanicowell yeah it would be slower
10:44:50YardanicoAjusa: this version works for me too https://gist.github.com/Yardanico/a24062fc659bb3f10e88f3b63f533961
10:44:54Yardanicocan you try it?
10:45:01Yardanicomaybe you'll have better results
10:45:21Yardanicoyou don't even need for loop for "ratios" in split
10:45:28FromGitter<Ajusa> I switched back to one loop
10:45:31Yardanicomaybe this can result in memory usage reduction
10:45:47FromGitter<Ajusa> Check my repo again xD
10:45:55FromGitter<Ajusa> I forgot to push last night
10:46:02ArrrrDoes spawn create a new thread for each computation? Can't you split the total work in 4 queues for example?
10:46:02FromGitter<Ajusa> I had it back to the one loop
10:46:12YardanicoArrrr, well you can set max pool size
10:46:17Yardanicobut it seems this doesn't have any effect
10:46:33Yardanicohmmm
10:47:38YardanicoIt's like ~10-15 times slower with parallel for me
10:47:42FromGitter<Ajusa> @zachaysan I am like 90% sure that is exactly what I had done, and it had gotten slower
10:48:16FromGitter<zacharycarter> yeah it definitely slows down
10:49:55Yardanicolet me try with openmp pragma
10:51:28Yardanicooh boy
10:51:29Yardanicoit works!
10:51:38YardanicoI get 3x speedup
10:51:49Yardanicohttps://nim-lang.org/docs/system.html#||
10:52:00Yardanicobut you'll need to have openmp installed in your system
10:52:25Yardanicohttps://gist.github.com/Yardanico/30b14883568985399c74aab3024dd723
10:52:31YardanicoI just changed .. to || :D
10:52:57Yardanicomy command for compilation and running is: nim c --cc:gcc -d:release --passC:"-fopenmp" --passL:"-fopenmp" -r hello.nim
10:53:09FromGitter<Ajusa> Nice! I actually thought that it wasn't implemented in the language yet. There was a forum post about it a while ago.
10:53:32Yardanicowell it just doesn't have proper checks on Nim side
10:53:45Yardanicoit just adds specific openmp pragma to the loop
10:54:17Yardanicojust try command like mine
10:54:24Yardanicoif it works - you're lucky and you already have openmp
10:55:20FromGitter<Ajusa> I'll test it asap; gotta go to school in a few minutes
10:55:31Yardanicook
10:55:54YardanicoI'll install D compiler now and check your D version for me
10:57:05FromGitter<Ajusa> Wow thanks! You guys are ridiculously helpful lol
10:57:51ArrrrHe wants your upvotes
10:57:57Yardanicolol
10:58:11ArrrrYou could make a post on how you optimized the program.
10:58:27*dom96|w joined #nim
11:00:35FromGitter<Ajusa> Nim: 187ms D: 500ms (The reason these are changing is because of throttling and stuff)
11:00:46FromGitter<Ajusa> That's ridiculous
11:00:49Yardaniconim with openmp?
11:00:52euantorThat's pretty good :D
11:00:55Yardanicoyeah it is
11:01:04Yardanicogod bless "result" variable
11:01:04euantorIs that using DMD? I'd be interesed to see how LDC does
11:01:19FromGitter<Ajusa> It is DMD
11:01:21Yardanicoeuantor, yeah I want to try it too
11:01:32FromGitter<Ajusa> LDC was actually slower for me, but I wasn't passing in any flags
11:01:33Yardanicobut both dmd and ldc are failing to compile for me
11:01:38euantorI'd expect LDC to be a lot faster. Hopefully Nim can still beat it
11:01:48Yardanicowith some linker error
11:02:00FromGitter<Ajusa> rdmd -O -m64 -inline -release -noboundscheck --build-only main.d
11:02:11FromGitter<Ajusa> use rdmd over dmd
11:02:50Yardanicowell it's not in arch repos :(
11:03:00YardanicoI can't even find it in AUR
11:03:22FromGitter<Ajusa> Oh.
11:03:45Yardanicoah it's only one file
11:04:07Yardanicoyeah I compiled rdmd
11:04:23FromGitter<Ajusa> wait now your version is giving me application errors
11:04:38Yardanicoon exit?
11:04:47Yardanicowell openmp pragma isn't very stable
11:04:58Yardanicoand for me D version is faster
11:05:07FromGitter<Ajusa> "the application was unable to start correctly"
11:05:10YardanicoI mean not faster
11:05:12FromGitter<Ajusa> its a windows error
11:05:14Yardanicohmm
11:05:22Yardanicoprobably it can't load openmp libraries
11:05:25Yardanico(dlls)
11:05:32FromGitter<Ajusa> oh
11:05:37FromGitter<Ajusa> yeah I should install those
11:06:15FromGitter<Ajusa> Okay, I really gotta go to school now. I have 1st and third hour free tho, so I can test your stuff then. :D Thanks for all the help!
11:06:40Yardanicowell D version is almost as fast as Nim for me
11:06:46YardanicoD - 150ms, Nim - 130ms
11:06:48Yardanicoon arch linux
11:06:48euantorMight also be worth posting somehting on the forum if you haven't already
11:06:54Yardanicohe did
11:07:01euantorok, I missed that :)
11:07:03Yardanicoah sorry
11:07:07Yardanicohe didn't
11:07:24euantortoo busy fighting with .net at the minute
11:09:04*dddddd joined #nim
11:23:42FromGitter<ephja> are you benchmarking with ldc, gdc etc as well?
11:25:32*ajusa joined #nim
11:26:20ajusaI have not benchmarked with GDC (didn't want to go through compiling that on Windows) and with LDC (no extra compile flags) it was slower than DMD
11:27:13AraqYardanico, couven92: I'm making the android-glob stuff dependent on -d:termux
11:27:34*BigEpsilon quit (Quit: Leaving)
11:27:54*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
11:28:21couven92Araq: Hmm... good idea, I'm currently looking into the Android NDK, I'm playing with the idea to cross compile Nim with the Android NDK gcc cross-compiler
11:28:33couven92Let's see how far I get...
11:28:52FromGitter<zacharycarter> have fun!
11:28:56couven92:D
11:30:28Yardanicowell we should some time revive nim buildfarm
11:31:00Yardanicoto get binary releases for windows
11:31:05Yardanicobecause linux distros already have nim :)
11:32:03ajusaHow do I use OpenMP with nim? How do I get the dlls?
11:32:56Yardanicoajusa, well I don't really know
11:33:00couven92ajusa, well if you were writing gcc you'd do `-lopenmp` (or sth. similar) on the command-line, right?
11:33:08Yardanicocouven92, he's on windows
11:33:09Yardanicowith mingw
11:33:13couven92Oh.
11:33:24Yardanicodo you have mingw-w64?
11:33:27ajusaYes
11:33:41couven92For that I'd actually suggest VCC, since VCC supports built-in OpenMP
11:33:55Yardanicoyeah I said about that too
11:33:59Yardanicobut it's not that small
11:34:14couven92Yardanico, what's not small? VCC?
11:34:19couven92Yeah, no shit! :P
11:34:25Yardanicocouven92, yeah
11:34:32Yardanicoit's more in size than mingw :D
11:34:34ajusaI don't want all of visual studio lol
11:34:53couven92Well, the standalone tools will give you just the compiler, so you can do that
11:35:18couven92ajusa: http://landinghub.visualstudio.com/visual-cpp-build-tools
11:35:56Yardanicoah, yes
11:35:59YardanicoDidn't knew this exists
11:36:25FromGitter<zacharycarter> would be nice to have a giant Nim logo there
11:37:15couven92that one is actually fairly small... And iirc you still get separate compilers specialized for x86 and x64
11:39:35couven92ah, never mind... It's still an entire GiB :O
11:39:47Yardanicoyeah
11:40:49ajusak, I installed that
11:41:39Yardanicoajusa, openmp or vcc
11:41:40Yardanico?
11:41:52FromGitter<zacharycarter> I don't think you install openmp
11:41:57FromGitter<zacharycarter> your compiler has to support it apparently
11:42:23ajusaI installed the visual studio package thing
11:42:57Yardanicoajusa, ok, now open "Visual studio bla-bla" from start menu
11:43:01Yardanicoit has the icon of the console
11:43:04ajusaI did
11:43:11Yardaniconow compile your nim app like
11:43:18couven92hmmm... Araq, Yardanico, the current Android NDK gives us toolchains for Android 4.9... is that fine or should I go legacy for 4.0 or lower?
11:43:19Yardaniconim --cc:vcc -d:release app.nim
11:43:41Yardanicocouven92, there is android 4.9?
11:43:42Yardanicowow
11:43:46Yardanicoare you sure?
11:44:08couven92C:\Program Files\Android\android-ndk-r15c\toolchains\arm-linux-androideabi-4.9
11:44:21Yardanicomaybe it's the version of linux kernel?
11:44:32couven92yeah it is!
11:44:46Yardanicowell many android phones use 3.x kernel
11:44:50Yardanicoeven my phone
11:44:52ajusaI am getting invalid command "main.nim" something is out of order afaik
11:45:02Yardanicoajusa, ah sorry
11:45:07Yardanicoajusa, nim c --cc:vcc -d:release app.nim
11:45:19couven92Yardanico, really? :O I just installed an Android 7.1 custom ROM on mine yesterday! :P
11:45:32Yardanicocouven92, yeah
11:45:40Yardanico4.x kernels are not widespread
11:45:43Yardanicoin android world
11:45:50Yardanicocouven92, well I can install android 7 rom too :)
11:46:08FromGitter<ephja> yeah it's out of order. anyone got a wrench?
11:46:13*dddddd quit (Ping timeout: 240 seconds)
11:46:27couven92okay... to spare myself some trouble I'll first create a stable build chain with the current NDK before I go back in time... :D
11:46:47ajusaYardanico, now how do I go about using your multithreaded openmp code?
11:47:03Yardanicoajusa, just try to compile my version without passing any flags
11:47:17Yardanicoah
11:47:20Yardanicoyou should add this
11:47:39Yardaniconim c --cc:vcc --passC:"/openmp" --passL:"/openmp" -d:release main.nim
11:47:42Yardanicotry this
11:47:59ajusaokay, ill try that
11:49:32ajusaAlright, that worked :D
11:49:58ajusaSpeed improvement too! It is about 20 percent faster with the multithreading
11:50:06Yardanicoajusa, hmm, ok
11:50:20Yardanicothere's always a lot of difference between different platforms
11:50:26ajusa232ms vs 531ms (Nim vs D)
11:50:43Yardanicowell on my arch linux I get 130ms nim vs 150ms D :) but nim is still faster
11:50:50ajusaThat's amazing, there is no way I would have figured out this stuff without you guys
11:50:54ajusaThanks!
11:51:15Yardanicoso we got most of the improvement because of "result" variable
11:51:39ajusayeah, that's what did most of it
11:53:17ajusaI changed the second method "getSplitIntensityRatio" to use result and that shaved off another 20ms or so
11:54:24Yardanicowell "result" is actually useful - most of the time you'll make your procedures 2 lines shorter if you use result :)
11:54:27Yardanicosometimes 1 line shorter
11:54:54Yardanicoand speed too
11:55:15ajusayeah, since it is already part of the function, using it instead of a second var is much better for memory I guess
11:57:09*ajusa quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
11:59:18*dddddd joined #nim
12:02:38*dom96|w joined #nim
12:07:37*ldleworker joined #nim
12:08:30*abeaumont quit (Ping timeout: 252 seconds)
12:09:36*mal`` quit (Ping timeout: 252 seconds)
12:10:09*xet7 quit (Ping timeout: 252 seconds)
12:10:09*oaao quit (Ping timeout: 252 seconds)
12:10:09*ldlework quit (Ping timeout: 252 seconds)
12:10:09*Shoozza quit (Ping timeout: 252 seconds)
12:10:58*Shoozza joined #nim
12:16:05*dddddd quit (*.net *.split)
12:16:05*Yardanico quit (*.net *.split)
12:16:05*Sentreen quit (*.net *.split)
12:16:05*kunev quit (*.net *.split)
12:16:05*acidx quit (*.net *.split)
12:16:06*Jesin quit (*.net *.split)
12:16:06*beatmox quit (*.net *.split)
12:16:06*niv quit (*.net *.split)
12:16:06*joshbaptiste_ quit (*.net *.split)
12:16:06*ehmry quit (*.net *.split)
12:16:06*byteflame quit (*.net *.split)
12:16:07*derlafff quit (*.net *.split)
12:16:07*dom96|w quit (*.net *.split)
12:16:07*Yaiyan quit (*.net *.split)
12:16:07*crem quit (*.net *.split)
12:16:08*watzon quit (*.net *.split)
12:16:08*flyx quit (*.net *.split)
12:16:08*Matthias247 quit (*.net *.split)
12:16:08*Demos[m] quit (*.net *.split)
12:16:09*pydsigner quit (*.net *.split)
12:16:09*TheManiac quit (*.net *.split)
12:16:09*m712 quit (*.net *.split)
12:16:09*dave24 quit (*.net *.split)
12:16:09*subsetpark quit (*.net *.split)
12:16:09*loc8_ quit (*.net *.split)
12:16:09*nsfw_ quit (*.net *.split)
12:16:09*StarBrilliant quit (*.net *.split)
12:16:10*Elronnd quit (*.net *.split)
12:16:10*jivank[m] quit (*.net *.split)
12:16:10*ShalokShalom_ quit (*.net *.split)
12:16:10*PMunch quit (*.net *.split)
12:16:10*cspar quit (*.net *.split)
12:16:10*yeeve__ quit (*.net *.split)
12:16:11*endragor quit (*.net *.split)
12:16:11*CcxWrk quit (*.net *.split)
12:16:11*Lord_Nightmare quit (*.net *.split)
12:16:11*chaosdav quit (*.net *.split)
12:16:11*GaveUp quit (*.net *.split)
12:16:12*notdekka[m] quit (*.net *.split)
12:16:12*Jipok[m] quit (*.net *.split)
12:16:12*bodie_ quit (*.net *.split)
12:16:12*adamchainz quit (*.net *.split)
12:16:12*dyce[m] quit (*.net *.split)
12:16:12*shodan45 quit (*.net *.split)
12:16:12*SunDwarf quit (*.net *.split)
12:16:13*bozaloshtsh quit (*.net *.split)
12:16:13*dom96 quit (*.net *.split)
12:16:13*Araq quit (*.net *.split)
12:16:13*Vladar quit (*.net *.split)
12:16:13*gmpreussner quit (*.net *.split)
12:16:13*Syneh_ quit (*.net *.split)
12:16:13*gsingh93 quit (*.net *.split)
12:16:13*JStoker quit (*.net *.split)
12:16:14*zielmicha_ quit (*.net *.split)
12:16:14*r4vi quit (*.net *.split)
12:16:14*mindB quit (*.net *.split)
12:16:14*MrAxilus[m] quit (*.net *.split)
12:16:14*koppeh1 quit (*.net *.split)
12:16:14*ketralnis quit (*.net *.split)
12:16:14*def- quit (*.net *.split)
12:16:14*EastByte quit (*.net *.split)
12:16:15*jonafato quit (*.net *.split)
12:16:15*joebo quit (*.net *.split)
12:16:15*pwntus quit (*.net *.split)
12:16:15*wishi quit (*.net *.split)
12:16:15*Gertm quit (*.net *.split)
12:16:15*benoliver999 quit (*.net *.split)
12:16:15*mwbrown quit (*.net *.split)
12:16:15*MonsterAbyss quit (*.net *.split)
12:16:15*couven92 quit (*.net *.split)
12:16:15*BitPuffin|osx quit (*.net *.split)
12:16:15*mahsav2 quit (*.net *.split)
12:16:16*Calinou quit (*.net *.split)
12:16:16*pigmej quit (*.net *.split)
12:16:16*Arrrr quit (*.net *.split)
12:16:16*nsf quit (*.net *.split)
12:16:16*kier quit (*.net *.split)
12:16:16*ludocode quit (*.net *.split)
12:16:16*zama quit (*.net *.split)
12:16:16*byte512 quit (*.net *.split)
12:16:16*heinrich5991 quit (*.net *.split)
12:16:16*Amrykid quit (*.net *.split)
12:16:16*federico3 quit (*.net *.split)
12:16:16*Zevv quit (*.net *.split)
12:16:17*rauss quit (*.net *.split)
12:16:17*Pisuke quit (*.net *.split)
12:16:17*oprypin quit (*.net *.split)
12:16:17*d10n quit (*.net *.split)
12:16:17*Amun_Ra quit (*.net *.split)
12:16:17*tdc quit (*.net *.split)
12:16:17*Snircle quit (*.net *.split)
12:16:17*SusWombat quit (*.net *.split)
12:16:17*Xe quit (*.net *.split)
12:16:18*cyraxjoe quit (*.net *.split)
12:16:18*livcd quit (*.net *.split)
12:16:18*gangstacat quit (*.net *.split)
12:16:18*euantor quit (*.net *.split)
12:16:18*hohlerde quit (*.net *.split)
12:16:19*surma quit (*.net *.split)
12:16:19*LyndsySimon quit (*.net *.split)
12:16:19*RushPL quit (*.net *.split)
12:22:26*couven92 joined #nim
12:22:26*mal`` joined #nim
12:22:26*oaao1 joined #nim
12:22:26*dom96|w joined #nim
12:22:26*dddddd joined #nim
12:22:26*ShalokShalom_ joined #nim
12:22:26*Yardanico joined #nim
12:22:26*tdc joined #nim
12:22:26*livcd joined #nim
12:22:26*BitPuffin|osx joined #nim
12:22:26*Matthias247 joined #nim
12:22:26*Arrrr joined #nim
12:22:26*endragor joined #nim
12:22:26*PMunch joined #nim
12:22:26*Vladar joined #nim
12:22:26*nsf joined #nim
12:22:26*cspar joined #nim
12:22:26*rauss joined #nim
12:22:26*gangstacat joined #nim
12:22:26*Pisuke joined #nim
12:22:26*mindB joined #nim
12:22:26*Demos[m] joined #nim
12:22:26*subsetpark joined #nim
12:22:26*Snircle joined #nim
12:22:26*loc8_ joined #nim
12:22:26*oprypin joined #nim
12:22:26*Sentreen joined #nim
12:22:26*nsfw_ joined #nim
12:22:26*notdekka[m] joined #nim
12:22:26*SusWombat joined #nim
12:22:26*Jesin joined #nim
12:22:26*yeeve__ joined #nim
12:22:26*StarBrilliant joined #nim
12:22:26*kier joined #nim
12:22:26*Xe joined #nim
12:22:26*ludocode joined #nim
12:22:26*beatmox joined #nim
12:22:26*mahsav2 joined #nim
12:22:26*gmpreussner joined #nim
12:22:26*Yaiyan joined #nim
12:22:26*niv joined #nim
12:22:26*kunev joined #nim
12:22:26*euantor joined #nim
12:22:26*d10n joined #nim
12:22:26*Amun_Ra joined #nim
12:22:26*joshbaptiste_ joined #nim
12:22:26*zama joined #nim
12:22:26*pydsigner joined #nim
12:22:26*TheManiac joined #nim
12:22:26*ketralnis joined #nim
12:22:26*Calinou joined #nim
12:22:26*byte512 joined #nim
12:22:26*crem joined #nim
12:22:26*m712 joined #nim
12:22:26*watzon joined #nim
12:22:26*Zevv joined #nim
12:22:26*acidx joined #nim
12:22:26*dave24 joined #nim
12:22:26*heinrich5991 joined #nim
12:22:26*Amrykid joined #nim
12:22:26*federico3 joined #nim
12:22:26*Elronnd joined #nim
12:22:26*MrAxilus[m] joined #nim
12:22:26*jivank[m] joined #nim
12:22:26*hohlerde joined #nim
12:22:26*ehmry joined #nim
12:22:26*dyce[m] joined #nim
12:22:26*byteflame joined #nim
12:22:26*Jipok[m] joined #nim
12:22:26*bodie_ joined #nim
12:22:26*adamchainz joined #nim
12:22:26*CcxWrk joined #nim
12:22:26*koppeh1 joined #nim
12:22:26*dom96 joined #nim
12:22:26*shodan45 joined #nim
12:22:26*pigmej joined #nim
12:22:26*SunDwarf joined #nim
12:22:26*def- joined #nim
12:22:26*bozaloshtsh joined #nim
12:22:26*EastByte joined #nim
12:22:26*Araq joined #nim
12:22:26*joebo joined #nim
12:22:26*jonafato joined #nim
12:22:26*pwntus joined #nim
12:22:26*benoliver999 joined #nim
12:22:26*flyx joined #nim
12:22:26*chaosdav joined #nim
12:22:26*wishi joined #nim
12:22:26*Lord_Nightmare joined #nim
12:22:26*Gertm joined #nim
12:22:26*mwbrown joined #nim
12:22:26*MonsterAbyss joined #nim
12:22:26*GaveUp joined #nim
12:22:26*derlafff joined #nim
12:22:26*surma joined #nim
12:22:26*LyndsySimon joined #nim
12:22:26*RushPL joined #nim
12:22:26*Syneh_ joined #nim
12:22:26*gsingh93 joined #nim
12:22:26*JStoker joined #nim
12:22:26*cyraxjoe joined #nim
12:22:26*zielmicha_ joined #nim
12:22:26*r4vi joined #nim
12:27:59*gangstacat quit (Quit: Leaving)
12:30:05*kunev quit (Ping timeout: 240 seconds)
12:30:43*kunev joined #nim
12:32:39YardanicoFromGitter yay
12:33:40FromGitter<krux02> @Yardanico: I actually use result in c++, too
12:39:01*BigEpsilon joined #nim
12:40:48BigEpsilon@Araq, here it is about that bug in compiler/render https://github.com/nim-lang/Nim/pull/6296
12:42:10Yardanicokrux02: oh, wait, there's result in c++? cool
12:43:45AraqBigEpsilon: nice you even wrote a test case
12:46:07couven92Araq, basically, I can get almost the entire compiler to compile with the Android NDK...
12:46:27couven92Except for globbing... There's no glob.h in android
12:46:51couven92(which is why termux includes it)
12:46:56couven92suggestions?
12:47:02FromGitter<BigEpsilon> yes :)
12:47:27FromGitter<BigEpsilon> @Araq , yes :)
12:47:32FromGitter<BigEpsilon> sry
12:48:20Araqsteal from termux's glob.h implementation?
12:49:10couven92yeah... that's what everyone else also suggests (except to steal it from FreeBSD)
12:49:15*ShalokShalom_ is now known as ShalokShalom
12:50:55Yardanicocouven92, yeah it's only 1 file
12:50:55Yardanicohttps://github.com/termux/termux-packages/tree/master/packages/libandroid-glob
12:50:58Yardanico1 header and 1 c file
12:51:06Yardanicoonly ~1kloc
12:51:13Yardanico~800 loc
12:51:22YardanicoLol
12:51:28Yardanico * This code is derived from software contributed to Berkeley by Guido van Rossum.
13:05:37*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
13:07:19*mahsav joined #nim
13:09:51*mahsav2 quit (Ping timeout: 248 seconds)
13:11:37*BigEpsilon quit (Quit: Leaving)
13:14:37*dom96|w joined #nim
13:22:16*mahmudov joined #nim
13:32:58*relax joined #nim
13:37:40*yglukhov joined #nim
13:43:37FromGitter<krux02> @Yardanico well when you declare a variable and call it result, then yes
13:43:55Yardanicoah :)
13:45:39*rosshadden joined #nim
13:51:43*mahsav2 joined #nim
13:53:33*mahsav quit (Ping timeout: 252 seconds)
13:56:27*endragor quit (Remote host closed the connection)
13:58:10*endragor_ joined #nim
14:01:03*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
14:01:32*miran joined #nim
14:02:52*endragor_ quit (Ping timeout: 260 seconds)
14:05:49*abeaumont joined #nim
14:06:18*yglukhov quit (Remote host closed the connection)
14:09:04*ldleworker is now known as ldlework
14:09:05*ldlework quit (Changing host)
14:09:05*ldlework joined #nim
14:09:29miranany idiomatic way to get unique characters in a string? (the python way is to convert it to a set)
14:09:52*PMunch quit (Quit: Leaving)
14:10:33mirancurrently i'm iterating through string, checking if a character is not in a sequence of characters and then add the character to it.
14:13:40Yardanicomiran, https://nim-lang.org/docs/sets.html ?
14:14:03Yardanicoyeah it works
14:14:19Yardanicobut probably not for unicode
14:14:39Yardanicoif you want unicode - you'll need to convert your string to runes
14:14:51Yardanicoyeah that works
14:15:05Yardanicomiran, https://gist.github.com/Yardanico/b4182c1391b67a0039baa809460e0432
14:15:28Yardanicoif you care only about ASCII - you don't need toRunes
14:15:49mirantoSet works, thanks Yardanico
14:16:18Yardanicowell if you want to create set and then add to it - you can use initSet
14:18:40mirancurrently i just need to iterate through the unique chars, but initSet will probably be useful in the future
14:31:29*relax quit (Ping timeout: 248 seconds)
14:50:26*nsf quit (Quit: WeeChat 1.9)
14:51:19*nsf joined #nim
14:56:34*Vladar quit (Quit: Leaving)
15:03:57*arnetheduck quit (Ping timeout: 252 seconds)
15:04:32*Trustable joined #nim
15:07:06*gangstacat joined #nim
15:09:30*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
15:15:44*dom96|w joined #nim
15:23:52*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
15:32:37*dom96|w joined #nim
15:33:23*yglukhov joined #nim
15:41:48*relax joined #nim
15:51:53*BigEpsilon joined #nim
16:02:30couven92How do I copy the value of a Nim string into an already allocated cstring?
16:06:09euantorCould probably use `copyMem`: https://nim-lang.org/docs/system.html#copyMem,pointer,pointer,Natural
16:08:15FromGitter<BigEpsilon> @Araq , I made a PR to add support for cpp integer template parameters to c2nim: https://github.com/nim-lang/c2nim/pull/95 ⏎ non a temple of that form: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a6e2ee9acddb2407e5b28a]
16:09:57*BitPuffin|osx quit (Remote host closed the connection)
16:10:42*BitPuffin|osx joined #nim
16:10:52*endragor joined #nim
16:15:12*endragor quit (Ping timeout: 240 seconds)
16:19:16couven92YES! Araq, Yardanico: I got nim running on my phone WITHOUT termux! :)
16:19:25Yardanicocouven92, ohhhh
16:20:28couven92And it can run nimscript!
16:20:41FromGitter<BigEpsilon> wow great !
16:21:10couven92I have not cross-compiled gcc, so I can't actually compile anything with my binary, but we know that part works in termux where we have gcc
16:21:59YardanicoI've found this: https://code.google.com/archive/p/native-android-development/downloads
16:22:06Yardanicoandroid gcc 4.4.0
16:22:23Yardanicoit's precompiled binary
16:23:30couven92Hmm... might work :)
16:23:53couven92from 2011! :P
16:23:56Yardanicoyeah !
16:24:15YardanicoI've found it here: https://stackoverflow.com/questions/11852187/how-to-compile-gcc-for-android
16:24:25couven92precompiled clang would actually also be fine, but...
16:24:44Yardanicowell gcc from 2011 isn't the best
16:24:48couven92let's get this working for ONE compiler first, right :P
16:24:54Yardanicoyeah
16:28:01couven92Yardanico: "./android-gcc-4.4.0/bin/arm-eabi-gcc": error: only position independent executables (PIE) are supported.
16:28:12Yardanicocouven92, ehh
16:28:37couven92yeah... I had this with Nim as well, but I fixed it by putting -fPIE -pie into the CFLAGS
16:28:47Yardanicoyeah so we'll need to compile GCC with these flags as well
16:29:01couven92Wuhuu! No, not doing that today :P
16:29:15Yardanicocross-compile GCC to android
16:29:21Yardanicomuch fun :D
16:29:38couven92well... I'd much rather fix Nim! :D
16:30:34couven92BTW, Yardanico: cross-compiling Nim with the NDK is a pain! :D
16:30:54Yardanicocouven92, well I knew it is. I heard that NDK itself is a pain :)
16:33:22couven92Yardanico, would you mind cloning the `android-ndk` branch from https://github.com/couven92/Nim.git to test that everything still behaves nicely on termux?
16:33:54Yardanicocouven92, ok
16:34:00couven92ah, wait
16:34:26Yardanicoyou've removed termux entry :)
16:34:28couven92you're on ARM64, right... okay, I probably need to include android-glob there as well...
16:34:54couven92yeah... turns out, there's no difference (I hope) between termux and vanilla Android
16:36:39couven92Yardanico, okay, there you go
16:37:51YardanicoOk I'll clone it now
16:39:15YardanicoI'll compile it using my normal nim compiler (which is already installed in termux)
16:39:28couven92that should work... hehe...
16:40:49Yardanicoalso git (at least github) is case-insensitive, so https://github.com/nim-lang/Nim and https://github.com/nim-lang/nim are equal
16:41:55Yardanicocouven92, it seems it works in termux!
16:46:48couven92Yardanico, Yuhuuu! :D
16:47:33couven92Okay, then I'll try to get on the next bus home, and then Araq I'll at the sigtimedwait issue on old Android
16:48:07*sleepyqt joined #nim
16:49:25couven92Araq, cross-compiling using the NDK and totally avoiding termux was a little bit compilicated... I should write that down for next crazy person to attempt this, right?
16:55:59*xet7 joined #nim
16:57:47Yardanicocouven92, yeah, maybe as a post for nim blog !
16:57:59couven92:)
17:01:10*yglukhov quit (Remote host closed the connection)
17:01:22couven92Ah Yardanico: "Since Android Lollipop, Android has required that executables be linked as position independent (-pie) to help provide ASLR."
17:01:32Yardanicocouven92, yeah
17:04:54couven92Yardanico, this might actually make cross-compiling GCC somewhat easier...
17:04:57couven92https://gist.github.com/nddrylliog/4688209
17:05:42*mahmudov quit (Remote host closed the connection)
17:12:04*BigEpsilon quit (Ping timeout: 255 seconds)
17:13:59*sleepyqt quit (Quit: WeeChat 1.9)
17:14:15*couven92 quit (Quit: Client disconnecting)
17:16:10*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
17:17:56*dom96|w joined #nim
17:20:44*ldlework quit (Quit: co'o ro pendo be mi)
17:23:22*BigEpsilon joined #nim
17:24:53*ldlework joined #nim
17:24:53*ldlework quit (Changing host)
17:24:53*ldlework joined #nim
17:29:51*aasaad joined #nim
17:34:24*aasaad quit (Ping timeout: 260 seconds)
17:37:16*relax quit (Ping timeout: 255 seconds)
17:40:35*BigEpsilon quit (Ping timeout: 240 seconds)
17:41:14*Trustable quit (Remote host closed the connection)
17:43:10*Nobabs27 joined #nim
17:44:09*couven92 joined #nim
17:46:56*PMunch joined #nim
17:47:42couven92Is there a way (e.g. with a pragma) to get nim to send the right add lib argument to the linker?
17:47:56couven92Like a smart passL pragma?
17:48:50couven92then we could omit the -landroid-glob config and put it into lib/pure/posix.nim instead
18:02:49Araqcouven92: that's worse as that config option causes problems.
18:03:01Araqhowever, you do not need to port glob.c
18:04:15Araqhttps://nim-lang.org/docs/os.html#walkPattern.i,string
18:04:25Araq"pattern is OS dependent, but at least the "*.ext" notation is supported."
18:04:40AraqNim's stdlib is suprisingly good sometimes :P
18:04:49Araqyou only need to implement the star
18:09:13couven92Araq, ah, you mean we should write our own minimalist Android-glob to rid ourselves of the dependency?
18:09:23Araqyes!
18:09:45ArrrrI think this should be treated as a bug https://pastebin.com/x6j3w0cf really annoying
18:10:10Yardanicowell there's no actual way to have usual arguments after keyword arguments
18:10:36ArrrrWhy?
18:10:44YardanicoI don't know, ask Araq :)
18:11:25ArrrrHe told you that?
18:11:57Yardanicono, but I think there's no way
18:12:16ArrrrWhy do you believe that?
18:12:26Yardanicobecause I've tried myself :D
18:12:35ArrrrThat's interesting.
18:13:16ArrrrI don't know how the compiler works, so i cannot say anything
18:13:19Araqthat's not a bug, we don't do overloading resolution based on nondeterministic state machines
18:13:43Araqin fact, I don't think there is a single language out there that supports that
18:14:05*Nobabs27 quit (Quit: Leaving)
18:14:35ArrrrWhy can't you make a fun(b: bool) which under the hood calls fun(1, b)
18:14:56Yardanicowhy you can't?
18:15:02YardanicoI do this
18:15:32YardanicoAraq, yeah, even python doesn't allow that
18:15:36YardanicoSyntaxError: non-default argument follows default argument
18:15:42ArrrrOf course, but would be a good idea if the compiler does it for me
18:16:01Arrrri save 3 lines
18:16:09*nsf quit (Quit: WeeChat 1.9)
18:24:57*Nobabs27 joined #nim
18:30:08*relax joined #nim
18:37:31*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
18:42:51*pilne joined #nim
18:43:25*nsf joined #nim
18:44:47Araq3 lines for you, 100 lines in the compiler and a never ending stream of new bugs, no thanks
18:47:28*claudiuinberlin joined #nim
18:47:36claudiuinberlinhello everyone
18:48:02Yardanicoclaudiuinberlin, hi
18:48:14claudiuinberlinI'm an old ruby guy, and I would like in my free time to invest in a new language, so here I'm an nim channel. I do try cristal, d, and now nim
18:48:23claudiuinberlinwhat is the status of the language?
18:48:38claudiuinberlincrystal is super beta, d is forever in beta, so nim?
18:49:09Yardanicoclaudiuinberlin, well, as Araq once said on the forum - he wanted to make nim 1.0 years ago, but community disagreed
18:49:32claudiuinberlinso, still in beta?
18:49:58Araqno, Nim 0.17.0 is Nim 2017 :P
18:49:58ArrrrAlpha wolf
18:51:25Araqkidding aside, Nim is forever in beta too.
18:51:50Yardanicoclaudiuinberlin, but not super beta because we have all platforms support :D
18:52:12claudiuinberlinthx for the replies
18:52:16Araqwe also have very good backwards compatibility, ymmv
18:52:18claudiuinberlinwhat is the ecosystem?
18:52:25claudiuinberlinfor example, in d is missing :)
18:52:32claudiuinberlinand in crystal is on ryby :))
18:52:50Yardanicoclaudiuinberlin, well, same for Nim I guess
18:53:22claudiuinberlinok :)
18:53:25claudiuinberlinthx guys!
18:53:36claudiuinberlinbrew install nim :d
18:53:42Yardanicoyeah this would work
18:53:50claudiuinberlinany editor, sublime, vim ?
18:53:53ArrrrThe ecosystem is do your own bindings. but in nim is really easy.
18:54:10Yardanicoclaudiuinberlin, well, the most complete one - VSCode + nim plugin
18:54:31Yardanicoit uses nimsuggest tool (tool built with nim compiler to provide suggestions for Nim code) to add autocompletion
18:54:58Yardanicowell there's also plugins for vim/sublime/emacs etc
18:55:13Yardanicoclaudiuinberlin, https://github.com/nim-lang/Nim/wiki/Editor-Support
18:56:07claudiuinberlin<Yardanico> tjx
18:56:10claudiuinberlinthx*
18:56:20claudiuinberlinthx guys
18:56:29claudiuinberlinI will try doing some hello world
18:56:35claudiuinberlinthen ffi with ruby :)
18:56:42claudiuinberlinthat is my goal
18:57:07claudiuinberlinanother question, there is any roadmap?
18:57:21claudiuinberlinand you are backed by some companies, or lonely birds like dlang?
18:59:59Arrrrhttps://github.com/nim-lang/Nim/blob/devel/todo.txt
19:01:44*yglukhov joined #nim
19:05:29claudiuinberlinthx
19:05:55claudiuinberlinouch here: - try to fix as many compiler crashes as reasonable :)
19:05:57*yglukhov quit (Ping timeout: 252 seconds)
19:07:22*couven92 quit (Ping timeout: 260 seconds)
19:07:33*Nobabs27 quit (Quit: Leaving)
19:08:37claudiuinberlinhow you guys evaluate with crystal or dlang?
19:08:53claudiuinberlinffy, the vcode is amazing, and the binary is really small!
19:09:21miranclaudiuinberlin: "any editor, sublime, vim ?" -> i just started with nim few days ago, but i had a nice time with nim in vs code
19:09:36Yardanicoclaudiuinberlin, install nim extension and "vscode-icons" to add Nim icons :)
19:12:37*relax quit (Ping timeout: 260 seconds)
19:12:57claudiuinberlinok, what is most suitable and simple way for a champ like me to use nim and be happy?
19:13:12claudiuinberlinwhere nim is great and where I shloud focus
19:13:29claudiuinberlin2 weeks of holidays in spain and I prefer do relax writing some stuff :)
19:14:07ArrrrA lot of people around here make videogames.
19:14:24ArrrrOne has a game on steam
19:14:42claudiuinberlinreally?
19:14:42claudiuinberlinwow
19:14:46claudiuinberlinI will but the book
19:14:58claudiuinberlinnim in action so I fell that I help the people behind
19:17:00*miran quit (Remote host closed the connection)
19:18:27claudiuinberlindone
19:18:30claudiuinberlinnew book!
19:19:20claudiuinberlinok guys
19:19:29claudiuinberlinI would like to thx a lot for the kind replies
19:19:32claudiuinberlinI have a book now
19:19:34claudiuinberlinand some spare time
19:20:53PMunchHmm, why do seq have int as their index? And not uint
19:23:23*dom96|w joined #nim
19:27:10FromGitter<zacharycarter> can anyone explain why this doesn't work?
19:27:22FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a7119abc46472974dbfd58]
19:27:35FromGitter<Yardanico> one sec
19:27:42FromGitter<zacharycarter> type mismatch: got (Future[system.string]) ⏎ ⏎ but expected one of: ⏎ proc await(fv: FlowVarBase) ⏎ proc await(fv: FlowVarBase) ... [https://gitter.im/nim-lang/Nim?at=59a711aeee5c9a4c5f178550]
19:27:59Yardanicobecause you didn't import asyncdispatch :D
19:28:03Yardanico"import asyncdispatch"
19:28:03FromGitter<zacharycarter> oh
19:28:07Yardanicooh wait
19:28:11Yardanicodo you want to use threads?
19:28:14FromGitter<zacharycarter> yeah
19:28:15Yardanicoor async?
19:28:18FromGitter<zacharycarter> oh wait
19:28:19FromGitter<zacharycarter> duh
19:28:21FromGitter<zacharycarter> :P
19:28:23FromGitter<zacharycarter> thanks
19:28:30Yardanicowith async you need "asyncdispatch", not "threadpool"
19:28:47FromGitter<zacharycarter> I gotcha, i'm just being stupid thanks Tiberium
19:28:51Yardanicowell it would still throw an error
19:29:01Yardanicobecause you can use "await" only inside of a async proc
19:29:26FromGitter<zacharycarter> gotcha
19:29:42FromGitter<Yardanico> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a71226ee5c9a4c5f1787c1]
19:29:53*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
19:30:54FromGitter<zacharycarter> awesome thank you
19:31:08FromGitter<Yardanico> and you don't need experimental too :)
19:34:39FromGitter<zacharycarter> this is really what I'm trying to do
19:34:45FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a71355ba0f0f6e38fd520c]
19:34:50FromGitter<zacharycarter> but I don't know if it's possible
19:35:58FromGitter<Yardanico> well you can do that with async too I think
19:36:16FromGitter<Yardanico> but only if you don't need to do heavy computations
19:37:07FromGitter<zacharycarter> hrm
19:38:22FromGitter<Yardanico> I don't know if httpclient is thread-safe
19:38:30FromGitter<Yardanico> if it is - you can use your code like this
19:38:43FromGitter<Yardanico> like you wrote it
19:39:36FromGitter<zacharycarter> gotcha
19:40:08Yardanicohow can I profile memory usage of my application to see what takes RAM?
19:43:37YardanicoI've tried to use massif, but it only shows heap usage, which is ~100-200kb for my app (is this very bad?). My app usually uses 8-20mb ram, I know this is not much, but I really want to know what takes it :)
19:50:51FromGitter<zacharycarter> hmm I guess httpclient isn't gcsafe
19:51:09FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a7172c162adb6d2e4ed6eb]
19:51:10FromGitter<zacharycarter> doesn't work
19:51:29FromGitter<Yardanico> because you're trying to use global variable
19:51:35FromGitter<zacharycarter> oh
19:51:38FromGitter<Yardanico> global variables
19:52:15FromGitter<zacharycarter> okay yeah I got it now thanks
19:54:05*couven92 joined #nim
19:58:54*gangstacat quit (Quit: Leaving)
20:01:18Yardanicohmm, I googled a bit.. so there's no way to actually see what objects in my app take most of RAM?
20:01:41*mahmudov joined #nim
20:01:47FromGitter<zacharycarter> not sure
20:01:58FromGitter<zacharycarter> I can only help with osx :/
20:02:48FromGitter<zacharycarter> wondering why I'm getting different output from these 2 snippets
20:03:22FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a71a0a9acddb2407e6c080]
20:03:46*Serenitor joined #nim
20:04:55FromGitter<zacharycarter> I think I get it
20:06:45*StephenLynx joined #nim
20:07:04StephenLynxI was curious, does nim actually compiled a binary on its own or it can just transpile to another language?
20:07:10StephenLynxactually compiles*
20:08:01YardanicoStephenLynx, compilation = transpiling
20:08:14Yardanicobecause you can say that Rust "transpiles" to LLVM
20:08:18Yardanico*LLVM IR
20:08:19PMunchIt compiles (not transpiles) to C, which is then turned into a binary by your compiler of choice
20:08:28StephenLynxhow does it compiles to C?
20:08:42StephenLynxit generates C source or binary objects? (.o)?
20:08:45YardanicoStephenLynx, no
20:08:48PMunchC source
20:08:54StephenLynxso it transpiles to C.
20:08:54YardanicoStephenLynx, it creates C/C++/Objective C source code
20:09:01StephenLynxand C++
20:09:04PMunchCompiles*
20:09:06Yardanicoand Objective C
20:09:22Araqno, it *compiles*, C does not "transpile" to Assembler either.
20:09:34StephenLynxhow is it a compilation if the source code has to be compiled?
20:09:40PMunchCompiling is the general term for taking source code written in one language and transforming into another.
20:09:40PMunchTranspiling is a specific term for taking source code written in one language and transforming into another language that has a similar level of abstraction.
20:09:58StephenLynxso when you take nim code and get C code is just transpiling, right?
20:09:59PMunchSource: https://www.stevefenton.co.uk/2012/11/compiling-vs-transpiling/
20:10:03YardanicoStephenLynx, no
20:10:24Araq"transpiling" is a verb with no sane semantics
20:10:35Araqand worse, it's super ugly.
20:10:37YardanicoA compiler is computer software that transforms computer code written in one programming language (the source language) into another computer language (the target language).
20:10:53Yardanicosource language: Nim, target language: C
20:10:55PMunchNope, when you compile to C it evaluates macros and templates, does compile time bounds checking etc. etc. etc. Thus the resulting C code is not at the same level of abstraction, it's lower
20:11:59Yardanicohow many times will people ask "why nim transpiles to C?"
20:12:07PMunchLook at it this way, transpile is translating a sentence from English to French, compiling is translating a sentence from English to something a child could understand in English.
20:13:29StephenLynxplease go on, all this mental gymnastic is quite the spectacle.
20:13:51Araq"transpile" is no word, there is "compile" and "translate" and translate is an umbrella term
20:14:34StephenLynxI find it funny you think its a different level of abstraction when its on the same. you give it human readable code and get human readable code.
20:14:51StephenLynxby your logic, a library is a lower level of abstraction.
20:15:05YardanicoStephenLynx, well, asm is human-readable too :)
20:16:06StephenLynxi could also argue that asm is not portable.
20:16:08StephenLynxC is.
20:16:36*StephenLynx left #nim (#nim)
20:17:03Arrrrlol
20:17:20Arrrryou transpiled him into a ban
20:17:27YardanicoxD
20:17:30FromGitter<xmonader> Do we really have to exhaustively match cases in nim? for instance parsing with parseargs2 library?
20:17:45couven92I liked your French analogy PMunch! :)
20:17:50FromGitter<xmonader> Ocaml displays a warning if you don't match enough
20:18:06Yardanicoxmonader: what library do you mean?
20:18:18AraqI have a bad headache so my tolerance for trolls is low, sorry :P
20:18:43FromGitter<zacharycarter> I could still use help here - trying to make http requests in parallel and banging my head against the wall
20:18:47couven92Araq, that's fine... Go make youself a cup of tea! :)
20:19:14FromGitter<xmonader> @Yardanico sorry, I meant parseopts2
20:19:40Yardanicooh, you don't need to match all cases
20:19:42Araqxmonader: use an 'else: discard' branch in your case statement?
20:19:44Yardanicojust add "else: discard"
20:19:49Araqyep.
20:20:15Araqzacharycarter, hey, what's the problem?
20:20:19*Yardanico quit (Remote host closed the connection)
20:20:36FromGitter<zacharycarter> I just don't get how to do this Araq:
20:20:45FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a71e1dba0f0f6e38fd889f]
20:20:48FromGitter<zacharycarter> or something similar to it
20:20:58*tdc quit (Ping timeout: 246 seconds)
20:21:00FromGitter<xmonader> Really? Didn't thought that was allowed because it was practical example from the docs https://nim-lang.org/docs/parseopt2.html
20:21:11FromGitter<xmonader> but totally makes sense. Thank you guys :)
20:21:35*Sentreen quit (Ping timeout: 240 seconds)
20:22:39FromGitter<xmonader> Also, I really want to say, I love the pascal influence in the language design. It's one of the main reasons I decided to give nim a shot :)
20:23:19Araqzacharycarter: parallel likes to analyse things and that means you should wrap stuff in a main proc to help the analyser
20:24:19Araqbut your code is not gcsafe at all, seems easy enough to make it so though
20:24:36FromGitter<zacharycarter> okay
20:24:37FromGitter<zacharycarter> I'll do that
20:24:46FromGitter<zacharycarter> thanks
20:25:04Araqinstead of 'i' pass compCodes[index] to your getDealerProfile
20:25:26Araqso that getDealerProfile doesn't access eligibleDealerCompCodes
20:25:41FromGitter<zacharycarter> gotcha
20:26:36PMunchHaha Araq, poor guy :P
20:26:39*vlad1777d joined #nim
20:26:40PMunchcouven92, thanks :)
20:26:52FromGitter<zacharycarter> thanks for the help Araq: hope the headache gets better
20:27:25Araqwell it's a flu, but thanks
20:28:34*rosshadden quit (Quit: WeeChat 1.9)
20:30:17couven92Araq, Gute Besserung! :)
20:30:29Araqdanke danke
20:30:57PMunchOh couven92, we should start preparing our talk on Nim
20:31:06PMunchDid we ever set a date for it?
20:31:10FromGitter<ephja> `static: for x in [1, 2, 3, ...]: f(x)` where `f` takes a `static[int]` is broken, right?
20:31:21FromGitter<ephja> I wonder if it works with an intermediate const
20:31:42couven92no, but I keep telling TD that we're going to do it, I'd say aim for beginning october
20:33:03PMunchI vote for not the first week but the second
20:33:16PMunchSo 9-13th
20:33:55couven92Fine by me... But the week after that I gotta teach low-level tech to some high school teachers
20:34:24couven92And we also need to deliver our M.Scs! Anders wants to see you! :P
20:34:36PMunchThen he should tell me -_-
20:34:50*Sentreen joined #nim
20:34:57PMunchThat's why I said we should aim for second week, to give us at least one week of prep
20:35:08couven92+1
20:38:46*relax joined #nim
20:39:16couven92PMunch, I was actually thinking... How do we create an easy task for people to actually learn something about macros?
20:39:56PMunchWait, are we doing a workshop or a talk?
20:40:41couven92both! I talk (it's what I do best) and you can pet people while they work on a workshop-task :P
20:41:24couven92I actually dunno... workshop would be nice though... But it's... WORK! :P
20:42:37couven92I mean, look at your Functional programming talk.... Everybody loved it and lot of people said "yeah, I should totally start to do functional programming"
20:43:26couven92But ultimately, they still just stick to their python, because nobody feels that they have the time to learn a new language
20:43:48PMunchTrue
20:44:05PMunchSo an hour talk as an introduction, and then some workshop stuff after that?
20:44:22PMunchTalked to the university about pizza? Or TD?
20:44:30PMunchMaybe we should move this to a PM by the way :P
20:45:16couven92Yeha, sorry people! We aren't trolls! :P (Don't hurt us Araq :D )
20:45:18dom96ooh
20:45:24dom96feel free to discuss it here
20:45:31dom96I'm interested :)
20:46:04couven92PMunch, TD got lot's of money, so pizza should work out fine, even if IFI didn't sponsor us :P
20:47:09couven92"panem et circenses" it's important, right? :D
20:47:36PMunchHaha, we supply the circus, they supply the bread?
20:47:59FromGitter<zacharycarter> alright
20:48:09FromGitter<zacharycarter> I ditched threadpool and moved to async / await
20:48:18FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a72492162adb6d2e4f130e]
20:48:23FromGitter<zacharycarter> still not working
20:48:36FromGitter<zacharycarter> getting a sigsev error from that
20:49:10couven92dom96, got an idea how to get an obvious but simple macro application into a beginners workshop?
20:50:01PMunchMaybe a simple DSL?
20:50:09couven92alternatively, just do templates with OOP stuff (like in the manual) and just don't do macros
20:50:13PMunchSomething like the JSON example from the docs?
20:50:35dom96Maybe a HTML generator DSL?
20:51:57couven92Hmm... we've had so many Web-focused workshops at UiT in the last year, so I kinda wanted to do sth not web-related...
20:52:23couven92(But that's just me, though)
20:52:27PMunchYeah, I think a lot of people at UiT are more focused on low-level stuff anyways
20:52:39couven92yup
20:53:21couven92we're teaching C from the 1st semester, so definitely low-level people! :D
20:55:56PMunchdom96, a HTML generator DSL is nice. But it only returns strings, which is a bit boring.
20:56:12PMunchThe genui macro is pretty cool, but a bit complex..
20:58:07*relax quit (Ping timeout: 248 seconds)
20:59:03Araqzacharycarter, ok but now it's dom96's turn, not mine
21:00:05FromGitter<zacharycarter>
21:00:08*livcd quit (Ping timeout: 240 seconds)
21:00:37dom96zacharycarter: stack trace?
21:01:11*livcd joined #nim
21:01:32FromGitter<zacharycarter> I just got in the car as soon as I get home I'll post it and ping you
21:10:28claudiuinberlinI found `*` idea to mark procedures and type as public strange :)
21:10:40claudiuinberlinI was think a, look ma'am pointers
21:10:41claudiuinberlin:))
21:11:00PMunchYeah it takes a little bit getting used to
21:11:19Araqwhen I learned C, I thought "huh, multiplications everywhere"
21:11:26claudiuinberlin:))
21:11:31couven92Nice! :D
21:11:34PMunchYeah, C is also very confusing with pointers :P
21:11:59claudiuinberlinalso, proc instead of def like all the other people :d
21:12:02claudiuinberlinjoking here
21:12:15PMunchWell, that actually makes more sense
21:12:18claudiuinberlinfn, fun, function, def, proc
21:12:33PMunchI've started calling them procedures now :P
21:12:44PMunchAnd reserving function for, well, functions
21:12:53couven92don't forget Pascal and Delphi that distiguish between procedure and function! :P
21:12:59claudiuinberlinyes
21:13:08claudiuinberlinI was thinking about this
21:13:08claudiuinberlin:))
21:13:28PMunchAraq, the func keyword is still planning to be added right?
21:13:41claudiuinberlinwhy not def then
21:13:42claudiuinberlinand public
21:13:45couven92what do we want for func?
21:13:51couven92pure functions?
21:13:54claudiuinberlinanyway, did the chat app from the book
21:13:54PMunchproc {.noSideEffect.}
21:14:01claudiuinberlinsimple language
21:14:08claudiuinberlinwhen I do some rust
21:14:13claudiuinberlinI fell dump after 30 minutes
21:14:32AraqPMunch: I am not sure about its semantics
21:14:46PMunchHmm, what do you mean?
21:14:48dom96claudiuinberlin: enjoying the book? :D
21:14:54claudiuinberlinthe book is really nice
21:15:05dom96'def' makes less sense when you consider what it stands for... define
21:15:09dom96You defined variables too.
21:15:10PMunchI thought the idea was just that func should add the {.noSideEffect.} pragma
21:15:12dom96*define
21:15:12claudiuinberlinthe std chapter, I will ignore it
21:15:20claudiuinberlinas I can read the documentation by myself :)
21:15:29dom96claudiuinberlin: Sure, feel free.
21:15:40claudiuinberlinbut really nice
21:16:01claudiuinberlinmy goal is to make some deploy tool :)
21:16:06dom96I'd be interested to hear the gaps in knowledge that programmers who have only read my book have
21:16:15dom96so that I can write some articles hopefully fill that gap :)
21:16:17claudiuinberlinwe are using not, dokku and in the past, mina-deploy
21:16:25couven92dom96, Sorry I am planning on stealing the book from PMunch from time to time... I have no bookshelf in my small little room... :(
21:16:48PMunchcouven92, get the e-book version ;)
21:16:55claudiuinberlinyes, much better
21:17:00dom96couven92: heh, that's fine.
21:17:06PMunchThen you can print it page by page and use the read pages as kindling for the winter :)
21:17:12claudiuinberlin:))
21:17:28claudiuinberlinyou can use kindle and use it as a book
21:17:31couven92there is one? Yeah, ebook would be fine
21:17:40claudiuinberlinjust turn the kindle, everytime you finish the page
21:17:56FromGitter<xmonader> Quick question, If I created a macro that generates data classes would be less performant than tuples?
21:17:57claudiuinberlinthe book will be finishi this eyar?
21:18:18PMunchclaudiuinberlin, it is finished. Have a nice physical copy right next to me
21:18:30*vlad1777d quit (Ping timeout: 252 seconds)
21:18:31claudiuinberlinwell mine says MEAP
21:18:33claudiuinberlinversion1-
21:18:36claudiuinberlin10
21:19:00couven92yes, dom96, PMunch actually brought his copy with him the other day when he came over... And it's so nice, that I want to honor it with a proper special place which I don't have :P
21:19:09claudiuinberlinand I just take it few hour ago
21:19:34PMunchHmm, seems like the Manning page is down :(
21:19:57dom96couven92: :D
21:20:35dom96xmonader: Depends what code the macro generates.
21:20:47dom96claudiuinberlin: It's already finished.
21:20:57claudiuinberlinwell it shows meap for me
21:21:04dom96You might want to check for a new version on Manning's site
21:21:15claudiuinberlinhmm
21:21:24claudiuinberlinI get it 2 hours ago :)
21:21:28FromGitter<xmonader> @dom96 a ref object with fields/properties
21:21:38claudiuinberlinI dont think is a new versions from that time
21:22:18dom96claudiuinberlin: weird, might want to contact Manning support
21:22:25claudiuinberlini will
21:22:31claudiuinberlinwhen the site is up :)
21:22:38claudiuinberlinthere is not much oop in the book
21:22:47claudiuinberlinas I can see, or in mine version of book
21:22:58dom96yep, there is none in fact.
21:23:14dom96xmonader: should be performant.
21:23:43FromGitter<xmonader> Perfect ^_^
21:23:43claudiuinberlinis nim better as more to procedural and functional, than oop?
21:24:23FromGitter<xmonader> Is there a channel for the internal development of nim/contributions? or all through this channel?
21:24:34couven92all here
21:24:51couven92we got #nim-offtopic on IRC though
21:25:03FromGitter<xmonader> I've a high interest in Nim as I'm trying to convince my current company to embrace it
21:25:28PMunchCool, what kind of company?
21:25:41FromGitter<xmonader> Also, I'm trying to write a book in my native language about nim "arabic"
21:26:08couven92yeah, getting enterprise traction for Nim certainly wouldn't hurt... But beware, we're not in 1.0 yet
21:26:14FromGitter<xmonader> @PMunch It's called greenItGlobe
21:26:36couven92waht do you do?
21:26:39FromGitter<xmonader> @couven92 actually we tried to use it for some internal project as a kickstarter, but we faced bit of problems there
21:26:55couven92what kind of problems?
21:27:17FromGitter<xmonader> @couven92 mainly, cloud provider, also we got our own container system
21:27:33PMunchCool, cool! Well, I'm off
21:27:34*PMunch quit (Quit: leaving)
21:27:42*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:28:07couven92okay... cool! We were thinking about how we would go about getting Nim into an AWS lamda (or similar)
21:28:50FromGitter<xmonader> Mainly we use go, but I've people in support of nim, but not hitting 1.0 was a turn off also some problems with the maturity of the libraries, but I really appreciate the effort
21:29:07FromGitter<xmonader> @couven92 It'd be such a great idea
21:29:36FromGitter<Yardanico> couven92: I heard @zacharycarter used nim in aws lambda
21:29:57*claudiuinberlin joined #nim
21:30:18couven92yes, but I never heard how far he had come
21:30:32FromGitter<xmonader> I wish for more success story and How the community are using it
21:31:05*vlad1777d joined #nim
21:31:07couven92@xmonader Nim in general, or the particular cloud bit?
21:31:26FromGitter<Yardanico> https://aws.amazon.com/ru/blogs/compute/running-executables-in-aws-lambda/
21:31:54FromGitter<Yardanico> Lambda’s built-in sandbox lets you safely run code written in any language
21:33:10FromGitter<xmonader> @couven92 we do lots of systems programming and tools which are dominated by go in the company, and I'd like to change that
21:34:19couven92I see... so for you our work on asyn/await and multithreading is probably the most interesting?
21:35:10FromGitter<xmonader> @couven92 Yup
21:35:20*Arrrr quit (Read error: Connection reset by peer)
21:36:31FromGitter<xmonader> Also the key value store, we had lots of problems with something like sophiadb, we ran into all kinds of problems back then also with redis library .. main libraries should be stabilized :S
21:37:37*nsfw_ quit (Quit: Leaving.)
21:37:37FromGitter<xmonader> I'm off work for 4 days and I'd like to do some POCs in nim
21:38:11FromGitter<zacharycarter> @couven92 @Yardanico I got a nim program running in lambda
21:39:10*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:39:13FromGitter<xmonader> @zacharycarter Interesting, did you document that process? I bet many would be interested in such
21:39:41FromGitter<zacharycarter> I haven't @xmonader I could write a blog post about how I did it, although I still have some improvements to make in the overall solutioning
21:40:08FromGitter<zacharycarter> for instance right now I'm just uploading a binary file and executing it with a python script, ideally we'd do something like golang and compile the nim program to a shared library and use dlopen / dlclose to interact with it
21:40:14*relax joined #nim
21:40:17FromGitter<zacharycarter> that way we could pass around lambda job contexts as wel
21:40:20FromGitter<zacharycarter> well*
21:41:08FromGitter<xmonader> @zacharycarter It'd be great. Thank you ^_^
21:41:12*Sentreen quit (Ping timeout: 240 seconds)
21:41:28FromGitter<zacharycarter> I need a blog :P
21:41:56couven92damn! This is where the Nim community is so dangerous! So many exiciting things where you can be a part of! I am really diverting way too much time from my M.Sc. as it is :(
21:42:07*Zevv left #nim (#nim)
21:43:43FromGitter<zacharycarter> getting Nim into aws lambda is pretty simple
21:43:49couven92nim was my first time ever I had worked OpenSource in a community... AND IT'S SO MUCH FUN working with you guys! :D
21:43:52FromGitter<xmonader> This is why the company paused it's nim adaption https://github.com/recoilme/pudge
21:44:29FromGitter<zacharycarter> You compile your nim program with docker against AWS linux
21:44:57FromGitter<zacharycarter> then you write a python module to execute your nim program
21:45:29FromGitter<zacharycarter> then you zip up your binary and python script and upload them :P
21:45:56FromGitter<zacharycarter> I'm trivializing these steps as they're not 100% straightforward but it's not a huge task I figured it out in an afternoon
21:48:10FromGitter<xmonader> @zacharycarter It makes sense. Thank you ^_^
21:50:12FromGitter<zacharycarter> np!
21:50:36FromGitter<zacharycarter> soon as I get time to start a blog I'll write a post :)
21:50:51FromGitter<zacharycarter> @dom96 :
21:50:57FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a73341c101bc4e3a734d9d]
21:51:45dom96xmonader: wow, what is this, it's the first time I've seen it.
21:52:16dom96zacharycarter: no, Nim stack trace
21:52:21FromGitter<zacharycarter> there is no stack trace
21:52:25FromGitter<zacharycarter> it just segfaults :/
21:52:32dom96there is always a stack trace
21:52:35FromGitter<xmonader> @dom96 Are you talking about pudge?
21:52:40dom96xmonader: yep
21:53:07dom96xmonader: btw, if you're up for it, you could ask my publisher about translating Nim in Action into Arabic.
21:53:41*JStoker quit (Ping timeout: 255 seconds)
21:54:16*Sentreen joined #nim
21:54:21FromGitter<zacharycarter> weird previously I wasn't getting anything now I am
21:54:34FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59a7341a210ac26920db528c]
21:54:51FromGitter<xmonader> @dom96 It's using sophiadb internally, it was nice and the original caller for nim in the company asked a team to use it for a certain project, and they ran into all kinds of errors with it for edge cases
21:55:31dom96zacharycarter: that should help you debug it :)
21:55:42*JStoker joined #nim
21:55:50FromGitter<xmonader> @dom96, About the book, Sure, I was having in mind a fast paced tutorial/book with maybe 1 or 2 practical examples
21:55:51dom96xmonader: it's not even written in Nim :(
21:56:33FromGitter<xmonader> pudge is, sophia is interfaced from c code
21:57:04dom96yeah, it's just a wrapper
21:58:43FromGitter<xmonader> Do you guys have some ideas for some interesting ideas to be done in nim?
21:59:37FromGitter<zacharycarter> graphql library!
21:59:40FromGitter<zacharycarter> oh 4 days
21:59:41FromGitter<zacharycarter> hrm
22:00:45FromGitter<zacharycarter> I'd be impressed with any non trivial async / await or threading examples
22:00:51*Sentreen quit (Ping timeout: 252 seconds)
22:00:51FromGitter<zacharycarter> as that seems to be what I struggle with the most with Nim
22:01:00FromGitter<xmonader> Actually I was working with graph.cool the last couple of days and it's amazing -> definitely should try to do something with nim framework and graphql requests
22:01:29FromGitter<xmonader> Didn't try async/await in nim yet, but I really hope it's not half baked as in python :(
22:03:42dom96zacharycarter: read my book?
22:03:50FromGitter<zacharycarter> I need to
22:03:57FromGitter<zacharycarter> I'm bringing it camping this weekend with me
22:06:06dom96Awesome, but I'd recommend following the examples as you read it
22:07:10FromGitter<zacharycarter> gotcha
22:07:12FromGitter<zacharycarter> I'll start tonight then
22:13:41*Sentreen joined #nim
22:16:00*relax quit (Ping timeout: 248 seconds)
22:26:49FromGitter<xmonader> @dom96 what's the state of this one? https://nim-lang.org/docs/asyncdispatch.html I see lots of "doesn't work" and "doesn't support"
22:27:48dom96State is that it's ready for production but it's still in flux.
22:28:17dom96You have to make some sacrifices for it sometimes, like not using a `try ... catch`
22:28:31dom96but checking for errors inside a Future using an `if`
22:30:48FromGitter<xmonader> Hmm I need to try that out
22:31:20FromGitter<xmonader> Do you consider something like monads or go error style for nim? I see you already have option data type
22:31:40dom96I do like exceptions
22:31:59FromGitter<xmonader> Me too. If it can be used everywhere.
22:34:39FromGitter<xmonader> I've to get some sleep. Thank you guys for the amazing effort and for answering my questions. See ya tmw
22:38:14*relax joined #nim
22:40:31*BitPuffin|osx quit (Ping timeout: 248 seconds)
22:46:11*nsf quit (Quit: WeeChat 1.9)
22:49:48*vlad1777d quit (Remote host closed the connection)
22:54:36*couven92 quit (Quit: Client Disconnecting)
23:04:21FromGitter<zacharycarter> I need to figure out how to upload a file to a s3 bucket
23:05:49FromGitter<zacharycarter> should be simple enough with just http client
23:06:02*loc8 joined #nim
23:07:33FromGitter<zacharycarter> I wish https://github.com/aidansteele/aws_sdk.nim were further along
23:08:55*loc8_ quit (Ping timeout: 276 seconds)
23:09:42*relax quit (Ping timeout: 240 seconds)
23:11:14*relax joined #nim
23:15:19FromGitter<FridgeSeal> Oh yeah I'm dropping back to Python to handle doing AWS things in my lambda function.
23:18:49FromGitter<zacharycarter> hrm
23:19:35FromGitter<zacharycarter> I've written an ET... process. Trying to get the L part working
23:19:37FromGitter<zacharycarter> :P
23:19:41FromGitter<FridgeSeal> Hahahaha
23:19:59FromGitter<zacharycarter> I wonder if there's a C aws sdk library I can wrap
23:20:12FromGitter<FridgeSeal> I was just about to ask if there was a C library...
23:20:41FromGitter<zacharycarter> https://github.com/aws/aws-sdk-cpp
23:20:46FromGitter<zacharycarter> looks like this is it
23:20:57FromGitter<FridgeSeal> Just beat me to it.
23:22:03FromGitter<zacharycarter> @Varriount was working on a Nim AWS project, not sure if he's stalled on that or not, I know he has school starting up soon
23:23:03FromGitter<Varriount> As soon as someone comes up with a way to go without sleep, I can work on it again
23:23:23FromGitter<zacharycarter> :P
23:23:45*Pisuke quit (Ping timeout: 248 seconds)
23:23:58FromGitter<zacharycarter> bleh who knew uploading to s3 could be such a PITA without a client sdk library
23:24:24FromGitter<FridgeSeal> I know right
23:24:28FromGitter<Varriount> The CPP library will be very hard to wrap, as it uses boost and lots of templates
23:24:52FromGitter<Varriount> I was talking a pure-Nim approach.
23:24:52FromGitter<zacharycarter> yeah I gave up as soon as I looked at it
23:25:01FromGitter<zacharycarter> which is ideal for sure
23:25:17FromGitter<zacharycarter> I wasn't aware of - https://github.com/aidansteele/aws_sdk.nim before
23:25:21FromGitter<zacharycarter> but it's totally incomplete
23:25:26FromGitter<zacharycarter> all it can do atm I believe is list buckets
23:25:49FromGitter<Varriount> I have type generation from JSON api schemas done, however authentication is still a work in progress
23:26:08FromGitter<zacharycarter> gotcha
23:26:58FromGitter<Varriount> Did I mention that there are around 6 different ways to make API requests, and each services may only support some of those ways?
23:27:14FromGitter<zacharycarter> no but it sounds about right / as hellacious as AWS seems
23:27:17FromGitter<FridgeSeal> Wow, this already sounds like a nightmare
23:27:49FromGitter<Varriount> I still want to work on the library, but it's definitely not a one-week project
23:28:01FromGitter<zacharycarter> yeah
23:30:06FromGitter<zacharycarter> not being able to upload / retrieve from s3 though is going to kill my solution here / probable chances of using Nim at work
23:30:07FromGitter<zacharycarter> grrr
23:31:55*arnetheduck joined #nim
23:34:07*Matthias247 quit (Read error: Connection reset by peer)
23:35:44FromGitter<Varriount> Use the AWS s3 command line tools
23:36:18FromGitter<zacharycarter> well that's an option for uploading it
23:36:25FromGitter<zacharycarter> but also introduces a huge dependency
23:36:58FromGitter<Varriount> Use a C++ program and export a function?
23:37:10FromGitter<zacharycarter> that could work
23:38:16FromGitter<Varriount> There *is* a pure C aws mini-sdk
23:38:24FromGitter<zacharycarter> oooo
23:38:35FromGitter<Varriount> It's not complete, but it's for embedded devices
23:38:52FromGitter<zacharycarter> oh duh I know what I'll do
23:38:55FromGitter<zacharycarter> muhahaha
23:39:00FromGitter<Varriount> ...?
23:39:04FromGitter<zacharycarter> nodejs to the rescue
23:39:22FromGitter<Varriount> ?
23:39:37FromGitter<zacharycarter> I already have my program to extract and transform and produce a file for loading
23:39:50FromGitter<zacharycarter> so I'll use the aws node sdk and just bind to that
23:39:56FromGitter<zacharycarter> and then run everything from nimscript
23:39:59FromGitter<zacharycarter> maybe
23:40:47FromGitter<zacharycarter> ehh
23:40:51FromGitter<zacharycarter> a better option might just be using a shell script
23:41:27FromGitter<Varriount> Python. ;D
23:41:45FromGitter<zacharycarter> Either way I'll need node or python or something else installed bleh
23:42:39FromGitter<zacharycarter> I'm more likely to have access to node than python
23:42:57FromGitter<zacharycarter> someone is just going to scream at me though "WHY DON'T YOU JUST USE JAVA?"
23:44:03FromGitter<zacharycarter> I'm actually okay with the node + nim solution because we'd be writing this in NodeJS anyway
23:44:17FromGitter<zacharycarter> and it's the performant part that's written in Nim which is the part that matters
23:58:41FromGitter<FridgeSeal> I was lucky enough that I only need to post a single thing to S3, so I could change the structure so that nim does all the work and then python just uploads the result at the end. :)
23:59:20FromGitter<zacharycarter> nice!