00:05:59 | * | onionhammer joined #nim |
00:11:48 | Araq | if you don't read the sparse documentation, why should I add more? |
00:12:44 | Araq | it's immediately obvious how patchFile works, you put it in your NimScript configuration aka config.nims or $project.nims |
00:13:04 | FromGitter | <martinium> @def-pri-pub nice lib |
00:13:41 | Araq | a recursive grep for 'patchFile' in tests/ also reveals that. |
00:14:57 | FromGitter | <martinium> @Araq I formatted some JSON data as strings and the floats don’t print. When I try to use getFNum on them instead of getStr they are blank ⏎ ⏎ ```Symbol: TSLA Exchange: NASDAQ Name: Tesla Motors Inc %Chng: High: Low: Volume: Close:``` [https://gitter.im/nim-lang/Nim?at=5866f8809d4cc4fc535c8cb8] |
00:15:00 | FromGitter | <martinium> thats an example |
00:15:06 | FromGitter | <martinium> number fields are blank |
00:16:10 | Araq | that's an example, but not JSON. |
00:16:31 | FromGitter | <martinium> I’m printing the json to those identifiers |
00:16:31 | Araq | and you shouldn't use -d:release for testing |
00:17:58 | dom96 | Araq: I did read it. Others did as well and had to guess how it works. |
00:18:28 | Araq | others managed to figure it out on their own. |
00:19:00 | Araq | I don't even know what to write more. The context is NimScript. |
00:19:46 | Araq | I could copy&paste the general paragraphs about NimScript to every NimScript related proc. |
00:20:03 | dom96 | You need to write about what this solves. You see yourself that nobody knows that they should be using this mechanism. |
00:20:48 | * | Calinou quit (Remote host closed the connection) |
00:22:00 | dom96 | martinium: we need to see your code to help |
00:23:30 | FromGitter | <martinium> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5866fa827a3f79ef5dbc5fe7] |
00:24:33 | Araq | it solves the problem of having to patch /override a file in the stdlib or some other nimble package. |
00:26:37 | dom96 | it indirectly solves the problem of extensibility |
00:27:00 | dom96 | and you complained that people don't know that they should be using patchFile to solve that problem |
00:27:07 | dom96 | how are they supposed to know? |
00:27:43 | Araq | there is a difference between not knowing about patchFile's existance |
00:27:50 | Araq | and being unable to read its docs. |
00:28:06 | Araq | I complained about the first issue, you complain about the second. |
00:28:22 | * | Calinou joined #nim |
00:28:32 | dom96 | I complained that there is no docs that explain how to solve the problem of extensibility |
00:30:04 | dom96 | martinium: can you gist that? I can't copy it from gitter without it messing up the newlines. |
00:30:12 | FromGitter | <martinium> yeah 1 sec |
00:31:15 | Araq | it doesn't solve the problem of extensibility, but it mitigates the problem of "omg the stdlib is shit" |
00:31:58 | Araq | and *IMHO* a simple stdlib that can be patched is something we can promise for v1 |
00:32:36 | Araq | contrast this with a fullblown times.nim module that tries to provide everything that Java's stdlib provides |
00:32:49 | FromGitter | <martinium> @dom96 https://gist.github.com/martinium/17607f816101d1840b1baafb5348d092 |
00:34:25 | dom96 | martinium: argh, I need an API key D: |
00:34:31 | dom96 | What JSON does this web service return? |
00:34:42 | Araq | lowPrice = data["low"].getFNum perhaps? |
00:35:07 | FromGitter | <martinium> I tried .getFNum |
00:35:07 | Araq | then lowPrice is a float, tunr it to a string via $ |
00:35:10 | FromGitter | <martinium> didn’t work |
00:35:19 | Araq | getNum then? |
00:35:23 | FromGitter | <martinium> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5866fd4b9e6f00e74add50f3] |
00:35:24 | Araq | is it a float? |
00:35:28 | Araq | is it an int? |
00:35:33 | FromGitter | <martinium> it’s a float |
00:35:46 | dom96 | Araq: I disagree. ``patchFile`` seems like a hack that will require people to rewrite their libraries in the future once we support the proper extensibility features, whatever those will be. |
00:35:46 | FromGitter | <martinium> that’s why I tried .getFNum |
00:36:02 | Araq | dom96: yeah I know, that's why I said IMHO. |
00:36:23 | Araq | your opinion is ofc we can delay v1 for 10 more years |
00:36:40 | dom96 | no, it's not. |
00:37:07 | dom96 | I'd just rather be honest upfront about the situation. |
00:37:42 | dom96 | IIRC you made it seem like patchFile was the final solution |
00:38:07 | dom96 | it's fine if it's not, but mention that |
00:38:16 | FromGitter | <martinium> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5866fdf8c895451b753b6487] |
00:38:40 | Araq | maybe the numbers are integers and our json is too picky? |
00:38:56 | dom96 | martinium: paste your code again |
00:39:37 | dom96 | martinium: here is what you should be doing: data["high"].getFNum() |
00:40:00 | Araq | don't use .getStr on float values |
00:40:01 | dom96 | then echo("High", data["high"].getFNum()) |
00:40:45 | dom96 | If you really need to concatenate the result with a string literal then you should write: "High: " & data["high"].getFNum() |
00:41:07 | dom96 | But this isn't necessary for echo, as long as you pass separate arguments |
00:41:18 | Araq | "High: " & $data["high"].getFNum() |
00:42:41 | dom96 | yes, I missed the crucial `$` |
00:45:15 | FromGitter | <martinium> what does the sigil do? |
00:45:18 | FromGitter | <martinium> $ |
00:45:54 | dom96 | It's the "to string" operator |
00:46:22 | FromGitter | <martinium> nice |
00:46:28 | FromGitter | <martinium> that is very convenient |
00:46:46 | FromGitter | <martinium> love this language more and more each time I use it |
00:47:06 | dom96 | :) |
00:47:29 | FromGitter | <martinium> I was going to hunker down and learn C |
00:47:32 | FromGitter | <martinium> then found this lang |
00:50:06 | FromGitter | <martinium> excellent guys |
00:50:10 | FromGitter | <martinium> that solved my issue |
00:50:13 | FromGitter | <martinium> thanks a bunch |
00:50:46 | FromGitter | <martinium> got this output for GOOG now |
00:50:47 | FromGitter | <martinium> Symbol: GOOG Exchange: NASDAQ Name: Alphabet Class C %Chng: High: 782.78 Low: 770.41 Volume: 1769900.0 Close: 771.8200000000001 |
00:50:52 | FromGitter | <martinium> Perfect |
00:52:07 | dom96 | also, you might want to consider using the `%` operator. echo("Symbol: $1 Exchange: $2 ..." % [symbol, exchange]) |
00:52:19 | dom96 | (you need to import strutils for it) |
00:53:49 | FromGitter | <martinium> I saw that one earlier in the docs but don’t remember what it does |
00:53:58 | FromGitter | <martinium> this lang seems to have very useful operators |
00:54:06 | FromGitter | <martinium> @Araq did you study at MIT? |
00:54:28 | FromGitter | <martinium> or were you a professional programmer that wanted to fix the two language problem? |
00:55:18 | Araq | I'm just some random nerd with social problems |
00:55:40 | FromGitter | <martinium> @Araq aren’t we all ;-) |
01:01:27 | FromGitter | <martinium> anyways, thanks to your help I was able to get this working with proper formatting (the way I wanted) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=586703679e6f00e74add6840] |
01:01:56 | FromGitter | <martinium> thats output from this program |
01:02:28 | dom96 | looks nice :) |
01:02:57 | FromGitter | <martinium> my first useful utility |
01:03:53 | FromGitter | <martinium> with this lang I was able to learn how to query REST API and manipulate JSON data(with you guys help :-) ) this week. |
01:04:41 | FromGitter | <martinium> persistence paid off and the fact that the syntax is so approachable. The fundamentals I’ve learned all have carried over nicely |
01:05:15 | FromGitter | <martinium> @dom96 I am going to buy your book it covers quite a bit of these topics |
01:05:33 | dom96 | martinium: yay, thanks :) |
01:05:57 | Araq | yeah the book is excellent. |
01:06:10 | Araq | covers everything that's important in the real world. |
01:06:17 | FromGitter | <martinium> my hopes and from the looks of it is that you can use this one language for pretty much everything |
01:06:35 | dom96 | good night |
01:06:41 | FromGitter | <martinium> yes exactly, for the things important in the real world |
01:07:04 | FromGitter | <martinium> @dom96 good night |
01:07:16 | Araq | I read it and wanted to create this twitter clone right away and make money with it :-) |
01:07:31 | FromGitter | <martinium> haha nice |
01:07:55 | FromGitter | <martinium> One of my projects I intend to work on next is a twitter bot as a matter of fact |
01:08:26 | FromGitter | <martinium> someone already made a nim lib for twitter |
01:10:55 | FromGitter | <martinium> I have to learn more of the language and websockets etc |
01:10:57 | FromGitter | <martinium> :) |
01:18:43 | * | devted quit (Read error: Connection reset by peer) |
01:18:57 | * | cheatfate joined #nim |
01:34:59 | * | dddddd quit (Read error: Connection reset by peer) |
01:50:35 | * | nsf quit (Quit: WeeChat 1.6) |
02:29:57 | * | cheatfate quit (Ping timeout: 258 seconds) |
02:40:45 | * | martinium joined #nim |
02:40:47 | * | martinium quit (Changing host) |
02:40:47 | * | martinium joined #nim |
02:48:37 | * | chemist69 quit (Ping timeout: 260 seconds) |
03:01:21 | * | chemist69 joined #nim |
03:06:10 | * | cheatfate joined #nim |
03:28:48 | * | martinium quit (Ping timeout: 245 seconds) |
03:33:00 | * | ftsf joined #nim |
04:08:02 | * | bjz joined #nim |
04:09:20 | * | bjz_ quit (Ping timeout: 256 seconds) |
04:13:43 | * | kulelu88 quit (Quit: Leaving) |
04:17:04 | * | cheatfate quit (Ping timeout: 265 seconds) |
04:38:33 | * | bjz quit (Ping timeout: 246 seconds) |
04:38:58 | * | bjz_ joined #nim |
05:20:26 | * | brson quit (Quit: leaving) |
05:37:34 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:54:17 | * | bjz joined #nim |
06:33:14 | * | Vladar joined #nim |
06:44:17 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
06:52:33 | * | chemist69 quit (Ping timeout: 245 seconds) |
06:57:05 | * | chemist69 joined #nim |
07:04:21 | * | rokups joined #nim |
07:10:07 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:32:25 | * | def-pri-pub quit (Quit: leaving) |
07:36:36 | * | bjz joined #nim |
07:46:55 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:53:44 | * | nsf joined #nim |
08:01:05 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:06:49 | * | bjz joined #nim |
08:07:58 | * | bjz quit (Client Quit) |
08:16:14 | * | bjz joined #nim |
08:19:43 | * | yglukhov joined #nim |
08:42:50 | * | jinshil joined #nim |
08:43:59 | * | byte512 joined #nim |
08:49:51 | * | irrequietus joined #nim |
08:59:49 | * | Trustable joined #nim |
09:01:18 | * | chemist69 quit (Ping timeout: 245 seconds) |
09:03:50 | * | chemist69 joined #nim |
09:27:18 | * | azur_kind joined #nim |
10:08:47 | * | Matthias247 joined #nim |
10:56:48 | * | confundus joined #nim |
11:06:23 | * | confundus quit (Quit: leaving) |
11:15:07 | * | azur_kind quit (Read error: Connection reset by peer) |
11:33:52 | * | yglukhov quit (Remote host closed the connection) |
11:45:24 | * | ftsf quit (Quit: Leaving) |
11:48:26 | * | nsf quit (Quit: WeeChat 1.6) |
12:04:36 | * | Snircle joined #nim |
12:12:40 | * | vlad1777d joined #nim |
12:20:29 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
12:34:22 | * | yglukhov joined #nim |
12:38:38 | * | yglukhov quit (Ping timeout: 252 seconds) |
12:44:18 | * | couven92 joined #nim |
12:46:58 | * | Kingsquee joined #nim |
12:57:41 | * | couven92 quit (Ping timeout: 248 seconds) |
13:11:47 | * | jinshil quit (Quit: client terminated!) |
13:31:44 | * | bjz joined #nim |
13:33:48 | * | Ven quit (Ping timeout: 245 seconds) |
13:37:37 | * | Ven joined #nim |
13:54:00 | * | dddddd joined #nim |
14:30:05 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:31:36 | * | Trustable quit (Remote host closed the connection) |
14:36:21 | * | yglukhov joined #nim |
14:40:44 | * | yglukhov quit (Ping timeout: 252 seconds) |
14:41:03 | * | boop quit (Ping timeout: 268 seconds) |
14:42:16 | * | boop joined #nim |
15:55:59 | * | vlad1777d quit (Remote host closed the connection) |
16:06:00 | FromGitter | <zacharycarter> o/ |
16:06:26 | FromGitter | <zacharycarter> I'm running into an issue with c2nim, specifically with - https://gcc.gnu.org/onlinedocs/cpp/Stringification.html |
16:07:02 | FromGitter | <zacharycarter> is there a way to replace '#' preprocessing operator with something c2nim can handle? |
16:07:54 | Araq | dunno, but running a C preprocessor over the source before handing it to c2nim can help |
16:08:24 | FromGitter | <zacharycarter> alright - I'll try to figure out how to do that thank you |
16:17:07 | FromGitter | <zacharycarter> Araq: that may have worked, it got nim to compile I'll try to create a test and see what happens, thank you |
16:28:48 | * | chamar joined #nim |
16:29:33 | * | dddddd quit (Remote host closed the connection) |
16:43:00 | * | byte512 quit (Ping timeout: 256 seconds) |
17:00:08 | * | arnetheduck quit (Ping timeout: 258 seconds) |
17:04:29 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
17:18:03 | * | Matthias247 quit (Read error: Connection reset by peer) |
17:19:33 | * | nsf joined #nim |
17:22:00 | dom96 | Looks like Crystal is getting better and better at marketing https://twitter.com/CrystalLanguage/status/815201597588434946 |
17:29:24 | * | kunev quit (Ping timeout: 250 seconds) |
17:30:34 | * | kunev joined #nim |
17:50:34 | * | yglukhov joined #nim |
17:56:45 | * | martinium joined #nim |
17:59:35 | federico3 | :( |
18:02:37 | * | bjz joined #nim |
18:08:53 | * | odc joined #nim |
18:13:50 | * | Ven quit (Ping timeout: 264 seconds) |
18:18:47 | * | Ven joined #nim |
18:24:11 | * | vlad1777d joined #nim |
18:26:34 | * | space-wizard joined #nim |
18:30:51 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
19:09:00 | * | yglukhov quit (Remote host closed the connection) |
19:16:00 | * | yglukhov joined #nim |
19:21:38 | * | nsf quit (Quit: WeeChat 1.6) |
19:21:40 | * | Ven quit (Ping timeout: 256 seconds) |
19:28:55 | * | def-pri-pub joined #nim |
19:29:21 | * | Kingsquee joined #nim |
19:33:53 | * | Ven joined #nim |
19:45:51 | * | martinium quit (Quit: WeeChat 1.5) |
19:51:42 | * | Ven quit (Ping timeout: 256 seconds) |
19:53:47 | * | Ven joined #nim |
20:00:54 | * | dddddd joined #nim |
20:07:23 | * | planhths joined #nim |
20:07:25 | * | Ven quit (Ping timeout: 260 seconds) |
20:08:20 | * | dmi0 joined #nim |
20:13:45 | * | Ven joined #nim |
20:20:50 | * | Ven quit (Ping timeout: 268 seconds) |
20:32:05 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
20:33:17 | * | dmi00 joined #nim |
20:34:04 | * | Ven joined #nim |
20:35:48 | * | dmi0 quit (Ping timeout: 246 seconds) |
20:38:48 | * | dmi0 joined #nim |
20:39:00 | * | dmi00 quit (Ping timeout: 258 seconds) |
20:41:59 | * | rokups quit (Quit: Connection closed for inactivity) |
20:51:46 | * | Ven quit (Ping timeout: 256 seconds) |
20:53:58 | * | Ven joined #nim |
21:07:37 | * | Ven quit (Ping timeout: 260 seconds) |
21:13:35 | * | Ven joined #nim |
21:16:51 | * | yglukhov quit (Remote host closed the connection) |
21:18:44 | * | bjz joined #nim |
21:22:42 | * | Ven quit (Ping timeout: 265 seconds) |
21:51:12 | * | vlad1777d quit (Remote host closed the connection) |
21:53:23 | * | Ven joined #nim |
22:04:26 | * | planhths quit (Ping timeout: 268 seconds) |
22:05:29 | * | planhths joined #nim |
22:07:11 | * | Ven quit (Ping timeout: 258 seconds) |
22:13:17 | * | Ven joined #nim |
22:18:55 | * | cheatfate joined #nim |
22:21:30 | * | Ven quit (Ping timeout: 246 seconds) |
22:24:10 | * | Vladar quit (Remote host closed the connection) |
22:25:24 | * | cheatfate quit (Ping timeout: 268 seconds) |
22:33:43 | * | Ven joined #nim |
22:34:23 | * | Ven quit (Read error: Connection reset by peer) |
22:47:33 | * | bjz quit (Ping timeout: 248 seconds) |
22:49:43 | * | bjz joined #nim |
22:53:03 | * | Ven joined #nim |
23:06:13 | * | planhths quit (Ping timeout: 248 seconds) |
23:07:06 | * | Ven quit (Ping timeout: 265 seconds) |
23:13:05 | * | Ven joined #nim |
23:16:13 | Araq | HAPPY NEW YEAR! |
23:21:09 | * | Ven quit (Ping timeout: 258 seconds) |
23:24:38 | * | bjz quit (Ping timeout: 264 seconds) |
23:24:46 | * | bjz joined #nim |
23:31:16 | * | dmi0 quit (Quit: ~) |
23:32:22 | ofelas | Happy New Year |
23:32:58 | * | Ven joined #nim |
23:34:21 | * | Ven quit (Read error: Connection reset by peer) |
23:38:23 | * | planhths joined #nim |
23:39:41 | * | nsf joined #nim |
23:40:15 | planhths | Happy new year! |
23:41:27 | dom96 | Still 20 minutes to go for me :) |
23:49:57 | * | chemist69 quit (Ping timeout: 240 seconds) |
23:51:33 | Calinou | happy Nim year! |
23:52:52 | * | Ven joined #nim |
23:52:54 | * | chemist69 joined #nim |