00:09:36 | * | xet7 quit (Quit: Leaving) |
00:18:53 | FromGitter | <timotheecour> @dom96 any other concerns for https://github.com/nim-lang/Nim/pull/8555 ? I’ve removed `FAKEFILE` and tests are green |
00:20:56 | * | krux02 quit (Remote host closed the connection) |
00:21:55 | FromGitter | <gogolxdong> the first time configure nginx https settings, got 403 Forbidden. |
00:23:42 | FromGitter | <gogolxdong> and 400 Bad request if use jester. |
00:24:53 | FromGitter | <gogolxdong> nginx reverse proxy , pricisely. |
00:33:50 | * | bung quit (Quit: Page closed) |
00:35:10 | * | zachcarter quit (Ping timeout: 252 seconds) |
00:41:14 | * | ftsf joined #nim |
00:45:30 | * | mr_yogurt quit (Ping timeout: 264 seconds) |
00:54:50 | FromGitter | <gogolxdong> firefox got more specific reason |
00:54:52 | FromGitter | <gogolxdong> Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.bafang.cloud:8081/cmpprotocol. (Reason: CORS request did not succeed). |
01:00:53 | FromGitter | <gogolxdong> Should this be https ? ⏎ ⏎ ```location / { ⏎ proxy_pass http://localhost:8000; ⏎ }``` [https://gitter.im/nim-lang/Nim?at=5b80aa45e5b40332abf4d70e] |
01:03:00 | FromGitter | <timotheecour> happy Friday and here’s a friday present for you all: universal toSeq: works with UFCS; works with inline & closure iterators, and with iterables #8711 |
01:18:47 | * | nixologist joined #nim |
01:19:43 | * | nixologist left #nim (#nim) |
01:25:39 | FromGitter | <gogolxdong> How to replace this `var routeTable = @["routeTableName":"\"<script>alert(1);</script>"]` to make it can be parsed by parseJson? |
01:32:17 | * | zachk quit (Quit: Leaving) |
01:37:00 | FromGitter | <gogolxdong> and notice there might be multiple like "\"\"... |
01:46:24 | * | ftsf quit (Ping timeout: 268 seconds) |
01:48:52 | * | nickoe26 joined #nim |
01:48:58 | * | nickoe26 quit (Remote host closed the connection) |
01:53:23 | FromGitter | <gogolxdong> `var routeTable = @["""{\"routeTableName\":"\"<script>alert(1);</script>\"}"""]` |
02:00:52 | * | Death916 quit (Changing host) |
02:00:52 | * | Death916 joined #nim |
02:00:52 | * | Death916 quit (Changing host) |
02:00:52 | * | Death916 joined #nim |
02:09:27 | * | ftsf joined #nim |
02:25:56 | FromGitter | <gogolxdong> ok, I just simply replace("\\\""). |
02:43:46 | FromGitter | <DanielSokil> @dom96 Thanks for fixing Jester. |
02:48:33 | * | dddddd quit (Remote host closed the connection) |
03:06:22 | FromGitter | <gogolxdong> I still got bad request. |
03:27:20 | * | ftsf quit (Ping timeout: 244 seconds) |
03:31:04 | * | zachcarter joined #nim |
03:32:25 | * | kapil___ joined #nim |
03:35:33 | * | zachcarter quit (Ping timeout: 252 seconds) |
05:32:27 | * | mr_yogurt_ joined #nim |
05:38:23 | * | mr_yogurt_ quit (Ping timeout: 252 seconds) |
05:40:25 | * | liteIRC joined #nim |
05:40:37 | * | mr_yogurt joined #nim |
05:43:03 | * | liteIRC quit (Client Quit) |
05:44:17 | * | zachcarter joined #nim |
05:49:22 | * | zachcarter quit (Ping timeout: 268 seconds) |
06:04:21 | * | zachcarter joined #nim |
06:08:35 | * | Yujian joined #nim |
06:10:49 | * | Yujian quit (Client Quit) |
06:29:50 | * | leorize quit (Quit: WeeChat 2.2) |
06:30:11 | * | stefanos82 joined #nim |
06:30:16 | * | leorize joined #nim |
06:32:29 | * | NimBot joined #nim |
06:54:36 | FromGitter | <Bennyelg> @Araq Where I can find the db infering in ornim ? |
06:54:58 | FromGitter | <Bennyelg> @Araq ormin* |
08:03:08 | * | gmpreussner quit (Quit: kthxbye) |
08:04:06 | * | gmpreussner joined #nim |
08:22:43 | * | Yujian joined #nim |
08:23:19 | * | Yujian quit (Client Quit) |
08:29:51 | * | Trustable joined #nim |
08:35:46 | * | krux02 joined #nim |
08:36:43 | FromGitter | <bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b81151aff44515616364d3f] |
08:37:02 | FromGitter | <bung87> how to pass the method? |
08:44:00 | stefanos82 | can you provide a better example? |
08:45:44 | leorize | bung87: pass the method like this: atexit(delpid) |
08:46:08 | * | wildlander_ joined #nim |
08:46:28 | leorize | if parameter is necessary, try passing a closure. |
08:46:31 | FromGitter | <bung87> found there is a `addQuitProc( )` ⏎ ⏎ now ⏎ ⏎ ``` ⏎ method delpid(self:Daemon) = ⏎ ⏎ addQuitProc( self.delpid ) ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5b8117664be56c591892d5e0] |
08:47:02 | leorize | I think you should use `defer:` instead |
08:47:36 | * | wildlander quit (Ping timeout: 272 seconds) |
08:48:36 | stefanos82 | does anyone knows a way to measure a tuple's number of elements? |
08:50:50 | FromGitter | <bung87> @leorize thanks! let me try it |
08:52:01 | leorize | stefanos82: it's rather weird that `[]` exists for tuples but not `len()` |
08:52:16 | stefanos82 | leorize: I know |
08:52:35 | stefanos82 | I'm trying to figure out a way to measure its element size and cannot find one! |
08:53:03 | leorize | use the fields() iterator? |
08:53:16 | stefanos82 | let me try it |
08:53:58 | stefanos82 | which module is it part of? |
08:54:02 | leorize | system |
08:55:22 | stefanos82 | can you provide an example to test it? I get an error when I'm trying to use it |
08:55:49 | stefanos82 | Nim desperately needs a cleaner documentation :/ |
08:56:03 | stefanos82 | I cannot easily find things that should be obvious to the end-user |
08:56:37 | * | wildlander_ quit (Quit: Konversation terminated!) |
08:58:47 | leorize | what exactly are you trying to do? |
08:59:26 | stefanos82 | to get the element size of a tuple and loop over it to get its values |
08:59:36 | stefanos82 | much like we get with PHP's associative arrays |
08:59:43 | FromGitter | <bung87> ` <proc (){.closure.}>` that type mismatch`proc ()` |
09:02:17 | leorize | bung87: looks like closure won't cut it. Is there any reason you would need to use `addQuitProc()`? |
09:03:46 | FromGitter | <bung87> to delete pid file when process exit |
09:04:08 | leorize | maybe use `defer:`? |
09:06:48 | leorize | does the create gist button on Nim playground actually work? |
09:07:13 | * | druonysus quit (Ping timeout: 260 seconds) |
09:07:15 | leorize | stefanos82: https://ptpb.pw/e6Op |
09:07:32 | leorize | for element size, I think you'd need a macro |
09:07:47 | stefanos82 | thank you leorize |
09:13:44 | FromGitter | <GULPF> you can use the arity proc from the typetraits module to get the number of elements in a tuple type |
09:22:56 | * | krux02 quit (Remote host closed the connection) |
10:04:59 | FromGitter | <gogolxdong> What's the common nginx reverse proxy configuration ? ⏎ we got `Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://wwww.bafang.cloud:8081/cmpprotocol. (Reason: CORS request did not succeed).` |
10:08:05 | * | krux02 joined #nim |
10:12:21 | * | Vladar joined #nim |
10:17:26 | FromGitter | <bung87> https://github.com/bung87/moto-moe/blob/master/conf/moto-moe.conf you can check this |
10:19:16 | FromGitter | <bung87> also you can check many open source web project that using nginx |
10:20:42 | FromGitter | <gogolxdong> ok, wonder whether it's out of ⏎ proxy_pass_header Server; ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b812d7a38a12915e4f3d19c] |
10:22:22 | FromGitter | <gogolxdong> ours is simply as ⏎ location ~ ^/~(.+?)(/.*)?$ { ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b812ddef86b741b05bec85f] |
10:23:38 | FromGitter | <dom96> https://github.com/nim-lang/nimforum/blob/master/setup.md#nginx |
10:24:02 | FromGitter | <dom96> CORS is unrelated to this. Read up on it. |
10:24:26 | FromGitter | <bung87> if it's that simple ,you may doing thing |
10:25:09 | FromGitter | <bung87> you backend program may not get enough information about request. |
10:26:06 | FromGitter | <bung87> also you can try proxy_pass with ip:port or socket address |
10:28:35 | * | tiorock joined #nim |
10:28:35 | * | tiorock quit (Changing host) |
10:28:35 | * | tiorock joined #nim |
10:28:35 | * | rockcavera is now known as Guest57803 |
10:28:35 | * | Guest57803 quit (Killed (sinisalo.freenode.net (Nickname regained by services))) |
10:28:35 | * | tiorock is now known as rockcavera |
10:31:36 | * | tiorock joined #nim |
10:31:36 | * | tiorock quit (Changing host) |
10:31:37 | * | tiorock joined #nim |
10:31:37 | * | rockcavera quit (Killed (wilhelm.freenode.net (Nickname regained by services))) |
10:31:37 | * | tiorock is now known as rockcavera |
10:35:12 | FromGitter | <alehander42> is there a way to get the current exe name ? |
10:35:34 | leorize | getAppFilename()? |
10:36:11 | FromGitter | <gogolxdong> if X-Real_IP $remote_addr is ip address ,what is $host should be? |
10:40:52 | * | Trustable quit (Remote host closed the connection) |
10:41:43 | FromGitter | <bung87> the variable is taken care by nginx , you dont need edit it |
10:42:13 | FromGitter | <bung87> and it's not your host ip |
10:44:00 | FromGitter | <bung87> I think the best way is read the document from your web framework site,which may has a minimal config file for nginx. |
10:47:59 | FromGitter | <alehander42> thanks leorize ! |
10:48:08 | FromGitter | <alehander42> it works for me |
10:53:43 | * | dddddd joined #nim |
10:59:52 | FromGitter | <gogolxdong> Please take a look at our nginx.conf . |
10:59:54 | FromGitter | <gogolxdong> http://ix.io/1lcm |
11:03:31 | FromGitter | <bung87> `proxy_pass http://localhost:8000;` change it to ip:port ,since your server host 80 and 443 |
11:05:23 | FromGitter | <bung87> I can't sure it's wrong but it is misleading.right? |
11:07:34 | * | SenasOzys quit (Ping timeout: 268 seconds) |
11:08:21 | * | kapil___ quit (Quit: Connection closed for inactivity) |
11:09:33 | FromGitter | <bung87> and another question your program can serve both http https through one port? |
11:09:39 | FromGitter | <gogolxdong> changed to 0.0.0.0:8000, no difference. |
11:11:42 | FromGitter | <gogolxdong> web framework listen on http://*:8000 |
11:13:20 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8139cffd3c641b0609452e] |
11:13:42 | FromGitter | <bung87> I think your http server works fine |
11:16:27 | * | ftsf joined #nim |
11:16:59 | FromGitter | <bung87> if you config server both 80 443 port ,you may need write condition in config file about which port you will proxy_pass to |
11:19:16 | FromGitter | <gogolxdong> I can comment it out but got the same error. |
11:20:05 | FromGitter | <gogolxdong> comment http out |
11:23:08 | FromGitter | <bung87> I dont like further disscus about this, nothing related to Nim. |
11:28:05 | FromGitter | <bung87> I checked https://www.bafang.cloud/cmpprotocol seems works fine now, your problem gone. |
11:28:32 | * | SenasOzys joined #nim |
11:29:12 | FromGitter | <gogolxdong> you mean I shouldn't add https://www.bafang.cloud:8081/cmpprotocol? |
11:30:58 | FromGitter | <bung87> you should not add port to your url. |
11:32:29 | FromGitter | <bung87> the most wrong parts is your backend serve 0.0.0.0 that client can directly access to it ,right? then why you config a nginx file,and why you config cert file on nginx? |
11:34:47 | FromGitter | <gogolxdong> because of ⏎ ⏎ ##This HTTP server has not been designed to be used in production, but ⏎ ⏎ ##for testing applications locally. Because of this, when deploying your ... [https://gitter.im/nim-lang/Nim?at=5b813ed6ac25fd11b5913c14] |
11:35:09 | FromGitter | <gogolxdong> asynchttpserver.nim |
11:36:16 | FromGitter | <bung87> so this description prove mine. |
11:36:46 | FromGitter | <bung87> you dont read carefully |
11:37:33 | FromGitter | <bung87> that's *0.0.0.0* that you allow client access dirctly |
11:41:46 | FromGitter | <gogolxdong> listen on its ip address now , got 405 |
11:43:16 | FromGitter | <gogolxdong> oh, it's a virtual IP which cannot be listen on . failed to listen. |
12:16:00 | * | ftsf quit (Ping timeout: 252 seconds) |
12:39:25 | FromGitter | <dom96> Once again: look at the config I sent you, that's all you need |
12:39:43 | FromGitter | <dom96> Don't expose jester to the internet |
12:40:41 | FromGitter | <dom96> You're probably requesting your site on port 8081 when you're on port 80 |
12:40:56 | FromGitter | <dom96> That's a CORS violation as far as I know |
12:48:54 | * | dorelix joined #nim |
13:14:10 | stefanos82 | @dom96: when we use magic pramas, where are they implemented exactly? |
13:15:27 | leorize | they're implemented in the compiler |
13:16:25 | leorize | search for m<Magic name> in the compiler source IIRC |
13:17:04 | stefanos82 | I will, thank you leorize |
13:24:18 | stefanos82 | leorize: it's an enum value |
13:24:46 | leorize | yep, looks for where it's used, then you will figure out how the compiler generate code for them |
13:32:42 | * | Yujian joined #nim |
13:33:37 | * | Yujian quit (Client Quit) |
13:47:42 | * | mrshu quit (Ping timeout: 260 seconds) |
13:47:43 | * | rockcavera quit (Read error: Connection reset by peer) |
14:12:47 | FromGitter | <gogolxdong> xhr.js:178 POST https://www.bafang.cloud/cmpprotocol 405 (Method Not Allowed) |
14:13:45 | * | endragor joined #nim |
14:16:00 | stefanos82 | is there any list with built-in pragmas and any with templated pragmas? |
14:18:27 | * | endragor quit (Remote host closed the connection) |
14:18:30 | leorize | what do you mean? |
14:19:46 | stefanos82 | templates give you the right to implement your own prama |
14:20:21 | stefanos82 | so I was wondering; is there any list with actual built-in pragmas and other list for templated ones? |
14:20:30 | leorize | for a list of built-in pragmas, check the Manual |
14:20:46 | stefanos82 | I'm reading it, but it's not always clear |
14:21:19 | leorize | for the purpose of a list, it's there |
14:32:15 | stefanos82 | yeah, so basically it's impossible to distinguish which is built-in and which is user-defined |
14:32:17 | stefanos82 | oh well... |
14:33:02 | leorize | well it's user-defined when you can't find it in the Manual :P |
14:34:45 | stefanos82 | obviously; also, I meant template-defined by saying user-defined |
14:34:49 | stefanos82 | anyway |
14:42:45 | pqflx3[m] | Is it possible to test runnableExamples on local docs? |
14:49:16 | leorize | I think it's tested automatically when you run `nim doc` |
14:51:14 | pqflx3[m] | Didn't there used to be a button to 'Run' the examples looking at the html? or am I misremembering |
14:54:18 | * | SenasOzys quit (Ping timeout: 272 seconds) |
14:59:59 | FromGitter | <ephja> stefanos82: are you talking about the recent addition to user-defined pragmas? |
15:00:03 | * | SenasOzys joined #nim |
15:02:35 | FromGitter | <ephja> in any case, user-defined pragmas applied to types seem to serve only as tags atm, IINM. I'm sure it'll be possible to modify the AST eventually. it would be a little less hairy than applying a user-defined pragma to a whole type section rather than types in a type section |
15:06:35 | FromGitter | <ephja> will more generalized macro constructs take us closer to a statically typed lisp? :p |
15:09:38 | FromDiscord_ | <exelotl> is it possible to do async proc forward declartion? |
15:09:44 | FromDiscord_ | <exelotl> *declaration |
15:12:48 | stefanos82 | @ephja: the documentation does not state anything about being recently added; all I'm doing is reading the manual and experimenting as much as possible to figure out how to use Nim *the right way*, that's all |
15:14:23 | * | echotangoecho joined #nim |
15:18:35 | * | xet7 joined #nim |
15:18:57 | * | mrshu joined #nim |
15:25:20 | * | mrshu quit (Ping timeout: 268 seconds) |
16:19:06 | * | mrshu joined #nim |
16:21:54 | * | echotangoecho quit (Quit: Lost terminal) |
16:36:40 | FromGitter | <mratsim> Oh, I just realised, Nim is allowed on HackerRank: https://www.hackerrank.com/environment |
16:37:43 | * | Jesin joined #nim |
16:39:56 | * | Jesin quit (Remote host closed the connection) |
16:43:44 | FromGitter | <rayman22201> So is BrainF*ck... |
16:43:49 | FromGitter | <rayman22201> Lol |
16:45:14 | * | Jesin joined #nim |
16:53:32 | * | kapil___ joined #nim |
17:03:40 | * | xet7 quit (Quit: Leaving) |
17:03:59 | * | xet7 joined #nim |
17:07:57 | * | linuxdaemon24 joined #nim |
17:09:08 | * | linuxdaemon24 quit (Remote host closed the connection) |
17:19:41 | krux02 | ephja: Nim is already a statically typed lisp |
17:20:02 | * | dorelix quit (Ping timeout: 268 seconds) |
17:20:09 | krux02 | it is just that the macros are ugly here and there |
17:21:26 | FromGitter | <mratsim> I just checked, no Nim lang, it’s a trap |
17:22:54 | ldlework | nim isn't really a lisp |
17:23:14 | FromGitter | <alehander42> i don't really dig homoiconity so much anymore |
17:23:22 | FromGitter | <alehander42> it's neat, but I think it's actually worse for users |
17:23:22 | ldlework | lisp is all about homoiconic antiquoting |
17:23:36 | * | Vladar quit (Remote host closed the connection) |
17:23:36 | FromGitter | <alehander42> because after all macros are not your #1 solution |
17:23:41 | ldlework | quoting can make things extremely expressive |
17:23:47 | FromGitter | <alehander42> yep, for macros |
17:23:51 | ldlework | i use macros all the time in my lisp |
17:23:54 | FromGitter | <alehander42> but nim does have quoting too |
17:23:56 | FromGitter | <data-man> https://github.com/alehander42/breeze ;) |
17:24:23 | FromGitter | <alehander42> and in cases when you need a more complicated macro, lisp does win, but I'd argue those macros are not so common |
17:24:31 | ldlework | not really on the same level of expressitivty and succinctness |
17:24:34 | FromGitter | <alehander42> or if they are, that's not good for maintainability |
17:24:37 | FromGitter | <alehander42> but that's good |
17:24:40 | FromGitter | <alehander42> that's the point |
17:24:53 | ldlework | i literally use macros all over the place |
17:24:56 | FromGitter | <alehander42> I prefer it being a little bit harder |
17:25:00 | ldlework | i refactor my code so each unit is small |
17:25:15 | ldlework | lisp excells at refactorability |
17:25:25 | FromGitter | <alehander42> well, doesn't it lead to harder to maintain code for teams? |
17:25:25 | ldlework | (i can't believe i'm defending lisp at all lol) |
17:25:28 | FromGitter | <alehander42> don't get me wrong |
17:25:32 | ldlework | but you guys were getting out of hand lol |
17:25:32 | FromGitter | <alehander42> I am using a lot of macros too |
17:25:43 | FromGitter | <alehander42> but often I feel bad about it |
17:25:51 | FromGitter | <alehander42> every macros is its own custom dsl |
17:26:04 | FromGitter | <alehander42> and if you have too many in the same project, this can get weird |
17:26:38 | FromGitter | <alehander42> Idlework look, I am not saying lisp is bad, I am just saying homoiconity has pro-s and con-s |
17:26:41 | ldlework | i don't think there is much difference between macros and functions in lisp |
17:27:01 | ldlework | a function call in lisp is pretty much a macro where you know all the arguments are evaluated |
17:27:05 | FromGitter | <alehander42> but that's an illusion |
17:27:10 | ldlework | beyond that you don't know what either will do with their arguments |
17:27:12 | FromGitter | <alehander42> because a macro can do wtf stuff with its args |
17:27:20 | ldlework | yes and so can a function |
17:27:26 | FromGitter | <alehander42> well, function calls are more obvious |
17:27:32 | ldlework | the only difference is that a function always evaluates the arguments |
17:27:36 | ldlework | but pass a data structure to a function |
17:27:38 | ldlework | omg! |
17:27:40 | ldlework | what will it do? |
17:27:46 | ldlework | it can do anything with that data structure! |
17:27:49 | FromGitter | <alehander42> but that's not a function |
17:27:51 | ldlework | interpret it in any way it wants. |
17:27:53 | FromGitter | <alehander42> you now have |
17:27:53 | ldlework | what |
17:28:01 | FromGitter | <alehander42> "compile" time and run time |
17:28:06 | FromGitter | <alehander42> and you run code on both |
17:28:11 | FromGitter | <alehander42> which complicates things |
17:28:16 | FromGitter | <alehander42> ok, there is a reason why |
17:28:20 | ldlework | it doesn't matter at all |
17:28:23 | FromGitter | <alehander42> if you can do something with a function |
17:28:31 | FromGitter | <alehander42> you try that first |
17:28:36 | FromGitter | <alehander42> and only after you do a macro |
17:28:40 | ldlework | look |
17:28:45 | ldlework | it is the other way around |
17:28:52 | ldlework | take any macro and function that do the same |
17:28:55 | ldlework | the only difference between them |
17:29:03 | ldlework | is that for the function you'll quote all your arguments |
17:29:09 | ldlework | beyond that they can both do all the same things |
17:29:13 | FromGitter | <alehander42> I know how it works, all I am saying is |
17:29:18 | FromGitter | <alehander42> when I read somebody else's code |
17:29:25 | FromGitter | <alehander42> following normal calls is a bit easier |
17:29:35 | FromGitter | <alehander42> it's hard to talk without concrete examples |
17:29:43 | FromGitter | <alehander42> but a lot of the macro dsl-s I do |
17:29:52 | FromGitter | <alehander42> are actually very "powerful" |
17:29:52 | ldlework | lots of code in melpa uses macros |
17:29:55 | FromGitter | <alehander42> like, you write a spec |
17:29:56 | ldlework | i use tons of macros |
17:30:01 | FromGitter | <alehander42> and I do all kinds of shit in the background |
17:30:02 | ldlework | i debug elisp all the time |
17:30:11 | ldlework | i just don't agree with the waving |
17:30:18 | FromGitter | <alehander42> ok, are those macros closer to nim's templates |
17:30:27 | FromGitter | <alehander42> I mean, is it more like "quoting and unquoting" |
17:30:34 | FromGitter | <alehander42> or more complicated ast walking and creation? |
17:30:46 | ldlework | i sometimes functionally generate list structures which i evaluate or inject into an accumulated form |
17:30:56 | FromGitter | <alehander42> I think it's good to differentiate between both |
17:31:01 | FromGitter | <alehander42> because most macros are the first kinds |
17:31:01 | ldlework | the point is api design |
17:31:08 | ldlework | you can'tk now what a function or macro does |
17:31:22 | FromGitter | <alehander42> and nim already is good enough at them |
17:31:26 | ldlework | here's the thing |
17:31:28 | ldlework | here's the one thing |
17:31:32 | FromGitter | <alehander42> templates are exactly as easy as lisp quotes |
17:31:34 | ldlework | if evaluation has side-effects |
17:31:48 | FromGitter | <alehander42> now, macros are harder, but what they do is also way more opaque |
17:31:52 | ldlework | no it really doesn't |
17:32:08 | ldlework | templates are not the same lisp quoting/antiquoting |
17:32:19 | ldlework | you can quote and antiquote arbitrarily anywhere in any code |
17:32:25 | ldlework | you don't need to define a template and use it |
17:32:40 | ldlework | quoting/antiquoting is syntax and can be used anywhere |
17:32:47 | ldlework | and is also a useful way to make data |
17:32:49 | ldlework | not just code |
17:33:11 | FromGitter | <mratsim> That really sounds like #firstWorldLanguage problem |
17:33:14 | ldlework | i think the truism that nim and lisp macros are similar in that they are compile time code that works on an ast |
17:33:15 | FromGitter | <alehander42> yeah, but I don'\t like that |
17:33:21 | ldlework | is being conflated though culture |
17:33:27 | ldlework | to be more than that |
17:33:35 | ldlework | because that's as far as their similarity really goes |
17:33:38 | FromGitter | <alehander42> like, it's cool that your ast is data |
17:33:45 | FromGitter | <alehander42> and you can use the same syntax on all |
17:33:55 | FromGitter | <alehander42> but look, this is all the pro-s and con-s of macros |
17:33:58 | ldlework | it is absurdly useful and expressive at the same time |
17:34:01 | FromGitter | <alehander42> and then we have "normal syntax" |
17:34:04 | FromGitter | <alehander42> and it sucks |
17:34:08 | FromGitter | <alehander42> come on `(+ 2 3)` |
17:34:18 | FromGitter | <alehander42> there is a reason no other language |
17:34:23 | FromGitter | <alehander42> uses prefix notation |
17:34:30 | ldlework | i think you're stuck attacking lisp |
17:34:32 | FromGitter | <alehander42> or is so homoiconic |
17:34:36 | FromGitter | <alehander42> mate i love lisp |
17:34:48 | FromGitter | <alehander42> i've implemented minilisps several times |
17:34:51 | FromGitter | <mratsim> Well you have Polish Notation and Reverse Polish Notation and finance people love their HP-12C |
17:34:53 | FromGitter | <alehander42> for a long time |
17:34:58 | FromGitter | <alehander42> I thought homoiconity is great |
17:35:11 | FromGitter | <alehander42> but if you ignore macros for a second |
17:35:18 | FromGitter | <alehander42> from purely syntactic viewpoint |
17:35:29 | FromGitter | <mratsim> in RPN you would use (2 3 +) ;) |
17:35:39 | FromGitter | <alehander42> you have 90% of languages using a different syntax, with more special cases |
17:35:49 | ldlework | its hardly "prefix" notation |
17:35:51 | ldlework | foo(bar) |
17:35:51 | FromGitter | <alehander42> and I just think that's closer to the balance |
17:35:54 | ldlework | is this prefix notation? |
17:35:56 | FromGitter | <alehander42> not only prefix |
17:36:03 | ldlework | `+`(2, 3) |
17:36:03 | FromGitter | <alehander42> the homoiconicity thing too |
17:36:10 | FromGitter | <mratsim> https://en.wikipedia.org/wiki/Polish_notation <-- |
17:36:12 | FromGitter | <alehander42> having several syntactic constructs |
17:36:12 | ldlework | homoioncicity has no negatives |
17:36:14 | FromGitter | <alehander42> is not bad |
17:36:19 | FromGitter | <alehander42> I don't agree |
17:36:24 | FromGitter | <alehander42> it limits you just so |
17:36:31 | ldlework | what |
17:36:32 | FromGitter | <alehander42> your source code looks like the ast |
17:36:40 | ldlework | lol ok |
17:36:41 | * | Yujian joined #nim |
17:36:54 | FromGitter | <alehander42> well that's the obvious + of it |
17:36:54 | ldlework | anyway probably #nim-offtopic material |
17:37:09 | FromGitter | <mratsim> Discussing Nim syntax is not offtopic |
17:37:38 | FromGitter | <alehander42> and there is no reason you can't have 60-80% of the macro power with a more "classical" syntax |
17:37:47 | FromGitter | <alehander42> nim might not have it so deeply |
17:37:54 | FromGitter | <alehander42> like quoting and quasiquoting everywhere |
17:38:00 | FromGitter | <alehander42> but you could write such a language |
17:38:58 | * | Yujian quit (Client Quit) |
17:40:40 | FromGitter | <alehander42> basically my point is that you have ⏎ "standard code" "macro code" and homoiconic syntax optimizes the second case too much hurting the first case when the first usecase is still bigger |
17:41:24 | FromGitter | <alehander42> also, take a look at io's homoiconity, it's pretty cool too |
17:55:31 | * | abm joined #nim |
18:10:35 | krux02 | ldlework, what do you program mostly in lisp? |
18:11:05 | krux02 | All lisp I know is emacs lisp, and the introduction course to scheme in my first lecture in computer scince that I attended. |
18:27:14 | ldlework | krux02: I have been coding for like 20 years, but I have been writing a lot of lisp lately as I've gone crazy with emacs customization. |
18:27:29 | ldlework | I have written a number of elisp packages for working with Org-mode and other things. |
18:27:37 | ldlework | But I am a Python professional. |
18:28:36 | FromGitter | <alehander42> what do you think of clojure (if you have tried it) |
18:36:14 | * | zachk joined #nim |
18:43:46 | krux02 | ldlework, so most of your lisp experience is elip. |
18:45:02 | ldlework | krux02: and cl |
18:45:07 | * | wildlander joined #nim |
18:48:41 | * | druonysus joined #nim |
18:48:42 | * | druonysus quit (Changing host) |
18:48:42 | * | druonysus joined #nim |
18:51:41 | * | rockcavera joined #nim |
18:59:24 | krux02 | I never wrote cl, but there is a lot of cl-xxx macros in elisp |
18:59:47 | krux02 | seems like a lot of emacs people want elisp to be more like cl |
19:00:22 | krux02 | ldlework: I wonder, are there some el-xxx macros in common lisp, to make it more like emacs lisp? |
19:04:45 | FromGitter | <timotheecour> any one with commit access here? |
19:06:01 | * | qwertfisch is now known as qwertforelle |
19:08:54 | * | zachk quit (Changing host) |
19:08:54 | * | zachk joined #nim |
19:08:57 | * | stefanos82 quit (Quit: Quitting for now...) |
19:09:49 | * | Zord20 joined #nim |
19:13:51 | * | Zord20 quit (K-Lined) |
19:23:37 | FromGitter | <bung87> https://github.com/serverdensity/python-daemon/blob/master/daemon.py#L113 I'm porting a python package but dont know why he change `daemon_alive` to false next to exit() |
19:27:51 | * | krux02 quit (Remote host closed the connection) |
19:28:43 | * | krux02 joined #nim |
19:45:13 | * | Vladar joined #nim |
20:24:56 | * | Vladar quit (Remote host closed the connection) |
20:31:05 | FromGitter | <timotheecour> @araq thanks for merging the 2 PRs; how about these other 2: https://github.com/nim-lang/Nim/pull/8680 and https://github.com/nim-lang/Nim/pull/8682 ? |
20:49:50 | FromGitter | <Araq> see my remarks |
21:16:45 | FromGitter | <timotheecour> thanks, will fix 8682; regarding the `Space after the colon` thing: since nimpretty is not quite ready yet, how about a `nimpretty —safe` that does a safe subset of checks that can be safely run on code without messing it; ie, it wouldn’t deal with comment reflowing etc but at the very least could handle the `space after the colon` + other simple things |
21:20:29 | * | arecaceae quit (Remote host closed the connection) |
21:20:47 | * | arecaceae joined #nim |
21:28:10 | FromGitter | <Araq> that's far more work than making you type a space |
21:28:26 | FromGitter | <timotheecour> PR accepted? |
21:30:00 | FromGitter | <Araq> how so? the reviewer still need to review every line in the patch |
21:31:06 | FromGitter | <timotheecour> of course; but it will save a lot of back and forth time ; eg when a PR is only halted because of style nits that would’ve been caught byt `nimpretty —safe` |
21:33:36 | FromGitter | <Araq> needs a serious cost-benefit analysis based on the percentage of PRs that are only halted because of style nitpicks |
21:37:34 | FromGitter | <timotheecour> here’s one non-quantitative data point: at google, when this was introduced (via `clang-format —style=google`), it saved a lot of time on reviews |
21:44:35 | * | qwertforelle is now known as qwertfisch |
21:48:03 | FromGitter | <Araq> yeah I can imagine, but Nim is not Google and yet I bet nobody at G did a cost-benefit analysis for the `-style=google` feature |
21:48:37 | FromGitter | <timotheecour> (unrelated: PTAL on https://github.com/nim-lang/Nim/pull/8682 ; addressed all ur comments) |
21:48:45 | FromGitter | <Araq> because frankly, programmers are downright terrible at this and programmers turn into managers etc ;-) |
21:50:09 | FromGitter | <kayabaNerve> Everyone competent will be promoted until they are no longer competent, meaning the highest jobs in society will be filled with incompetent workers. |
21:50:29 | FromGitter | <kayabaNerve> --Some law I paraphrased and probably butchered the wording of. |
21:50:51 | FromGitter | <timotheecour> everyone gets promoted to their highest level of incompetence ; lol |
21:51:59 | FromGitter | <kayabaNerve> https://en.wikipedia.org/wiki/Peter_principle |
21:52:01 | FromGitter | <kayabaNerve> Found it. |
21:52:34 | FromGitter | <kayabaNerve> The idea is that once they become incompetent, they are no longer promoted, but they're not demoted back. |
21:52:56 | FromGitter | <kayabaNerve> So not really their highest level of incompetence; more their level of incompetence. |
21:59:51 | FromGitter | <mratsim> @Araq, I think that’s mostly a problem in Europe, at least it is in France: the only way to progress in your career is to become a team lead then manager then director and managing people is completely different from managing machines |
22:00:05 | FromGitter | <mratsim> and some jut don’t want to deal with people |
22:00:53 | FromGitter | <mratsim> thankfully that’s changing in startups and you get an expert track and a management track with the similar pay and recognition |
22:02:44 | FromGitter | <mratsim> Also Luke and Timothee, due to labor law and firing being super difficult, in big French company you also have what is dubbed the “closet promotion”. If you’re doing nothing or even preventing things from working as it should, instead of firing you, the company will promote you in the middle of nowhere where you harmless. Why promotion? because otherwise you wouldn’t accept. >_> |
22:12:35 | * | kapil___ quit (Quit: Connection closed for inactivity) |
22:16:24 | * | brainproxy quit (Quit: WeeChat 2.2) |
22:21:47 | FromGitter | <timotheecour> yup, I’m all too familiar with that aspect in France.. I thought it improved quite a bit though ? |
22:23:12 | * | leorize quit (Ping timeout: 252 seconds) |
22:30:36 | * | rockcavera quit (Remote host closed the connection) |
22:32:30 | * | Ben648 joined #nim |
22:34:35 | * | nsf joined #nim |
22:36:49 | * | Ben648 quit (Remote host closed the connection) |
22:54:33 | * | krux02 quit (Remote host closed the connection) |
23:13:54 | * | nsf quit (Quit: WeeChat 2.2) |
23:20:49 | FromGitter | <timotheecour> is there a commonly accepted term for proc|template|func|macro (and maybe iterator) ? is that `routine` ? |
23:54:41 | FromGitter | <data-man> "My routine returns the strange result..." ⏎ "What you mean? The proc? The func? The macro?" ⏎ "No! The template!" |
23:55:22 | FromGitter | <timotheecour> what I meant is in a context where it would apply to any of these |
23:56:42 | FromGitter | <data-man> As in D? :-D |
23:57:12 | FromGitter | <timotheecour> sorry I don’t see how D is related. |