00:03:21 | FromGitter | <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:07 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=57edb06bbe5dec755008f10a] |
00:42:44 | cheatfate | gogolxdong: i think you know that allocated objects will not be handled via GC |
00:44:33 | cheatfate | and i still dont understand what you are trying to achieve |
00:45:05 | FromGitter | <gogolxdong> yes,I know, you mean it doesn't make sense? |
00:47:50 | FromGitter | <gogolxdong> or it isn't viable? |
00:49:52 | FromGitter | <gogolxdong> especially when x is untyped and make var of type(x) |
00:54:08 | FromGitter | <gogolxdong> it doesn't matter it's allocated object or ref object,it's about abstract pattern. |
01:06:52 | FromGitter | <gogolxdong> `Error: undeclared identifier: 'x'` for the example in manual `Typed vs untyped parameters`section |
01:08:00 | FromGitter | <cheatfate> your code doesn't make sense and i dont understand what are you trying to achieve... and going sleep now... |
01:09:28 | FromGitter | <gogolxdong> thank you for replying. |
01:09:34 | FromGitter | <gogolxdong> good night |
01:10:56 | FromGitter | <gogolxdong> I will learn in depth. |
01:11:59 | FromGitter | <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:20 | ftsf | dom96, 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:53 | girvo | Hi all |
04:51:05 | * | enthus1ast quit (Quit: Leaving.) |
04:52:28 | girvo | Quick 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:36 | Arrrr | gogolxdong you are trying to use a variable without declaring first, and both to extract type and as an identifier. |
06:37:42 | Arrrr | With a couple of modifications https://glot.io/snippets/eix5irrbh3 |
06:45:12 | Arrrr | Maybe 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:06 | FromGitter | <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:20 | ftsf | ahh, well that's slight progress \o/ |
07:17:30 | ftsf | not failing on libSDL2 now =) |
07:19:09 | FromGitter | <dom96> :) |
07:19:22 | ftsf | thanks for trying |
07:22:20 | * | Trustable joined #nim |
07:22:45 | FromGitter | <dom96> np |
07:27:09 | * | Andris_zbx joined #nim |
07:30:35 | ftsf | aha, I think the problem was I was using dynlibOverride="SDL2,SDL2_mixer" not two separate arguments |
07:31:16 | ftsf | now 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:36 | FromGitter | <gogolxdong> @Arrrr, |
07:50:59 | FromGitter | <gogolxdong> thank you:) |
07:51:22 | FromGitter | <gogolxdong> 你好 |
07:52:04 | * | wgf_ quit (Quit: Leaving) |
07:52:47 | Arrrr | Hi |
07:55:32 | * | desophos quit (Read error: Connection reset by peer) |
07:56:30 | ftsf | dom96, http://static.impbox.net/vektor2089/vektor2089-2016-09-30-osx.zip if you wanna give it another try (this time for sure!) |
07:56:42 | ftsf | i should try and get an OSX VM working >__< |
08:01:37 | FromGitter | <dom96> ftsf: will have to wait until I get home from work again :) |
08:01:59 | FromGitter | <dom96> but yes, excited to try it! |
08:02:47 | ftsf | \o/ |
08:04:36 | FromGitter | <gogolxdong> I am on the train home,with my girl friend |
08:05:31 | FromGitter | <gogolxdong> to see our parents,we are getting married |
08:05:32 | FromGitter | <gogolxdong> :) |
08:05:47 | FromGitter | <dom96> @gogolxdong nice! Congratulations :) |
08:06:31 | ftsf | gogolxdong congrats! |
08:06:32 | FromGitter | <gogolxdong> thank you |
08:07:46 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
08:08:16 | * | Kingsquee joined #nim |
08:08:53 | FromGitter | <dom96> @gogolxdong out of curiosity, where are you from? |
08:09:13 | FromGitter | <gogolxdong> China |
08:09:37 | FromGitter | <dom96> Which region of China? |
08:09:53 | FromGitter | <gogolxdong> tomorrow is our national day |
08:10:24 | FromGitter | <gogolxdong> Shenzhen,Guang Dong |
08:10:48 | FromGitter | <dom96> Looks nice :) |
08:12:32 | FromGitter | <gogolxdong> next to Hong Kong |
08:15:43 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
08:21:29 | Arrrr | Congratz 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:30 | FromGitter | <gogolxdong> varies according to the region:) |
08:31:36 | FromGitter | <gokr> @gogolxdong My two daughters are from Guangdong |
08:32:26 | FromGitter | <gogolxdong> housing price is a barrier,Shenzhen is the first rank |
08:32:38 | FromGitter | <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:41 | FromGitter | <gogolxdong> yeah,we talked before |
08:32:54 | FromGitter | <gokr> Sorry, bad memory ;) |
08:33:31 | FromGitter | <gogolxdong> :p |
08:33:59 | FromGitter | <gokr> So... taking pictures on Shamian Island? :) |
08:34:45 | FromGitter | <gokr> Perhaps something you only do if you actually live in Guangzhou. |
08:35:23 | * | rtr_ quit (Ping timeout: 244 seconds) |
08:35:25 | ftsf | \o/ someone confirmed my game works on OSX \o/ so happy! |
08:35:44 | FromGitter | <gogolxdong> my gf knows Shamian Island |
08:36:58 | FromGitter | <gogolxdong> She lives in Guangzhou,I live in Shenzhen |
08:37:23 | * | rtr_ joined #nim |
08:37:43 | FromGitter | <gokr> Aha, yeah, it was real fun - tons of wedding couples all over that island. |
08:38:11 | * | yglukhov joined #nim |
08:38:23 | FromGitter | <gokr> National day tomorrow? For China? |
08:38:51 | FromGitter | <gokr> Ah, cool. I didn't know. |
08:39:09 | FromGitter | <gogolxdong> :) |
08:39:10 | FromGitter | <gokr> Then we can pull out our chinese flags for the dinner table tomorrow :) |
08:39:39 | FromGitter | <dom96> ftsf: awesome! When is the official release? |
08:39:56 | ftsf | dom96, haha dunno... still lots to do |
08:43:19 | FromGitter | <dom96> ftsf: is the game single player or multiplayer or both? |
08:44:04 | cheatfate | ftsf, i can send you working osx vm :) |
08:44:16 | cheatfate | but i have only vmware image |
08:44:39 | ftsf | cheatfate, i'm downloading a virtualbox one now |
08:44:44 | ftsf | dom96, both |
08:45:03 | cheatfate | ftsf, impbox.net your blog? |
08:45:18 | ftsf | cheatfate, that's my old photography stuff |
08:45:37 | cheatfate | ftsf, very nice animated gifs with nature :) |
08:46:00 | ftsf | ahh that's probably my tumple, that's not my work, just pretty things i found on there |
08:46:21 | ftsf | *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:19 | FromGitter | <gogolxdong> when will release 0.15? |
09:40:51 | FromGitter | <dom96> hopefully today |
09:40:54 | FromGitter | <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:54 | Calinou | what's new in 0.15? |
09:58:57 | Calinou | is 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:56 | baabelfish | Calinou: https://github.com/nim-lang/Nim/blob/6953c2e691e04bc8eedc5bd5b2bec8394569a580/web/news/version_0_15_released.rst |
10:10:16 | * | byte512 joined #nim |
10:11:18 | Calinou | thanks |
10:16:26 | FromGitter | <coffeepots> btw link to strmisc doc isn't found http://nim-lang.org/docs/strmisc.html |
10:18:17 | FromGitter | <dom96> hey Calinou, any progress on the website? |
10:22:51 | * | Demon_Fox quit (Quit: Leaving) |
10:24:21 | Calinou | hi dom96, just created the Community page |
10:24:24 | Calinou | empty so far :) |
10:24:35 | Calinou | will have some infos on IRC, Gitter |
10:24:37 | Calinou | and forum |
10:30:03 | * | mitai joined #nim |
10:30:14 | FromGitter | <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:37 | FromGitter | <dom96> Python's new feature called 'f-strings' looks pretty nice http://nedbatchelder.com//blog/201609/computing_primes_with_css.html |
11:50:51 | federico3 | dom96: 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:20 | FromGitter | <dom96> yeah, the amount of different formatters in python is comical |
11:51:32 | FromGitter | <dom96> but hey, nothing is perfect |
11:51:47 | federico3 | f-strings might be one of the most readable and least verbose |
11:51:57 | * | brechtm joined #nim |
11:53:24 | FromGitter | <dom96> writing an f-string macro sounds like fun |
11:53:32 | FromGitter | <dom96> Anybody wanna try it? :) |
11:54:06 | * | federico3 ducks |
11:56:46 | corecode | i'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:48 | FromGitter | <dom96> corecode: awesome, go for it |
12:01:42 | * | mitai quit (Ping timeout: 264 seconds) |
12:12:05 | corecode | dom96: first i need a design |
12:12:58 | corecode | the 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:38 | corecode | another difficulty is error handling |
12:24:52 | corecode | how do you deal with error returns/exceptions? |
12:25:15 | corecode | because those happen during your transition, not while in a state |
12:26:01 | corecode | so 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:06 | corecode | am i overthinking this? |
12:29:21 | flyx | corecode: 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:02 | corecode | exactly |
12:31:52 | corecode | that'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:02 | corecode | flyx: does that make sense? |
12:32:10 | corecode | not return, but create |
12:34:00 | flyx | you 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:12 | flyx | (I have built something like this in the past, it is used in production in a safety-critical environment) |
12:40:55 | corecode | oh cool |
12:41:13 | corecode | maybe you can help define the syntax and implementation? |
12:44:24 | FromGitter | <dom96> I don't have much experience with these things so I'm curious: what would you use an fsm library for? |
12:44:28 | flyx | I could show you how the API for it was designed but I am not allowed to show the original code |
12:46:08 | flyx | dom96: 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:03 | flyx | dom96: 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:57 | flyx | this 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:09 | cheatfate | dom96, in some cases it is possible to make asynccore via FSM :) |
12:52:25 | * | irrequietus quit () |
12:52:29 | corecode | cheatfate: i still don't get that |
12:53:57 | cheatfate | corecode, just make something and after we get your results we can think about it |
12:55:48 | cheatfate | do you have used select/poll ? |
12:55:59 | cheatfate | corecode, do you have used select/poll? for your network applications? |
12:56:14 | corecode | sure |
12:56:38 | * | arnetheduck joined #nim |
12:57:01 | cheatfate | corecode, then you can understand that processing select/poll and results is some kind of state machine |
12:58:08 | corecode | if you have a fixed set of descriptors, yes |
12:58:25 | FromGitter | <BontaVlad> kinda off-topic: for a range like `x .. y` how can I set the increment value? |
12:59:08 | cheatfate | corecode, why we need fixed set of descriptors? |
13:00:21 | corecode | because otherwise you have a loop |
13:00:27 | corecode | to check which descriptor is done |
13:01:34 | cheatfate | corecode, we will use modern variants of select/poll - kqueue/epoll |
13:01:42 | cheatfate | so we dont need to loop over it |
13:02:20 | cheatfate | the main reason is to generate our ownPool() proc which will be state machine generated from async procs/awaits |
13:05:15 | corecode | sorry, i don't understand you at all |
13:05:28 | corecode | i'm missing significant context |
13:06:02 | corecode | and why don't you have to loop for kqueue/epoll? |
13:06:27 | corecode | of course you have to to process all the ready descriptors |
13:07:56 | * | wgf_ quit (Quit: Leaving) |
13:10:00 | FromGitter | <Araq> @BontaVlad for i in countup(a, b, step) |
13:14:37 | FromGitter | <endragor> @cheatfate what’s the bottleneck of the current approach of {.async.}? |
13:18:23 | cheatfate | endragor: too many allocations of memory |
13:19:16 | FromGitter | <BontaVlad> ty @Araq |
13:45:45 | * | kulelu88 joined #nim |
14:05:27 | FromGitter | <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:22 | FromGitter | <dom96> @Dhertz nope, please report it |
14:14:42 | * | krux02 joined #nim |
14:19:18 | FromGitter | <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:37 | Calinou | hmm, webchat IRC is not allowed here? from a quick look at the ban list |
14:27:05 | FromGitter | <dom96> Calinou: it's redirected to #nim-web for now |
14:27:07 | FromGitter | <Calinou> hi, testing Gitter |
14:27:12 | Calinou | heh, it works |
14:27:20 | Calinou | I generally don't use Gitter much |
14:27:46 | FromGitter | <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:01 | fredrik92 | what kind of values can you specify in the --cpu option? amd64 for x64, i386 for x86, arm (are there more?) |
15:14:13 | FromGitter | <dom96> ppc |
15:14:13 | Araq_ | fredrik92: the list is in compiler/platform.nim iirc |
15:14:15 | FromGitter | <dom96> and ppc64 |
15:14:27 | FromGitter | <dom96> mips32 IIRC as well |
15:16:24 | fredrik92 | Araq_, thx! |
15:17:11 | fredrik92 | dom96, according to compiler/platform.nim it's powerpc and powerpc64 and mips (without the 32) |
15:19:00 | FromGitter | <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:53 | fredrik92 | ok, 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:48 | Araq_ | yes |
15:29:33 | fredrik92 | so if I set i386.windows.gcc.exe to myAwesomeCompile.exe I have effectively renamed gcc for Nim? |
15:30:05 | Araq_ | well there are examples for that in the nim.cfg |
15:30:18 | Araq_ | I know, I know, "IT IS NOT DOCUMENTED OMG!" |
15:30:31 | Araq_ | but hey, examples are the best form of documentation anyway |
15:31:32 | fredrik92 | yeah... 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:30 | Araq_ | well you use this to override the default |
15:34:36 | fredrik92 | what 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:17 | fredrik92 | But 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:54 | fredrik92 | So 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:59 | Araq_ | I don't think the compiler supports invoking a .bat file instead of an .exe |
15:38:19 | Araq_ | usually for process communication we avoid the shells |
15:38:37 | fredrik92 | I tried, it does: i386.windows.vcc.exe = "i386-windows-vcc-cl.cmd" |
15:38:59 | fredrik92 | (as long as "i386-windows-vcc-cl.cmd" is in the PATH or next to nim.exe) |
15:38:59 | Araq_ | that's undocumented and might go away :P |
15:39:12 | Araq_ | write a Nim helper program instead :-) |
15:39:12 | fredrik92 | Oh! :( |
15:39:19 | Araq_ | that would be cool. |
15:39:25 | fredrik92 | Ok, will do |
15:39:35 | fredrik92 | But the approach in nim.cfg is correct? |
15:39:42 | Araq_ | yeah |
15:40:10 | Araq_ | btw I'm very interested in this patch |
15:40:16 | fredrik92 | :D |
15:40:21 | Araq_ | please create a PR from this |
15:40:35 | fredrik92 | ok, where in the Nim.repo do you want it? |
15:40:51 | Araq_ | tools/ |
15:40:54 | fredrik92 | ok |
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:26 | Calinou | does 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:01 | Araq_ | Calinou: yes, it should work |
16:47:04 | Calinou | how 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:37 | flyx | if I cast a ref type to pointer, will it still count as reference for the GC? |
17:12:06 | Araq_ | flyx: nope |
17:12:24 | Araq_ | Calinou: by tweaking Nim's linking command? |
17:12:29 | Calinou | right |
17:15:34 | flyx | I 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:39 | flyx | I believe it has *something* to do with the GC |
17:25:29 | Araq_ | flyx: there are no known GC bugs. |
17:28:30 | flyx | hmm, 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:06 | Araq_ | gist it if you want to |
17:37:19 | flyx | this was my problem: https://github.com/flyx/NimYAML/blob/devel/private/lex.nim#L1154 |
17:37:54 | flyx | I 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:58 | Araq_ | no, everything inside a ptr is invisible to the GC by definition |
17:39:13 | Araq_ | your safeAlloc() is completely unsafe and unnecessary |
17:39:56 | Araq_ | the 'try except' is also pointless since OutOfMem does not raise. |
17:40:05 | dom96 | flyx: why are you using pointers? |
17:41:20 | flyx | dom96: long story |
17:43:05 | flyx | dom96: 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:50 | flyx | … which is, in turn, needed to be able to compile for JS because that doesn't support StringStream |
17:44:59 | flyx | I also did not want to have a dispatching method for reading a single character from the source |
17:45:50 | flyx | Araq_: iirc the compiler complained without having the try except block |
17:46:20 | flyx | Araq_: what would be the alternative to safeAlloc()? just alloc? I got some errors with that |
17:53:36 | flyx | I guess I could use a ref instead of a ptr, GC_ref that, and then cast it to pointer. |
17:59:05 | flyx | did it. however, I cannot remove try… except, I get `lib/system/mmdisp.nim(64, 6) Error: can raise an unlisted exception: Exception` |
18:00:22 | federico3 | is there any implemetation of (textual) diff I can use? |
18:01:09 | FromGitter | <Araq> flyx: that is a stdlib issue then |
18:01:35 | flyx | Araq_: okay, will create an issue |
18:07:42 | * | Arrrr quit (Ping timeout: 264 seconds) |
18:08:47 | * | yglukhov joined #nim |
18:08:56 | flyx | ah well, BaseLexer.open was the culprit, had nothing to do with the other things |
18:25:17 | dom96 | ftsf: damn, your game is awesome. |
18:25:46 | dom96 | ftsf: How much of it is written in Nim? |
18:25:59 | * | Matthias247 joined #nim |
18:32:22 | * | nsf joined #nim |
18:37:49 | dom96 | Dhertz: After looking into this: I don't think HttpClient is to blame, you need to call ``close`` explicitly on the HttpClient instance. |
19:00:50 | euantor | Quick 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:10 | euantor | When using DLL Export Viewer, I see the function I exported and a `NimMainInner` |
19:01:45 | euantor | The 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:29 | euantor | The header also defines a `NimMain`, which isn't exported in the DLL |
19:06:56 | * | libman joined #nim |
19:07:31 | Araq_ | euantor: that's a bug then |
19:07:39 | Araq_ | it's NimMain. |
19:08:32 | euantor | Ah, thought I might be doing something wrong when compiling |
19:09:51 | euantor | Shall I open an issue for it on GitHub? |
19:11:43 | Araq_ | sure |
19:32:06 | dom96 | euantor: seems your server will restart for updates soon |
19:33:16 | euantor | dom96: 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:35 | dom96 | euantor: can you disable the restart now? |
19:34:13 | dom96 | It would be nice to have it now as we're trying to get the release out |
19:35:01 | euantor | Sure, I'll log in now and try to stop it |
19:35:58 | dom96 | I doubt you'll have enough time to :( |
19:36:20 | euantor | I'm just logging in now |
19:39:59 | euantor | Looks like it might have restarted already |
19:40:03 | euantor | I was too slow |
19:40:35 | * | irrequietus joined #nim |
19:45:36 | FromGitter | <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:14 | dom96 | euantor: oh well, thanks for trying |
19:47:57 | Araq_ | recoilme: why the 'toInt'? just remove it |
19:48:45 | euantor | I've changed the setting to download but not install |
19:51:24 | FromGitter | <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:56 | FromGitter | <recoilme> error: Error: type mismatch: got (int, float64) |
19:52:51 | * | desophos joined #nim |
19:52:52 | Araq_ | urls.len * 4 div 5 |
19:53:21 | Araq_ | or convert the 'len' to float but that's slow when you don't have an FPU |
19:56:31 | FromGitter | <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:11 | dyce | any ideas on promoting nim? |
20:42:41 | dyce | thought it was cool the developers who are using it to develop with unreal engine (was it?) |
20:43:08 | Araq_ | 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:20 | Araq_ | ooohhhh! icons for VS! |
21:12:28 | Araq_ | dom96: can we merge that before the release? |
21:13:17 | dom96 | Let's not |
21:13:26 | Araq_ | ppfffff -.- |
21:13:28 | Araq_ | ok |
21:13:30 | dom96 | Why is that so exciting? |
21:13:51 | Araq_ | because it implies Nim still builds with VC :P |
21:14:12 | * | yglukhov quit (Read error: Connection reset by peer) |
21:14:32 | federico3 | guys, nothing prevents more frequent minor releases |
21:14:44 | * | yglukhov joined #nim |
21:14:46 | dom96 | A lot of things do |
21:15:34 | federico3 | (I should say micro) |
21:16:41 | * | fredrik92 joined #nim |
21:18:30 | ldlework | Why? |
21:18:32 | ldlework | Don't we have CI? |
21:18:44 | ldlework | Shouldn't people be able to effortlessly track the version of Nim they are using |
21:18:52 | ldlework | Allowing them to control their own breakage? |
21:19:22 | ldlework | Should be releasing micro releases anytime someone submits a PR for which all the tests pass and the changes are approved |
21:19:32 | ldlework | automatically |
21:19:46 | ldlework | (but I am probably just simplifying what is probably an annoying process) |
21:20:06 | euantor | The CI does build each commit |
21:20:18 | euantor | If you like to live dangerously, you could use those I guess |
21:20:34 | euantor | For this of us wanting something approaching stable, tagged releases are fairly important |
21:20:52 | dom96 | cheatfate: https://gitlab.com/nim-lang/nim/builds/4627381/artifacts/browse/build/ |
21:21:28 | dom96 | yeah... CI helps |
21:21:37 | cheatfate | dom96, do you have made any changes to PATH handling? |
21:21:45 | dom96 | unfortunately it takes over an hour to build, deploy, test each commit |
21:21:50 | dom96 | cheatfate: yes |
21:30:06 | dom96 | okay |
21:30:09 | dom96 | I think this is us? |
21:30:12 | dom96 | Araq_: ? |
21:31:10 | cheatfate | dom96, why you need administrative rights now? |
21:31:11 | Araq_ | I'm drunk |
21:31:39 | cheatfate | and why we need this `nim shortcut` on desktop? |
21:31:44 | dom96 | ... |
21:31:55 | dom96 | cheatfate: Does the PATH setting work? |
21:32:13 | cheatfate | wait testing |
21:32:51 | dom96 | Araq_: Hello? |
21:33:08 | dom96 | It would be nice to get this release out someday |
21:33:14 | dom96 | instead of listening to you say "I'm drunk" |
21:33:25 | Araq_ | well this nimblepkglist bug annoys me |
21:33:33 | Araq_ | so I'm still looking at it |
21:35:13 | cheatfate | dom96: path works |
21:35:20 | Araq_ | "I'm drunk" was a joke |
21:36:38 | cheatfate | dom96, this downloading timeouts annoying |
21:36:53 | * | confundus joined #nim |
21:37:18 | dom96 | Don't select "Documentation" when installing then |
21:37:31 | dom96 | or is this a different issue? |
21:38:01 | * | pie__ quit (Ping timeout: 240 seconds) |
21:38:53 | cheatfate | dom96, it happens too often on mingw/aporia |
21:40:09 | dom96 | maybe your internet is just really glitchy? :P |
21:43:17 | cheatfate | nope because i have 2 100mbps links |
21:43:57 | cheatfate | dom96, hello world compiled fine |
21:44:03 | cheatfate | dom96, but this annoying https://gist.github.com/cheatfate/f783656dc030a18bcd418f6b2befeee1 |
21:44:14 | cheatfate | trying to compile async test |
21:47:06 | dom96 | which test? |
21:50:15 | dom96 | cheatfate: please tell me so that I can fix it |
21:53:48 | cheatfate | tnewasyncudp.nim but i think every tests which uses async can fire this warnings |
21:54:44 | cheatfate | and could you answer me question why installer needs administrative rights? |
21:55:08 | cheatfate | because its impossible to run tests in C:\Program Files\Nim-xxx\tests ... permission denied errors |
21:56:08 | dom96 | because otherwise the installer will silently fail if it needs admin privs but doesn't have them |
21:58:15 | cheatfate | so we need administrative rights to put files in C:\Program Files? |
21:58:43 | dom96 | okay, I will change it |
22:01:28 | Araq_ | 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:44 | fredrik92 | noob question: How did you check whether the current nim is the main entry point module? like if __name__=="__main__": in python? |
22:23:32 | dom96 | when isMainModule: |
22:27:08 | dyce | so 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:24 | cheatfate | dyce, macros |
22:47:40 | dom96 | generics 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:17 | cheatfate | do we have separate manual about generics? |
22:54:30 | cheatfate | because 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:36 | Araq_ | cheatfate: well there is a section in the manual covering them |
23:13:45 | cheatfate | Araq_, yeah but i have found this construction `proc doSomething[T: someType|otherType|anotherType](v: T)` which is not covered by manual |
23:13:53 | cheatfate | and 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:51 | cheatfate | Araq_, such powerful things like 'Generics`, `Macros`, `Templates`, `Concepts` must have its own documentation |
23:17:04 | Araq_ | 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:55 | ldlework | It is covered in the manual |
23:28:05 | ldlework | "The parameter constraint expression can use the operators | (or), & (and) and ~ (not) and the following predicates:" |
23:28:34 | ldlework | oh 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:10 | cheatfate | Araq_, 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:32 | Araq_ | I don't think that's reliable |
23:35:42 | Araq_ | we need to ensure we get the stack bottom |
23:35:44 | * | Pisuke joined #nim |
23:35:57 | Araq_ | who knows when DllMain is called and from what thread |
23:36:26 | cheatfate | DllMain is called by system loader |
23:36:41 | cheatfate | and also it called after every time new thread created |
23:36:57 | Araq_ | seems risky but we can consider it |
23:37:37 | cheatfate | why risky? everything nim need to handle is in DllMain |
23:37:57 | cheatfate | the only problem it must not load more dlls |
23:38:00 | cheatfate | from dllmain |
23:43:24 | * | yglukhov quit (Remote host closed the connection) |
23:43:59 | * | yglukhov joined #nim |
23:44:51 | Araq_ | alright, alright |
23:45:08 | Araq_ | is that possible also for Unix? |
23:47:53 | dom96 | nim-lang.org/news/2016_09_30_version_0_15_0_released.html?ref=irc |
23:47:53 | cheatfate | need to check |
23:48:00 | dom96 | ugh |
23:48:02 | dom96 | http://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:05 | cheatfate | Araq, You can use the __attribute__((constructor)) and __attribute__((destructor)) to execute code on load and unload of the shared library. |
23:49:32 | cheatfate | Araq_, this is for gcc let me look something for clang |
23:49:56 | Araq_ | that works for clang too |
23:50:03 | Araq_ | we use it already |
23:50:05 | Araq_ | for something |
23:51:28 | cheatfate | this 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:11 | Araq_ | guys, release is here |
23:53:16 | Araq_ | :D |
23:54:41 | cheatfate | congratulations |
23:55:34 | * | Kingsquee joined #nim |
23:56:24 | dom96 | Posted to HN and Reddit :) |
23:58:36 | fredrik92 | Araq_, here's my first try on the VCC wrappers: https://github.com/nim-lang/Nim/pull/4841 |
23:59:30 | fredrik92 | and using Nim worked much better than writing a .bat! :D |