<< 21-08-2017 >>

00:36:21*mahtob is now known as mahmudov
00:36:38*Nobabs27 joined #nim
00:52:33*yglukhov joined #nim
00:57:05*yglukhov quit (Ping timeout: 248 seconds)
01:39:28*chemist69 quit (Ping timeout: 240 seconds)
01:40:35*vivus quit (Quit: Leaving)
01:53:32*chemist69 joined #nim
02:12:29*m712 quit (Quit: bye-nyan!)
02:12:55*m712 joined #nim
02:15:01*dddddd quit (Remote host closed the connection)
02:17:12*m712 quit (Client Quit)
02:17:26*m712 joined #nim
02:23:29*m712 quit (Quit: bye-nyan!)
02:23:42*m712 joined #nim
02:35:41*yglukhov joined #nim
02:39:53*mahmudov quit (Remote host closed the connection)
02:39:53*yglukhov quit (Ping timeout: 240 seconds)
02:46:38*Nobabs25 joined #nim
02:47:27*Nobabs27 quit (Ping timeout: 240 seconds)
03:10:35*endragor joined #nim
03:12:05*sz0 quit (Quit: Connection closed for inactivity)
03:20:21*askdf joined #nim
03:22:53*askdf left #nim (#nim)
04:32:44*ShalokShalom joined #nim
04:37:33*yglukhov joined #nim
04:41:22*Nobabs25 quit (Quit: Leaving)
04:42:09*yglukhov quit (Ping timeout: 248 seconds)
04:48:30*pilne quit (Quit: Quitting!)
05:27:07*arnaud1 quit (Ping timeout: 276 seconds)
05:50:27*crem quit (Quit: WeeChat 1.9)
05:50:48*crem joined #nim
06:21:19*rauss quit (Quit: WeeChat 1.9)
06:27:48*ShalokShalom quit (Remote host closed the connection)
06:33:48*nsf joined #nim
06:39:50*yglukhov joined #nim
06:44:14*yglukhov quit (Ping timeout: 255 seconds)
06:48:31*ShalokShalom joined #nim
06:50:09*endragor quit (Remote host closed the connection)
06:59:50GertmI'm getting error messages at the bottom of the stdlib page: https://nim-lang.org/docs/lib.html ( JSON.parse: expected double-quoted property name at line 5996 column 3 of the JSON data ). Is this a known issue?
07:17:12*nattefrost joined #nim
07:27:02*Arrrr joined #nim
07:28:31AraqGertm: ooh thanks, that's a new one :-)
07:34:08Jipok[m]Why is my post not visible on the forum?
07:34:21Jipok[m]https://forum.nim-lang.org/t/3113
07:35:53ArrrrJester lost your post. He is so careless
07:37:12Jipok[m]Because of the comma in the title?
07:38:19Araqworks for me
07:38:23ArrrrNow is working
07:38:42Araqyeah sorry, you were in moderation, I made you a user and swoosh
07:38:49Araqpeople can now read your posts
07:55:27FromGitter<ephja> `T* {.p.} = object` -> `TypeDef(PragmaExpr(Postfix(Ident(!"*"), Ident(!"T")), Pragma(Ident(!"p"))), Empty(), ObjectTy(Empty(), Empty(), Empty()))`
07:56:21*endragor joined #nim
07:57:56FromGitter<ephja> is that right? if so then it's a little inconvenient, but all that's missing is a few accessor functions
08:02:16*yglukhov joined #nim
08:02:25*yglukhov quit (Remote host closed the connection)
08:05:03*yglukhov joined #nim
08:06:34AraqI doubt the ObjectTy is correct
08:17:22FromGitter<ephja> no? `T* = object` -> `TypeDef(Postfix(Ident(!"*"), Ident(!"T")), Empty(), ObjectTy(Empty(), Empty(), Empty()))`
08:24:12GertmAraq: The site worked a week ago, so shouldn't be hard to find. :)
08:40:23*gokr quit (Ping timeout: 240 seconds)
08:41:12*gokr joined #nim
08:43:27ZevvDoes Nim have a way to detect and complain about unused imports?
08:46:15Araqno.
08:46:19Zevvok
08:47:01gokrJipok[m]: Atomicgameengine (as well as Urho3D which it is a fork of) uses SDL2 and emscripten for HTML5 deployments. You can always take a look and see their sizes.
08:49:47*Yardanico joined #nim
09:04:37*jinshil quit (Quit: Good-bye!)
09:04:49*dom96|w joined #nim
09:14:42*vlad1777d joined #nim
09:20:57ShalokShalomdom96: concurrency
09:21:44*endragor quit (Remote host closed the connection)
09:35:54*endragor joined #nim
09:38:48*gokr quit (Ping timeout: 240 seconds)
09:54:40*ShalokShalom quit (Ping timeout: 255 seconds)
09:55:59*gokr joined #nim
10:03:09*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
10:10:54*endragor quit (Remote host closed the connection)
10:14:36*endragor joined #nim
10:18:47*arnetheduck joined #nim
10:23:40*couven92 joined #nim
10:31:28FromGitter<ephja> so the parseStmt/staticRead approach for comparing symbols with a module and some dependency works in some cases, but it's sub-optimal I think
10:33:00*PMunch joined #nim
10:43:40*dom96|w joined #nim
10:49:32dom96|wShalokShalom: Why not use Nim's concurrency?
10:50:51FromGitter<ephja> so I need to run the semantic pass and then inspect the AST after that, I think
10:58:26FromGitter<ephja> ```semanticPasses() ⏎ registerPass(stuff) ⏎ compileProject(graph, cache)``` ⏎ ⏎ that seems like the right way to start [https://gitter.im/nim-lang/Nim?at=599abcd2578b44a046d1208e]
10:59:53FromGitter<ephja> @zacharycarter how are you initializing opengl?
11:04:52*ShalokShalom joined #nim
11:09:38Yardanicohmm, is there something like range[1..12], but for strings/chars?
11:11:14*maxcroud joined #nim
11:15:56*haha_ joined #nim
11:16:43maxcroudWhat type system does Nim have: unsound or sound? I can't figure it out.
11:17:26FromGitter<ephja> Yardanico: 'range' accepts a char slice as well
11:18:24*vlad1777d quit (Ping timeout: 248 seconds)
11:18:40FromGitter<ephja> container interfaces are not very flexible atm, but they might become more so eventually now that there aren't many concept bugs left
11:18:50YardanicoMost type systems aim to provide some sort of guarantee about how a well-type program will behave. For example, in many languages all memory accesses are “safe” in well-typed programs. A type system is sound if it actually succeeds at providing that guarantee. Thus informally a type system is sound if it ensures what its designers intended it to ensure. This is much like programming: a program is correct if it does what it is supposed to do.
11:18:59Yardanico(so you don't need to google it)
11:20:16*gangstacat joined #nim
11:22:40maxcroudThanks Yardanico!
11:24:50*vlad1777d joined #nim
11:29:57maxcroudMy friend asked me a question about soundness of Nim type system. I asked him what does sound type system mean for him. He said "it's for example when for type a -> Bool the function \x -> 'a', evidently, is not appropriate; unsound type system (or similar more complex) can't prove or check this"
11:30:35maxcroudAFAIK concerning to this defenition Nim is sound
11:32:05Yardanicowell it's not allowed yeah, but I don't know if generics are "sound"
11:32:17Yardanicobecause Future for example can be of any type (and any other containers)
11:32:35YardanicoFuture[string] or Future[void] or Future[MySpecialType]
11:33:30Yardanicobut it's probably fine for containers
11:33:53Yardanicowell nim has a strong type system which can check for many errors at compile-time
11:34:30maxcroudI tried to code tangled things with generics to "prove" unsoundness but I failed :)
11:34:36FromGitter<ephja> they can, but the instantiations happen at compile time
11:34:59maxcroudYes, there were generics instantiations errors
11:36:21Yardanicoso it means that nim is "sound"?
11:37:11Yardanicoah, I didn't knew that sound can be something like "strong", "solid" (just used google translate)
11:37:46maxcroudYardanico: I suppose it can be a good argument towards soundness
11:38:18Yardanicowell sorry about futures, I forgot that compiler will still check the type of future
11:38:21Yardanicoso it's sound too
11:38:33Yardanicoat compile-time
11:38:33*dddddd joined #nim
11:39:21Yardanicobut I think cast can be considered an "unsafe" feature, so it doesn't apply for soundness
11:39:43YardanicoI don't think you can make a C/C++ FFI without things like cast
11:40:58maxcroudCasting is the only "unsound" feature for now
11:41:44Yardanicowell nim is compiling to C/C++, so casting is neccesary
11:42:11Yardanicoalso cast is used for performance
11:42:31Yardanico(raw pointer)
11:42:40Yardanicoraw pointers, raw types and other unsafe things
11:42:54maxcroudBut casting was conceived for low-level interactions, wasn't it?
11:44:04Yardanicoyes as I said
11:44:20Yardanicofor low-level interactions (when you need to use C libraries or bare-metal performance)
11:44:35*xet7 quit (Ping timeout: 240 seconds)
11:47:43*Cider joined #nim
11:47:58Ciderhello
11:48:05Yardanicohi
11:48:23Ciderwhy you use nim, it isn't even stable?
11:48:46Yardanicoxd
11:48:49cremWe like risk.
11:48:54ZevvLiving on the edge
11:49:00Yardanicoit's stable for me :) and we won't feed you, ok?
11:49:08Cideri am hungry
11:49:10Yardanico(because there's many trools like this, sorry if you arent)
11:49:40Ciderwhy don't you help araq to make it 1.0?
11:49:49Yardanicowe do
11:49:54FromGitter<ephja> I do wish that I was more interested in developing a product as that's how you make money
11:50:03Ciderhow do i disable the gc?
11:50:16crem:)
11:50:19FromGitter<ephja> but I just find many other languages to be so primitive
11:50:30cremActually I'd like it not to become 1.0. Then it's stable and boring.
11:50:51ArrrrCider https://nim-lang.org/docs/gc.html
11:51:05Yardanicoyeah, no new cool features :)
11:51:30cremWith 0.17, I still have hope for constructors. :)
11:51:49cremAnd with 1.0 all my hopes will be broken!
11:51:53Yardanicoyou mean "create=" ?
11:51:58Yardanicoand "destroy="?
11:52:14cremAh, is there a constructor already?
11:52:26cremI knew about destructor..
11:52:55YardanicoI don't know really
11:53:45cremThere's no mention of it in docs.
11:54:04Yardanicoohh
11:54:10Yardanicoprobably there are only deconstructors :)
11:54:19Yardanicowhy you don't like procs like newFoo or initFoo ?
11:56:06cremBecause it's possible to forget to call them. But I wrote too few lines in nim to have an opinion.
11:56:14Ciderthis community is friendly with everyone?
11:56:22Ciderno discrimination?
11:56:23FromGitter<ephja> `init(T: typedesc[Foo]): T` is alright. I also defined `new` at some point, but you might accidentally call system.new in some cases
11:56:43Cidercuz i am special
11:56:47FromGitter<ephja> crem: it's certainly easy to forget, but mostly if you're new I think
11:57:10FromGitter<ephja> of course, optimizing for newcomers to some degree is important, but you need to strike a balance
11:57:10*Cider left #nim (#nim)
11:57:30YardanicoCider, but please look at https://github.com/nim-lang/Nim/wiki/IRC-guidelines
11:57:36cremI mostly was annoyed about unitialied strings/seqs. But I'm not fully serious.
11:57:53YardanicoShould these rules not suffice, we will change them, but in all the years of Nim's development it was rarely (2 or 3 times) necessary to ban one and we like to continue this trend.
11:57:58Yardanico(from this page)
11:58:35Yardanicowell it's a bit higher if you look at irc ban list
11:58:52Yardanicobut only 16 people have permabans
11:58:54AraqYardanico: that needs to be updated :-) we had a very persistent troll
11:59:19FromGitter<ephja> crem: right. convenience by default is the way to go, and that's what Nim is going for in most cases
11:59:37Araqand I think it's not a coincidence he left when I got OP mode
11:59:46Yardanicolol
12:00:06FromGitter<ephja> C and C++ do the opposite in many cases, which is terrible
12:00:10euantoryeah, I noticed that lol
12:01:19FromGitter<ephja> (undefined behavior, unless the programmer annotates accordingly)
12:03:51dom96|wlol
12:04:20dom96|wcrem: I doubt constructors will be a thing.
12:04:33dom96|wseqs/strings will soon be initialised by deafult
12:04:34dom96|w*default
12:05:12Yardanicoevery ref type or only strings/seqs?
12:07:19*sz0 joined #nim
12:11:03FromGitter<ephja> I mostly diverge from the conventions in math contexts. I'm not sure why though, but I have constructors named 'vec', 'mat4' and so on
12:15:39AraqYardanico: only strings/seqs because they have a sensible default (apart from nil, I mean)
12:15:49FromGitter<ephja> Yardanico: probably not every type, but remember that we have 'not nil' (yet another unfinished construct)
12:18:09*Vladar joined #nim
12:18:20Yardanicoalso as I understand "range" thing is mostly for debug and compile-time checking?
12:18:33FromGitter<zacharycarter> @ephja you mean in the wasm screenshot I posted?
12:18:38Yardanicobecause it wouldn't work if user inputs something (in release mode)
12:20:31FromGitter<ephja> @zacharycarter yep. wait, is that generated by Nim or not?
12:20:51Yardanicoit is
12:20:54Yardanicoah
12:20:55Yardanicowasm isnt
12:20:58Yardanicoit's emscripten
12:21:22FromGitter<zacharycarter> hrm? it's definitely webassembly
12:21:40Yardanicohe asks if you emit wasm right from Nim
12:21:49Yardanico(but I may be wrong)
12:21:56Yardanicobut yeah, this is Nim-powered stuff
12:23:17FromGitter<ephja> Yardanico: ranges are only for preventing programmatic errors, but you can reference the bounds if you want
12:23:52FromGitter<ephja> the opengl package needs JS support as well. I need to steal some things from nimx
12:29:23*mahsav quit (Ping timeout: 240 seconds)
12:38:52FromGitter<stisa> @ephja there's a webgl package I started writing some time ago, and you can bridge webgl and OpenGL with some hackish stuff like https://github.com/stisa/crow/blob/master/src/crow/ngl.nim , which is probably similar to what nimx does
12:39:22*BitPuffin|osx joined #nim
12:39:33FromGitter<zacharycarter> I'm just using gles3 for wasm
12:40:03FromGitter<zacharycarter> I guess in reality gles2 with some gles3 emulation
12:43:22*mahsav joined #nim
12:43:24*maxcroud quit (Ping timeout: 260 seconds)
12:46:04Jipok[m]zacharycarter: look at Sokol and Oryol
12:46:07Jipok[m]It might be interesting for you
12:46:11Jipok[m]https://github.com/stisa/crow/issues/1
12:51:18*byte512 quit (Ping timeout: 246 seconds)
12:53:01*planhths joined #nim
12:56:38*byte512 joined #nim
13:02:46FromGitter<zacharycarter> thanks Jipok[m]: I've seen Oryol before
13:03:42*kafke quit (Remote host closed the connection)
13:06:55*Arrrr quit (Read error: Connection reset by peer)
13:07:31*maxcroud joined #nim
13:15:51*rauss joined #nim
13:18:40*kafke joined #nim
13:18:42*kafke quit (Remote host closed the connection)
13:19:20*kafke joined #nim
13:23:30*kafke quit (Ping timeout: 240 seconds)
13:27:31*planhths quit (Ping timeout: 255 seconds)
13:33:11*haha_ quit (Quit: haha_)
13:35:10*rauss quit (Ping timeout: 240 seconds)
13:37:25*rauss joined #nim
13:41:53*rauss quit (Ping timeout: 248 seconds)
13:42:54*arnaud2 joined #nim
13:43:43*rauss joined #nim
13:57:13*Sentreen quit (Ping timeout: 255 seconds)
14:03:35*haha_ joined #nim
14:03:36*scriptum quit (Quit: Leaving)
14:04:54*PMunch quit (Quit: Leaving)
14:06:40*couven92 quit (Ping timeout: 246 seconds)
14:09:48FromGitter<krux02> zty.pe
14:10:19*Sentreen joined #nim
14:10:27*endragor quit (Remote host closed the connection)
14:10:43FromGitter<krux02> very off topic, but http://zty.pe
14:12:24*MyMind joined #nim
14:14:05*Sembei quit (Ping timeout: 240 seconds)
14:15:02*Pisuke joined #nim
14:17:37*MyMind quit (Ping timeout: 248 seconds)
14:21:51*Sentreen quit (Ping timeout: 248 seconds)
14:33:46*PMunch joined #nim
14:35:52*Sentreen joined #nim
14:43:06Yardaniconice game
14:43:16Yardanicoand easy
14:44:32Yardanicowell not that easy
14:45:51Yardanicohow many waves?
14:47:06Yardanicowait
14:47:10Yardanicodoes it work for any unicode?
14:47:24*nattefrost quit (Remote host closed the connection)
14:47:31YardanicoLOL
14:47:33Yardanicohttp://zty.pe/?url=https://nim-lang.org/
14:48:54*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
14:51:09*dom96|w joined #nim
14:55:37YardanicoI reached wave 44 only :(
14:59:58Yardanicosadly it works only for english alphabet
15:00:03*kafke joined #nim
15:01:09*kafke quit (Client Quit)
15:03:00*couven92 joined #nim
15:05:14*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
15:11:36Jipok[m]http://zty.pe/?url=https://ko.wikipedia.org/wiki/%EC%A4%91%ED%99%94%EC%9D%B8%EB%AF%BC%EA%B3%B5%ED%99%94%EA%B5%AD
15:11:38Jipok[m]4 waves(
15:12:04Yardanicoehm
15:12:26Yardanicohow can I type á ?
15:12:27Yardanicolol
15:12:38Jipok[m]idk)
15:12:39YardanicoI have only english and russian keyboard layouts :(
15:12:46Jipok[m]+1
15:13:40Jipok[m]failed on "ngguó"
15:17:56*dom96|w joined #nim
15:20:32*dddddd quit (Ping timeout: 248 seconds)
15:23:51*enthus1ast__ joined #nim
15:24:50dom96|whah, that's a cool site
15:24:58dom96|ws/site/game/
15:26:40*Trustable joined #nim
15:31:08enthus1ast__hey ho, i found a strange behavior of the loggin module (rollingFileLogger)
15:31:20enthus1ast__it seems to overwrite the logfile on every start.
15:31:48enthus1ast__https://gist.github.com/enthus1ast/161f6fb59281287dec12d5c8c3d8bf69
15:32:02enthus1ast__logging
15:32:53enthus1ast__can you reproduce it?
15:33:01Yardanicoone sec
15:33:18Yardanicoyes
15:33:26Yardanicobut I don't know if this is a bug
15:33:55enthus1ast__when i add fmAppend (which yould not make sense here cause it have to read the file of course) it crashes
15:34:17*dddddd joined #nim
15:34:19*maxcroud quit (Ping timeout: 260 seconds)
15:35:34enthus1ast__if its not a bug then its a little strange behavior for a logfile?
15:36:30Yardanicowell probably yes, but I've never used file loggers in nim before :)
15:36:52enthus1ast__never had problems with it until now
15:37:04enthus1ast__i'll file a issue
15:39:20dom96|wI think we may need to emphasise Nim's metaprogramming abilities far more. https://news.ycombinator.com/item?id=15064951
15:44:18Yardanicois there a way to have optional arguments in a template/macro if it's called like "foo MyType: body"?
15:44:48Yardanicoso both of these work - https://gist.github.com/Yardanico/2e509f2e80c0a2dffa70831bb01fa69a
15:44:51Yardanicoah, just overloading, im dumb
15:51:02*nsf quit (Quit: WeeChat 1.9)
15:52:07*yglukhov quit (Remote host closed the connection)
15:55:43*dddddd quit (Ping timeout: 248 seconds)
15:56:25*yglukhov joined #nim
15:58:23*yglukhov_ joined #nim
15:58:24*yglukhov quit (Read error: Connection reset by peer)
16:02:43enthus1ast__zty.pe :) how small the world is
16:02:48*yglukhov_ quit (Ping timeout: 255 seconds)
16:04:40Yardanicoenthus1ast__, what do you mean? :)
16:04:59enthus1ast__the guy who made this lives around the corner
16:05:35enthus1ast__its made in "Hesse"
16:05:44enthus1ast__"Hesse" is the best bundesland in germany
16:09:03*gangstacat quit (Quit: Leaving)
16:09:17*dddddd joined #nim
16:09:39subsetparkWas ist ein bundesland?
16:11:26enthus1ast__Its like a state, but i think its offtopic :D
16:13:54*Jesin joined #nim
16:15:18tankfeedernow my sha3 library supports KangarooTwelve.
16:15:46tankfeedersince [email protected]
16:15:50*endragor joined #nim
16:20:19*endragor quit (Ping timeout: 255 seconds)
16:20:48tankfeederbroken again: https://nim-lang.org/docs/lib.html#nimble-unofficial-packages
16:21:11tankfeederUnable to retrieve package list: Unexpected token } in JSON at position 143338
16:24:17*Jesin quit (Quit: Leaving)
16:24:35Yardanicoyes
16:24:39Yardanico:(
16:24:49Yardanicocc dom96|w
16:25:19tankfeederautomatic monitoring case
16:30:45dom96|wI guess somebody put a trailing comma in the packages.json
16:31:11*planhths joined #nim
16:31:20dom96|wWe'll remove this soon anyway, nimble.directory will supersede it.
16:33:10tankfeederok
16:33:18enthus1ast__kuhl nimble.directory!
16:36:15*Jesin joined #nim
16:41:05Yardanicowhat happens if staticExec can't find a executable?
16:41:11Yardanicowill it raise an exception or something?
16:41:21YardanicoI mean if it can't find the command
16:44:38def-Yardanico: just returns an empty string then, but that should be changed imo
16:45:31def-https://github.com/nim-lang/Nim/issues/1994
16:45:35def-Apparently there is gorgeEx now
16:46:22def-(not an empty string, the error from your system's shell)
16:49:52*dddddd quit (Ping timeout: 240 seconds)
16:59:10*Calinou quit (Ping timeout: 264 seconds)
17:02:40*yglukhov joined #nim
17:02:55*dddddd joined #nim
17:03:05*gokr quit (Ping timeout: 240 seconds)
17:03:55*itseris joined #nim
17:06:53*haha_ quit (Quit: haha_)
17:07:02*yglukhov quit (Ping timeout: 255 seconds)
17:08:02*Calinou joined #nim
17:09:02enthus1ast__hey guys, we have build a little nim "offline pack"
17:09:05enthus1ast__https://github.com/enthus1ast/nimOfflinePack
17:09:42enthus1ast__its kuhl for coding in the train with no wifi etc.
17:09:43*Matthias247 joined #nim
17:14:13Yardanicowow
17:14:14Yardanicoenthus1ast__, wow
17:14:27Yardanico1.5gb only - not that much actually
17:14:44Yardanicobut maybe you can upload it to somewhere else too?
17:14:56Yardanicolike mega.co.nz, google drive
17:15:14YardanicoBecause I get only 1.5-2mb/s :)
17:15:27Yardanicolol, it actually means there are some MY packages
17:15:29Yardanicowow!
17:15:42enthus1ast__:)
17:15:44enthus1ast__i dont know
17:16:02enthus1ast__these are the repos the github api let us see
17:16:23enthus1ast__Dankrad is trying to get more so its not complete
17:17:04enthus1ast__i can reup it somewhere else later if one like
17:19:41*ipjk joined #nim
17:19:54enthus1ast__try it with mgit it turns out better then i thought
17:21:13*Arrrr joined #nim
17:21:13*Arrrr quit (Changing host)
17:21:13*Arrrr joined #nim
17:22:02*PMunch quit (Quit: leaving)
17:27:10*enthus1ast__ quit (Quit: on the way home)
17:30:42*gokr joined #nim
17:33:09*yglukhov joined #nim
17:33:27*gokr quit (Read error: Connection reset by peer)
17:40:31*Jesin quit (Quit: Leaving)
17:41:41*haha_ joined #nim
17:44:54*Jesin joined #nim
17:46:22FromGitter<dandevelop> Is anyone using nake?
17:46:23*haha_ quit (Read error: Connection reset by peer)
17:46:41*haha_ joined #nim
17:50:19*nsf joined #nim
17:54:11Yardanicodandevelop: a lot of us
17:54:47FromGitter<dandevelop> @Yardanico great! :D Just found out about it. I was curious how is it different from using nimscript in nimble
18:01:46Yardanicowell with nake you can use all stuff that you can use in usual nim programs
18:01:56Yardanicobecause nakefile is compiled as a standalone program
18:02:20FromGitter<zacharycarter> I'd advise against using nake and instead use nimscript
18:02:29FromGitter<zacharycarter> nimscript = the future from my understanding
18:02:31FromGitter<dandevelop> @zacharycarter why is that?
18:03:03FromGitter<zacharycarter> also nake isn't really maintained to my knowledge - https://github.com/fowlmouth/nake
18:03:25FromGitter<zacharycarter> you should be able to accomplish anything you can with nake, with nimscript and not introduce another dependency into your project
18:03:43FromGitter<dandevelop> @zacharycarter that was my next question, it looks like the last commit was 5 months ago
18:04:51*ofelas joined #nim
18:04:53FromGitter<zacharycarter> yeah my advice would be to avoid Nake for new projects
18:04:57FromGitter<zacharycarter> and to instead rely on nimscript
18:05:03FromGitter<zacharycarter> since it is core to the language unlike Nake
18:05:47Araqwell I have gone full cycle and sometimes would advocate Nake over Nimscript :D
18:06:21FromGitter<dandevelop> @Araq could you share some of those "times" in sometimes? :D
18:07:00Araqin my quest to invent the perfect build system I came up with something that's quite like Nake
18:07:36Araqadvantages: can use the full power of Nim's osproc module (aka parallel builds)
18:08:24Araqand the compilation result is cached. Native speed, not Nimscript's speed.
18:10:39Araqas fas as I know 'nake' is feature complete and would be updated if there were any real issues
18:11:32*planhths quit (Quit: Konversation terminated!)
18:12:02FromGitter<dandevelop> @Araq sounds good to me!
18:12:44*Relax joined #nim
18:15:52*Relax quit (Client Quit)
18:16:08*gangstacat joined #nim
18:17:05*Relax joined #nim
18:18:14*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
18:27:23*nsf quit (Quit: WeeChat 1.9)
18:28:22ZevvI'm having troubles understanding how to handle exceptions in asyncdispatch
18:28:30Zevvfor example, newAsyncHttpCLient
18:28:42ZevvThe docs are a bit dense on this
18:28:47*gangstacat quit (Ping timeout: 246 seconds)
18:28:59YardanicoZevv, it's very easy actually
18:29:18ZevvProbably, but I'm missing the point I guess
18:29:33ZevvI usually find things are very easy in Nim, but it takes me a second or two to get there :)
18:29:38YardanicoZevv, any future has "failed" field
18:29:41Yardanico(completed future)
18:30:10YardanicoCan I somehow convert sequence to array? or create an array using "split"?
18:30:14YardanicoI know the size of an array
18:30:35ZevvOk, but how does this play with await
18:30:46ZevvHaving await inside a try: block causes complaints
18:30:50Yardanicoyes
18:30:53Yardanicoyou should use yield
18:30:58Yardanicoif you want to handle exceptions
18:31:02Yardanicothere is an example
18:31:09Yardanicohttps://nim-lang.org/docs/asyncdispatch.html#asynchronous-procedures-handling-exceptions
18:31:20ZevvI found that, but where exactly is yield in the docs
18:31:30Yardanicoyield is an iterator thing
18:31:33Zevvwhat is the difference between await and yield, and why not always use yield then?
18:31:35Yardanicoand async/await (ab)uses them
18:31:41ipjkyglukhov: is it possible to set the windowsflags in nimx (for winapi backend).
18:31:55YardanicoZevv, await is shorter and more readable
18:32:04dom96there is a semantic difference actually
18:32:10dom96'await' reads the future after it is yielded
18:32:43Zevvok, one sec, I'll post an example
18:33:24yglukhovipjk: i don't think so, but prs are welcome. also note that winapi backend is not 100% complete. currently sdl2 backend is used for windows.
18:33:33Zevvnever mind the json cruft on top
18:33:34Zevvhttps://pastebin.com/raw/ujsxfxYX
18:33:45Zevvit's about the last tow paragraphs
18:34:14ZevvHow should I handle the exceptions thrown by the asynchHTTPclient
18:34:28YardanicoZevv, use yield :)
18:34:39Yardanicoas docs say
18:34:50ZevvI can't just change await into yield
18:34:52Zevvthat does not compile
18:34:53Yardanicoyes
18:35:21FromGitter<ephja> no but see the previous line in the example
18:35:29Zevvcts.nim(165, 19) Error: expression expected, but found 'keyword yield'
18:35:50YardanicoZevv, why are you using "if await withTimeout"?
18:35:57Yardanicoah I get it
18:36:14*gokr joined #nim
18:36:26ZevvThere's 3 awaits in there: timeout, HTTP headers and http body completed
18:36:28Yardanicowait
18:36:31Yardanicowhere's withTimeout from?
18:36:36Yardanicoah, asyncdispatch
18:36:39Zevvasyncdispatch
18:36:49Zevvafaik this is the way to handle timeouts for async stuff
18:38:11YardanicoZevv, something like this, but I'm not sure - https://gist.github.com/Yardanico/e15182322ae9706339686c3fc4562c7b
18:38:15Yardanicoah sorry
18:38:19Yardanicoyou don't need "yield req" at line 20
18:38:31Yardanicook removed it
18:38:48Yardanicobut this may not work because of withTimeout
18:38:56Yardanicoi've never used timeouts myself honestly
18:39:01Zevvhehe
18:39:26Zevvthat should be fine, because the req only gets to line 21 it has not timed out
18:39:31Zevvotherwise it goes to line 30
18:40:08Yardanicodom96, is there a way to get domain zone from URL via uri module?
18:40:51ZevvYardanico: ok, so basically I'm peeking inside the future to see if there was an exception
18:40:54Zevvbut not actual
18:41:01Zevvbut not actually using the exception mechanism inside the async block
18:41:11Yardanicowell you're kinda using it
18:41:26Yardanicoyou can get error via "req.error" if it failed
18:41:35Yardanico(error is of ref Exception type)
18:41:53ZevvOk, that's clear
18:42:08ZevvI can live with that, although it feels a bit rough on the edges, still :)
18:42:26ZevvI never expect async stuff to be easy, so that's ok
18:42:40Yardanicowell there's actually not that many async/await implementations in compiled languages (I mean compiled to binary without any VM)
18:42:56Yardanicothere's libuv, but it's not that simple
18:42:57Yardanico:D
18:43:10federico3any zsh user?
18:43:22ZevvI'm accustomed to doing it all myself in libev/libuv
18:43:22Yardanicofederico3, me
18:43:27Zevvand that's cumbersome as hell
18:43:41dom96Yardanico: what's the domain zone?
18:43:43Zevvso I'm happy as a little baby with Nim
18:43:52Yardanicodom96, sorry, like "vk.com" - get "com"
18:44:02Yardanicofederico3, but I know nothing about zsh :)
18:44:10dom96Yardanico: see what parseUri returns
18:44:53FromGitter<ephja> is it somehow easier with a VM?
18:44:55dom96Zevv: so what do you want to do?
18:45:01Yardanicodom96, ah, "vk.com" is not RFC 3986 - ike, so parseUri can't parse it properly :(
18:45:05Yardanico*like
18:45:23Zevvdom96: well, I'm ok for now. I just peek into the Future to see what happened
18:46:07Zevvdom96: I was naively trying to put a few awaits inside a try:
18:46:09Yardanicoah wait
18:46:14Yardanicoit actually parses it, nvm
18:46:18YardanicoZevv, you can't sadly
18:46:29YardanicoZevv, there's a note about this in docs
18:46:33ZevvI would be surprisid if that worked :)
18:46:57ZevvI'm enlightened by now, so no problems here anymore
18:47:31Yardanicodom96, ah yes, it can't parse "vk.com"
18:48:00Yardanico"https://vk.com" - scheme: https, hostname: vk.com; "vk.com" - path: vk.com
18:48:07Yardanicobut it's not nim fault
18:50:04Yardanicowait, I can actually use scanf for this, hmm
18:50:34subsetparkhappy eclipse, everybody!
18:50:41ZevvBoohoo
18:50:46*Zevv is in europe
18:50:48FromGitter<zacharycarter> my office is way too excited about this thing
18:51:21Yardanicoabout what thing?
18:51:23FromGitter<zacharycarter> I've been practicing all week - standing in the middle of the street with my eyes half closed
18:51:24Yardanicoah, eclipse :)
18:51:29FromGitter<zacharycarter> standing in closets with the lights off
18:52:02FromGitter<zacharycarter> :P
18:52:08ipjkzacharycarter: send them this, http://i.imgur.com/oqxLnYd.jpg
18:52:21FromGitter<zacharycarter> hahaha
18:52:34*planhths joined #nim
18:59:15*haha_ quit (Quit: haha_)
19:03:50Yardanicoso I can't construct an array from sequence ? :(
19:03:57Yardanicoif I know the length
19:04:11Yardanicoat compile-time
19:06:37*Vladar quit (Quit: Leaving)
19:07:59dom96No eclipse in Europe D:
19:09:15FromGitter<zetashift> Wasn't there a way to get a nim install on my android?
19:10:54FromGitter<ephja> Yardanico: you can, but there are no shortcuts
19:10:59*Relax quit (Remote host closed the connection)
19:11:27FromGitter<ephja> loop over the range and fill the indices
19:13:22Yardanicoщр
19:13:25Yardanicooh, thanks
19:16:02Yardanicoephja: but how can I do this at compile-time?
19:17:41Yardanicoah, I figured it out :)
19:17:47Yardanicocompile-time var + static + const
19:23:05*relax joined #nim
19:25:53*planhths quit (Quit: Konversation terminated!)
19:27:48*couven92 quit (Read error: Connection reset by peer)
19:28:12*couven92 joined #nim
19:30:36FromGitter<adandersen> how do you do a compile-time var? I thought using var meant runtime
19:31:01FromGitter<adandersen> and only way to do compile-time variable was const
19:31:41FromGitter<adandersen> im pretty new to nim though...
19:32:23Yardanicowell all code in compile-time is ran by a VM (virtual machine), it can execute a large chunk of nim code which isn't using C functions
19:32:37Yardanicoyou just declare
19:32:48Yardanicovar somedata {.compiletime.}: string
19:32:58Yardanicoand you'll able to edit it on compile-time
19:33:12FromGitter<adandersen> ah so a pragma
19:33:15Yardanicoyeah
19:33:18FromGitter<adandersen> thats cool
19:33:19Yardanicobut also
19:33:30Yardanicoyou can wrap all you want to execute at compile-time into a "static" block
19:34:27FromGitter<adandersen> ill have to look up static block, very enlightening, thank you
19:38:19*Arrrr quit (Ping timeout: 255 seconds)
19:39:50FromGitter<adandersen> found it, https://nim-lang.org/docs/manual.html#statements-and-expressions-static-statement-expression
19:45:08FromGitter<adandersen> where would be a good place to read more about Nim's compile time VM?
19:46:15YardanicoI don't know really
19:46:40FromGitter<adandersen> https://nim-lang.org/0.11.3/nims.html
19:46:57FromGitter<adandersen> nimscript seems to talk about it some
19:47:03FromGitter<adandersen> that looks like an old version of nim though
19:47:26FromGitter<adandersen> https://nim-lang.org/docs/nims.html
19:47:53*yglukhov quit (Remote host closed the connection)
19:52:41FromGitter<adandersen> it seems its just mentioned in a few places without really documentation about it. unfortunate
19:54:47FromGitter<adandersen> oh well
20:04:54*nsf joined #nim
20:05:52*Jesin quit (Quit: Leaving)
20:06:44*big_num joined #nim
20:10:48dom96adandersen: anything in particular you'd like to know about it?
20:11:11*dom96 quit (Changing host)
20:11:11*dom96 joined #nim
20:22:05*boop joined #nim
20:24:09FromGitter<adandersen> it would have been nice to have a complete spec ;) but i suppose in general how much of the language is supported by it?
20:30:18Yardanicowell
20:30:29Yardanicoalmost anything except functions which require C FFI
20:30:42FromGitter<adandersen> ah
20:31:09FromGitter<adandersen> and then those 4 libraries mentioned on the nimscript page
20:31:35FromGitter<adandersen> i suppose when i said language i wasnt meaning any of the library functions
20:31:54FromGitter<adandersen> but if all the language is supported thats good
20:32:42dom96yeah, the full language is supported
20:32:49dom96everything apart from the FFI
20:33:01dom96the 4 libraries you mention are not supported because they use the FFI
20:33:05FromGitter<cooldome> i
20:33:07FromGitter<cooldome> i
20:34:17FromGitter<cooldome> i
20:34:57FromGitter<cooldome> i and london is a
20:35:22FromGitter<adandersen> but there are plans to eventually have FFI supported by the VM? I thought i read that somewhere
20:35:26Yardanicoyes
20:35:27Yardanicothere are
20:36:17*beatmox quit (Ping timeout: 255 seconds)
20:38:44*beatmox joined #nim
20:40:22*boop quit (Quit: WeeChat 1.7)
20:43:41*Vindaar joined #nim
20:52:43*rauss quit (Quit: WeeChat 1.9)
21:07:00*Vindaar quit (Quit: Page closed)
21:07:05*Vindaar` joined #nim
21:09:26*Vindaar` quit (Client Quit)
21:10:03*Vindaar joined #nim
21:10:11*Vindaar quit (Client Quit)
21:11:30*endragor joined #nim
21:13:36*Yardanico quit (Remote host closed the connection)
21:15:48*endragor quit (Ping timeout: 240 seconds)
21:16:53*Yardanico joined #nim
21:18:04*Vindaar` joined #nim
21:18:47*Yardanico quit (Client Quit)
21:20:25*gangstacat joined #nim
21:20:45*Yardanico joined #nim
21:21:44Vindaar`Hey everyone!
21:22:59dom96hello Vindaar`!
21:23:47YardanicoHi!
21:25:47Vindaar`so I'm currently working through Nim in Action (awesome so far :) ). I finally found something I thought was somewhat surprising
21:26:58Vindaar`So in short basically, if you create an object using let, why can you still just change the fields of the object by re-assigning them to something else?
21:27:17YardanicoYou can if it's a reference object
21:27:23Yardanicoref object
21:27:31Vindaar`intuitively I would have thought that that would be forbidden, because one used let, but I see that it sort of makes sense
21:27:35Vindaar`oh!
21:28:06dom96yeah, you can't reassign the variable
21:28:21YardanicoSo let with ref object just says that you can't change the reference, so it would always refer to one object
21:28:29dom96in that case, but it's still a mutable reference
21:28:42Vindaar`oh I see. That makes sense :)
21:28:53dom96Glad you like the book :D
21:29:02Vindaar`me too :D
21:29:05*dom96 is the author in case that's not clear :)
21:29:38Vindaar`yep, I know :) I'm the guy who answered on your tweet regarding the 50% off (if that wasn't clear ;) )
21:31:19*rauss joined #nim
21:31:38dom96oh cool, didn't realise :)
21:39:07*Trustable quit (Remote host closed the connection)
21:40:18*gangstacat quit (Quit: Leaving)
21:48:27*yglukhov joined #nim
21:52:02*gangstacat joined #nim
21:52:52*yglukhov quit (Ping timeout: 255 seconds)
22:00:33FromGitter<zacharycarter> dom96: what do you think about exceptions in Nim
22:00:45FromGitter<zacharycarter> do you use them?
22:00:53dom96yes
22:00:56dom96I love them
22:01:02FromGitter<zacharycarter> okay
22:01:04*ofelas quit (Quit: shutdown -h now)
22:01:09dom96Why?
22:01:16FromGitter<zacharycarter> I have zero in zengine so far
22:01:35FromGitter<zacharycarter> and I'm somewhat wary of introducing any, but a contributor is suggesting adding some
22:01:41FromGitter<zacharycarter> I just want a core team members take on the feature
22:01:56dom96what are your fears regarding exceptions?
22:02:27FromGitter<zacharycarter> introducing a lot of handling code
22:03:24dom96how do you deal with errors currently?
22:03:39FromGitter<zacharycarter> in this situation we're dealing with texture loading
22:04:03FromGitter<zacharycarter> so if the file doesn't exist OR if the load operation produces no data, the proc returns nil
22:04:10FromGitter<zacharycarter> and warns the user of what has occurred
22:04:31FromGitter<zacharycarter> sufficient from my point of view and simple
22:04:53dom96Perhaps, but the application has no way of capturing the error
22:05:01dom96All it can find out is that the call failed
22:05:19dom96So if I wanted to show the error in a GUI I wouldn't be able to
22:05:19FromGitter<zacharycarter> right, not as to why
22:05:28FromGitter<zacharycarter> gotcha
22:05:55dom96I would however avoid 'nil' as much as possible.
22:06:18FromGitter<zacharycarter> hrm okay
22:08:18FromGitter<zacharycarter> thanks for the advice
22:08:52*gangstacat quit (Quit: Leaving)
22:09:57*relax quit (Ping timeout: 240 seconds)
22:15:08*ipjk quit (Quit: Leaving)
22:21:34*nsf quit (Quit: WeeChat 1.9)
22:22:16TheManiacHi all. Am puzzled by list comprehensions
22:22:35TheManiacIs there a reason why:
22:22:37TheManiaclet args = lc[eval(arg, table, symbols, source) | (arg <- node.children[1 .. node.children.high]), Maybe[string]]
22:22:46YardanicoOhh
22:22:58TheManiacworks if table is a constant, but not if it's a `var` ?
22:23:11TheManiac(says illegal capture)
22:23:59TheManiac(by constant I mean declared with `let`, I dont mean `const`)
22:24:27*dom96|w joined #nim
22:29:21*dom96|w quit (Ping timeout: 248 seconds)
22:38:22dom96TheManiac: Can you gist your code?
22:43:05TheManiacIt's in the middle of a function - do you need the whole function?
22:44:56dom96it would help if I could (attempt to) compile it
22:45:06dom96but the function might help anyway
22:45:25TheManiachttps://bitbucket.org/snippets/maxgrenderjones/8Lr8G6
22:46:10FromGitter<ephja> damn these compiler globals :p
22:46:53TheManiacUnfortunately it's part of a project, so there would be lots of files if you needed to compile it
22:48:15dom96okay, what's the error that you get?
22:48:21dom96and what is `eval`?
22:48:38dom96is this open source perhaps?
22:58:21TheManiactheoretically, but not yet published
22:58:37TheManiacthe error is 'illegal capture'
22:58:42FromGitter<ephja> what's wrong? ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=599b65a281cd9a5d7e9cd200]
23:00:31TheManiacI guess I'll have to hurry up and publish it :)
23:01:43*relax joined #nim
23:02:52FromGitter<ephja> `condsyms.initDefines()`
23:06:14dom96TheManiac: Yeah, what I would do to investigate this is see the code that the `lc[]` macro is generating.
23:06:26dom96the error might then become clear
23:06:35dom96I have to head to sleep for now
23:06:41dom96Ping me if you do end up publishing the code :)
23:07:20FromGitter<ephja> back to the correct side of the planet?
23:07:44FromGitter<ephja> always a good thing
23:12:30*Yardanico quit (Read error: Connection reset by peer)
23:12:33*vlad1777d quit (Ping timeout: 248 seconds)
23:16:47FromGitter<zacharycarter> hrm I wish there were more documentation / examples around gles and Nim
23:17:00FromGitter<ephja> "D:\dev\nim\lib\system\mmdisp.nim(547, 13) Error: cannot open 'system\alloc'"
23:29:50*ketralnis left #nim ("Textual IRC Client: www.textualapp.com")
23:34:44*Matthias247 quit (Read error: Connection reset by peer)
23:40:51*jinshil joined #nim
23:48:27*relax quit (Ping timeout: 240 seconds)
23:59:39*couven92 quit (Quit: Client Disconnecting)