<< 08-07-2017 >>

00:01:37*Nobabs227 quit (Ping timeout: 248 seconds)
00:04:00*def-pri-pub joined #nim
00:30:05*Matthias247 quit (Read error: Connection reset by peer)
00:34:04*dddddd quit (Remote host closed the connection)
00:37:16*shashlick quit (Quit: Connection closed for inactivity)
00:44:53*mwbrown quit (Quit: Exiting)
00:54:51dom96Trustable, shashlick: please ask questions via PM instead of here.
00:55:04dom96I can't answer you when you're not on IRC, but I can here because there are logs
00:55:07dom96also, others can help!
00:55:23dom96lol, er, the other way around
00:55:28dom96please ask them here instead of via PM
00:55:29dom96:)
00:56:04dom96Trustable: answer to your questions is "Yes" and "That warning looks wrong"
00:57:04*yglukhov quit (Remote host closed the connection)
00:58:48*v17d quit (Ping timeout: 260 seconds)
01:13:05*def-pri-pub quit (Ping timeout: 240 seconds)
01:28:54*Vi- quit (Ping timeout: 255 seconds)
01:28:55*chemist69 quit (Disconnected by services)
01:28:59*chemist69_ joined #nim
01:44:45*krux02 quit (Remote host closed the connection)
01:57:36*yglukhov joined #nim
02:00:14*shashlick joined #nim
02:00:46shashlickSounds good dom96
02:02:05*yglukhov quit (Ping timeout: 240 seconds)
02:03:14shashlickI'm just curious what time is this channel usually active? It seems like GMT evenings
02:03:35FromGitter<zacharycarter> most core nim contributors are Euro I believe
02:03:57FromGitter<zacharycarter> generally during evenings EST it's Varriount, myself, ftsf and a few others
02:17:28*def-pri-pub joined #nim
02:27:35FromGitter<Varriount> Hm?
02:28:35FromGitter<zacharycarter> that was @shashlick asking about when folks were active in the channel
02:29:28FromGitter<zacharycarter> CL is interesting, not sure how much I like it so far...
02:38:26FromGitter<Varriount> CL?
02:38:32FromGitter<Varriount> Oh, Common lisp
02:38:54FromGitter<Varriount> @zacharycarter Hope you bought enough parenthesis. :D
02:39:13FromGitter<ephja> I have some leftover parentheses if you need any
02:39:28FromGitter<ephja> I recall stumbling upon odd loop constructs for CL
02:40:21FromGitter<zacharycarter> yo. so many parentheses....
02:40:28FromGitter<zacharycarter> seems super powerful though
02:41:23FromGitter<zacharycarter> I think we need to start a #NimGames community
02:41:30FromGitter<zacharycarter> lisp has one
02:55:01shashlickI'm in CST so see long hours where it's quiet here
03:00:25*def-pri-pub quit (Quit: leaving)
03:03:21FromGitter<zacharycarter> yeah it's definitely quieter here during US prime time
03:03:28FromGitter<zacharycarter> but that just means we need to attract more users to Nim
03:15:46*def-pri-pub joined #nim
03:16:11*def-pri-pub quit (Client Quit)
03:27:10FromGitter<Varriount> @zacharycarter I believe one of more popular PS1 games was written in lisp... I can't recall the name though.
03:27:22FromGitter<Varriount> Something similar to Ratchet and Clank in genre
03:33:06*chemist69_ quit (Ping timeout: 255 seconds)
03:35:47FromGitter<zacharycarter> @Varriount all Naughty Dog's games are written in CL
03:36:07FromGitter<zacharycarter> so the uncharted series
03:36:49FromGitter<zacharycarter> I think I finally have zengine off on the right foot
03:37:05FromGitter<TheSuspiciousWombat> @zacharycarter Are you sure?
03:37:12FromGitter<zacharycarter> about?
03:37:14FromGitter<TheSuspiciousWombat> wasnt it racket?
03:37:25FromGitter<zacharycarter> maybe
03:37:43FromGitter<zacharycarter> https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp
03:38:03FromGitter<zacharycarter> I think that's for Ratchet and Clank though
03:38:25FromGitter<zacharycarter> https://www.slideshare.net/naughty_dog/statebased-scripting-in-uncharted-2-among-thieves
03:38:30FromGitter<TheSuspiciousWombat> "We still use lisp in our data compiler tool, but the engine itself is written in C++. We switched to using C++ on Uncharted: Drakes Fortune to allow for better code sharing with other Sony studios."
03:39:09FromGitter<zacharycarter> looks like a lot of lispy stuff in ^
03:40:05FromGitter<TheSuspiciousWombat> @zacharycarter Maybe you mean crash bandicoot by the ps1 game?
03:40:09FromGitter<zacharycarter> so maybe scripting gets done in some lisp dialect and then engine code is written in C++
03:40:11FromGitter<TheSuspiciousWombat> awesome game btw
03:40:21FromGitter<zacharycarter> probably
03:41:34FromGitter<TheSuspiciousWombat> Only game i liked more on the ps1 was croc :D
03:41:53FromGitter<zacharycarter> ah man, you're bringing back memories :P
03:45:03FromGitter<zacharycarter> the Nim colors module needs work IMO
03:45:06FromGitter<zacharycarter> no alpha component
03:45:12FromGitter<zacharycarter> no accessors to the rgb components
03:49:11shashlickDoes the nim forum have a mobile view?
03:52:13FromGitter<zacharycarter> doubtful
03:59:41*yglukhov joined #nim
04:00:12*chemist69 joined #nim
04:03:35*vqrs quit (Ping timeout: 240 seconds)
04:03:45FromGitter<zacharycarter> gotten drawing an opengl triangle down to 60 loc in the main nim file
04:03:52FromGitter<zacharycarter> getting there in terms of abstraction...
04:03:58FromGitter<zacharycarter> ideally it's like 10 loc
04:05:05*yglukhov quit (Ping timeout: 240 seconds)
04:08:18shashlickChrome on Android is doing a good job in the mobile friendly view of the forum though
04:08:56shashlickIn fact it is loading all pages in one shot instead of paginating
04:16:26FromGitter<zacharycarter> :D nice
04:20:21*pilne quit (Quit: Quitting!)
04:33:42*skrylar joined #nim
04:57:29FromGitter<superfunc_twitter> @zacharycarter the last game scripted in their LISP was the last Jak game
04:57:49Xethey wrote the whole game in lisp
04:58:13FromGitter<superfunc_twitter> Scripted was the wrong word my bad
04:58:40FromGitter<superfunc_twitter> `s/scripted/written/`
05:00:27FromGitter<superfunc_twitter> some fun articles on it here: http://all-things-andy-gavin.com/2011/03/12/making-crash-bandicoot-gool-part-9/
05:09:24skrylarsuperfunc_twitter they use racket now
05:12:01FromGitter<superfunc_twitter> skrylar: yeah, they gave a talk at racketcon a couple years back that was really neat
05:13:46FromGitter<superfunc_twitter> https://www.youtube.com/watch?v=oSmqbnhHp1c
05:13:54*mwbrown joined #nim
05:24:21*mwbrown quit (Quit: Exiting)
05:26:35*mwbrown joined #nim
05:36:48*skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…)
05:38:46*chemist69 quit (Ping timeout: 276 seconds)
05:43:00*chemist69 joined #nim
06:14:59*tankfeeder joined #nim
06:18:03*nsf joined #nim
06:39:57*Trustable joined #nim
07:02:32*tankfeeder quit (Quit: Leaving)
07:03:11*yglukhov joined #nim
07:07:45*yglukhov quit (Ping timeout: 248 seconds)
07:08:51*ftsf_ joined #nim
07:11:48*ftsf quit (Ping timeout: 260 seconds)
07:32:01*McSoFake joined #nim
07:38:57*Vi- joined #nim
08:00:32*couven92 joined #nim
08:00:57*Trustable quit (Remote host closed the connection)
08:56:44*salewski joined #nim
08:57:59salewskiSome people now likes to ask nim questions at reddit...
08:58:07salewskihttps://www.reddit.com/r/nim/comments/6lyjto/help_with_neo_library_importing/
08:59:01salewskiI would guess that with "from neo import nil" the converters are not imported, and maybe
08:59:36salewski"let v1 = neo.constantVector(2, 3)" needs a converter.
09:00:34salewskiWell just a guess, and of course I am not subscribed at reddit to answer.
09:00:41salewskiBye.
09:01:16*salewski quit (Client Quit)
09:03:16*Matthias247 joined #nim
09:05:01*yglukhov joined #nim
09:07:24*arnetheduck quit (Read error: Connection reset by peer)
09:09:44*yglukhov quit (Ping timeout: 260 seconds)
09:25:05FromGitter<mratsim> @salewski I think it’s the `$` for vector that is not imported and replied as such
09:29:05*Vi- quit (Ping timeout: 248 seconds)
09:29:47*v17d joined #nim
09:34:57FromGitter<TiberiumN> Hi everyone, my friend asked me - does try/except in nimlang have a big performance penalty like in Python?
09:45:09*Vi- joined #nim
09:47:13*v17d quit (Ping timeout: 248 seconds)
09:53:03*Arrrr joined #nim
09:55:32*skrylar joined #nim
10:20:31*cspar joined #nim
10:23:01*cspar_ quit (Ping timeout: 258 seconds)
10:25:50*xet7 joined #nim
10:25:58*nsf quit (Quit: WeeChat 1.7.1)
10:30:26skrylarI wonder if Nim would run on plan nine. It probably would considering it just creates C code, and they already have a C compiler. Although I think the only people using plan nine right now are supercomputers inside strange academic workshops.
10:31:29FromGitter<TiberiumN> maybe this can help? http://doc.cat-v.org/plan_9/4th_edition/papers/comp
10:32:26*Matthias247 quit (Read error: Connection reset by peer)
10:35:44FromGitter<mratsim> @skrylar apparently there is a Raspberry Pi image: https://www.reddit.com/r/plan9/comments/609bxi/rpi_version_issue/
10:35:57skrylarthat is just adorable
10:36:10skrylari was reading about mainframes earlier and remembered plan9 existed and that it was apparently awesme
10:36:25skrylaralthough a lot of supercomputing is done on GPUS and i don't know if plan9 likes those
10:36:41skrylarif it did you would probably end up able to mount individual opencl cores or some silliness
10:55:49*v17d joined #nim
11:05:13*v17d quit (Ping timeout: 246 seconds)
11:07:24*yglukhov joined #nim
11:08:45*McSoFake quit (Quit: leaving)
11:12:00*yglukhov quit (Ping timeout: 260 seconds)
11:17:21*Vi- quit (Ping timeout: 248 seconds)
11:33:21*murych joined #nim
11:34:18*sz0 quit (Quit: Connection closed for inactivity)
11:36:56FromGitter<mratsim> Does nim rst support images?
11:38:20*skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…)
11:38:53Araqyes
11:45:59FromGitter<mratsim> I’m prefacing the `Import`, `Types`… technical sections with a tutorial. I have a section like this but the image gets ignored ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5960c5f71c8697534a0280ed]
11:49:35FromGitter<Araq> maybe put the URL in ""
11:49:43FromGitter<Araq> should work, not sure
11:56:04*v17d joined #nim
11:57:30FromGitter<mratsim> Strange, it’s completely ignored, it doesn’t appear in the html file
12:03:25*chemist69 quit (Ping timeout: 255 seconds)
12:04:34FromGitter<zacharycarter> https://gist.github.com/zacharycarter/3a3cff69a9c61689283d19534521a719
12:04:54FromGitter<zacharycarter> all that for a triangle :P
12:06:55*Arrrr quit (Read error: Connection reset by peer)
12:08:03*chemist69 joined #nim
12:09:33*yglukhov joined #nim
12:26:27FromGitter<mratsim> @zacharycarter next step is being as concise as Red lang: http://www.red-lang.org/2016/03/060-red-gui-system.html :P I wish you luck
12:28:26Araqalready solved for karax
12:32:31FromGitter<zacharycarter> interesting
12:32:40FromGitter<zacharycarter> right now I'm shooting for an API similar to raylib
12:32:50*Vi- joined #nim
12:35:30FromGitter<zacharycarter> this is the code for using the lib thus far
12:35:48FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5960d1a44bcd78af568c504d]
12:54:02*nsf joined #nim
13:28:05*pilne joined #nim
13:53:28*Trustable joined #nim
13:55:20*smt quit (Quit: Leaving)
13:55:34*smt joined #nim
14:06:38*adeohluwa joined #nim
14:07:35FromGitter<TiberiumN> dom96: what can be the reason of "No handles or timers registered in dispatcher. [ValueError]" when executing "runForever()" ?
14:08:09dom96There are no file descriptor, sockets, etc waiting on data.
14:08:18dom96So the dispatched has nothing to do.
14:08:37FromGitter<TiberiumN> hmm, thanks, that is strange
14:08:53FromGitter<TiberiumN> I did some small refactoring and this error came :)
14:11:04*chemist69 quit (Ping timeout: 246 seconds)
14:14:34FromGitter<TiberiumN> I think I've made an error somewhere, and "asyncCheck" ends before runForever()
14:18:46FromGitter<TiberiumN> yeah, I've fixed the error and now everythink works
14:18:57FromGitter<TiberiumN> but sadly there was no error traceback at all
14:19:28FromGitter<TiberiumN> ah maybe this wasn't an error
14:20:04FromGitter<TiberiumN> sorry, it totally was my mistake: due to bug in my code some async procs just didn't execute
14:23:59*rauss joined #nim
14:24:59*rauss quit (Client Quit)
14:32:32*tankfeeder joined #nim
14:36:26*Vladar joined #nim
14:38:16*chemist69 joined #nim
14:40:36*Vi- quit (Ping timeout: 260 seconds)
14:47:13FromGitter<zacharycarter> got transformation matrices wired in
15:07:50*tankfeeder quit (Ping timeout: 268 seconds)
15:20:21*Vi- joined #nim
15:28:13*nsf quit (Quit: WeeChat 1.7.1)
15:37:16*shashlick quit (Quit: Connection closed for inactivity)
15:56:25euantorIs this a bug? https://glot.io/snippets/erjeacgl8y
15:56:38euantorString is initialised as length 22, add a string to the en and its length is 21
15:57:23euantorIf you print the string's length before adding the content, length is 22
15:57:51euantorSeems like it's because there would be a null byte at the end (which I need for the protocol I'm interfacing with) which is confusing things
15:58:04*Vi- quit (Ping timeout: 260 seconds)
15:59:20Araqeuantor: splicing can shorten strings
15:59:29euantorDarn
15:59:41euantorSo I guess the approach is to use a loop to assign chars one at a time
16:01:45*yglukhov quit (Remote host closed the connection)
16:02:59euantoryup, that seems to fix it
16:06:24*PMunch joined #nim
16:06:50Araqwell it's a feature, not a bug
16:07:03*yglukhov joined #nim
16:07:20Araq"replace the substring at x..y with this content"
16:08:26yglukhovAraq: what do you think? attr pragma vs object type pragma?
16:09:05yglukhovAraq: btw, i gave up trying suggestSym for modules.
16:09:24Araqhmm?
16:09:50yglukhovi don't see an easy way to reach module symbols from semexprs/semstsmt
16:10:37yglukhovmaybe i'm wrong and don't understand it as good as you do
16:10:54yglukhovbut anyways, just fyi =)
16:12:05euantorAraq: Yes, I wouldn't expect having a null character at the end of my string to shorten the string though
16:12:47euantorOr rather putting something at the end to shorten the string
16:12:52Araqeuantor: newString(22) creates a string with nulls
16:12:56euantoryes
16:13:08*Vi- joined #nim
16:13:17euantorAnd if I replace 13..21 surely it should still be 22 characters long?
16:13:32Araqlen() doesn't count nulls, it accessed the length field
16:13:36euantorI just don't understand why that shortens the string
16:13:48euantorYes, the string "postgres" has no nulls - it's eight characters long
16:14:38euantorhttps://glot.io/snippets/erjesg8v7o
16:14:39Araq21-13+1 == 9
16:14:47*adeohluwa quit (Quit: Connection closed for inactivity)
16:14:54Araqyou replace 9 chars with 8, ergo length is reduced by one
16:15:50euantorOk, it's been a long day and obviously not thinking clearly
16:19:30*Tiberium joined #nim
16:31:24*yglukhov quit (Remote host closed the connection)
16:33:17*yglukhov joined #nim
16:34:43*krux02 joined #nim
16:46:30*PMunch quit (Quit: leaving)
16:47:33*yglukhov quit (Remote host closed the connection)
16:51:13*Vi- quit (Ping timeout: 248 seconds)
16:52:05*flashmozzg joined #nim
16:58:22flashmozzghello, how would I do a static dispatch absed on the type? I want something like when type(T) == int: ..., but it seems I cna't compare types that way. I rember in D there was an is() operator. Is there something similar?
16:59:49Araqwhen T is int: ...
16:59:56Araqelif T is string: ...
17:02:54*Nobabs27 joined #nim
17:07:04*sz0 joined #nim
17:09:00*yglukhov joined #nim
17:14:30flashmozzgAraq: thanks! That is what I was looking for!
17:18:48*yglukhov quit (Remote host closed the connection)
17:20:30*yglukhov joined #nim
17:29:23*nsf joined #nim
17:43:25*tankfeeder joined #nim
17:44:14*fredrik92 joined #nim
17:44:25*couven92 quit (Disconnected by services)
17:44:33*fredrik92 is now known as couven92
17:44:51*yglukhov quit (Remote host closed the connection)
18:15:19*pilne quit (Quit: Quitting!)
18:24:08*yglukhov joined #nim
18:32:08*krux02 quit (Remote host closed the connection)
18:37:08*couven92 quit (Ping timeout: 240 seconds)
18:45:17*Nobabs27 quit (Quit: Leaving)
18:48:52*chrisheller quit (Ping timeout: 260 seconds)
18:55:39flashmozzgAraq: what would be the correct way to match "inner" type? like when T is seq[S]: foo[S]()?
18:56:04Araqrethink your design
18:56:34Araquse overloading to lead the compiler do the type disambiguations or macros.getType
18:56:48Araq*to led
18:56:52flashmozzgI can't overload on return type
18:56:58flashmozzgcan I?
18:57:20Araqwhat's that to do with anything?
18:59:00flashmozzgAlso, are you saying that what I want is not possible? I have some funct that works on a small set of types and collections/sequences of those types. I want to be able to call this func with appropriate type specialization in the latter case.
19:00:02flashmozzgIn D I'd do something like 'static if (is(T == V[], V)) { ... }'
19:00:35*yglukhov quit (Remote host closed the connection)
19:01:29*Vi- joined #nim
19:01:30Araqwhen T is seq: foo[type(x[0])]()
19:02:20flashmozzgAraq: thanks!
19:02:34Araqbut I don't see the point, seems to me you're writing a 'foo' that doesn't work well
19:03:14flashmozzgAraq: wait. no. taht won't work. I don't ahve x
19:04:36*yglukhov joined #nim
19:06:04Araqwe don't have overloading on return type and the solution is not to use 'proc foo[T](): auto # return type depends on T anyway'
19:06:31Araqthe solution is to write idiomatic Nim code instead.
19:06:57Araqthink about the children
19:07:35flashmozzgAraq not an excuse for is not to be able to get seq type parameter
19:08:08AraqI can get it.
19:08:13Araqmaybe you can't.
19:08:21*yglukhov quit (Remote host closed the connection)
19:08:44Araqbut it's still a bad idea.
19:10:06flashmozzgWell you haven't shared the method with me, despite me asking.
19:23:37AraqI did.
19:24:23Araq when X is seq:
19:24:23Araq var z: X
19:24:23Araq var x = newSeq[type(z[0])](5)
19:32:37*yglukhov joined #nim
19:39:19*Vladar quit (Remote host closed the connection)
19:40:09flashmozzgOnly now. The snippet before was incomplete and I didn't know that this would wotk (since there are no z[0]). Anyway, inability to destructure parameters of complex types naturally (like when T is seq[S]: let x: S ...) seems like a drawback in Nim's metaprogramming power. Thanks for the solution, though!
19:56:52*yglukhov quit (Remote host closed the connection)
20:04:34*captainkraft quit (Ping timeout: 276 seconds)
20:09:34*captainkraft joined #nim
20:25:49*Tiberium quit (Remote host closed the connection)
20:29:30FromGitter<zacharycarter> can anyone help me reproduce this C macro in Nim?
20:29:34FromGitter<zacharycarter> https://github.com/raysan5/raylib/blob/master/src/text.c#L116
20:29:38FromGitter<zacharycarter> this is what I came up with -
20:29:54FromGitter<zacharycarter> ``` template bitCheck(a, b: untyped): bool = ⏎ return ((a) and (1 shl (b)))``` [https://gitter.im/nim-lang/Nim?at=596140c2bf7e6af22cbaf3b1]
20:29:58FromGitter<zacharycarter> not sure if that's correct or not
20:30:38*yglukhov joined #nim
20:47:00*tankfeeder quit (Quit: Leaving)
21:04:59FromGitter<zacharycarter> I guess I want to use bitsets
21:05:08FromGitter<zacharycarter> but I'm not sure how to construct a bitset
21:05:53FromGitter<zacharycarter> I have a set of bits like - 0xEFDFBF79
21:06:01FromGitter<zacharycarter> and I want to check if that includes a certain bit
21:10:15*yglukhov quit (Remote host closed the connection)
21:17:06TrustableHi all, a question about Nimble: When I install a package, will it abe dded to the search path automatically or is this manual?
21:18:37flashmozzgI think I've found a bug in Nim compiler: 'SIGSEGV: Illegal storage access. (Attempt to read from nil?)'
21:19:17flashmozzglooks liek a regression (I tested the same code on ideone, which says it uses 0.16 and it compiles correctly)
21:20:00FromGitter<zacharycarter> care to share the code flashmozzg?
21:21:59FromGitter<ephja> Trustable: The nimble package directory is part of the path by default
21:23:00FromGitter<ephja> you don't need to do anything after installing
21:23:22TrustableI found this in my Nim config:@ if nimbabel:
21:23:22Trustable nimblepath="$home/.nimble/pkgs/"
21:23:22Trustable @if not windows:
21:23:24Trustable nimblepath="/opt/nimble/pkgs/"
21:23:26Trustable @else:
21:23:28Trustable # TODO:
21:23:28*deavmi_ joined #nim
21:23:30Trustable @end
21:23:30deavmi_Hi
21:23:32Trustable@end
21:23:34TrustableBut it does not find my installed package
21:23:47deavmi_https://git.librenet.co.za/DMS - got a Nim mirror up there. Still gotta mirror the other stuff.
21:24:54FromGitter<ephja> Trustable: Are you taking into account the directory structure of the source directory for your package?
21:25:08flashmozzghere is the code: http://ideone.com/Bid3mA
21:25:29FromGitter<ephja> Trustable: 'foo.bar' rather than just 'bar' for example
21:26:13*vendethiel joined #nim
21:26:22TrustableIt does not find the main file nigui.nim which is in the "src" directory. Maybe I have to change something in the package.
21:26:34flashmozzgAlso, if use seq instead of Bar it works too
21:27:30*deavmi_ quit (Quit: leaving)
21:29:05*FromGitter quit (Remote host closed the connection)
21:29:14*FromGitter joined #nim
21:33:42*murych quit (Ping timeout: 240 seconds)
21:34:12FromGitter<stisa> Trustable you are probably missing `srcDir = "src"` in your nimble file
21:34:51Trustablestisa: ok, ty
21:42:16Trustablethx for help, my Nimble package NiGui works now
21:50:12*couven92 joined #nim
21:51:17*Trustable quit (Remote host closed the connection)
21:52:21*nsf quit (Quit: WeeChat 1.7.1)
21:59:36*xet7 quit (Quit: Leaving)
22:17:20dom96ahh cool, so the warning Nimble gave was correct :)
22:29:03*Vi- quit (Ping timeout: 258 seconds)
23:07:35*couven92 quit (Ping timeout: 240 seconds)
23:08:23*skrylar joined #nim
23:19:35*vendethiel quit (Ping timeout: 240 seconds)
23:25:25*chemist69 quit (Ping timeout: 276 seconds)
23:27:31*chemist69 joined #nim
23:40:32*Wombah joined #nim
23:43:10WombahI have a question about import path resolution... According to the top answer of this (https://stackoverflow.com/questions/30037165/where-does-nim-search-for-modules-to-import) stackoverflow question the resolution should search relative to the main module if it fails when searching relative to the importing module. That doesn't seem to work for me
23:43:11Wombah though... :/