<< 08-09-2017 >>

00:00:14FromGitter<zacharycarter> o/
00:00:18def-pri-pubzacharycarter: I sent you a response for the timer module. It looks good, but I think there needs to be a few tweaks and some documentation
00:00:26def-pri-pubCheck the issue tracker for more info
00:01:03*yglukhov quit (Ping timeout: 248 seconds)
00:01:36*vlad1777d quit (Quit: Leaving)
00:03:38*vlad1777d joined #nim
00:06:09FromGitter<zacharycarter> thank you def-pri-pub
00:06:33FromGitter<zacharycarter> I'm working on a wasm branch but I willl look shortly
00:23:25def-pri-pubzacharycarter: do you think you'll have the changes in tonight for the timer?
00:32:04*libman joined #nim
00:42:52FromGitter<zacharycarter> yup!
00:43:08FromGitter<zacharycarter> def-pri-pub ^
01:00:47FromGitter<zacharycarter> def-pri-pub: changes should be up
01:04:03*def-pri-pub quit (Ping timeout: 240 seconds)
01:09:03*Jesin joined #nim
01:15:07*MyMind quit (Ping timeout: 260 seconds)
01:20:51*dddddd quit (Quit: Hasta otra..)
01:22:02*libelulu6 joined #nim
01:37:23*endragor joined #nim
01:38:24*chemist69 quit (Ping timeout: 252 seconds)
01:41:57*endragor quit (Ping timeout: 260 seconds)
01:42:48*sleepyqt quit (Quit: WeeChat 1.9)
01:51:31*linsword13 joined #nim
01:52:03*chemist69 joined #nim
01:58:14*yglukhov joined #nim
02:02:27*pilne quit (Quit: Quitting!)
02:02:36*yglukhov quit (Ping timeout: 252 seconds)
02:28:45*linsword13 quit (Quit: WeeChat 1.9)
03:01:28*vlad1777d quit (Remote host closed the connection)
03:07:30*cspar quit (Ping timeout: 252 seconds)
03:20:14*Serenit0r joined #nim
03:21:21*kier quit (Ping timeout: 240 seconds)
03:23:27*mahmudov quit (Ping timeout: 252 seconds)
03:24:02*Serenitor quit (Ping timeout: 260 seconds)
03:32:09*kier joined #nim
03:35:22*yglukhov joined #nim
03:39:43*yglukhov quit (Ping timeout: 248 seconds)
04:09:11*cspar joined #nim
04:14:58*haha_ joined #nim
04:17:36*haha_ quit (Client Quit)
04:17:56*BigEpsilon joined #nim
04:19:30*def-pri-pub joined #nim
04:19:40*def-pri-pub quit (Changing host)
04:19:40*def-pri-pub joined #nim
04:24:12*endragor joined #nim
04:24:33*endragor quit (Remote host closed the connection)
04:26:26*endragor joined #nim
04:32:51def-pri-pubzacharycarter: I'm not sure if you're here, still up (and I'm going to bed soon), but I saw your commit and left three comments on it.
04:37:42def-pri-pubzacharycarter: well, it's four now.
04:41:15*Serenit0r quit (Quit: Leaving)
04:48:05*MyMind joined #nim
04:49:29*def-pri-pub quit (Quit: leaving)
04:51:07*gokr joined #nim
04:55:04*miran joined #nim
05:00:21*endragor quit (Remote host closed the connection)
05:04:18*endragor joined #nim
05:32:17*miran quit (Ping timeout: 248 seconds)
05:33:39*mahmudov joined #nim
05:37:32*yglukhov joined #nim
05:41:51*yglukhov quit (Ping timeout: 248 seconds)
05:43:50*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:45:49*miran joined #nim
06:06:07*JohnNovak quit (Quit: Page closed)
06:11:53*mahmudov quit (Quit: Leaving)
06:12:47*nsf joined #nim
06:18:10FromGitter<Grabli66> Hi. How to make not gcsafe proc gcsafe?
06:18:21*miran quit (Ping timeout: 252 seconds)
06:20:40FromGitter<mratsim> @Grabli66 Check what is required in the pragma section of the manual, I think noSideEffect implies gcsafe
06:25:47*nohusuro joined #nim
06:26:39FromGitter<Grabli66> I use websocket module, and nim says that readData is not gcsafe "as it performs an indirect call here [GcUnsafe2]"
06:27:05*endragor quit (Remote host closed the connection)
06:27:12nohusuroThat is a warning without threads and an error with threads.
06:27:39nohusuroCan anyone explain why I'm getting SSL certificate validation failures when using this code? http://termbin.com/ud7u
06:28:55*endragor joined #nim
06:29:00*endragor quit (Remote host closed the connection)
06:30:49*endragor joined #nim
06:32:10FromGitter<Grabli66> nohusuro, i do not use threads. Maybe :)
06:34:44nohusurobut do you compile with --threads:on ?
06:35:38FromGitter<Grabli66> i compile "nimble build". May be it adds threads support, i dont know.
06:36:04nohusurowell, do you get an error or a warning for the gcsafe message?
06:36:41FromGitter<Grabli66> ... lib\pure\asyncmacro.nim(55, 3) Warning: 'readData' is not GC-safe as ⏎ it performs an indirect call here [GcUnsafe2]
06:38:48nohusuroso your program still compiles
06:38:55nohusuroand is being compiled without threads
06:39:01FromGitter<Grabli66> Yes
06:39:21FromGitter<Grabli66> But maybe, there is a way to fix that warning?
06:39:33FromGitter<Grabli66> lock, guard, something? :)
06:51:13*cspar quit (Ping timeout: 248 seconds)
06:52:15FromGitter<zacharycarter> def-pri-pub: replied, will fix issues in morning
06:55:01FromGitter<mratsim> I’m trying to run the examples here: https://github.com/jcosborn/cudanim/tree/master/demo1. The is a config.nims that change the compiler to Nvidia nvcc but whatever I do, the config.nims configuration is ignored. Isn’t nim supposed to scan the directory automatically for config.nims?
06:56:02FromGitter<zacharycarter> I got these running the other day
06:56:11FromGitter<zacharycarter> I think the problem is demo1 doesn't have the config.nims in it
06:56:23FromGitter<zacharycarter> oh it does hrm
07:01:56FromGitter<zacharycarter> they're being picked up for me
07:02:04FromGitter<zacharycarter> if I run compile in the ex1 dir
07:02:08FromGitter<zacharycarter> it uses the nvcc compiler
07:03:11FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/acGE/Screen-Shot-2017-09-08-at-3.02.55-AM.png)
07:05:18*Vladar joined #nim
07:05:18FromGitter<mratsim> strange >_>
07:07:24*PMunch joined #nim
07:12:43*nattefrost joined #nim
07:19:36*Zevv joined #nim
07:20:01ZevvHi; I'd like to compile a C file into a Nim app; how do I tell the Nim compiler to link in my .o?
07:21:31FromGitter<mratsim> @Zevv you can use importc pragma to use the C function directly in nim
07:21:52ZevvThat works, but it's about the link phase
07:22:09ZevvI now add --passL:foo.o to the nim compiler
07:22:17Zevvworks, but not sure if it is the intended way
07:23:13FromGitter<Grabli66> What todo with whis? I build with "nimble build" ⏎ ⏎ Warning: Package 'BombardoServer' has an incorrect structure. It should conta ⏎ in a single directory hierarchy for source files, named 'BombardoServer', but fi ⏎ le 'limitedStream.nim' is in a directory named 'common' instead. This will be an ... [https://gitter.im/nim-lang/Nim?at=59b24561bac826f054922afc]
07:23:43FromGitter<mratsim> @Zevv, check what def-pri-pub does there: https://github.com/define-private-public/stb_image-Nim/tree/master/stb_image
07:24:42Zevvthanks
07:25:30*claudiuinberlin joined #nim
07:26:18FromGitter<mratsim> @zacharycarter I changed the config.nims to nim.cfg and managed to call mvcc, though it still doesn’t compile ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59b2461a8f4427b462e53af5]
07:27:12*yglukhov joined #nim
07:31:50FromGitter<mratsim> I think my nim install was borked, I had archlinux nim + choosenim doing weird things together
07:37:20FromGitter<mratsim> Cleanup everything, it works now
07:42:40*Arrrr joined #nim
07:50:38*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:56:19FromGitter<Grabli66> dom96, ping :)
08:05:56FromGitter<mratsim> When was this added/documented: this is awesome - https://nim-lang.org/docs/manual.html#ast-based-overloading-move-optimization
08:07:18FromGitter<dom96> @Grabli66 I guess that warning still isn't clear :/
08:08:47Araqmratsim: that's pretty old
08:08:53FromGitter<dom96> All your Nim files need to be in a directory named 'BombardoServer' (named after your package)
08:09:18FromGitter<dom96> So move 'common' into a 'BombardoServer' directory.
08:09:49FromGitter<Grabli66> @dom96 I dont understand how to write "big" application with nimble. Nimble want that my source directory must be plain, without any other directory. But it will be a mess if there be a lot of files in one directory.
08:10:05FromGitter<Grabli66> I'll try
08:10:41FromGitter<dom96> @Grabli66 it won't be. You can put any directories you want in that 'BombardoServer' directory
08:10:48AraqI think Nimble doesn't mind subdirectories
08:10:51*claudiuinberlin joined #nim
08:11:23FromGitter<mratsim> Oh, I didn’t see it before. How does it work with an object that contains a ref type like ⏎ ⏎ ```type similiArray[T] = object ⏎ len: int ⏎ data: ref whatever[T]``` [https://gitter.im/nim-lang/Nim?at=59b250ab4e50cfde2718597c]
08:12:23FromGitter<mratsim> Does it check if ref field are also unique?
08:13:48*claudiuinberlin quit (Client Quit)
08:13:49Araqrefs are pointers, what's the point in moving them?
08:14:00Araqthey are not unique pointers
08:17:10*couven92 joined #nim
08:17:14*claudiuinberlin joined #nim
08:17:41FromGitter<Grabli66> Ohhh. I fixed it. No warnings anymore.
08:20:23FromGitter<mratsim> @Araq, I have an object backed with GPU memory, I want to implement value semantics for it but avoid unnecessary copies if there are only one reference to the GPU memory location: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59b252c74e50cfde271862ec]
08:27:22FromGitter<Grabli66> Nim will be executed on gpu in future? :)
08:28:12Araqmratsim: not sure I can help with that. did you check out andrea ferretti's work?
08:28:23*PMunch quit (Quit: Leaving)
08:28:33*PMunch joined #nim
08:29:30FromGitter<mratsim> Yes, but everything is pass by ref. Actually my code is working and compiles. I can do additions on GPU for example
08:30:17yglukhovmratsim: imo, it would be easier for your tensor to have ref semantics.
08:30:47yglukhovyou'll have a lot less questions regarding raii then =))
08:31:15FromGitter<mratsim> @yglukhov, yes but I want to be consistent with Nim default, and my Cpu tensors also have value semantics
08:32:05yglukhov"Nim default" doesn't say anything about ref vs value semantics.
08:32:20yglukhovor do you mean seqs?
08:32:25FromGitter<mratsim> yes seqs
08:32:43*rokups joined #nim
08:33:23yglukhovwell... as an option you could implement refcounting_smart_ptr through finalizers. but you need to be aware of the implications.
08:33:40*Zevv left #nim (#nim)
08:33:49FromGitter<mratsim> So actually what I want is: ⏎ ⏎ 1) value semantics (can be done by overloading `=`) ⏎ 2) shallow-copy if only one ref to GPU memory exists (can be done with the {call} I mentionned before ??) [https://gitter.im/nim-lang/Nim?at=59b255edb16f2646421b273e]
08:34:15*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:35:24FromGitter<mratsim> I guess my question boils down to how to implement seq-like object without magic.
08:38:55Araqlike you said? by overloading of '=' ?
08:39:06*Andris_zbx joined #nim
08:39:40AraqI think you are confused what {call} does.
08:39:50FromGitter<mratsim> probably
08:40:07yglukhovAraq: overloading `=` doesn't work for data that ends up to be in parent data structures. how hard is it to fix that?
08:40:58Araqcreate a proper issue for it please
08:41:05AraqI'm not aware of this problem
08:42:32*BitPuffin|osx quit (Remote host closed the connection)
08:42:41yglukhovAraq: https://github.com/nim-lang/Nim/issues/6347 looks good?
08:42:44*BitPuffin|osx joined #nim
08:43:23*salewski joined #nim
08:43:27Araqyes. that is supposed to work :-)
08:43:41Araqthat can mean it's rather easy to fix...
08:46:57salewskiI just remembered: let x = "str"; when compiles(GC_ref(x)): gc_ref(x)
08:47:15salewskiThe problem was, when x is not allocated on the heap.
08:47:41salewskiThen GC_ref() compiles, but crashes.
08:48:05salewskiI guess this is still the case?
08:48:09Araqyup
08:48:33salewskiAnd there is no way to check for that?
08:48:39Araqproc safeGCref(x: var string) = GC_ref(x)
08:48:54Araqwhen compiles(safeGCRef(x)): safeGCref(x)
08:49:03*nsf quit (Ping timeout: 248 seconds)
08:49:30salewskiThanks, and bye.
08:49:51*nsf joined #nim
08:51:48*libman quit (Quit: Connection closed for inactivity)
08:56:30FromGitter<Grabli66> How i can create object in constructor with base object constructor? Like call super(someParams) in java class constructor.
08:58:51yglukhovAraq, mratsim: as far as i see this issue is probably the only one preventing from implementing seq-like types. or am i missing anything?
09:01:45FromGitter<Grabli66> It works in playground https://play.nim-lang.org/?gist=d1a77e7bbe7b077f020ecf62055a1a08
09:03:03FromGitter<Grabli66> But in real programm i get exception "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"
09:03:19yglukhovAraq: what do you think of adding a cmdline arg to override config file path?
09:05:02FromGitter<mratsim> @yglukhov, if there is no nesting I guess it works now already. What I have to test is let b = a, move if a is not used anymore (yeah compiler), or if we have to implement our own move optimization
09:05:22yglukhovGrabli66: that's not supposed to work.
09:05:29*endragor quit (Remote host closed the connection)
09:05:59*endragor joined #nim
09:06:05FromGitter<Grabli66> I just dont copy and paste constructor's code.
09:06:14FromGitter<Grabli66> dont want*
09:06:21yglukhovGrabli66: see this https://forum.nim-lang.org/t/2982#18752
09:06:28yglukhovhttps://forum.nim-lang.org/t/2982
09:06:32yglukhovall of it =)
09:07:18FromGitter<Grabli66> It's interesting. Solves the problem. Thanks
09:09:20*salewski quit (Quit: WeeChat 1.4)
09:10:12yglukhovmratsim: i think `let b = a` move should be done by compiler automatically
09:10:28yglukhov* could be
09:10:34*endragor quit (Ping timeout: 255 seconds)
09:10:53FromGitter<mratsim> I’m on my way to test it
09:19:52FromGitter<mratsim> @yglukhov, it doesn’t work. I’m using just this `let u = @[1'f64, 3, -5].toTensor().cuda()` with overloaded `=` but it copies value instead of moving
09:21:42yglukhovmratsim: i guess you could file a bug/feature-request then. or go fix it yourself ;)
09:22:08yglukhovsecond option could be faster =)
09:22:16FromGitter<mratsim> I’m aiming for 2017 bug master
09:22:51FromGitter<mratsim> I’ll try with the {call} thing in the manual first to see if that works as a workaround
09:24:01*endragor joined #nim
09:27:00*couven92 quit (Ping timeout: 252 seconds)
09:27:08*chemist69 quit (Ping timeout: 240 seconds)
09:35:24*endragor quit (Remote host closed the connection)
09:49:47*couven92 joined #nim
09:54:04*dom96|w joined #nim
09:57:55FromGitter<mratsim> I’m not even sure of the title I should use ...
09:58:03FromGitter<mratsim> for the issue
10:04:53FromGitter<mratsim> Okay done: https://github.com/nim-lang/Nim/issues/6348
10:05:42FromGitter<Grabli66> Why when i pass object to proc, one of it's field becomes nil?
10:06:26*couven92 quit (Quit: Client Disconnecting)
10:07:36*cspar joined #nim
10:08:45FromGitter<mratsim> use object.repr to debug
10:08:48Araqcause you truncatened it
10:08:52Araq?
10:10:21FromGitter<Grabli66> Oooops. I have my own reset procedure. And then i renamed type. And now nim uses system.reset procedure, that destroys my object :)
10:12:32FromGitter<mratsim> Strange, the compiler should output ambiguous call, unless you forgot to import your reset proc
10:12:53*flyx quit (Excess Flood)
10:13:39*flyx joined #nim
10:14:30Araqit might not be ambiguous for the compiler ;-)
10:15:18FromGitter<Grabli66> Strange, nim prefer system.reset, not my reset. :)
10:15:43*chemist69 joined #nim
10:17:14ArrrrUse YourModule.reset
10:18:23FromGitter<Grabli66> I renamed "reset" to "clear". I like call proc like "myObject.clear()"
10:19:54ArrrrMan, the result variable is really a good idea. That and tuples makes my day.
10:20:39FromGitter<Grabli66> Araq, what i can do with warning, that procedure in not my module is not gcsafe? How i can make it gcsafe? Maybe lock it, guard?
10:20:58FromGitter<Grabli66> I dont use threads, only async
10:22:48Araqmake it gcsafe?
10:23:20Araqhttps://nim-lang.org/docs/manual.html#threads-gc-safety
10:24:54Araqthe manual kind of misses the point though :-) use .threadvar for your global
10:25:54FromGitter<Grabli66> It's not my global. It's in websocket module
10:26:04FromGitter<Grabli66> I must fix that module? :)
10:26:09*ShalokShalom_ joined #nim
10:28:40Araqthen use the workaround the manual shows
10:29:19*ShalokShalom quit (Ping timeout: 248 seconds)
10:33:04*claudiuinberlin joined #nim
10:35:46*haha_ joined #nim
10:37:15*mjanssen quit (Quit: leaving)
10:39:22*dddddd joined #nim
10:41:13*ShalokShalom_ is now known as ShalokShalom
10:47:56*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:56:04*couven92 joined #nim
10:58:41*cspar quit (Ping timeout: 248 seconds)
11:03:08*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
11:04:18*Yardanico joined #nim
11:13:03*dddddd quit (Ping timeout: 248 seconds)
11:16:52*sleepyqt joined #nim
11:18:04*haha_ quit (Quit: haha_)
11:25:19*dddddd joined #nim
11:26:42*haha_ joined #nim
11:26:54*vlad1777d joined #nim
11:27:29Yardanicohttps://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers/_compare/6a80ffc%5E...6a80ffc
11:27:36Yardanicois this correct ? :)
11:29:30Yardaniconim's first focus is "efficiency", so it was designed for speed, not for safety only?
11:30:18FromGitter<mratsim> You should add “The speed of Nim is an unwanted side-effect"
11:30:22FromGitter<mratsim> :giggle
11:30:38Yardanicowell I don't think Nim was designed for safety as the first goal
11:30:49Yardanicoit was designed to be safer than C/C++
11:31:18FromGitter<krux02> well I am not so sure about that
11:31:27FromGitter<mratsim> For me, I understand “efficiency” as expressing what you want without resorting to convoluted construction
11:31:34FromGitter<krux02> I don't think Nim is safer than c++
11:31:36Yardanicowell, about this: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers/_compare/6a80ffc%5E...6a80ffc
11:31:42Yardanicois this a valid change?
11:31:54Yardanicoe.g. "The key to understanding Nim is that Nim was designed to be as fast as C, but to be much safer." to "The key to understanding Nim is that Nim was not designed to be as fast as C, but to be much safer."
11:32:05Yardanicowas / was not designed to be as fast as C
11:32:19*dom96|w joined #nim
11:32:34subsetparkNim was designed to be as fast as C.
11:32:43FromGitter<mratsim> It seems strange to me that the second line of a Nim introduction to Python programmer talks about pointers
11:32:47Araqkrux02: you don't think so, but it's true. Nim has a clear memory safe subset, C++ does not.
11:33:01YardanicoAraq, should I revert this change then?
11:33:13Yardanicoit's a small change, but still :)
11:33:42AraqI'd reword this completely
11:34:22Araqit wasn't designed to be "as fast as C" because C++ already beats it easily in the real world, ymmv
11:34:44Yardanico"it was designed to be fast" maybe?
11:34:47FromGitter<mratsim> When Python people look for another language is due in my opinion to: ⏎ ⏎ 1) Speed ⏎ 2) Type hell ⏎ 3) Multiprocessing (Global Interpreter Lock …) ... [https://gitter.im/nim-lang/Nim?at=59b28056bc464729740cecb7]
11:34:53Yardanicoyeah
11:35:00FromGitter<mratsim> so I think Nim for Python should appeal to those
11:35:12FromGitter<Yardanico> but this page is just a comparasion
11:35:22FromGitter<Yardanico> types/features of nim/python
11:36:05Araqwhat does "fast as C" mean anyway? bad icache usages due to pervasive 'if (errno) goto Error'? bad dcache usage due to void* indirections? (C lacks generics)
11:36:23Araqbad IO performance because of interpreted format strings?
11:36:23FromGitter<krux02> well from python perspective, Nim is as fast as C
11:36:27Yardanicoyeah
11:36:31FromGitter<mratsim> Yeah but IMO a type system is much better example than pointers to illustrate Nim safety compared to Python
11:36:39FromGitter<krux02> from C perspective, maybe not so much
11:37:01Yardanicowell this page is for python programmers
11:37:26FromGitter<krux02> then I think as fast as C is correct enoguh
11:38:01FromGitter<Grabli66> Will be there a page "Nim for C# programmers"? :)
11:38:16FromGitter<krux02> when you write one, I think so
11:38:17FromGitter<mratsim> “Nim compiles on MacOS and Linux” —> Done
11:38:26AraqI would write it as "on par with C++ performance wise"
11:39:05Yardanicook
11:39:07Araq"as fast as Fortran" ... now we're talking :P
11:39:58FromGitter<mratsim> Yeah right, then try to write a GUI in Fortran :P
11:40:13Araqtry to write a GUI in C :P
11:40:15FromGitter<krux02> try to write a gui in NIM :P
11:41:12FromGitter<krux02> writing a general purpose GUI library is a hard problem
11:41:26Yardanicowell I think I will not edit this page at all
11:41:40Yardanicobut I'll revert last change about as fast as C
11:41:54dom96|w"Hold my beer" -- yglukhov. https://github.com/yglukhov/nimx/ :P
11:42:26Yardanicowell it doesn't work quite well on linux :0
11:42:38FromGitter<krux02> yea but like with most other GUI libraries, I don't want to use them
11:43:11FromGitter<krux02> I use this: https://www.youtube.com/watch?v=OEpsG2PGi-s
11:43:41FromGitter<krux02> and here is the nim wrapper https://github.com/krux02/nimAntTweakBar/
11:43:54Yardanicoso something like dear imgui or nuklear?
11:44:05FromGitter<krux02> nope
11:44:16FromGitter<krux02> but still very trivial to use
11:44:40Yardanicowell imgui and nuklear can be integrated to opengl/directx too
11:44:45FromGitter<krux02> and most important it has quaternion as ui elements
11:45:14FromGitter<mratsim> Now the Haskeller is talking :D
11:45:37FromGitter<codenoid> https://www.codepolitan.com/nim-si-pesaing-python-yang-baru-59b237d5cbf5c
11:45:50FromGitter<krux02> well yea, I have to go, have fun with AntTweakBar, it's good and it is ported to Nim
11:46:05Yardanicocodenoid: is there any translations?
11:46:19Yardanicowell I'll hope google translate will do it
11:46:40Yardanicoah
11:46:43Yardanicoit's not an article
11:46:48Yardanicomore like an short info
11:46:59FromGitter<codenoid> "nim, the new python contender", that's it
11:48:40FromGitter<Grabli66> I think nim does not need GUI library and game library. I think nim is like golang, for web services. :)
11:48:53Yardanicowell it's not
11:48:56Yardanicoppl are writing games in it
11:49:16FromGitter<mratsim> @codenoid for which kind of applications do you think Nim can contend/replace Python?
11:49:27Yardanicofor any apps which require speed?
11:49:39Yardanicorewriting python app to nim would be easier than rewriting C/C++ IMO
11:49:40Yardanico*to
11:50:10FromGitter<Grabli66> Yardanico, simple 2D games, like snake?
11:50:16Yardanicowell no
11:50:19Yardanicoask yglukhov :)
11:50:26FromGitter<mratsim> If speed I would say Nim, the new Cython contender :P
11:50:31Yardanicoand not only yglukhov
11:50:50Yardanicohttps://github.com/pragmagic/godot-nim and https://github.com/pragmagic/nimue4, so ask Xored Inc
11:50:57Yardanicoand also ftsf
11:51:09FromGitter<mratsim> Lots of Nim dev on IRC seem to be game developer. They have the choice between C++, Lisp, C# and Nim so easy choice ;)
11:51:41dom96|wNim in Action in ePub and Mobi formats is now out :)
11:53:23FromGitter<mratsim> You should put a HackerNews discount code (maybe for Cyber Monday) to raise the hype
11:54:00Yardanicodom96|w, do you really get more sales with promo codes ? :)
11:54:09PMunchI'm actually going to a game jam later today and plan on using Nim
11:54:15Yardanicolike 50% more or what?
11:54:17dom96|wYardanico: no idea.
11:54:23PMunchFinally get to test out my gamelib :)
11:54:28dom96|w*Still* waiting on Manning to give me sale data...
11:54:41dom96|wPMunch: awesome :D
11:54:43Yardanicodom96|w, hmm
11:55:08PMunchIt will be interesting to see what I have forgotten to implement :P
11:55:44PMunchJust added rudimentary support for Tiled maps so I can get someone else to design levels for the game while I'm coding :)
11:56:32PMunchI think I might rewrite the way it loads though
11:57:30PMunchCurrently it adds it depends on the TextureRegion stuff which makes it dependent on SDL. If I want to create a noSDL version in the future I'd have to rewrite that part..
11:58:05PMunchAnd since it parses it into a simple format it means the user will probably reparse it anyways into their own structure, which isn't very nice..
11:59:24PMunchWhat would be the best way to have a parsing function that takes multiple callbacks for each of the entities? That way I could offer default callbacks but you could override them if you wanted to put them into your own stucture right away.
12:00:02*claudiuinberlin joined #nim
12:00:10PMunchMaybe a parser type with two callbacks that can be set before you run it? Or is there a way to create a procedure that takes two blocks of code and not just one?
12:00:16*claudiuinberlin quit (Client Quit)
12:06:32*claudiuinberlin joined #nim
12:11:19*haha_ quit (Quit: haha_)
12:33:39Arrrra template?
12:34:17Arrrrhttps://nim-lang.org/docs/manual.html#procedures-do-notation
12:34:33*cspar joined #nim
12:34:33ArrrrWell, now that i look into it, it only works for macros
12:35:59ArrrrMMm, new version https://nim-lang.org/blog/2017/09/07/version-0172-released.html
12:36:09*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:39:21*Snircle joined #nim
12:44:02*claudiuinberlin joined #nim
12:52:53livcdthere is not online "repl" right ?
12:52:54FromGitter<Grabli66> How i can return iterator of Table from procedure?
12:53:22ArrrrThre is a playground https://play.nim-lang.org/
12:53:55livcdahh thanks
12:54:38*dom96|w_ joined #nim
12:55:33*dom96|w quit (Ping timeout: 240 seconds)
12:58:35*gokr quit (Ping timeout: 240 seconds)
12:58:53*mahmudov joined #nim
13:00:49*rauss joined #nim
13:06:11*haha_ joined #nim
13:07:09Yardanicodom96, was 0.17.2 a first test for choosenim to change release versions ?
13:07:28dom96|w_Nope
13:07:30dom96|w_second
13:12:00*haha_ quit (Quit: haha_)
13:16:17*haha_ joined #nim
13:22:34PMunchThanks Arrrr, I went away from the machine for a while but the do notation is pretty much what I was asking for :)
13:23:06*grape joined #nim
13:23:19grapeGuys why this won't compile
13:23:59grapetype IPv4 = range[0..4294967295]
13:24:09grapethe compiler says
13:24:20grapetype mismatch
13:25:22grapeError: type mismatch
13:25:52grapealso if i do range[0..high(uint32)] it says the same error
13:26:13*haha_ quit (Quit: haha_)
13:26:43grapecan someone help me please
13:26:52*haha_ joined #nim
13:27:41Araqtype IPv4 = uint32
13:28:08FromGitter<Grabli66> How to create async timer?
13:29:20grapeThanks Araq that works :D
13:29:49Araqand now I have to ban you cause you're the troll...
13:29:56grapeok
13:32:00PMunchHaha, what was that Araq?
13:32:05*grape quit (Quit: Bye)
13:33:53Araqit was our troll, trolls are not welcomed here.
13:34:21couven92How did you know it was a troll? Recognized the nick?
13:34:53Yardanicowell why did he answer "ok" then ?
13:35:02Araqremembered the nick plus I know his writing style
13:35:05PMunchHaha, that's what got to me :P
13:35:17PMunchThe lowercase defeatist "ok"
13:35:35PMunchBut I'm off now
13:35:36*PMunch quit (Quit: Leaving)
13:35:41Araqcould have been wrong but from his reaction it doesn't look like I was.
13:35:47couven92:D
13:37:49Yardanicomaybe he realised that nim isn't bad at all? :P
13:37:56Yardanicoand he's writing some software in it
13:39:24*haha_ quit (Quit: haha_)
13:40:05FromGitter<Grabli66> If i implement timer like this https://play.nim-lang.org/?gist=08a5bb7d4660e0827a889645de885f95 ? Is it normal? There will not stack overflow?
13:40:53*skrylar joined #nim
13:41:10Araqgrabli66: no stack overflow, but it might produce an ever growing list... not sure
13:42:11FromGitter<Grabli66> Maybe there is better timer implementation? I find none, in google :)
13:42:50subsetparkWe're not TCO are we?
13:45:04*haha_ joined #nim
13:45:43skrylartimers dunno. i wrote a datetime object
13:46:18FromGitter<xmonader> Is there a tool like Mix of elixir but for nim?
13:46:40Araqwhat does Mix do?
13:47:26FromGitter<xmonader> @Araq it handles project creation, structure, tests, compilations all that
13:47:26Araqsubsetpark: what does TCO mean?
13:47:45subsetparkTail call optimized
13:47:46FromGitter<xmonader> https://hexdocs.pm/mix/Mix.html
13:47:50Araq'nimble init' does something like that
13:48:09Araqthough it doesn't yet setup your directory layout for you
13:48:18Araqsubsetpark: oh ... no, we are not
13:48:31FromGitter<xmonader> @Araq I'll check nimble thank you
13:48:36Araqbut async doesn't need it, it runs the "tail call" later anyway
13:48:58subsetparkOh I know, it just got me curious
13:49:42*relax joined #nim
13:51:42*Arrrr quit (Ping timeout: 260 seconds)
13:52:03FromGitter<xmonader> Do you guys think it's okay to post this in /r/nim https://gist.github.com/xmonader/a3b17a74eab8212cfab6cbc55610f786 ? or even contribute it to the documnetation?
13:53:35dom96|w_@Araq awww, he was asking okay questions
13:54:20AraqI don't punish him for what he wrote, I punish him for what he is.
13:54:58*gokr joined #nim
13:55:26dom96|w_:\
13:57:27yglukhovpeople could change over time...
14:06:23*gokr quit (Ping timeout: 248 seconds)
14:08:29dom96|w_yeah, please unban him
14:09:03Yardanicowell Araq banned him 2 or 3 times before
14:09:19YardanicoI don't remember exactly
14:10:11FromGitter<eliezedeck> Hey guys, how do you solve this one: `Error: ambiguous call; both hashes.hash(x: cstring)[declared in lib/pure/hashes.nim(138, 5)] and hashes.hash(x: openarray[A])[declared in lib/pure/hashes.nim(240, 5)] match for: (array[0..5, char])`
14:10:33dom96|w_hrm, well, actually Araq muted him
14:10:35dom96|w_didn't ban him
14:10:45FromGitter<eliezedeck> I have: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59b2a4e5162adb6d2e7eed2d]
14:11:14FromGitter<Yardanico> well, I can't answer about this particular thing
14:11:18FromGitter<Yardanico> but can't you use UUIDs ?
14:12:08FromGitter<Yardanico> @eliezedeck oh wait
14:12:27FromGitter<eliezedeck> @Yardanico UUIDs? how?
14:12:35*gokr joined #nim
14:13:02FromGitter<Yardanico> well nvm it's not in stdlib :)
14:13:05FromGitter<eliezedeck> in fact, whether I case to the array or not, the compiler complains about the same exact problem
14:13:12FromGitter<Yardanico> is your ClientID a string actually?
14:13:17FromGitter<Yardanico> or it's really an array of char?
14:13:28FromGitter<Yardanico> (well I know internally it's almost the same)
14:13:40FromGitter<eliezedeck> no, it's an array of char, certainly not a readable string; not a NULL terminated string
14:14:24FromGitter<eliezedeck> (yes, almost ... but hashing these will not be the same result)
14:14:36Yardanicohmm I think you can report it
14:14:47Yardanicothe issue here - array[0..5, char] is the same as "cstring"
14:15:08FromGitter<eliezedeck> Ok
14:16:16Yardanicowell just convert it to cstring
14:16:20YardanicoI think result will be the same
14:16:34*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:18:45*sz0 joined #nim
14:19:45FromGitter<eliezedeck> @Yardanico no man... cstring and C arrays are not the same... plus, it's a hashing. This is arbitrary unreadable, quite possibly be some null bytes in there. So, absolutely not a good thing if converted to cstring as that will mean only part of the data will be hashed as soon as the null char is reached.
14:20:09*Trustable joined #nim
14:20:33*claudiuinberlin joined #nim
14:20:38FromGitter<eliezedeck> That would be a recipe for bug
14:21:39*Arrrr joined #nim
14:21:39*Arrrr quit (Changing host)
14:21:39*Arrrr joined #nim
14:22:02FromGitter<eliezedeck> I reported it: https://github.com/nim-lang/Nim/issues/6350
14:22:28Yardanicoyeah I saw it
14:24:32FromGitter<eliezedeck> @dom96 mind giving some help on this one?
14:26:33*PMunch joined #nim
14:28:38*cspar quit (Ping timeout: 246 seconds)
14:29:01*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:30:02*claudiuinberlin joined #nim
14:32:31*gokr quit (Ping timeout: 248 seconds)
14:38:25*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:39:50*Andris_zbx quit (Remote host closed the connection)
14:41:58dom96|w_well, ClientID = array[0..5, char]
14:42:06dom96|w_so it's the same type, not sure why you're defining a hash proc...
14:42:14dom96|w_you might want a `distinct` type
14:42:21dom96|w_just add the `distinct` keyword
14:43:04*claudiuinberlin joined #nim
14:44:01Araqthe conversion from arrays to cstring needs to go away, yes
14:44:09Araqplanned for 0.18
14:44:53YardanicoAraq, I have a question - will all previosly deprecated stuff be removed in 1.0? e.g. MANY renamings (TFile - File), deprecated procs, etc..
14:45:13Araqwe can do that, yes
14:45:44skrylaris there a less annoying way of fixing a nimble publish than just resubmitting it
14:45:57Yardanicomanual PR ? :)
14:46:13skrylari didn't make it in the first place, nimble shoved it in some magic folder :\
14:46:16Yardanicoor editing a PR
14:46:21Yardanicoyou did
14:46:22Yardanicoskrylar, https://github.com/nim-lang/packages/pull/576
14:46:48skrylari see you're not understanding what i said
14:46:58Yardanicoyou didn't want to make a PR ?
14:47:17*claudiuinberlin quit (Max SendQ exceeded)
14:47:17*PMunch quit (Quit: leaving)
14:47:31skrylarYardanico: i didn't create the folder nimble made the PR about. as a user, i just said "publish"
14:47:47skrylarto modify the PR i have to know about the place its doing the changes, but those are magic
14:48:26FromGitter<zacharycarter> @FridgeSeal I just am reading your message now
14:51:35*miran joined #nim
14:51:51skrylarfixed it manually through the github ui
14:55:42yglukhovdom96: i like the new nimble develop feature a lot, good job! but it needs a bit more polishing and consistency... =)
14:56:14dom96|w_yglukhov: Just keep submitting bugs :D
14:56:18dom96|w_Glad you like it :)
14:56:48yglukhovyeah, nimble bugs are trickier to submit that nim's =)
14:58:04dom96|w_I can imagine :\
15:02:27yglukhovdom96: so do i understand correctly that nimble develop always marks the "installed" pkg version as #head?
15:02:47dom96|w_yep
15:03:42yglukhovok. while `nimble install` from dir uses the version from nimble file...
15:04:08yglukhovand then if you consider binaries, it gets flaky
15:04:59yglukhovi'm not even sure how to formulate the problem, but you should already understand what i mean?
15:05:30dom96|w_so `develop` gives up on binary packages
15:06:20dom96|w_only supports library packages
15:06:26yglukhovwell. kinda. if you have no packages installed, `develop` will "install" the package without the binary
15:07:59yglukhovmaybe the binaries have to be installed like with "nimble install"?
15:08:06yglukhovor
15:08:29dom96|w_what do you mean when you have no packages installed?
15:08:30yglukhovmaybe some wrapper should be installed, which will recompile the binary every time
15:08:53dom96|w_if a package has a 'bin' specified, nimble won't `develop`-install it
15:08:55yglukhovi mean no versions of my package
15:09:08dom96|w_for now at least
15:09:41yglukhovyup, disregard my "if you have no packages installed" =)
15:12:00*enthus1ast- joined #nim
15:12:09dom96|w_`nimble install` from current directory is indeed a bit inconsistent, but is that really a problem?
15:13:17*nsf quit (Quit: WeeChat 1.9)
15:14:21yglukhovwell it seems to work for me... but i'm not sure if that's just luck =)
15:14:38FromGitter<ephja> submit bug reports, not bugs!
15:14:52yglukhovyou know, i like calling "nimble path ..." from my build tools? =)
15:19:41yglukhovdom96: and if i do "nimble develop" + "nimble install" (for bins), i'm not sure what "nimble path" will return. currently it does return what i want, but like i said....
15:22:49*yglukhov quit (Remote host closed the connection)
15:24:09*yglukhov joined #nim
15:26:50dom96|w_and what do you want it to return?
15:28:31*yglukhov quit (Ping timeout: 248 seconds)
15:33:52*couven92 quit (Quit: Client disconnecting)
15:38:43*Jesin quit (Quit: Leaving)
15:39:11FromGitter<ephja> can a proc parameter be evaluated at compile time? perhaps if proc{constraint} had worked. nothing wrong with templates though
15:41:50Yardanicostatic ?
15:44:36FromGitter<ephja> yeah. it's just not as user friendly
15:45:05FromGitter<ephja> ```code paste, see link``` ⏎ ⏎ I've always had a thing for long functions [https://gitter.im/nim-lang/Nim?at=59b2bb01b16f2646421cf48d]
15:45:53FromGitter<Yardanico> make this a converter?
15:46:07FromGitter<Yardanico> so it would work for any value which can be "nim"
15:46:10FromGitter<Yardanico> "nil"
15:46:46FromGitter<Yardanico> converter someNameT (x: T): bool = not x.isNil
15:46:52Yardanicoconverter someName[T](x: T): bool = not x.isNil
15:46:56FromGitter<Yardanico> eh, gitter sucks
15:47:00FromGitter<Yardanico> ```converter someName[T](x: T): bool = not x.isNil```
15:47:59Yardanicoit seems this isn't useful for your case
15:48:01Yardanicohm
15:48:47skrylari think templates are what do that tbh
15:53:53nohusuroCan anyone explain why I'm getting SSL certificate validation failures when using this code? http://termbin.com/ud7u
15:55:47FromGitter<ephja> I wonder if it will have a significant impact on the compilation speed. I'm going to measure it some time
15:56:50dom96|w_nohusuro: I think you need to load a cert store, something which I've never managed to do successfully. Unfortunately to do it you might need to dig into openssl.
16:01:04FromGitter<ephja> Maybe I should just use this https://www.khronos.org/opengl/wiki/Get_Context_Info#Extension_list
16:02:43FromGitter<mratsim> @eliezedeck I proposed a solution to your issue https://github.com/nim-lang/Nim/issues/6350. Had the same issue with openarray[T]/seq[T] catching string as openarray[char]/seq[char]. You can use `yourproc[T: not char]` in the declaration to avoid that
16:03:05YardanicoBigEpsilon: great work!
16:03:16Yardanicoreorder would be a nice nim feature :)
16:06:00FromGitter<ephja> I wonder if wglGetProcAddress and so on are actually necessary
16:08:07FromGitter<ephja> they probably are
16:09:05*relax quit (Ping timeout: 248 seconds)
16:11:16skrylardom96|w_: i'm not sure openssl is a good idea these days
16:11:22skrylarwith libressl out and all dunno
16:12:34*yglukhov joined #nim
16:13:50dom96|w_skrylar: happy to accept PRs adding libressl support (pretty sure it's backwards compatible though anyway)
16:14:31*nsf joined #nim
16:14:37skrylarit might be
16:14:50skrylarsupposedly theres a libtls now
16:15:06skrylarwhich is a subset of {open,libre}ssl that just like, has an easy mode wrapper for the sockets
16:15:27federico3there are many competitors but not a clear winner
16:16:23*endragor joined #nim
16:17:03*yglukhov quit (Ping timeout: 248 seconds)
16:17:52*SusWombat_ quit (Remote host closed the connection)
16:19:42skrylarwell personally i don't like tls
16:19:51skrylarbut its necessary to operate with other people -shrug-
16:20:19skrylari think mixing your certs with crypto is a horrible idea that only has served to put untrustowrthy companies in charge of trust management and we'd be better off with libsodium but i digress
16:23:36federico3FWIW there's a libsodium wrapper for Nim
16:25:11skrylarprobably.
16:25:16skrylari meant collectively though
16:26:03skrylari think libsodium lets you use some of that shiny ecc stuff too
16:26:16skrylaropenssl does too, although i keep trying and apps keep rejecting ecc certs
16:26:19*yglukhov joined #nim
16:26:37federico3skrylar: libsodium provide crypto primitives, not TLS
16:26:47skrylarthat is correct
16:26:55skrylarif you read what i said, i said i didn't like TLS in the first place
16:27:32skrylartrust and crypto concerns are separate and should not have been mixed so rigidly
16:28:30FromGitter<zacharycarter> pymod-nim is nice!
16:30:20federico3skrylar: I red that and I agree. Unfortunately we are stuck with TLS for now (even QUIC uses it)
16:30:43*gangstacat quit (Quit: Ĝis!)
16:31:57FromGitter<BigEpsilon> @Yardanico , thanks ! But I think it still need more work and it should not be the default.
16:32:58Yardanicowhy?
16:32:59Yardaniconot now
16:33:10Yardanicobut before 1.0 :)
16:33:52FromGitter<BigEpsilon> Working on the syntax tree is hacky
16:34:19FromGitter<BigEpsilon> and nim is heavy on macro/template usage
16:34:37FromGitter<BigEpsilon> which do not play well with the reorder pragma
16:34:57FromGitter<BigEpsilon> making it the default will introduce more bugs
16:35:25FromGitter<BigEpsilon> and I think it is the opposite of what nim needs
16:35:49FromGitter<BigEpsilon> Still it can be very helpful is some cases
16:36:16FromGitter<BigEpsilon> I initially started working on it in order to compile code generated by c2nim
16:36:29FromGitter<BigEpsilon> And I'll return to that now :)
16:41:35FromGitter<zacharycarter> @FridgeSeal if you're around and have a sec I have some questions about nim-pymod you may / may not be able to answer
16:44:41skrylari'm not familiar with reorder :b
16:44:52skrylaralthough yea. any language with macros is going to be upset with any attempts at an ast change
16:46:40*sz0 quit (Quit: Connection closed for inactivity)
16:53:53*couven92 joined #nim
17:00:06*haha_ quit (Quit: haha_)
17:01:16*dom96|w_ quit (Ping timeout: 246 seconds)
17:01:59*haha_ joined #nim
17:06:25*endragor quit (Remote host closed the connection)
17:14:36AraqBigEpsilon: did you find a real problem with it? I only know about theoretical issues
17:16:30*gangstacat joined #nim
17:17:10FromGitter<BigEpsilon> I can't talk now but yes there are some problems
17:17:43FromGitter<BigEpsilon> for tried to treat each one as you may see in the code
17:18:15FromGitter<BigEpsilon> and I tried to privilege not breaking existing code over reordering anything
17:18:38*claudiuinberlin joined #nim
17:18:43FromGitter<BigEpsilon> I have to leave now sry and bye
17:19:12Araqok bye
17:20:37FromGitter<zacharycarter> yay got my lambda job working with nim-pymod - no more binaries for lambda, calling Nim from python now!
17:21:27Yardanicowell it's not a better solution :)
17:22:35FromGitter<zacharycarter> yeah it is
17:22:54FromGitter<zacharycarter> now I can hook into lambda lifecycle events if need be
17:22:56FromGitter<zacharycarter> it's a far better solution
17:24:24*BigEpsilon quit (Ping timeout: 252 seconds)
17:27:37FromGitter<mratsim> @zacharycarter I see that nim-pymod hasn’t been updated since November, is the author still on it?
17:27:49*miran quit (Ping timeout: 255 seconds)
17:29:31Yardanicomaybe it just works?
17:32:41FromGitter<zacharycarter> I doubt the author is but it does apparently just work
17:32:45FromGitter<zacharycarter> as long as you have numpy
17:33:04FromGitter<zacharycarter> I'm def going to fork it
17:35:24*Jesin joined #nim
17:40:22Yardanicohttps://github.com/nim-lang/Nim/pull/6351 is it better for "contains" to be a template?
17:40:29Yardanicoin this case
17:41:46FromGitter<mratsim> or mark it {.inline.}
17:42:06*Vladar quit (Quit: Leaving)
17:43:38FromGitter<mratsim> In my case when template/proc are interchangeable, I use proc (least powerful construct possible), except if it’s just returning an object field
17:44:30Yardanicowell strtabs module is made for performance :)
17:44:36Yardanicobut yeah
17:48:14dom96so I created #nim-nologs for those that want to discuss Nim without being logged
17:49:33FromGitter<mratsim> Troll bait?
17:49:42Yardanico;p
17:50:11Yardanicolet's talk about viruses in #nim-nologs :D
17:51:51FromGitter<mratsim> I’m just assuming that the compiler knows better than me whether to inline procs (depending on CPU, cache_line, proc length …)
17:52:15*relax joined #nim
17:55:11*vlad1777d quit (Ping timeout: 248 seconds)
17:57:35*nsf quit (Quit: WeeChat 1.9)
17:58:23dom96mratsim: not at all :)
17:58:30dom96There are people here who dislike being logged.
17:58:39dom96Of course I'd encourage everyone to continue discussion here.
18:13:08skrylarthere's no way to enforce nobody logging
18:13:59skrylareven if you ask them not to they'll just lie and do it anyway
18:15:38*smt joined #nim
18:21:32FromGitter<zacharycarter> grrr my makefile / dockerfile work fine on my machine but blow up on my co-workers
18:21:55Yardanicoskrylar, yeah
18:21:58Yardanicoalso thought about this
18:22:55*Jesin quit (Quit: Leaving)
18:26:57*Jesin joined #nim
18:27:11*mahtob joined #nim
18:27:37*mahmudov quit (Ping timeout: 260 seconds)
18:29:38dom96!ping
18:29:38NimBotpong
18:32:31*Trustable quit (Remote host closed the connection)
18:32:59*Calinou quit (Ping timeout: 255 seconds)
18:38:22*Calinou joined #nim
18:39:20FromGitter<ephja> "Hint: operation successful (30839 lines compiled; 5.168 sec total; 106.934MiB peakmem; Debug Build) [SuccessX]" damn. bloated opengl module
18:48:55*SusWombat joined #nim
18:49:17SusWombatwhy does randomize() not affect the float random()?
18:49:54Yardanicoreally?
18:50:01Yardanicolet me try
18:50:06SusWombatmaybe im wrong
18:50:14SusWombatYardanico, would be appreciated
18:50:28Yardanicowell, it outputs different numbers for me
18:50:34Yardanicowith each run
18:50:49Yardanicoe.g. : import random; randomize(); echo random(5.1)
18:51:07SusWombatlemme recheck i guess i have an error then somewhere
18:51:24Yardanicomaybe you call randomize with some arguments?
18:51:37SusWombatYardanico, nah i dont. Thanks for testing :)
18:51:42*dom96_ joined #nim
18:54:27SusWombatYardanico, you are right i wans wrong
18:55:27SusWombati tested with random(1.0) and the first number alwas seems to be 0.8478XXXXXX thats why i thought that
18:55:36*dom96 quit (Quit: Bye.)
18:55:45*dom96_ is now known as dom96
18:55:45*dom96 quit (Changing host)
18:55:45*dom96 joined #nim
18:56:06SusWombatis there a reason for that behaviour?
18:56:42Yardanicowell it doesn't seem to be 0.8478 for me
18:56:52Yardanicoit's always different for me
18:56:53SusWombatweird
18:57:27dom96Are you setting a different seed each time via randomize?
18:57:43SusWombatnah i just use randomize()
18:58:27Yardanicoreally weird
19:00:34*Araq_ joined #nim
19:01:27SusWombatWell only happens for the first number tho. So its not really a problem
19:05:50*Yardanico quit (Remote host closed the connection)
19:08:27*gokr joined #nim
19:13:46dom96Araq: Thoughts on this? https://github.com/nim-lang/website/issues/45
19:15:44*haha_ quit (Quit: haha_)
19:21:35*couven92 quit (Ping timeout: 240 seconds)
19:21:35*haha_ joined #nim
19:22:32*rauss quit (Quit: WeeChat 1.9)
19:22:42SusWombatwow totally forgot about devdocs. They improved a lot
19:24:58*Calinou quit (Ping timeout: 264 seconds)
19:28:36*nsf joined #nim
19:29:29*Calinou joined #nim
19:30:46FromGitter<superfunc> @dom96 just finishing up reading the book, great job dude.
19:31:05dom96thanks :D
19:35:01*Calinou quit (Ping timeout: 240 seconds)
19:37:43*Calinou joined #nim
19:40:07*skrylar quit (Ping timeout: 255 seconds)
19:40:39Araqdom96: looks like devdocs got a decent search, a link cannot hurt but I dunno how they do the indexing etc
19:42:54*haha_ quit (Quit: haha_)
19:43:23*cspar joined #nim
19:46:02FromGitter<superfunc> https://github.com/Thibaut/devdocs/blob/master/lib/docs/scrapers/nim.rb
19:49:19FromGitter<Yardanico> Hmmm, https://www.python.org/dev/peps/pep-0557/
19:53:31FromGitter<Yardanico> *shrug* how do we ask devdocs guys to update docs?
19:54:01FromGitter<Yardanico> For 0.17.2
19:58:18*jsgrant joined #nim
19:58:40jsgrantDoes Nim have an animal mascot?
19:59:30*xet7 quit (Ping timeout: 252 seconds)
20:00:14gangstacatjsgrant, https://github.com/nim-lang/assets/blob/master/Art/mascot.svg
20:00:21gangstacatbut certainly deprecated since long ago :p
20:00:55jsgrantWhat is that, a honey-badger?
20:02:06jsgrantI was thinking it was going to be ironic, like a sloth, or something. Slow, clumsy, seen to be dim-witted, etc.
20:03:08*jsgrant has been trying to mascotify the top-level of his mascot, with stuff he wants to learn/keep-in-mind-day-to-day next year; Nim is on that list. :^)
20:10:54subsetparkI was never fond of the honey badger...
20:11:38*vlad1777d joined #nim
20:13:35*relax quit (Ping timeout: 240 seconds)
20:13:36subsetparknake is named after make (obvs), but it doesn't actually do any dependency resolution does it?
20:14:31*rokups quit (Quit: Connection closed for inactivity)
20:15:48*relax joined #nim
20:18:08subsetparkI guess within nim itself the compiler takes care of all that nastiness for you. But it'd be kind of cool to have an all-purpose build tool written in Nim.
20:20:37FromGitter<mratsim> How about having a King of Heart as Nim mascoot :P
20:20:54relaxWhat's the recommended postgres library to use? db_postgres? I'd love to use asyncpg for the async-ness but it looks a little rough around the edges.
20:21:03jsgrantHa, http://i.imgur.com/xZkJ586.gif is one of the first results when I type "sloth crown".
20:21:03*Arrrr quit (Read error: Connection reset by peer)
20:21:42jsgrantActually visually complements pretty well.
20:22:36*couven92 joined #nim
20:23:19jsgrantSince honey-badger as-said seems deprecated & generally doesn't seem like there's too much fan-service there (with my wide-sample of 1) -- probably going to go with Sloth there then. :^)
20:25:14federico3jsgrant: people love cats
20:25:58jsgrantfederico3: Yeah, but too ubiquitous to even generic though. :^P
20:26:05jsgrantPlus, lolcode called it.
20:29:26ipjk_That mascot
20:29:32ipjk_is way too terrifying
20:30:17federico3next: raccoons are clever and quick
20:31:33jivank[m]hey federico3 , do you think nim is a good match for the freedombox project?
20:31:41jsgrantfederico3: Minix mascot.
20:32:58federico3jivank[m]: fbox uses Python for the management UI (Plinth), but most of the stuff shipped with it are 3rd parties applications that come with the distribution and could be written in any language
20:34:25federico3jivank[m]: Nim would help on small, low-power hardware
20:36:34jivank[m]yeah certainly, but that memory leak issue definitely stops some very lowend routers with <32mb ram for jester and downloading files
20:37:03jivank[m]perhaps thats a bit extreme though, given a raspberry pi is more powerful than most consumer routers
20:39:09federico3jivank[m]: I guess it's fixable? I'm running a little bit of Nim on microcontrollers
20:42:05*xet7 joined #nim
20:44:06*ShalokShalom quit (Remote host closed the connection)
20:49:30jivank[m]federico3: nice! is that easy to get going? you just have to disable the GC right
20:56:25*Pisuke joined #nim
20:58:42*MyMind quit (Ping timeout: 260 seconds)
21:01:38*yglukhov quit (Remote host closed the connection)
21:01:54dom96I really dislike the idea of a sloth...
21:01:59dom96sorry :)
21:05:53jsgrantdom96: Well it'd be on my bookshelf -- not suggesting it be adopted upstream or anything. Just wondering/shopping around what would be a good mascot that's not already taken.
21:08:16subsetparkGuys, what about a water bear??
21:08:31subsetparkhttps://apod.nasa.gov/apod/image/1303/tardigrade_eyeofscience_1024.jpg
21:09:38*yglukhov joined #nim
21:11:17jsgrantsubsetpark: What's the argument to relation (of attributes)? Nim is tiny & indestructible?
21:12:26subsetparkHm, I would think of it more as "freakishly featureful"
21:13:49jsgrantYou know, I don't think I've seen any software-project using a 'Axolotl'; That's unique but meme'd enough where I would think that was taken.
21:14:11subsetparkBut I suppose really if I were starting from attributes, I would go with "fast, fun, friendly"
21:15:51jsgrantFawn? :^P
21:16:23*skrylar joined #nim
21:18:26subsetparkyes, what's an adorable playful creature with really, really sharp teeth?
21:18:30subsetparka koala maybe.
21:18:43subsetparkmy understanding is that koalas can do some serious damage.
21:18:55*relax quit (Ping timeout: 248 seconds)
21:19:05jsgrant"Drop-bears".
21:19:16couven92what do you use in nim.cfg to get the name of the nim main module being compiled?
21:20:18jsgrantsubsetpark: Great, now I want this ... https://www.amazon.com/dp/B00K1W50ZW/ref=twister_B00SY2G5R8?_encoding=UTF8&psc=1 :^)
21:20:22couven92i.e. when kompiling koch.nim, I want to pass `/someOpt:koch` to the compiler via `vcc.options`
21:20:36subsetparkok, that's my final suggestion: either a koala or a jackalope.
21:21:16dom96jsgrant: That looks like a croissant :P
21:21:32jsgrantdom96: That's sounds like a "dank meme".
21:21:38ipjk_https://img1.etsystatic.com/002/0/5376657/il_570xN.405690271_pw8m.jpg
21:22:25subsetparkA jackalope would look cool with a crown.
21:24:13FromGitter<Varriount> http://www.istockphoto.com/vector/hand-sketched-jackalope-gm481808919-23018384?esource=SEO_GIS_CDN_Redirect
21:24:55*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:28:02FromGitter<Varriount> Perhaps the next time I go to an art convention, I can commission a jackalope sketche
21:28:24*jsgrant switches to Pony. X^D
21:38:14jsgrantI'm going Sloth guys; Sorry.
21:38:49jsgrantMight bug chat in a few days, after it comes with a pic or something; But besides that will lurking for the most-part till next year. :^)
21:39:36*miran joined #nim
21:56:05FromGitter<zacharycarter> o/
22:03:29subsetparkjsgrant: to recap, you have like, a vision board of the mascots of projects you want to learn about?
22:05:03*xet7 quit (Quit: Leaving)
22:07:14*endragor joined #nim
22:11:21*endragor quit (Ping timeout: 240 seconds)
22:11:40FromGitter<zacharycarter> it'd be cool to see an article like this for Nim - http://catswhisker.xyz/log/2017/9/7/a_first_excercise_in_natural_language_processing_with_python_counting_hapaxes/
22:11:59jsgrantsubsetpark: Yeah, more-or-less.
22:12:34subsetparkI dig it.
22:12:54*PMunch joined #nim
22:13:01FromGitter<adamrezich> random question: why isn't free() documented in the system module docs?
22:13:42skrylari suspect one isn't meant to use it
22:14:09PMunchhttps://github.com/PMunch/SDLGamelib/blob/master/gamelib/tilemap.nim#L18 Can you do this with booleans?
22:14:47FromGitter<adamrezich> oh I see, dealloc() is the opposite of alloc(). still, though, "free()" is *mentioned* in the system module docs, but not documented there :\
22:15:12FromGitter<zacharycarter> try it out PMunch, not sure
22:15:38*skrylar quit (Remote host closed the connection)
22:15:53*xet7 joined #nim
22:16:14couven92Do we have overloads for WideCString and cstring stringify with length?
22:16:18*skrylar joined #nim
22:16:32jsgrantIs 'Nim In Action' the definitive guide right now, 'cause it's good and/or because it's effectively the only thing out there? Plan on getting that by the end of the year.
22:16:46FromGitter<zacharycarter> the playground says yes PMunch: https://play.nim-lang.org/?gist=a5a6b32bc160885fd492b54b82dd5a07
22:16:56couven92i.e. a `$`(str: cstring, len: int): string
22:16:59*skrylar quit (Remote host closed the connection)
22:17:00FromGitter<zacharycarter> the definitive guide is the language manual
22:17:13PMunchHmm
22:17:16FromGitter<zacharycarter> Nim in Action is a supplement I'd say and offers examples of real world use cases for Nim
22:17:16jsgrantzach, well yeah; Fair.
22:17:25jsgrantI mean "printed" though.
22:17:39FromGitter<zacharycarter> to my knowledge it's the only printed material on Nim
22:17:46FromGitter<zacharycarter> widely avaialble
22:18:01PMunchAah, I was not declaring the boolean :)
22:18:10PMunchWhen I did that it works
22:18:34FromGitter<zacharycarter> I don't know the answer to your question couven92 sorry
22:19:26couven92there does not seem to be... I wonder why... I feel this is useful, since a lot of C-FFIs return strings together with their lengths
22:21:17jsgrantBasically have/am getting all my books for said "curriculum"; A vast majority of which right now Scala -- but Rust & Nim are certainly points of interest to me.
22:22:31FromGitter<zacharycarter> not quite sure how to benchmark but I'd like to
22:23:03FromGitter<zacharycarter> ugh my last message didn't send - my nim lambda job
22:23:07FromGitter<zacharycarter> it's fast for sure
22:25:13FromGitter<zacharycarter> I imagine the majority of the time it takes to execute is because it has to retrieve a file from s3
22:33:45*sleepyqt quit (Quit: WeeChat 1.9)
22:44:49*miran quit (Ping timeout: 248 seconds)
22:49:59*nsf quit (Quit: WeeChat 1.9)
22:51:25*skrylar joined #nim
22:51:29skrylargru cells fixed
22:51:44skrylarstill a bit behind openai/google but hey
22:56:57*sz0 joined #nim
22:58:09*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
23:05:13*skrylar quit (Remote host closed the connection)
23:06:13FromGitter<yglukhov> @mratsim you around?
23:13:29couven92YAIH! Araq, I just solved vccexe for Visual Studio 2017! :D I'll make a PR later :)
23:14:34PMunchHmm, I'm getting a weird error "x.y cannot be assigned to". x is a simple object type, y is a field of type cint.
23:15:28dom96is 'x' a 'var'/
23:15:29dom96?
23:15:50PMunchIt's all in the same function
23:16:29*skrylar joined #nim
23:16:41skrylarnow to play the wonderful game of "why aren't my polygons showing up"
23:17:44PMunchhttps://play.nim-lang.org?gist=7022ab9f3e13e3a487890b7a3a62fef8
23:17:47PMunchdom96, ^
23:19:31dom96https://play.nim-lang.org/?gist=fe4c76e1bca841fc43acc22fedc05461
23:21:29PMunchAh, right
23:21:45PMunchThe default iterator doesn't yield mutable values
23:23:04*yglukhov quit (Remote host closed the connection)
23:30:05*cspar quit (Ping timeout: 240 seconds)
23:32:31dom96yep
23:36:23*cspar joined #nim
23:40:16PMunchPhew, first day of the game jam over :)
23:40:24PMunchGot to say, Nim is pretty awesome
23:40:38*PMunch quit (Quit: Leaving)
23:50:47*vlad1777d quit (Ping timeout: 260 seconds)
23:52:54dom96:D