<< 31-12-2016 >>

00:05:59*onionhammer joined #nim
00:11:48Araqif you don't read the sparse documentation, why should I add more?
00:12:44Araqit's immediately obvious how patchFile works, you put it in your NimScript configuration aka config.nims or $project.nims
00:13:04FromGitter<martinium> @def-pri-pub nice lib
00:13:41Araqa recursive grep for 'patchFile' in tests/ also reveals that.
00:14:57FromGitter<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:00FromGitter<martinium> thats an example
00:15:06FromGitter<martinium> number fields are blank
00:16:10Araqthat's an example, but not JSON.
00:16:31FromGitter<martinium> I’m printing the json to those identifiers
00:16:31Araqand you shouldn't use -d:release for testing
00:17:58dom96Araq: I did read it. Others did as well and had to guess how it works.
00:18:28Araqothers managed to figure it out on their own.
00:19:00AraqI don't even know what to write more. The context is NimScript.
00:19:46AraqI could copy&paste the general paragraphs about NimScript to every NimScript related proc.
00:20:03dom96You 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:00dom96martinium: we need to see your code to help
00:23:30FromGitter<martinium> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5866fa827a3f79ef5dbc5fe7]
00:24:33Araqit solves the problem of having to patch /override a file in the stdlib or some other nimble package.
00:26:37dom96it indirectly solves the problem of extensibility
00:27:00dom96and you complained that people don't know that they should be using patchFile to solve that problem
00:27:07dom96how are they supposed to know?
00:27:43Araqthere is a difference between not knowing about patchFile's existance
00:27:50Araqand being unable to read its docs.
00:28:06AraqI complained about the first issue, you complain about the second.
00:28:22*Calinou joined #nim
00:28:32dom96I complained that there is no docs that explain how to solve the problem of extensibility
00:30:04dom96martinium: can you gist that? I can't copy it from gitter without it messing up the newlines.
00:30:12FromGitter<martinium> yeah 1 sec
00:31:15Araqit doesn't solve the problem of extensibility, but it mitigates the problem of "omg the stdlib is shit"
00:31:58Araqand *IMHO* a simple stdlib that can be patched is something we can promise for v1
00:32:36Araqcontrast this with a fullblown times.nim module that tries to provide everything that Java's stdlib provides
00:32:49FromGitter<martinium> @dom96 https://gist.github.com/martinium/17607f816101d1840b1baafb5348d092
00:34:25dom96martinium: argh, I need an API key D:
00:34:31dom96What JSON does this web service return?
00:34:42Araq lowPrice = data["low"].getFNum perhaps?
00:35:07FromGitter<martinium> I tried .getFNum
00:35:07Araqthen lowPrice is a float, tunr it to a string via $
00:35:10FromGitter<martinium> didn’t work
00:35:19AraqgetNum then?
00:35:23FromGitter<martinium> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5866fd4b9e6f00e74add50f3]
00:35:24Araqis it a float?
00:35:28Araqis it an int?
00:35:33FromGitter<martinium> it’s a float
00:35:46dom96Araq: 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:46FromGitter<martinium> that’s why I tried .getFNum
00:36:02Araqdom96: yeah I know, that's why I said IMHO.
00:36:23Araqyour opinion is ofc we can delay v1 for 10 more years
00:36:40dom96no, it's not.
00:37:07dom96I'd just rather be honest upfront about the situation.
00:37:42dom96IIRC you made it seem like patchFile was the final solution
00:38:07dom96it's fine if it's not, but mention that
00:38:16FromGitter<martinium> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5866fdf8c895451b753b6487]
00:38:40Araqmaybe the numbers are integers and our json is too picky?
00:38:56dom96martinium: paste your code again
00:39:37dom96martinium: here is what you should be doing: data["high"].getFNum()
00:40:00Araqdon't use .getStr on float values
00:40:01dom96then echo("High", data["high"].getFNum())
00:40:45dom96If you really need to concatenate the result with a string literal then you should write: "High: " & data["high"].getFNum()
00:41:07dom96But this isn't necessary for echo, as long as you pass separate arguments
00:41:18Araq"High: " & $data["high"].getFNum()
00:42:41dom96yes, I missed the crucial `$`
00:45:15FromGitter<martinium> what does the sigil do?
00:45:18FromGitter<martinium> $
00:45:54dom96It's the "to string" operator
00:46:22FromGitter<martinium> nice
00:46:28FromGitter<martinium> that is very convenient
00:46:46FromGitter<martinium> love this language more and more each time I use it
00:47:06dom96:)
00:47:29FromGitter<martinium> I was going to hunker down and learn C
00:47:32FromGitter<martinium> then found this lang
00:50:06FromGitter<martinium> excellent guys
00:50:10FromGitter<martinium> that solved my issue
00:50:13FromGitter<martinium> thanks a bunch
00:50:46FromGitter<martinium> got this output for GOOG now
00:50:47FromGitter<martinium> Symbol: GOOG Exchange: NASDAQ Name: Alphabet Class C %Chng: High: 782.78 Low: 770.41 Volume: 1769900.0 Close: 771.8200000000001
00:50:52FromGitter<martinium> Perfect
00:52:07dom96also, you might want to consider using the `%` operator. echo("Symbol: $1 Exchange: $2 ..." % [symbol, exchange])
00:52:19dom96(you need to import strutils for it)
00:53:49FromGitter<martinium> I saw that one earlier in the docs but don’t remember what it does
00:53:58FromGitter<martinium> this lang seems to have very useful operators
00:54:06FromGitter<martinium> @Araq did you study at MIT?
00:54:28FromGitter<martinium> or were you a professional programmer that wanted to fix the two language problem?
00:55:18AraqI'm just some random nerd with social problems
00:55:40FromGitter<martinium> @Araq aren’t we all ;-)
01:01:27FromGitter<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:56FromGitter<martinium> thats output from this program
01:02:28dom96looks nice :)
01:02:57FromGitter<martinium> my first useful utility
01:03:53FromGitter<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:41FromGitter<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:15FromGitter<martinium> @dom96 I am going to buy your book it covers quite a bit of these topics
01:05:33dom96martinium: yay, thanks :)
01:05:57Araqyeah the book is excellent.
01:06:10Araqcovers everything that's important in the real world.
01:06:17FromGitter<martinium> my hopes and from the looks of it is that you can use this one language for pretty much everything
01:06:35dom96good night
01:06:41FromGitter<martinium> yes exactly, for the things important in the real world
01:07:04FromGitter<martinium> @dom96 good night
01:07:16AraqI read it and wanted to create this twitter clone right away and make money with it :-)
01:07:31FromGitter<martinium> haha nice
01:07:55FromGitter<martinium> One of my projects I intend to work on next is a twitter bot as a matter of fact
01:08:26FromGitter<martinium> someone already made a nim lib for twitter
01:10:55FromGitter<martinium> I have to learn more of the language and websockets etc
01:10:57FromGitter<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:00FromGitter<zacharycarter> o/
16:06:26FromGitter<zacharycarter> I'm running into an issue with c2nim, specifically with - https://gcc.gnu.org/onlinedocs/cpp/Stringification.html
16:07:02FromGitter<zacharycarter> is there a way to replace '#' preprocessing operator with something c2nim can handle?
16:07:54Araqdunno, but running a C preprocessor over the source before handing it to c2nim can help
16:08:24FromGitter<zacharycarter> alright - I'll try to figure out how to do that thank you
16:17:07FromGitter<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:00dom96Looks 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:35federico3:(
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:13AraqHAPPY 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:22ofelasHappy 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:15planhthsHappy new year!
23:41:27dom96Still 20 minutes to go for me :)
23:49:57*chemist69 quit (Ping timeout: 240 seconds)
23:51:33Calinouhappy Nim year!
23:52:52*Ven joined #nim
23:52:54*chemist69 joined #nim