00:09:45 | * | Trustable quit (Remote host closed the connection) |
00:19:45 | * | mahasamoot joined #nim |
00:29:55 | * | kulelu88 joined #nim |
00:29:56 | * | kulelu88 quit (Changing host) |
00:29:56 | * | kulelu88 joined #nim |
00:39:21 | * | Matthias247 quit (Read error: Connection reset by peer) |
01:05:36 | filwit | can someone on devel verify that this is code is a bug there: |
01:05:42 | filwit | type Num = int | float |
01:05:54 | filwit | proc foo(x:Num, y:int|float): Vec = Vec() |
01:05:59 | filwit | proc bar(x:Num, y:Num): Vec = Vec() |
01:06:07 | filwit | let f = foo(1, 2.0) # works |
01:06:15 | filwit | let b = bar(1, 2.0) # ERROR! |
01:06:33 | filwit | ? |
01:11:49 | * | mahasamoot quit (Ping timeout: 250 seconds) |
01:12:44 | filwit | er.. replace the 'Vec' with 'int' or whatever, that's not important |
01:16:57 | def- | filwit: I reported this already |
01:17:20 | filwit | def-: okay, thanks.. i couldn't find any bug-report on it |
01:17:48 | def- | https://github.com/nim-lang/Nim/issues/1385 |
01:18:08 | filwit | thanks |
01:18:13 | * | arnetheduck joined #nim |
01:25:24 | * | kulelu88 left #nim ("Leaving") |
01:28:45 | filwit | thanks |
01:28:48 | filwit | whoops |
01:34:47 | filwit | whoops |
01:35:00 | filwit | alt-tab... |
01:35:28 | filwit | it appears overloading by static[] doesn't seem to work correctly either.. |
01:36:04 | filwit | the non-static overload is always preferred over the static overload version.. or they cause ambiguous errors in some cases.. |
01:37:52 | * | mahasamoot joined #nim |
01:59:58 | * | lokien_ quit (Quit: Connection closed for inactivity) |
02:38:21 | * | dorei quit () |
03:40:57 | * | filwit quit (Quit: Leaving) |
03:48:52 | * | brson quit (Ping timeout: 255 seconds) |
03:53:38 | * | awsteele quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:25:04 | * | mahasamoot quit (Ping timeout: 250 seconds) |
04:54:27 | * | endragor joined #nim |
05:12:51 | * | ludocode quit (Remote host closed the connection) |
05:14:59 | * | ludocode joined #nim |
05:16:15 | * | brson joined #nim |
05:30:29 | * | lompik quit (Ping timeout: 240 seconds) |
05:46:43 | * | pilne quit (Quit: Quitting!) |
06:12:06 | * | brson quit (Quit: leaving) |
06:18:29 | * | yglukhov joined #nim |
06:22:59 | * | yglukhov quit (Ping timeout: 248 seconds) |
06:52:18 | * | BitPuffin|osx quit (Ping timeout: 276 seconds) |
06:55:20 | * | pregressive joined #nim |
07:22:10 | * | gokr joined #nim |
07:22:57 | * | pregressive quit (Remote host closed the connection) |
07:32:26 | * | yglukhov joined #nim |
07:46:18 | * | spt joined #nim |
07:48:12 | * | gokr quit (Quit: Leaving.) |
08:05:59 | * | toaoMgeorge quit (Ping timeout: 240 seconds) |
08:12:38 | * | yglukhov quit (Remote host closed the connection) |
08:58:03 | * | yglukhov joined #nim |
09:23:43 | * | yglukhov quit (Remote host closed the connection) |
09:25:51 | * | gokr joined #nim |
09:28:04 | vega_nsk | Hi to all! Can anyone confirm or refute this bug on windows? https://github.com/nim-lang/Nim/issues/3889. I got it on two machines with XP and Win8. |
09:39:02 | * | toaoMgeorge joined #nim |
09:46:23 | * | yglukhov joined #nim |
10:16:03 | * | gokr quit (Quit: Leaving.) |
10:35:30 | * | lokien joined #nim |
10:35:38 | lokien | hey, anyone using sublime? |
10:39:38 | lokien | nvm, it fixed itself :D |
10:46:54 | * | yglukhov quit (Remote host closed the connection) |
10:51:18 | * | yglukhov joined #nim |
10:51:43 | * | beatmox quit (Remote host closed the connection) |
10:51:57 | * | beatmox joined #nim |
10:52:16 | * | Matthias247 joined #nim |
11:07:22 | * | lokien_ joined #nim |
11:07:44 | * | yglukhov quit (Remote host closed the connection) |
11:17:54 | * | yglukhov joined #nim |
11:20:40 | * | yglukhov quit (Remote host closed the connection) |
11:26:04 | * | nsf quit (Quit: WeeChat 1.4) |
11:28:48 | * | Trustable joined #nim |
11:29:06 | * | nimer joined #nim |
11:34:30 | * | nimer quit (Quit: Page closed) |
11:42:09 | * | gokr joined #nim |
11:49:30 | * | Demon_Fox quit (Quit: Leaving) |
11:50:00 | * | M-max joined #nim |
12:06:35 | * | lokien quit (Quit: Leaving) |
12:22:35 | * | PMunch joined #nim |
12:28:20 | * | NimBot joined #nim |
12:32:14 | * | gokr quit (Quit: Leaving.) |
12:32:25 | * | mahasamoot joined #nim |
12:38:12 | * | toaoMgeorge quit (Ping timeout: 250 seconds) |
12:38:22 | * | toaoMgeorge joined #nim |
12:44:09 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
12:54:25 | * | nsf joined #nim |
13:03:01 | * | Trustable quit (Remote host closed the connection) |
13:09:58 | * | lokien_ quit (Quit: Connection closed for inactivity) |
13:10:01 | * | lokien joined #nim |
13:19:29 | * | jaco60 quit (Remote host closed the connection) |
13:21:31 | * | jaco60 joined #nim |
13:49:52 | * | darkf quit (Quit: Leaving) |
13:53:50 | * | lompik joined #nim |
13:56:03 | * | Varriount_ joined #nim |
13:56:03 | * | Varriount quit (Disconnected by services) |
14:03:08 | * | PMunch quit (Ping timeout: 250 seconds) |
14:28:28 | * | vendethiel joined #nim |
14:28:38 | bbl_ | hmmh does anyone get "termios.nim(1, 22) Error: expression expected, but found 'keyword const'" after importing termios? |
14:29:40 | def- | bbl_: not for me, linux, most recent devel branch of Nim |
14:30:52 | bbl_ | def-: I'm running on arch with 0.13.0 from pacman and getting it |
14:31:25 | def- | bbl_: do you have another file named termios.nim around? |
14:31:38 | bbl_ | def-: ahhahah |
14:31:42 | def- | or did the arch package change the definition of the file? |
14:32:13 | bbl_ | def-: yeah I had the file there in my snippet directory |
14:32:30 | def- | hm yeah, that happens rather often to people |
14:33:17 | bbl_ | def-: heh, thanks for the assistance |
14:44:38 | * | Ven joined #nim |
14:46:14 | * | Ven quit (Client Quit) |
15:25:33 | * | vendethiel quit (Ping timeout: 240 seconds) |
15:28:27 | * | zepolen joined #nim |
15:32:57 | * | vendethiel joined #nim |
15:49:01 | * | Ven joined #nim |
15:51:49 | * | gokr joined #nim |
16:08:52 | * | pilne joined #nim |
16:17:27 | * | Matthias247 quit (Read error: Connection reset by peer) |
16:19:35 | jsudlow | does nim have a default search path for dll's in windows 7 64 bit? |
16:20:13 | jsudlow | if not I guess a good solution is just use -p and point it to a common dir that holds the files |
16:22:03 | * | def- quit (Ping timeout: 264 seconds) |
16:22:25 | * | def- joined #nim |
16:29:23 | Araq | the search path for DLLs is determined by the OS. |
16:30:25 | Araq | -p has nothing to do with DLLs. |
16:34:41 | lokien | how does one return multiple values from a procedure? |
16:35:15 | Araq | lokien: proc foo(): (int, string) = (3, "abc") |
16:35:18 | Araq | use tuples. |
16:35:27 | lokien | Araq: as I thought. thanks |
16:37:29 | * | def- quit (Ping timeout: 240 seconds) |
16:38:25 | * | def- joined #nim |
16:43:18 | * | zxc__ joined #nim |
16:45:18 | * | zxc__ quit (Remote host closed the connection) |
16:59:34 | jsudlow | thanks Araq... I see it can be set on my path in win 7. I already have a path entry for C:\Nim\bin and when I put the dll in that folder the code compiled in my repo just fine without the dll needed to be included |
17:06:10 | * | lokien quit (Quit: Leaving) |
17:07:30 | * | askatasuna joined #nim |
17:10:06 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:10:52 | * | tdc joined #nim |
17:12:44 | tdc | Hi Nimers. Does anyone have an idea why I receive the following error when running ./koch tests from a github clone (v0.13.0) |
17:12:49 | * | zxc_ joined #nim |
17:12:55 | tdc | tester.nim(15, 22) Error: cannot open 'compiler/nodejs' |
17:13:19 | * | zxc_ quit (Remote host closed the connection) |
17:13:28 | * | zxc_ joined #nim |
17:14:11 | * | toaoMgeorge quit (Ping timeout: 248 seconds) |
17:14:50 | * | lokien_ joined #nim |
17:15:30 | * | zxc_ quit (Remote host closed the connection) |
17:15:55 | * | zxc_ joined #nim |
17:18:43 | Araq | tdc: don't use the install.sh script |
17:19:57 | * | zxc_ left #nim (#nim) |
17:23:06 | tdc | Thanks @Araq - I'll give that a try. |
17:24:22 | * | Jesin quit (Quit: Leaving) |
17:26:49 | * | nsf quit (Read error: Connection reset by peer) |
17:27:30 | * | nsf joined #nim |
17:30:31 | * | Ven joined #nim |
17:34:43 | * | Salewski joined #nim |
17:35:01 | * | Ven quit (Client Quit) |
17:39:09 | Salewski | Since yesterday I wonder if int(9.9999) is 9 or 10? Of course we have round() in case we want rounding, so I guess now that int() will not round. I think I would prefer rounding for int()? |
17:41:08 | Salewski | And: For enums. we can use ord() or int() to get the corresponding int. Is that exactly the same? One may expect a uint for ord() I guess. |
17:46:57 | * | Salewski quit () |
17:47:28 | * | endragor_ joined #nim |
17:50:38 | * | endragor quit (Ping timeout: 250 seconds) |
17:51:43 | * | endragor_ quit (Ping timeout: 255 seconds) |
18:01:09 | * | vendethiel quit (Ping timeout: 276 seconds) |
18:04:36 | * | endragor joined #nim |
18:09:27 | * | vendethiel joined #nim |
18:11:39 | * | Jesin joined #nim |
18:21:34 | * | endragor quit (Remote host closed the connection) |
18:34:01 | Araq | the C standard says it needs to truncate and so that's what Nim does as well |
18:34:01 | * | vendethiel quit (Ping timeout: 255 seconds) |
18:34:18 | Araq | ord() has nothing to do with uint. |
18:37:35 | * | Salewski joined #nim |
18:38:39 | Salewski | Araq: So int(a_enum) is exactly the same as ord(a_enum)? |
18:39:02 | Araq | yes |
18:39:27 | Salewski | So do we need ord keyword at all? |
18:42:57 | Salewski | Some months ago I wrote somewhere "const Something = 1e7.int", which was very wrong. I should have used 1e7.round or 10_000_000. Have to remember that. |
18:43:22 | Salewski | Bye... |
18:43:25 | * | Salewski quit () |
18:46:43 | * | cyraxjoe quit (Remote host closed the connection) |
18:55:28 | * | filcuc joined #nim |
18:55:50 | filcuc | is there a way to generate a string at compile time unique for a given type T |
18:56:14 | def- | filcuc: i don't understand |
18:56:58 | filcuc | def-: i want to create proc registerFunc[T](procFuncPtr: proc...) |
18:57:39 | filcuc | the implementation of registerFunc should store the pointer somewhere...maybe inside a map |
18:58:08 | * | AFedorov joined #nim |
18:59:14 | filcuc | so i would like to generate (for example) a string given a type T |
18:59:49 | * | lokien joined #nim |
19:00:24 | def- | typetraits.name is not good enough I guess, because you can have types with same name in different modules |
19:04:29 | * | cyraxjoe joined #nim |
19:07:30 | * | BitPuffin|osx joined #nim |
19:10:25 | * | vegai joined #nim |
19:17:29 | * | filcuc quit (Ping timeout: 240 seconds) |
19:20:58 | * | PMunch joined #nim |
19:21:22 | Varriount_ | def-: What's worse is that you can even have modules with the same name. |
19:21:45 | Varriount_ | As complicated as it is, I wonder if Python has the right scheme for module. |
19:26:07 | ldlework | Varriount_: it absolutely does |
19:26:35 | ldlework | But we're not allowed to make meaningful comparisons to any other language |
19:28:24 | * | brson joined #nim |
19:31:53 | def- | ldlework: what's wrong with comparing Nim to other languages? |
19:32:25 | ldlework | def-: "Oh PYTHON'S module system?! Hurr durr, its a scripting language blah blah." |
19:32:31 | onionhammer | varriount_ |
19:32:35 | ldlework | I've literally had that conversation in here. |
19:32:42 | onionhammer | whats with all the alerts every time i open up sublime about nimlime :( |
19:35:04 | lokien | onionhammer: I get em too, they mean some executables can't be found |
19:35:14 | onionhammer | yeah.. didnt use to happen :\ |
19:35:18 | onionhammer | should just silently fail |
19:35:23 | onionhammer | or put something in the status bar |
19:35:27 | onionhammer | not pop up an alert |
19:35:45 | lokien | st3 can get annoying |
19:35:56 | lokien | what does Error: cannot open 'testability' mean? |
19:36:24 | lokien | while compiling .nim file |
19:36:52 | Varriount_ | onionhammer: I think you're the one who wrote the build system files. |
19:36:58 | Varriount_ | onionhammer: On my todo list |
19:37:08 | * | Varriount_ is now known as Varriount |
19:37:20 | onionhammer | yeah but it didnt do that before all your restructuring |
19:37:45 | onionhammer | i have nim, nimble, nimsuggest all in my path |
19:39:06 | lokien | me too. and sometimes it loads properly, sometimes it doesn't |
19:40:00 | * | AFedorov quit (Ping timeout: 252 seconds) |
19:40:13 | onionhammer | even setting the 'check_configuration' option to false doesnt work |
19:40:18 | onionhammer | i still get the popups |
19:44:30 | lokien | anyone compiled nimsuggest recently? |
19:44:39 | onionhammer | i just did |
19:44:45 | onionhammer | reinstalled it w/ nimble |
19:45:03 | lokien | "Nimsuggest is available as a Nimble package but currently does not install properly via Nimble" - is it true? |
19:49:18 | onionhammer | worked fine for me...? |
19:49:49 | lokien | installed for me too |
19:50:07 | lokien | but popups still alive |
19:50:23 | onionhammer | pop open your terminal |
19:50:27 | onionhammer | and try typing nimsuggest |
19:52:01 | lokien | works as intended |
20:00:07 | Varriount | onionhammer: You could file an issue. :3 |
20:00:23 | Varriount | onionhammer: Also, I haven't touched the build system stuff since its inception. |
20:02:04 | Varriount | onionhammer: How about this idea - disable commands when the exe's can't be found (current behavior) but have dummy commands that also appear. |
20:02:49 | Varriount | That way when someone searches 'nim' in the command palette, they'll see a command about how it can't be found. |
20:03:20 | Varriount | Status messages would be bad, they're only around for about a second - much too short for someone to see. |
20:04:03 | onionhammer | hmm |
20:04:10 | onionhammer | or just dont even do the search stuff |
20:04:27 | Varriount | onionhammer: Uh, what? |
20:04:33 | onionhammer | we didnt do it before, and it worked |
20:04:57 | onionhammer | configuration.nimsuggestexe OR "nimsuggest" |
20:04:59 | onionhammer | done |
20:05:02 | onionhammer | no searching required |
20:05:20 | Varriount | onionhammer: Uh, that's the default. |
20:05:55 | onionhammer | i have the default |
20:06:03 | onionhammer | and im getting all kinds of pop ups every time i start sublime |
20:06:10 | Varriount | onionhammer: And Nim is in your PATH? |
20:06:13 | onionhammer | yes |
20:06:17 | onionhammer | and nimsuggest is in my path |
20:07:55 | onionhammer | what im saying, is it doesnt need to do that search stuff (and fail at finding stuff thats in the path) |
20:07:57 | Varriount | onionhammer: Odd. I though I had fixed that. |
20:08:15 | onionhammer | it just needs to see if there is a configured path, if so use it, otherwise use just the exe and rely on the path |
20:09:01 | Varriount | onionhammer: I don't quite understand. |
20:09:57 | onionhammer | so at program start, you check the configuration.. it has a setting called nimsuggest.executable |
20:10:06 | onionhammer | if it has a value, you use that path |
20:10:14 | onionhammer | if it does not have a value, you use the default "nimsuggest" |
20:10:20 | onionhammer | with no absolute path |
20:10:22 | onionhammer | just the name |
20:10:25 | onionhammer | and then you call it |
20:10:32 | Varriount | onionhammer: That would require deleting the current settings key in the default settings. |
20:10:41 | onionhammer | no looping through 1000 different paths to try to find nimsuggest and build an absolute path |
20:10:48 | onionhammer | no |
20:11:20 | Varriount | onionhammer: And what if the exe isn't in the path? Then you get commands that silently fail. |
20:11:25 | onionhammer | yes |
20:11:40 | Varriount | onionhammer: You *want* silently failing commands? |
20:11:43 | onionhammer | better than startups that shout in your face when you're not even using nim at the moment |
20:12:09 | onionhammer | anything is better than the current situation |
20:12:14 | onionhammer | ANYTHING |
20:12:19 | Varriount | Ugh, fine. |
20:12:24 | onionhammer | just dont pop up alerts when the user starts ST |
20:12:57 | Varriount | How about popping up alerts when the user tries to run a command that requires a not-found executable? |
20:13:18 | onionhammer | i would prefer a status message at the bottom |
20:13:25 | onionhammer | not a modal |
20:13:56 | Varriount | onionhammer: Still don't know what's going on with your path detection, it works fine for me. |
20:14:07 | onionhammer | *shrug* |
20:14:18 | onionhammer | windows 10, sublime text 3 |
20:16:04 | Varriount | onionhammer: Same. |
20:16:47 | Varriount | onionhammer: "C:\x64\Nim\bin" is the last thing in my path variable, sans the quotes. |
20:17:13 | onionhammer | i think it's finding nim |
20:17:27 | onionhammer | the notification is for nimble or nimsuggest (or both) |
20:17:49 | onionhammer | no nevermind it is an alert for nim as well |
20:18:04 | onionhammer | it seems to find nimble |
20:25:25 | Varriount | onionhammer: I should have a fix out shortly. <3 Mixins |
20:26:06 | onionhammer | cool |
20:26:25 | onionhammer | I'll be around if you need me to test |
20:28:45 | Varriount | onionhammer: I know you might not like the recent structure changes, but it does make certain changes and checks easier to implement. |
20:29:13 | Varriount | For example, inserting a stub function into command code. |
20:35:56 | onionhammer | i dont really care about the structure changes, so long as it all still works ;) |
20:36:35 | onionhammer | im even in favor, it needed to be restructured |
20:37:57 | * | M-max quit (Remote host closed the connection) |
20:41:33 | Varriount | onionhammer: Could you PM me the output of 'echo %PATH%' from a regular command prompt? |
20:41:59 | onionhammer | in a few minutes.. |
20:42:01 | * | M-max joined #nim |
20:42:10 | onionhammer | my path is quite long on my dev box |
20:45:05 | Varriount | onionhammer: Make sure it's a regular command prompt, not one run via a batch script. |
20:46:54 | ics | Looking at the object variants section in the manual, is there a way to utilize the variant in in another declaration? For example, if I was operating on some data and needed a seq[nkInt] (which won't work because Error: type expected) |
20:47:41 | ics | NodeObj would work, e.g. seq[NodeObj], but then it's not discriminating on anything useful |
20:49:25 | onionhammer | varriount i privmsgd u |
20:49:40 | onionhammer | or..not |
20:49:46 | Varriount | onionhammer: Uh, it's not showing up in my client. |
20:50:01 | onionhammer | how bout now? |
20:50:31 | * | gokr1 joined #nim |
20:51:19 | * | Jesin quit (Quit: Leaving) |
20:52:16 | Varriount | onionhammer: I wonder if it's because your Nim executable is in a different drive other than C? |
20:52:30 | onionhammer | dont see why it should care |
20:52:46 | * | gokr2 joined #nim |
20:53:24 | Varriount | Well, the code I wrote shouldn't, but if the underlying realpath() routines use '\' (current drive) or 'C:\', then it would matter. |
20:53:27 | * | gokr quit (Ping timeout: 244 seconds) |
20:53:58 | onionhammer | well, i dont think we need to do all that stuff anyway ;) |
20:54:52 | * | gokr1 quit (Ping timeout: 255 seconds) |
20:56:24 | Varriount | onionhammer: I don't like silent failures. For one thing, I don't think I should have to debug my own configuration files. |
20:57:48 | onionhammer | well, for one thing it wouldnt fail if it just tried |
20:57:53 | onionhammer | since the stuff is *in* the path |
20:58:09 | onionhammer | for another thing it's not silent if you display a warning in the status |
20:59:28 | Varriount | onionhammer: Yes, that requires checking that the file exists. |
20:59:52 | onionhammer | no, it involves catching an error |
21:00:34 | onionhammer | rather than preemptively displaying an error when there is nothing wrong |
21:01:12 | Varriount | onionhammer: I don't know - is the FileNotFound exception universal though? |
21:01:50 | Varriount | That's what is thrown by Popen on Windows when the file can't be found, but what about other platforms? |
21:02:14 | Varriount | And not all exceptions thrown by Popen are due to the executable not being found either. |
21:02:27 | onionhammer | its just better to handle it then |
21:02:33 | onionhammer | when the user is actually doing something w/ it |
21:02:47 | onionhammer | you just cant pop up errors when sublime launches |
21:04:26 | Varriount | onionhammer: I guess. I was trying to take a page from some of the other plugins I have installed. |
21:04:53 | Varriount | I'll admit I do have a tendancy to overthink things. Any other suggestions for simplification? |
21:05:34 | * | M-max quit (Remote host closed the connection) |
21:08:17 | onionhammer | yeah, simplicity will help here IMO; just display a status message if POPEN fails. |
21:09:00 | onionhammer | if you can find a reliable way to check if something is in the path on startup... great i guess, but nim isnt the only thing most people do in ST |
21:09:03 | * | M-max joined #nim |
21:09:18 | onionhammer | its unecessary overhead imo |
21:09:59 | * | lokien_ quit (Quit: Connection closed for inactivity) |
21:12:59 | Varriount | onionhammer: Actually, it appears that python does have a function to do that, albeit a hidden one |
21:13:15 | Varriount | onionhammer: https://docs.python.org/release/2.4/dist/module-distutils.spawn.html |
21:13:34 | Varriount | All that time spent, when I could have used this. T_T |
21:19:01 | Varriount | onionhammer: What about commands that require user input before launching any subprocess? |
21:19:11 | onionhammer | hah. find_executable |
21:19:13 | onionhammer | ;) |
21:19:20 | onionhammer | commands? |
21:19:27 | onionhammer | oh like nimble? |
21:19:31 | Varriount | onionhammer: Yeah. |
21:19:47 | onionhammer | is there a way to check on-install of the package? |
21:19:51 | onionhammer | or first-time run? |
21:19:58 | Varriount | It's not... nice, when the command fails halfway through because an executable is missing. |
21:20:08 | onionhammer | agreed |
21:20:41 | onionhammer | when the user installs the package we could pop up a new tab with a report in it |
21:21:05 | onionhammer | saying "thanks for installing nimlime, you're good to go" vs "thanks for installing nimlime, we couldnt find x, y and z" |
21:21:07 | onionhammer | rather than a modal |
21:21:25 | onionhammer | then maybe throw the changelog in there too, that would be cool ;) |
21:21:41 | onionhammer | i have to run a couple errands, b back in an hour |
21:21:58 | Varriount | onionhammer: Ok, thanks for the advice. |
21:22:30 | Varriount | Sigh. I hate deleting code that I worked hard on, even if it was overcomplicated. |
21:23:22 | onionhammer | really? there's nothing better for me than deleting code :D |
21:23:31 | federico3 | +1 onionhammer |
21:24:05 | onionhammer | less code means less places things can go wrong |
21:25:11 | federico3 | deleted code has no vulnerabilities and bugs in general |
21:29:00 | * | toaoMgeorge joined #nim |
21:31:47 | * | nande joined #nim |
21:33:25 | * | toaoMgeorge quit (Ping timeout: 252 seconds) |
21:38:29 | * | toaoMgeorge joined #nim |
21:42:33 | * | toaoMgeorge quit (Ping timeout: 240 seconds) |
21:46:28 | * | yglukhov joined #nim |
21:49:50 | ldlework | Hello, what do people think about a compiler mode that enforced that all imports must be of the form "from mod import name" ? |
21:50:59 | * | yglukhov quit (Ping timeout: 248 seconds) |
21:51:26 | Varriount | ldlework: Could probably be done with a script or custom compiler pass. |
21:51:50 | Varriount | ldlework: Besides that, it would break the standard library. |
21:52:01 | ldlework | :( |
21:52:37 | ldlework | I feel like, maybe perhaps to fix import ambiguities we should adopt this kind of explicit import semantics but I know I'm talking into the wind there |
21:52:57 | ldlework | Maybe a module level pragma or something |
21:53:02 | ldlework | So projects could adopt it |
21:53:55 | ldlework | I guess there is no such thing as a module pragma |
21:54:03 | Varriount | ldlework: How often are ambiguities run into though? |
21:54:07 | ldlework | I guess we just have to enforce it ourselves |
21:54:22 | ldlework | Varriount: its not even ambiguities |
21:54:33 | ldlework | its the simple question of "where does this random proc come from" ? |
21:54:52 | Varriount | ldlework: True. That's what I like about Python |
21:55:03 | ldlework | Its a problem in Python too |
21:55:26 | * | vendethiel joined #nim |
21:55:31 | Varriount | ldlework: Well, most of the code I write uses 'from X import Y' |
21:55:37 | ldlework | we can do that in nim too |
21:55:39 | Varriount | (Most of the python code) |
21:55:42 | ldlework | I'm asking for compiler enforcement |
21:55:51 | ldlework | so I can easily take an existing project |
21:56:03 | ldlework | and have the compiler help me systematically convert it to 'from' style |
21:56:05 | dom96 | ldlework: even if a pragma is created I doubt the majority will use it. |
21:56:48 | ldlework | dom96: that's fine |
21:57:03 | asdf | Varriount, you're using that style in python, but not in nim? any reason for that? it'd seem it's helpful |
21:57:07 | ldlework | poop in the sink is fine in your own house :) |
21:57:18 | Varriount | The problem is that the convenience in Nim outweighs the problems |
21:57:34 | ldlework | hmm |
21:57:37 | ldlework | ? |
21:57:41 | dom96 | ldlework: just make it a habit to use the 'from module import nil' syntax then |
21:57:43 | Varriount | Imagine having to not only import classes manually in Python, but also all their methods |
21:57:58 | ldlework | dom96: thinking we could use computers to our advantage |
21:58:07 | asdf | Varriount, right, so because it'd be too much work in nim |
21:58:33 | ldlework | Varriount: it wouldn't be so bad if the compiler was like |
21:59:01 | ldlework | "woah, you're probably trying to use the method I found in the module that one of the types you passed to it came from..." |
21:59:01 | * | toaoMgeorge joined #nim |
21:59:04 | ldlework | "but you didn't import it." |
21:59:08 | ldlework | "oh okay." |
21:59:27 | ldlework | or like dom96 says, "just try harder" |
21:59:29 | ldlework | :) |
21:59:58 | dom96 | ldlework: it probably wouldn't be too difficult to implement such a pragma, go for it ;) |
22:00:07 | ldlework | there are module pragmas? |
22:00:21 | ldlework | and I imagine it wouldn't be trivial either |
22:00:32 | ldlework | can you just randomly introspect other modules than the one you're processing right now? |
22:00:33 | Varriount | ldlework: Look at the term-rewriting macros. |
22:00:35 | dom96 | there are |
22:00:45 | ldlework | how would term rewriting macros help? |
22:01:07 | Varriount | ldlework: They present a mechanism for implicit rewriting of code. |
22:01:16 | ldlework | That's not what we want |
22:01:35 | Varriount | rewrite 'import x' to 'compiletime error "You need to use from X import y" |
22:02:10 | * | PMunch quit (Ping timeout: 244 seconds) |
22:02:10 | ldlework | haha |
22:02:23 | ldlework | that's not super helpful but I guess |
22:02:50 | ldlework | is "compiletime error" a real thing? |
22:03:04 | Varriount | ldlework: Not that exact syntax, but yeah. |
22:03:14 | Varriount | {.error "Message.} |
22:03:21 | Varriount | Er "Message" |
22:03:25 | ldlework | I think you can just raise |
22:03:29 | ldlework | or quit |
22:03:41 | Varriount | I've privately wondered if using a versioned extension like '.nim2' might help with large changes like this. |
22:03:55 | Varriount | (Again, wondering about immutable strings becoming the default) |
22:05:01 | ldlework | oh we're dumb |
22:05:10 | Varriount | ? |
22:05:20 | ldlework | if you just remove the import to sequtils, the compiler will systematically complain about all the sequtils usage :D |
22:05:28 | ldlework | etc |
22:05:42 | Varriount | ldlework: Well, yes. Why wouldn't it? |
22:05:58 | ldlework | we're dumb because I said "Hey we should make the compiler do this" |
22:06:02 | ldlework | and no one said "just remove the import" |
22:10:33 | * | toaoMgeorge quit (Ping timeout: 240 seconds) |
22:14:54 | * | toaoMgeorge joined #nim |
22:19:17 | * | nsf quit (Quit: WeeChat 1.4) |
22:19:37 | * | toaoMgeorge quit (Ping timeout: 252 seconds) |
22:19:37 | * | vendethiel quit (Ping timeout: 252 seconds) |
22:25:30 | * | Jesin joined #nim |
22:38:41 | * | vendethiel joined #nim |
22:44:14 | ldlework | Inside of a subtype, how do you call a parent initializer from inside a child initilizer proc? |
22:44:22 | ldlework | Is casting The Way? |
22:44:47 | * | darkf joined #nim |
22:48:59 | ldlework | is this idiomatic nim? https://bpaste.net/show/1ac9eef46dc8 |
22:50:51 | Varriount | ldlework: The idiomatic way is for an initializer to accept a ref type, akin to what the 'new' builtin does. |
22:51:27 | ldlework | Varriount: hmm sorry can you modify that post with what you mean? |
22:51:41 | asdf | oh, you mean initializer shouldn't call new() itself? |
22:51:51 | ldlework | ah okay |
22:51:54 | ldlework | "constructor" |
22:52:02 | ldlework | oh right I remember the answer |
22:52:07 | ldlework | splitting initializers and constructors |
22:52:12 | asdf | oh, makes sense |
22:52:14 | ldlework | so you can call the parent initializer |
22:52:17 | asdf | right |
22:52:33 | ldlework | kinda annoying but simple |
22:52:35 | Varriount | ldlework: new(Typedef) actually works? |
22:52:58 | ldlework | probably not |
22:54:01 | * | lokien quit (Quit: Leaving) |
22:54:55 | * | toaoMgeorge joined #nim |
23:00:29 | * | vendethiel quit (Ping timeout: 240 seconds) |
23:00:52 | * | mat4 joined #nim |
23:01:09 | * | lokien_ joined #nim |
23:06:42 | * | Trustable joined #nim |
23:12:06 | Varriount | onionhammer: You there? |
23:12:38 | onionhammer | yeah |
23:14:36 | Varriount | onionhammer: http://www.tiikoni.com/tis/view/?id=2ad2b6c |
23:16:49 | Varriount | onionhammer: Of course, if you want, I could write a 500-line function that makes sparks fly out of your monitor to get your attention, but I figured that you would disapprove. |
23:17:26 | Varriount | onionhammer: By the way, can you check to see if the distutils.spawn.find_executable function works on non-default drives? |
23:17:33 | onionhammer | that looks good :) |
23:17:48 | onionhammer | do u have a new version up I can use to check that? |
23:17:55 | Varriount | Just use it to search for Nim: `distutils.spawn.find_executable("nim")` |
23:18:16 | Varriount | onionhammer: Not yet, I guess I could push it though. |
23:18:30 | * | Kingsquee joined #nim |
23:20:49 | Varriount | onionhammer: Done. |
23:22:07 | onionhammer | k, i'll check in a few minutes |
23:26:10 | onionhammer | seems to work |
23:26:23 | onionhammer | i forgot all the nimsuggest hotkeys though :) |
23:26:29 | * | nsf joined #nim |
23:26:30 | onionhammer | F12 works |
23:30:55 | onionhammer | lookup no longer seems to work :\ |
23:31:07 | onionhammer | and autocomplete |
23:31:51 | Varriount | onionhammer: What do you mean by lookup? Isn't that the same as autocomplete? |
23:32:08 | onionhammer | no, lookup used to display a little dialog with the proc signature and comments |
23:33:54 | Varriount | onionhammer: Try 'show definition' |
23:34:03 | onionhammer | how? |
23:34:15 | Varriount | Er, type it into the command box |
23:34:48 | onionhammer | ah, nothing happened |
23:35:11 | Varriount | onionhammer: Hrm. |
23:35:24 | onionhammer | then the command disappeared :) |
23:35:58 | Varriount | ?! |
23:36:13 | onionhammer | its gone from the command pallette now that i restarted st |
23:37:34 | Varriount | onionhammer: Try manually setting the syntax to Nim |
23:37:45 | onionhammer | nope |
23:37:50 | onionhammer | nothing |
23:37:53 | Varriount | :\ |
23:37:58 | Varriount | onionhammer: Stop giving me headaches. |
23:38:22 | onionhammer | hah |
23:38:29 | Varriount | onionhammer: Anything in the debug console? |
23:38:54 | onionhammer | Error loading scope:source.glsl: Unable to find syntax file for scope source.glsl in Packages/NimLime/Syntaxes/Nim.tmLanguage |
23:39:03 | onionhammer | and a bunch of other source.** files |
23:47:04 | * | Jesin quit (Quit: Leaving) |
23:47:54 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
23:48:03 | * | Trustable quit (Remote host closed the connection) |
23:48:04 | * | Kingsquee joined #nim |
23:48:12 | * | mat4 quit (Quit: Leaving) |
23:49:33 | * | Jesin joined #nim |
23:56:47 | Varriount | onionhammer: No idea why its doing that. |
23:57:35 | Varriount | onionhammer: I assumed it was some recent ST update bug. |
23:59:14 | Varriount | onionhammer: It seems to only do that after updating |