<< 30-09-2016 >>

00:03:21FromGitter<gogolxdong> I got 3 objects and how to abstract a pattern to get the allocated address according to each.
00:10:35*Snircle joined #nim
00:23:07*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
00:23:07FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=57edb06bbe5dec755008f10a]
00:42:44cheatfategogolxdong: i think you know that allocated objects will not be handled via GC
00:44:33cheatfateand i still dont understand what you are trying to achieve
00:45:05FromGitter<gogolxdong> yes,I know, you mean it doesn't make sense?
00:47:50FromGitter<gogolxdong> or it isn't viable?
00:49:52FromGitter<gogolxdong> especially when x is untyped and make var of type(x)
00:54:08FromGitter<gogolxdong> it doesn't matter it's allocated object or ref object,it's about abstract pattern.
01:06:52FromGitter<gogolxdong> `Error: undeclared identifier: 'x'` for the example in manual `Typed vs untyped parameters`section
01:08:00FromGitter<cheatfate> your code doesn't make sense and i dont understand what are you trying to achieve... and going sleep now...
01:09:28FromGitter<gogolxdong> thank you for replying.
01:09:34FromGitter<gogolxdong> good night
01:10:56FromGitter<gogolxdong> I will learn in depth.
01:11:59FromGitter<gogolxdong> trial and error
01:16:25*krux02 joined #nim
01:16:40*krux02 quit (Remote host closed the connection)
01:17:29*krux02 joined #nim
01:18:20ftsfdom96, drat =( any error message?
01:19:27*arne joined #nim
01:21:40*krux02 quit (Client Quit)
01:21:48*krux02 joined #nim
01:29:54*desophos quit (Ping timeout: 264 seconds)
01:32:38*chemist69 quit (Disconnected by services)
01:32:43*chemist69_ joined #nim
01:48:20*arne quit (Quit: Verlassend)
01:55:53*Kingsquee joined #nim
01:58:42*brson quit (Quit: leaving)
02:00:59*dddddd quit (Ping timeout: 272 seconds)
02:13:42*ludocode joined #nim
02:18:40*Demon_Fox joined #nim
02:21:48*krux02 quit (Quit: Leaving)
02:32:25*brechtm joined #nim
02:32:57*PMunch quit (Quit: leaving)
02:33:05*rtr_ quit (Remote host closed the connection)
02:36:49*brechtm quit (Ping timeout: 244 seconds)
02:48:34*mcc joined #nim
03:02:20*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:04:48*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:32:11*Ven_ quit (Ping timeout: 272 seconds)
03:34:10*Ven_ joined #nim
03:37:15*chemist69_ quit (Ping timeout: 272 seconds)
03:41:23*chemist69 joined #nim
03:42:39*mitai quit (Ping timeout: 276 seconds)
03:46:06*Ven_ quit (Ping timeout: 264 seconds)
03:49:42*Ven_ joined #nim
03:51:26*ARCADIVS joined #nim
03:54:05*bjz joined #nim
04:08:01*rtr_ joined #nim
04:09:36*MyMind joined #nim
04:12:30*Sembei quit (Ping timeout: 264 seconds)
04:50:49*girvo joined #nim
04:50:53girvoHi all
04:51:05*enthus1ast quit (Quit: Leaving.)
04:52:28girvoQuick question: what is everyone doing for dependencies within tests, ie. stubs etc.?
04:53:50*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:55:23*bjz joined #nim
05:08:43*girvo quit (Ping timeout: 244 seconds)
05:45:11*chemist69 quit (Ping timeout: 272 seconds)
05:46:23*wgf_ joined #nim
05:46:57*Ven_ quit (Ping timeout: 244 seconds)
05:47:03*chemist69 joined #nim
05:49:32*Ven_ joined #nim
05:51:05*rtr_ quit (Ping timeout: 244 seconds)
05:51:33*irrequietus joined #nim
06:14:20*rtr_ joined #nim
06:25:06*pleiosaur joined #nim
06:29:35*desophos joined #nim
06:32:38*Arrrr joined #nim
06:33:54*mcc quit (Quit: Connection closed for inactivity)
06:37:36Arrrrgogolxdong you are trying to use a variable without declaring first, and both to extract type and as an identifier.
06:37:42ArrrrWith a couple of modifications https://glot.io/snippets/eix5irrbh3
06:45:12ArrrrMaybe you wanted this https://glot.io/snippets/eix5q6qp9h
06:46:22*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:01:54*yglukhov quit (Remote host closed the connection)
07:05:18*gokr joined #nim
07:07:27*flyx quit (Quit: ZNC - http://znc.in)
07:08:30*flyx joined #nim
07:17:06FromGitter<dom96> @ftsf I had to try and execute it through the command line and that said that it couldn't find libsdl_mixer.dylib
07:17:20ftsfahh, well that's slight progress \o/
07:17:30ftsfnot failing on libSDL2 now =)
07:19:09FromGitter<dom96> :)
07:19:22ftsfthanks for trying
07:22:20*Trustable joined #nim
07:22:45FromGitter<dom96> np
07:27:09*Andris_zbx joined #nim
07:30:35ftsfaha, I think the problem was I was using dynlibOverride="SDL2,SDL2_mixer" not two separate arguments
07:31:16ftsfnow there's no dylib stuff in the generated source
07:40:20*brechtm joined #nim
07:45:10*xet7_ joined #nim
07:47:18*xet7 quit (Ping timeout: 264 seconds)
07:50:36FromGitter<gogolxdong> @Arrrr,
07:50:59FromGitter<gogolxdong> thank you:)
07:51:22FromGitter<gogolxdong> 你好
07:52:04*wgf_ quit (Quit: Leaving)
07:52:47ArrrrHi
07:55:32*desophos quit (Read error: Connection reset by peer)
07:56:30ftsfdom96, http://static.impbox.net/vektor2089/vektor2089-2016-09-30-osx.zip if you wanna give it another try (this time for sure!)
07:56:42ftsfi should try and get an OSX VM working >__<
08:01:37FromGitter<dom96> ftsf: will have to wait until I get home from work again :)
08:01:59FromGitter<dom96> but yes, excited to try it!
08:02:47ftsf\o/
08:04:36FromGitter<gogolxdong> I am on the train home,with my girl friend
08:05:31FromGitter<gogolxdong> to see our parents,we are getting married
08:05:32FromGitter<gogolxdong> :)
08:05:47FromGitter<dom96> @gogolxdong nice! Congratulations :)
08:06:31ftsfgogolxdong congrats!
08:06:32FromGitter<gogolxdong> thank you
08:07:46*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
08:08:16*Kingsquee joined #nim
08:08:53FromGitter<dom96> @gogolxdong out of curiosity, where are you from?
08:09:13FromGitter<gogolxdong> China
08:09:37FromGitter<dom96> Which region of China?
08:09:53FromGitter<gogolxdong> tomorrow is our national day
08:10:24FromGitter<gogolxdong> Shenzhen,Guang Dong
08:10:48FromGitter<dom96> Looks nice :)
08:12:32FromGitter<gogolxdong> next to Hong Kong
08:15:43*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
08:21:29ArrrrCongratz my friend, i understand it is harder to get married in China.
08:26:48*euantor quit (Read error: Connection reset by peer)
08:27:22*euantor joined #nim
08:29:30FromGitter<gogolxdong> varies according to the region:)
08:31:36FromGitter<gokr> @gogolxdong My two daughters are from Guangdong
08:32:26FromGitter<gogolxdong> housing price is a barrier,Shenzhen is the first rank
08:32:38FromGitter<gokr> So I have been there a few times, and we took a train from Hong kong through Shenzhen last we were there.
08:32:41FromGitter<gogolxdong> yeah,we talked before
08:32:54FromGitter<gokr> Sorry, bad memory ;)
08:33:31FromGitter<gogolxdong> :p
08:33:59FromGitter<gokr> So... taking pictures on Shamian Island? :)
08:34:45FromGitter<gokr> Perhaps something you only do if you actually live in Guangzhou.
08:35:23*rtr_ quit (Ping timeout: 244 seconds)
08:35:25ftsf\o/ someone confirmed my game works on OSX \o/ so happy!
08:35:44FromGitter<gogolxdong> my gf knows Shamian Island
08:36:58FromGitter<gogolxdong> She lives in Guangzhou,I live in Shenzhen
08:37:23*rtr_ joined #nim
08:37:43FromGitter<gokr> Aha, yeah, it was real fun - tons of wedding couples all over that island.
08:38:11*yglukhov joined #nim
08:38:23FromGitter<gokr> National day tomorrow? For China?
08:38:51FromGitter<gokr> Ah, cool. I didn't know.
08:39:09FromGitter<gogolxdong> :)
08:39:10FromGitter<gokr> Then we can pull out our chinese flags for the dinner table tomorrow :)
08:39:39FromGitter<dom96> ftsf: awesome! When is the official release?
08:39:56ftsfdom96, haha dunno... still lots to do
08:43:19FromGitter<dom96> ftsf: is the game single player or multiplayer or both?
08:44:04cheatfateftsf, i can send you working osx vm :)
08:44:16cheatfatebut i have only vmware image
08:44:39ftsfcheatfate, i'm downloading a virtualbox one now
08:44:44ftsfdom96, both
08:45:03cheatfateftsf, impbox.net your blog?
08:45:18ftsfcheatfate, that's my old photography stuff
08:45:37cheatfateftsf, very nice animated gifs with nature :)
08:46:00ftsfahh that's probably my tumple, that's not my work, just pretty things i found on there
08:46:21ftsf*tumblr
08:46:45*yglukhov quit (Ping timeout: 244 seconds)
08:52:29*yglukhov joined #nim
09:08:27*r4vi joined #nim
09:21:08*kulelu88 quit (Quit: Leaving)
09:29:08*brechtm quit (Remote host closed the connection)
09:31:28*brechtm joined #nim
09:40:19FromGitter<gogolxdong> when will release 0.15?
09:40:51FromGitter<dom96> hopefully today
09:40:54FromGitter<gogolxdong> today is a good day
09:50:17*rtr_ quit (Ping timeout: 272 seconds)
09:51:52*wgf_ joined #nim
09:57:42*rtr_ joined #nim
09:58:54Calinouwhat's new in 0.15?
09:58:57Calinouis there a changelog?
09:59:00*ARCADIVS quit (Quit: ARCADIVS)
10:04:37*acidx quit (Quit: Lost terminal)
10:08:47*acidx joined #nim
10:09:56baabelfishCalinou: https://github.com/nim-lang/Nim/blob/6953c2e691e04bc8eedc5bd5b2bec8394569a580/web/news/version_0_15_released.rst
10:10:16*byte512 joined #nim
10:11:18Calinouthanks
10:16:26FromGitter<coffeepots> btw link to strmisc doc isn't found http://nim-lang.org/docs/strmisc.html
10:18:17FromGitter<dom96> hey Calinou, any progress on the website?
10:22:51*Demon_Fox quit (Quit: Leaving)
10:24:21Calinouhi dom96, just created the Community page
10:24:24Calinouempty so far :)
10:24:35Calinouwill have some infos on IRC, Gitter
10:24:37Calinouand forum
10:30:03*mitai joined #nim
10:30:14FromGitter<dom96> Great :)
10:42:36*rtr_ quit (Remote host closed the connection)
10:47:29*elrood joined #nim
11:02:05*Snircle joined #nim
11:06:06*fredrik92 joined #nim
11:08:53*brechtm_ joined #nim
11:11:56*brechtm quit (Ping timeout: 244 seconds)
11:13:41*rtr_ joined #nim
11:18:19*rtr_ quit (Ping timeout: 272 seconds)
11:22:45*gangstacat quit (Ping timeout: 272 seconds)
11:23:46*gangstacat joined #nim
11:29:05*PMunch joined #nim
11:29:19*jh32 joined #nim
11:29:43*gangstacat quit (Quit: Leaving)
11:34:16*gangstacat joined #nim
11:49:37*brechtm_ quit (Remote host closed the connection)
11:49:37FromGitter<dom96> Python's new feature called 'f-strings' looks pretty nice http://nedbatchelder.com//blog/201609/computing_primes_with_css.html
11:50:51federico3dom96: indeed (rant: after implementing 4-5 other templating systems) and it would be nice to have something similar in Nim. Pity there are no formatters tho
11:51:20FromGitter<dom96> yeah, the amount of different formatters in python is comical
11:51:32FromGitter<dom96> but hey, nothing is perfect
11:51:47federico3f-strings might be one of the most readable and least verbose
11:51:57*brechtm joined #nim
11:53:24FromGitter<dom96> writing an f-string macro sounds like fun
11:53:32FromGitter<dom96> Anybody wanna try it? :)
11:54:06*federico3 ducks
11:56:46corecodei'd like to implement a fsm library
11:57:43*xet7_ quit (Quit: Leaving)
11:58:08*Snircle is now known as Nicgumteatoastan
11:58:34*Nicgumteatoastan is now known as Snircle
11:58:48FromGitter<dom96> corecode: awesome, go for it
12:01:42*mitai quit (Ping timeout: 264 seconds)
12:12:05corecodedom96: first i need a design
12:12:58corecodethe difficulty for real application state machines is that some actions are not atomic infinitely short actions, but rather running processes
12:16:19*apero joined #nim
12:16:32*apero left #nim (#nim)
12:24:38corecodeanother difficulty is error handling
12:24:52corecodehow do you deal with error returns/exceptions?
12:25:15corecodebecause those happen during your transition, not while in a state
12:26:01corecodeso strictly you could have a "executing foo" state, which triggers foo(), and then a "success", and a "failure" event which respectively trigger transitions
12:26:06corecodeam i overthinking this?
12:29:21flyxcorecode: if you allow the transition code to fail, you do not have a finite state automaton anymore. because deciding whether arbitrary code fails or not is type-0
12:31:02corecodeexactly
12:31:52corecodethat's why the transition can't fail, but the transition "action" that could return an error instead needs to be a "start this operation" action, which then can return an error event or not
12:32:02corecodeflyx: does that make sense?
12:32:10corecodenot return, but create
12:34:00flyxyou can allow the action to generate a new input for the fsm, and handle the error simply as valid input. the action handler will simply put that error on top of the input stream, so after returning to the fsm code, it takes the error from the input and makes another transition
12:35:12flyx(I have built something like this in the past, it is used in production in a safety-critical environment)
12:40:55corecodeoh cool
12:41:13corecodemaybe you can help define the syntax and implementation?
12:44:24FromGitter<dom96> I don't have much experience with these things so I'm curious: what would you use an fsm library for?
12:44:28flyxI could show you how the API for it was designed but I am not allowed to show the original code
12:46:08flyxdom96: it is useful for implementing an action sequence modelled by some kinds of UML diagrams that are mappable to FSMs. it is also useful for certain kinds of proofs you can run on your code.
12:47:03flyxdom96: i.e. in general, you cannot prove that your code is correct, but you may be able to prove that on a certain level of abstraction, the implementation of your fsm is correct
12:49:57flyxthis is mostly useful for code that executes independently of a user and runs indefinitely, i.e. on embedded hardware reacting to a given set of sensors and operating a given set of actuators, like, for example, traffic lights (induction loops -> sensors, lights -> actuators)
12:52:09cheatfatedom96, in some cases it is possible to make asynccore via FSM :)
12:52:25*irrequietus quit ()
12:52:29corecodecheatfate: i still don't get that
12:53:57cheatfatecorecode, just make something and after we get your results we can think about it
12:55:48cheatfatedo you have used select/poll ?
12:55:59cheatfatecorecode, do you have used select/poll? for your network applications?
12:56:14corecodesure
12:56:38*arnetheduck joined #nim
12:57:01cheatfatecorecode, then you can understand that processing select/poll and results is some kind of state machine
12:58:08corecodeif you have a fixed set of descriptors, yes
12:58:25FromGitter<BontaVlad> kinda off-topic: for a range like `x .. y` how can I set the increment value?
12:59:08cheatfatecorecode, why we need fixed set of descriptors?
13:00:21corecodebecause otherwise you have a loop
13:00:27corecodeto check which descriptor is done
13:01:34cheatfatecorecode, we will use modern variants of select/poll - kqueue/epoll
13:01:42cheatfateso we dont need to loop over it
13:02:20cheatfatethe main reason is to generate our ownPool() proc which will be state machine generated from async procs/awaits
13:05:15corecodesorry, i don't understand you at all
13:05:28corecodei'm missing significant context
13:06:02corecodeand why don't you have to loop for kqueue/epoll?
13:06:27corecodeof course you have to to process all the ready descriptors
13:07:56*wgf_ quit (Quit: Leaving)
13:10:00FromGitter<Araq> @BontaVlad for i in countup(a, b, step)
13:14:37FromGitter<endragor> @cheatfate what’s the bottleneck of the current approach of {.async.}?
13:18:23cheatfateendragor: too many allocations of memory
13:19:16FromGitter<BontaVlad> ty @Araq
13:45:45*kulelu88 joined #nim
14:05:27FromGitter<Dhertz> Hi @dom96 - do you know of the new HttpClient not releasing file handles when a connection times out?
14:05:36*macnz_ joined #nim
14:11:22FromGitter<dom96> @Dhertz nope, please report it
14:14:42*krux02 joined #nim
14:19:18FromGitter<Dhertz> @dom96 Ok, I am looking to patch it ASAP, so if I do an s.close whenever a HttpError is raised, does that sound reasonable?
14:25:37Calinouhmm, webchat IRC is not allowed here? from a quick look at the ban list
14:27:05FromGitter<dom96> Calinou: it's redirected to #nim-web for now
14:27:07FromGitter<Calinou> hi, testing Gitter
14:27:12Calinouheh, it works
14:27:20CalinouI generally don't use Gitter much
14:27:46FromGitter<dom96> @Dhertz possibly, can't say for sure
14:40:05*xet7 joined #nim
14:46:50*flyx quit (Quit: ZNC - http://znc.in)
14:47:10*flyx joined #nim
15:05:07*Trustable quit (Remote host closed the connection)
15:07:35*chemist69 quit (Ping timeout: 272 seconds)
15:09:52*nsf quit (Quit: WeeChat 1.5)
15:13:01fredrik92what kind of values can you specify in the --cpu option? amd64 for x64, i386 for x86, arm (are there more?)
15:14:13FromGitter<dom96> ppc
15:14:13Araq_fredrik92: the list is in compiler/platform.nim iirc
15:14:15FromGitter<dom96> and ppc64
15:14:27FromGitter<dom96> mips32 IIRC as well
15:16:24fredrik92Araq_, thx!
15:17:11fredrik92dom96, according to compiler/platform.nim it's powerpc and powerpc64 and mips (without the 32)
15:19:00FromGitter<dom96> ahh :)
15:20:46*chemist69 joined #nim
15:21:08*kulelu88 quit (Quit: Leaving)
15:26:18*gokr quit (Ping timeout: 264 seconds)
15:26:53fredrik92ok, and to set a xplat-compiler in nim.cfg, I write {cpu}.{os}.{compile}.exe? (where the different segments are replaced by the appropiate values)
15:27:48Araq_yes
15:29:33fredrik92so if I set i386.windows.gcc.exe to myAwesomeCompile.exe I have effectively renamed gcc for Nim?
15:30:05Araq_ well there are examples for that in the nim.cfg
15:30:18Araq_I know, I know, "IT IS NOT DOCUMENTED OMG!"
15:30:31Araq_but hey, examples are the best form of documentation anyway
15:31:32fredrik92yeah... Ok, what happens when you do not specify --os, --cpu, --cc? Does nim select the right combo from the host os? or do I have to set gcc.exe on its own as well?
15:32:30Araq_well you use this to override the default
15:34:36fredrik92what I am trying to do is to get Nim to compile using VCC, with out me having to call "%VS140COMNTOOLS%..\..\VC\vcvarsall" everytime... So I'm basically writing a small .bat that calls the vs common tools with the right args and then passes all nim args to cl and link
15:35:17fredrik92But in doing so, I might as well write several .bat's for each platform VS is able to compile for (x86/x64/ARM)
15:35:54fredrik92So Araq_, if I understood correctly I would set the defaults, as well as the xplat settings?
15:36:40*rtr_ joined #nim
15:36:41*Trustable joined #nim
15:37:41*Trustable quit (Remote host closed the connection)
15:37:59Araq_I don't think the compiler supports invoking a .bat file instead of an .exe
15:38:19Araq_usually for process communication we avoid the shells
15:38:37fredrik92I tried, it does: i386.windows.vcc.exe = "i386-windows-vcc-cl.cmd"
15:38:59fredrik92(as long as "i386-windows-vcc-cl.cmd" is in the PATH or next to nim.exe)
15:38:59Araq_that's undocumented and might go away :P
15:39:12Araq_write a Nim helper program instead :-)
15:39:12fredrik92Oh! :(
15:39:19Araq_that would be cool.
15:39:25fredrik92Ok, will do
15:39:35fredrik92But the approach in nim.cfg is correct?
15:39:42Araq_yeah
15:40:10Araq_btw I'm very interested in this patch
15:40:16fredrik92:D
15:40:21Araq_please create a PR from this
15:40:35fredrik92ok, where in the Nim.repo do you want it?
15:40:51Araq_tools/
15:40:54fredrik92ok
15:44:27*byte512 quit (Quit: I'm out.)
15:53:20*Andris_zbx quit (Remote host closed the connection)
15:56:59*yglukhov quit (Ping timeout: 272 seconds)
16:00:47*brson joined #nim
16:05:54*arnetheduck quit (Ping timeout: 264 seconds)
16:10:26Calinoudoes Nim support musl libc? just wondering, I've seen that ripgrep (a Rust program) defaults to musl libc for its Linux binaries
16:24:33*brechtm quit (Remote host closed the connection)
16:41:38*brechtm joined #nim
16:45:01Araq_Calinou: yes, it should work
16:47:04Calinouhow easy is it to enable? can it be integrated in Nim's build system (compile/run)
17:00:01*macnz_ quit (Quit: leaving)
17:09:37flyxif I cast a ref type to pointer, will it still count as reference for the GC?
17:12:06Araq_flyx: nope
17:12:24Araq_Calinou: by tweaking Nim's linking command?
17:12:29Calinouright
17:15:34flyxI have a *very* strange error where a string which I assigned previously suddenly is empty unless I execute `echo thatString.len` somewhere in the code.
17:23:39flyxI believe it has *something* to do with the GC
17:25:29Araq_flyx: there are no known GC bugs.
17:28:30flyxhmm, seems like I missed some GC_ref / GC_unref, although I am not sure why they are needed
17:34:00*krux02 quit (Quit: Leaving)
17:35:06Araq_gist it if you want to
17:37:19flyxthis was my problem: https://github.com/flyx/NimYAML/blob/devel/private/lex.nim#L1154
17:37:54flyxI assign a alloc'd StringSource object to a pointer variable, and that makes the contained string somehow invisible to the GC…?
17:38:48*brechtm quit (Remote host closed the connection)
17:38:58Araq_no, everything inside a ptr is invisible to the GC by definition
17:39:13Araq_your safeAlloc() is completely unsafe and unnecessary
17:39:56Araq_the 'try except' is also pointless since OutOfMem does not raise.
17:40:05dom96flyx: why are you using pointers?
17:41:20flyxdom96: long story
17:43:05flyxdom96: basically, I use it to avoid making the YamlLexer generic which would propagate to YamlParser, but still having it take both a Stream and a string as backend
17:43:50flyx… which is, in turn, needed to be able to compile for JS because that doesn't support StringStream
17:44:59flyxI also did not want to have a dispatching method for reading a single character from the source
17:45:50flyxAraq_: iirc the compiler complained without having the try except block
17:46:20flyxAraq_: what would be the alternative to safeAlloc()? just alloc? I got some errors with that
17:53:36flyxI guess I could use a ref instead of a ptr, GC_ref that, and then cast it to pointer.
17:59:05flyxdid it. however, I cannot remove try… except, I get `lib/system/mmdisp.nim(64, 6) Error: can raise an unlisted exception: Exception`
18:00:22federico3is there any implemetation of (textual) diff I can use?
18:01:09FromGitter<Araq> flyx: that is a stdlib issue then
18:01:35flyxAraq_: okay, will create an issue
18:07:42*Arrrr quit (Ping timeout: 264 seconds)
18:08:47*yglukhov joined #nim
18:08:56flyxah well, BaseLexer.open was the culprit, had nothing to do with the other things
18:25:17dom96ftsf: damn, your game is awesome.
18:25:46dom96ftsf: How much of it is written in Nim?
18:25:59*Matthias247 joined #nim
18:32:22*nsf joined #nim
18:37:49dom96Dhertz: After looking into this: I don't think HttpClient is to blame, you need to call ``close`` explicitly on the HttpClient instance.
19:00:50euantorQuick question regarding compiling Nom to a DLL and using it elsewhere. I have a very simple module with a single exported function (with the pragmas `cdecl, exportc, dynlib`. I compile it with `nom c -d:release --app:lib --header xyz.nim`, giving me an `xyz.dll` file as expected
19:01:10euantorWhen using DLL Export Viewer, I see the function I exported and a `NimMainInner`
19:01:45euantorThe docs refer to a `NimMain` function, which isn't listed as being exported. I believe NimMain is required for the GC to work, so do I call NimMainInner?
19:02:29euantorThe header also defines a `NimMain`, which isn't exported in the DLL
19:06:56*libman joined #nim
19:07:31Araq_euantor: that's a bug then
19:07:39Araq_it's NimMain.
19:08:32euantorAh, thought I might be doing something wrong when compiling
19:09:51euantorShall I open an issue for it on GitHub?
19:11:43Araq_sure
19:32:06dom96euantor: seems your server will restart for updates soon
19:33:16euantordom96: ah, I've not logged on in a while. When would be most convenient to do it? I can set it off tonight
19:33:35dom96euantor: can you disable the restart now?
19:34:13dom96It would be nice to have it now as we're trying to get the release out
19:35:01euantorSure, I'll log in now and try to stop it
19:35:58dom96I doubt you'll have enough time to :(
19:36:20euantorI'm just logging in now
19:39:59euantorLooks like it might have restarted already
19:40:03euantorI was too slow
19:40:35*irrequietus joined #nim
19:45:36FromGitter<recoilme> i am totaly stupid... i try just get length fron sequence and get error type mismatch.. so simple but i try find error last 2h... Just var j:int = toInt(urls.len) where urls: var urls: seq[Urlscore] = @[] Is it bug?
19:46:14dom96euantor: oh well, thanks for trying
19:47:57Araq_recoilme: why the 'toInt'? just remove it
19:48:45euantorI've changed the setting to download but not install
19:51:24FromGitter<recoilme> @Araq sorry i just try get 80% from size.. all code: var urls: seq[int] = @[] ⏎ var k = toInt(urls.len*0.8)
19:51:56FromGitter<recoilme> error: Error: type mismatch: got (int, float64)
19:52:51*desophos joined #nim
19:52:52Araq_urls.len * 4 div 5
19:53:21Araq_or convert the 'len' to float but that's slow when you don't have an FPU
19:56:31FromGitter<recoilme> @Araq Its work, thank you!
20:17:34*pie__ quit (Changing host)
20:17:34*pie__ joined #nim
20:19:30*nsf quit (Quit: WeeChat 1.5)
20:23:15*stisa joined #nim
20:26:53*Trustable joined #nim
20:34:00*rtr_ quit (Remote host closed the connection)
20:42:11dyceany ideas on promoting nim?
20:42:41dycethought it was cool the developers who are using it to develop with unreal engine (was it?)
20:43:08Araq_dyce: yeah indeed.
20:49:45*rtr_ joined #nim
20:52:17*libman quit (Remote host closed the connection)
21:05:14*NimBot joined #nim
21:07:09*fredrik92 quit (Read error: Connection reset by peer)
21:10:09*elrood quit (Remote host closed the connection)
21:12:20Araq_ooohhhh! icons for VS!
21:12:28Araq_dom96: can we merge that before the release?
21:13:17dom96Let's not
21:13:26Araq_ppfffff -.-
21:13:28Araq_ok
21:13:30dom96Why is that so exciting?
21:13:51Araq_because it implies Nim still builds with VC :P
21:14:12*yglukhov quit (Read error: Connection reset by peer)
21:14:32federico3guys, nothing prevents more frequent minor releases
21:14:44*yglukhov joined #nim
21:14:46dom96A lot of things do
21:15:34federico3(I should say micro)
21:16:41*fredrik92 joined #nim
21:18:30ldleworkWhy?
21:18:32ldleworkDon't we have CI?
21:18:44ldleworkShouldn't people be able to effortlessly track the version of Nim they are using
21:18:52ldleworkAllowing them to control their own breakage?
21:19:22ldleworkShould be releasing micro releases anytime someone submits a PR for which all the tests pass and the changes are approved
21:19:32ldleworkautomatically
21:19:46ldlework(but I am probably just simplifying what is probably an annoying process)
21:20:06euantorThe CI does build each commit
21:20:18euantorIf you like to live dangerously, you could use those I guess
21:20:34euantorFor this of us wanting something approaching stable, tagged releases are fairly important
21:20:52dom96cheatfate: https://gitlab.com/nim-lang/nim/builds/4627381/artifacts/browse/build/
21:21:28dom96yeah... CI helps
21:21:37cheatfatedom96, do you have made any changes to PATH handling?
21:21:45dom96unfortunately it takes over an hour to build, deploy, test each commit
21:21:50dom96cheatfate: yes
21:30:06dom96okay
21:30:09dom96I think this is us?
21:30:12dom96Araq_: ?
21:31:10cheatfatedom96, why you need administrative rights now?
21:31:11Araq_I'm drunk
21:31:39cheatfateand why we need this `nim shortcut` on desktop?
21:31:44dom96...
21:31:55dom96cheatfate: Does the PATH setting work?
21:32:13cheatfatewait testing
21:32:51dom96Araq_: Hello?
21:33:08dom96It would be nice to get this release out someday
21:33:14dom96instead of listening to you say "I'm drunk"
21:33:25Araq_well this nimblepkglist bug annoys me
21:33:33Araq_so I'm still looking at it
21:35:13cheatfatedom96: path works
21:35:20Araq_"I'm drunk" was a joke
21:36:38cheatfatedom96, this downloading timeouts annoying
21:36:53*confundus joined #nim
21:37:18dom96Don't select "Documentation" when installing then
21:37:31dom96or is this a different issue?
21:38:01*pie__ quit (Ping timeout: 240 seconds)
21:38:53cheatfatedom96, it happens too often on mingw/aporia
21:40:09dom96maybe your internet is just really glitchy? :P
21:43:17cheatfatenope because i have 2 100mbps links
21:43:57cheatfatedom96, hello world compiled fine
21:44:03cheatfatedom96, but this annoying https://gist.github.com/cheatfate/f783656dc030a18bcd418f6b2befeee1
21:44:14cheatfatetrying to compile async test
21:47:06dom96which test?
21:50:15dom96cheatfate: please tell me so that I can fix it
21:53:48cheatfatetnewasyncudp.nim but i think every tests which uses async can fire this warnings
21:54:44cheatfateand could you answer me question why installer needs administrative rights?
21:55:08cheatfatebecause its impossible to run tests in C:\Program Files\Nim-xxx\tests ... permission denied errors
21:56:08dom96because otherwise the installer will silently fail if it needs admin privs but doesn't have them
21:58:15cheatfateso we need administrative rights to put files in C:\Program Files?
21:58:43dom96okay, I will change it
22:01:28Araq_lol git on the new windows console produces binary blobs in its output
22:13:39*MyMind quit (Read error: Connection reset by peer)
22:14:39*MyMind joined #nim
22:17:00*Jesin quit (Quit: Leaving)
22:20:26*Jesin joined #nim
22:22:44fredrik92noob question: How did you check whether the current nim is the main entry point module? like if __name__=="__main__": in python?
22:23:32dom96when isMainModule:
22:27:08dyceso i got pretty fluent with nim now (use it like python). what are the more advanced features in nim i should start looking at first
22:39:02*stisa quit (Quit: quitting...)
22:44:24cheatfatedyce, macros
22:47:40dom96generics first
22:49:36*Trustable quit (Remote host closed the connection)
22:51:21*Demon_Fox joined #nim
22:52:15*Pisuke joined #nim
22:54:17cheatfatedo we have separate manual about generics?
22:54:30cheatfatebecause i think i'm still like noob in generics
22:55:37*MyMind quit (Ping timeout: 272 seconds)
22:57:59*confundus quit (Quit: leaving)
23:09:26*rtr_ quit (Remote host closed the connection)
23:10:00*rtr_ joined #nim
23:11:36Araq_cheatfate: well there is a section in the manual covering them
23:13:45cheatfateAraq_, yeah but i have found this construction `proc doSomething[T: someType|otherType|anotherType](v: T)` which is not covered by manual
23:13:53cheatfateand it very useful
23:14:27*Pisuke quit (Read error: Connection reset by peer)
23:14:53*rtr_ quit (Ping timeout: 264 seconds)
23:15:36*Pisuke joined #nim
23:15:51cheatfateAraq_, such powerful things like 'Generics`, `Macros`, `Templates`, `Concepts` must have its own documentation
23:17:04Araq_agreed but some day I wanna sell a book about Nim :P
23:25:29*Matthias247 quit (Read error: Connection reset by peer)
23:27:55ldleworkIt is covered in the manual
23:28:05ldlework"The parameter constraint expression can use the operators | (or), & (and) and ~ (not) and the following predicates:"
23:28:34ldleworkoh that's term rewriting
23:30:18*pregressive quit (Remote host closed the connection)
23:33:02*Pisuke quit (Read error: Connection reset by peer)
23:35:10cheatfateAraq_, about latest DLL exported `NimMainInner`, why we need to export `NimMain`, is it possible to do all initialization in `DllMain`?
23:35:17*irrequietus quit (Ping timeout: 264 seconds)
23:35:32Araq_I don't think that's reliable
23:35:42Araq_we need to ensure we get the stack bottom
23:35:44*Pisuke joined #nim
23:35:57Araq_who knows when DllMain is called and from what thread
23:36:26cheatfateDllMain is called by system loader
23:36:41cheatfateand also it called after every time new thread created
23:36:57Araq_seems risky but we can consider it
23:37:37cheatfatewhy risky? everything nim need to handle is in DllMain
23:37:57cheatfatethe only problem it must not load more dlls
23:38:00cheatfatefrom dllmain
23:43:24*yglukhov quit (Remote host closed the connection)
23:43:59*yglukhov joined #nim
23:44:51Araq_alright, alright
23:45:08Araq_is that possible also for Unix?
23:47:53dom96nim-lang.org/news/2016_09_30_version_0_15_0_released.html?ref=irc
23:47:53cheatfateneed to check
23:48:00dom96ugh
23:48:02dom96http://nim-lang.org/news/2016_09_30_version_0_15_0_released.html?ref=irc
23:48:32*dom96 quit (Changing host)
23:48:32*dom96 joined #nim
23:49:05cheatfateAraq, You can use the __attribute__((constructor)) and __attribute__((destructor)) to execute code on load and unload of the shared library.
23:49:32cheatfateAraq_, this is for gcc let me look something for clang
23:49:56Araq_that works for clang too
23:50:03Araq_we use it already
23:50:05Araq_for something
23:51:28cheatfatethis looks almost equal to dllmain and threads is only difference
23:52:02*yglukhov quit (Remote host closed the connection)
23:52:20*yglukhov joined #nim
23:53:11Araq_guys, release is here
23:53:16Araq_:D
23:54:41cheatfatecongratulations
23:55:34*Kingsquee joined #nim
23:56:24dom96Posted to HN and Reddit :)
23:58:36fredrik92Araq_, here's my first try on the VCC wrappers: https://github.com/nim-lang/Nim/pull/4841
23:59:30fredrik92and using Nim worked much better than writing a .bat! :D