00:23:10 | * | chemist69 quit (Ping timeout: 264 seconds) |
00:23:33 | * | chemist69 joined #nim |
00:51:23 | FromGitter | <zacharycarter> just finished blocking out the low poly |
00:51:25 | FromGitter | <zacharycarter> https://imgur.com/a/z8dHJ |
00:54:28 | * | ftsf joined #nim |
01:04:24 | * | couven92 quit (Quit: Client Disconnecting) |
01:04:48 | * | Pisuke joined #nim |
01:07:16 | * | MyMind quit (Ping timeout: 255 seconds) |
01:23:25 | FromGitter | <zacharycarter> would love any / all feedback so far |
01:36:15 | * | vlad1777d quit (Quit: Leaving) |
01:36:31 | * | yglukhov joined #nim |
01:37:53 | * | kunev quit (Ping timeout: 255 seconds) |
01:38:15 | * | kunev joined #nim |
01:38:41 | * | chemist69 quit (Disconnected by services) |
01:38:46 | * | chemist69_ joined #nim |
01:41:01 | * | yglukhov quit (Ping timeout: 255 seconds) |
01:57:21 | * | ipjk quit (Ping timeout: 248 seconds) |
02:08:05 | * | dddddd quit (Remote host closed the connection) |
02:25:08 | * | smt` quit (Ping timeout: 255 seconds) |
02:58:38 | * | libman quit (Quit: Connection closed for inactivity) |
03:16:20 | * | endragor joined #nim |
03:38:33 | * | yglukhov joined #nim |
03:42:57 | * | yglukhov quit (Ping timeout: 248 seconds) |
03:49:55 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:18:05 | * | UxerUospr quit (Ping timeout: 240 seconds) |
04:37:40 | * | rauss quit (Read error: Connection reset by peer) |
04:40:21 | * | rauss joined #nim |
04:43:03 | * | rauss quit (Client Quit) |
04:43:54 | * | rauss joined #nim |
05:03:50 | FromGitter | <Bennyelg> Looks fantastic |
05:04:02 | FromGitter | <Bennyelg> are you in the right profession :P ? |
05:08:00 | * | Yardanico joined #nim |
05:12:11 | * | Yardanico quit (Remote host closed the connection) |
05:13:50 | FromGitter | <Bennyelg> https://nim-lang.org/docs/manual.html#types-auto-type ⏎ Auto type ⏎ The auto type can only be used for return types and parameters. For return types it causes the compiler to infer the type from the routine body: ⏎ ⏎ I didn't get this type right, the compiler try to fetch the returnType from the proc name? [https://gitter.im/nim-lang/Nim?at=59e4400ef7299e8f53f0fd00] |
05:41:21 | * | yglukhov joined #nim |
05:45:37 | * | yglukhov quit (Ping timeout: 248 seconds) |
05:54:14 | FromGitter | <Bennyelg> Another Q: ⏎ Why writing i.e proc x[T: SomeSignedInt] ⏎ And not just x ().. |
05:58:32 | FromGitter | <zacharycarter> thank you @Bennyelg ! |
06:07:32 | * | Laon joined #nim |
06:24:53 | * | Syneh_ quit (Ping timeout: 255 seconds) |
06:24:58 | * | odc quit (Ping timeout: 264 seconds) |
06:26:34 | * | Syneh_ joined #nim |
06:30:19 | * | nsf joined #nim |
06:31:47 | FromGitter | <mratsim> looks gorgeous @zacharycarter |
06:38:08 | * | PMunch joined #nim |
06:40:41 | * | Arrrr joined #nim |
06:40:41 | * | Arrrr quit (Changing host) |
06:40:41 | * | Arrrr joined #nim |
06:51:10 | FromGitter | <zacharycarter> thank you @mratsim ! |
06:52:40 | PMunch | Aha, I think I've figured out the problem I had with the JS/Karax version of the layout engine |
06:52:52 | Arrrr | I hope this nim pretty is not enforced upon us |
06:54:04 | PMunch | Since Karax has the renderer procedure thing it meant that the code to generate the layout was placed within a function. This won't work since it can't do compile-time procedure calls within a regular function call |
06:59:51 | PMunch | Arrrr, I think it will be a separate tool |
07:00:19 | PMunch | But it might be that all commits to the compiler and/or stdlib will have to be formatted by it |
07:07:18 | * | gokr joined #nim |
07:19:54 | * | claudiuinberlin joined #nim |
07:25:49 | Araq | PMunch: maybe. I don't really believe in these things though and will likely not use nimpretty myself |
07:27:12 | Araq | it's a tradeoff here between forcing yet another rule on co-developers vs learning to deal with minor style differences, something which human brains are actaully superb at |
07:27:42 | Araq | programmers love to pretend they are foolish machines though, can't help them |
07:29:03 | PMunch | Problem is if someone writes a plug-in for e.g. VS Code that auto-styles Nim code and then someone who has auto-styled their code is doing a pull request and the diff message is all over the place |
07:29:09 | Araq | anyway this tradeoff never saw a serious cost/benefit analysis and so it remains superstition or conjecture |
07:29:38 | * | Sembei joined #nim |
07:30:16 | PMunch | Then you would have to force developers to not use the tool you have written to create pretty Nim code for anything that goes into the main repo. |
07:31:05 | * | Pisuke quit (Ping timeout: 240 seconds) |
07:31:38 | Araq | http://www.foxnews.com/story/2009/03/31/if-can-raed-tihs-msut-be-raelly-smrat.html this would be an impossibility |
07:33:35 | PMunch | git diff is unfortunately not that smart |
07:34:06 | PMunch | I'm not worried about the people reading or writing their code |
07:34:36 | Araq | git diff is always a good argument in favour of not changing anything |
07:36:37 | Arrrr | haha |
07:36:53 | PMunch | -_- |
07:39:51 | Arrrr | I have update my compiler to devel. For some reason, `include one/two.nim` is interpreted as `include one/two/nim` |
07:40:24 | PMunch | Don't you need quotes when using paths as imports? |
07:40:41 | Arrrr | The first time i hear this |
07:41:04 | PMunch | Or maybe that was just for "../something" imports |
07:45:33 | Arrrr | This seems to be the only breaking change, for now. |
07:52:55 | Araq | Arrrr: oh interesting |
07:53:09 | Araq | I thought this logic wasn't changed |
07:58:51 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:02:22 | * | claudiuinberlin joined #nim |
08:02:51 | * | Vladar joined #nim |
08:03:58 | * | yglukhov joined #nim |
08:08:01 | * | yglukhov quit (Ping timeout: 240 seconds) |
08:13:53 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:14:23 | PMunch | Updated the new genui project now. Layouts are working fine |
08:16:06 | Araq | which software do you use to cut videos? |
08:16:17 | * | yglukhov joined #nim |
08:16:25 | PMunch | I've used kdenlive before, pretty solid tool |
08:17:49 | SunDwarf | my two cents, every time ive used kdenlive it shat out a choppy 24-fps x264 file no matter what preset or settings i tried |
08:18:17 | PMunch | Huh, never had that problem myself |
08:21:47 | FromGitter | <mratsim> I use Avidemux to cut video if it's just cutting (not moving part before/after/fading) |
08:22:24 | * | odc joined #nim |
08:22:41 | FromGitter | <mratsim> If I want to process a video like a (Python) program and assign part of a video to a variable I use Vapoursynth, you can directly feed it to x264 |
08:22:59 | FromGitter | <mratsim> Sometimes Handbrake is useful for quick and dirty presets |
08:23:14 | FromGitter | <mratsim> Or command line ffmpeg |
08:24:30 | FromGitter | <mratsim> And to add subtitles and make sure they are in sync with the sound I use Aegisub |
08:32:30 | * | dddddd joined #nim |
08:36:17 | FromGitter | <Varriount> <3 Handbrake |
08:39:10 | * | couven92 joined #nim |
08:39:10 | * | fredrik92 joined #nim |
08:40:07 | * | fredrik92 quit (Client Quit) |
08:48:48 | * | claudiuinberlin joined #nim |
09:10:32 | PMunch | couven92, do you still have machines set up to use fredrik92? |
09:11:21 | couven92 | You mean in the TD-serverroom? |
09:11:50 | PMunch | No, you just logged in with both couven92 and fredrik92 before fredrik92 quit |
09:13:12 | couven92 | Ah! Sorry, yeah, I rebooted my machine and Windows remembered what applications I had running before turning off... Then I started HexChat myself when the machine was up and running again, and then Windows also relaunched HexChat itself... |
09:13:27 | couven92 | fredrik92 is my (first) alternate nick... |
09:13:39 | PMunch | Aah, that makes sense :P |
09:13:46 | couven92 | PMunch, you'll notice that both logged in from the same IP |
09:24:46 | dom96 | ooh, a storm heading towards Ireland. How fun. |
09:24:58 | dom96 | Uni classes cancelled woop woop |
09:25:09 | PMunch | Yeah I heard about that, pretty big one by the looks of it |
09:25:13 | PMunch | Lucky you :P |
09:25:47 | dom96 | Nowhere near as big as what hit the US/Caribbean |
09:27:51 | PMunch | Well they are known for having bigger storms |
09:33:47 | * | PMunch quit (Ping timeout: 252 seconds) |
09:33:54 | dom96 | Literally what Nim is https://twitter.com/d0m96/status/919857258191818752 |
09:34:13 | * | Vladar quit (Remote host closed the connection) |
09:36:37 | * | Vladar joined #nim |
09:39:04 | * | PMunch joined #nim |
09:39:31 | FromGitter | <mratsim> Hum Haskell is not simple, though I really like the language |
09:40:37 | FromGitter | <mratsim> Especially currying/function composition |
10:09:12 | FromGitter | <mratsim> Someone suggested Crystal in the comments of my blog article. I found a linalg crystal library much like neo. List comprehension syntax in Crystal can probably be stolen: |
10:09:21 | FromGitter | <mratsim> ===or using block m = GMat32.new(3, 4) { |i, j| i*3 + j + 1 } # or using one of other ways, check "spec" directory=== |
10:23:24 | * | gokr left #nim (#nim) |
10:26:15 | * | user0__ quit (Quit: user0__) |
10:26:30 | * | user0__ joined #nim |
10:26:31 | * | user0__ is now known as user0 |
10:30:46 | * | user0 quit (Client Quit) |
10:31:03 | * | user0 joined #nim |
10:38:14 | * | PMunch_ joined #nim |
10:38:31 | * | zolk3ri joined #nim |
10:40:24 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:41:05 | * | PMunch quit (Ping timeout: 248 seconds) |
10:41:56 | * | chemist69_ quit (Ping timeout: 255 seconds) |
10:42:18 | * | chemist69 joined #nim |
10:55:00 | * | Yardanico joined #nim |
10:59:32 | Yardanico | hi everyone! |
10:59:38 | * | yglukhov quit (Read error: Connection reset by peer) |
10:59:39 | Yardanico | Araq, is there a specific place for lambda tests? |
10:59:54 | * | yglukhov joined #nim |
10:59:55 | Yardanico | ah, it's closure |
11:01:04 | dom96 | mratsim: I discussed list comprehensions with Araq a while back, I think the plan is to allow for loops as expressions |
11:01:58 | * | Snircle joined #nim |
11:03:29 | dom96 | I don't see why Crystal would be faster in this case |
11:05:16 | Arrrr | for-loops as expressions? how would that work? |
11:05:50 | dom96 | var x = (for i in 0 .. 5: i) |
11:05:56 | crem | Are there recursive lambdas by any chance? |
11:06:09 | dom96 | (I'm guessing) |
11:06:44 | Yardanico | yeah, same as ifs and cases |
11:07:00 | FromGitter | <mratsim> @dom96 I replied to the Crystal comment: |
11:07:11 | FromGitter | <mratsim> > I would probably use Crystal if I didn't hear of Nim first actually. Both strike an excellent balance of ergonomics, flexibility and speed. The other language with those characteristics would be D. ⏎ ⏎ Regarding speed, I don't think Crystal would be faster if you cannot solve those questions: ⏎ ⏎ 1) How to insert OpenMP from Crystal ? ... [https://gitter.im/nim-lang/Nim?at=59e492de210ac26920f0a37e] |
11:07:17 | Arrrr | so x == 5? |
11:07:53 | FromGitter | <narimiran> test 1 2 |
11:08:28 | Yardanico | Arrrr, no, I think it should be @[0, 1, 2, 3, 5] |
11:08:44 | Yardanico | there wouldn't be any point in for-expression if it would return only last value |
11:08:52 | Arrrr | wtf |
11:08:53 | federico3 | "simple" list comprehensions don't seem to be much more useful than map(). Can you have multiple cycles? |
11:09:39 | Yardanico | oh, sorry |
11:09:55 | Yardanico | @[0, 1, 2, 3, 4, 5] |
11:10:05 | FromGitter | <mratsim> by the way @dom96, this breaks nimsuggest on my Cuda functions: ⏎ ⏎ ```when defined(cuda): ⏎ import ./tensor_cuda ⏎ export tensor_cuda``` ⏎ ⏎ Is there a way to tell nimsuggest to “define” some stuff in a repo for proper auto completion? ... [https://gitter.im/nim-lang/Nim?at=59e4938c32e080696ee763b8] |
11:10:25 | FromGitter | <Yardanico> yes |
11:10:28 | FromGitter | <Yardanico> edit your nim.cfg |
11:10:37 | FromGitter | <Yardanico> to define cuda |
11:10:45 | FromGitter | <Yardanico> it should probably work |
11:11:14 | FromGitter | <mratsim> @federico3 do you mean something like this? ⏎ ⏎ ```l = [[1,2,3],[4,5,6]] ⏎ flattened_l = [item for sublist in l for item in sublist]``` ⏎ ⏎ I find this unreadable [https://gitter.im/nim-lang/Nim?at=59e493d1177fb9fe7e84b9c0] |
11:12:00 | federico3 | yep |
11:12:04 | FromGitter | <narimiran> why unreadable? |
11:12:10 | FromGitter | <mratsim> I guess I will have to ship about 5 nim.cfg with Arraymancer (Cuda, OpenMP, Cuda+OpenMP, MKL, Cuda + MKL + OpenMP ….) |
11:12:49 | FromGitter | <mratsim> I would expect the outermost list on the right |
11:13:20 | crem | Generally list comprehention in python are readable, but one to flatten the nested list I always search in stackoverflow. |
11:13:29 | FromGitter | <mratsim> but here it’s [item for inner_list in outer_list for item in inner_list] |
11:13:39 | federico3 | mratsim: yes, the inversion is a bit confusing |
11:14:43 | FromGitter | <mratsim> Haha, I have an idea to get an Hacktoberfest shirt |
11:14:44 | FromGitter | <narimiran> @mratsim "I would expect the outermost list on the right" -> you read it from left to right like you would read it in multiline for loop: |
11:14:52 | Yardanico | mratsim: I already got it :) |
11:14:56 | FromGitter | <mratsim> A flatten for sequtils |
11:14:58 | Yardanico | I mean I completed 4 PRs |
11:15:04 | Yardanico | I didn't receive t-shirt yet |
11:15:19 | Yardanico | and guess what? all these 4 prs are for nim |
11:15:31 | FromGitter | <narimiran> ```for line in outer: ⏎ for char in line:``` [https://gitter.im/nim-lang/Nim?at=59e494d3f7299e8f53f2ab0c] |
11:15:59 | FromGitter | <narimiran> is the same as `[char for line in outer for char in line]` |
11:16:05 | FromGitter | <mratsim> actually you’re right, it’s easier ike this |
11:16:15 | * | user0 quit (Quit: user0) |
11:16:24 | federico3 | perhaps this would be more Nim-like: http://paste.debian.net/991022/ |
11:16:30 | * | user0 joined #nim |
11:16:31 | Yardanico | 1 for nim repo, 2 for vscode-nim, one for nimble |
11:18:14 | FromGitter | <narimiran> something like: `[x | x in 0 .. 10]`? |
11:18:49 | FromGitter | <mratsim> actually it’s possible via the `future`module with `lc[…]` |
11:20:12 | FromGitter | <narimiran> well then, we just need to make it regular part of the language :) |
11:20:46 | * | user0 quit (Client Quit) |
11:23:11 | * | user0 joined #nim |
11:24:48 | FromGitter | <Yardanico> Well no |
11:25:17 | FromGitter | <Yardanico> It's better when they're separated |
11:28:18 | FromGitter | <mratsim> lc[] is nice as a proof of concept but it’s too ugly for now :P |
11:28:52 | * | miran joined #nim |
11:30:07 | FromGitter | <mratsim> It at least needs a nice bracket/brace like syntaxt like `[. x | x in 0 .. 10 .]` or `{x | x in 0 .. 10}` |
11:31:04 | FromGitter | <mratsim> or just @[x | x in 0 .. 10] |
11:32:48 | FromGitter | <narimiran> the last one |
11:33:02 | FromGitter | <narimiran> @[ ... ] is in accordance to seq syntax |
11:33:36 | Yardanico | I think @[] wouldn't work without a language change |
11:33:55 | FromGitter | <narimiran> `x in 0 .. 10` is also familiar. combine those two and you get a sane synatax for comprehension |
11:34:45 | FromGitter | <mratsim> I think Nim might need a FAQ like Crystal’s, aka “Why doesn’t Nim do” https://github.com/crystal-lang/crystal/wiki/FAQ |
11:34:55 | miran | test 1 2 |
11:35:04 | miran | yeah, i'll switch here (from narimiran) |
11:35:30 | Yardanico | mratsim: there is |
11:35:47 | Yardanico | but it's not completed |
11:35:47 | Yardanico | https://github.com/nim-lang/Nim/wiki/Common-Criticisms |
11:35:52 | Yardanico | and https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ |
11:36:08 | Yardanico | second one |
11:36:23 | * | sleepyqt joined #nim |
11:38:18 | Yardanico | and crystal still doesn't have windows support :) |
11:38:34 | Yardanico | I think nim has windows support because Araq uses windows :P |
11:43:14 | * | PMunch_ is now known as PMunch |
11:44:46 | FromGitter | <mratsim> He was asking about profiling on MacOS 2 days ago :P |
11:45:12 | FromGitter | <mratsim> By the way Yardanico, I think the tag should be C++ Codegen, not codegen: https://github.com/nim-lang/Nim/issues/6512 |
11:45:26 | Yardanico | ah, sorry |
11:47:31 | * | vlad1777d joined #nim |
11:49:01 | * | claudiuinberlin joined #nim |
12:01:46 | * | JappleAck joined #nim |
12:02:19 | * | PMunch_ joined #nim |
12:03:40 | * | yglukhov quit (Remote host closed the connection) |
12:04:03 | * | yglukhov joined #nim |
12:04:57 | * | PMunch quit (Read error: Connection reset by peer) |
12:06:00 | * | PMunch joined #nim |
12:09:22 | * | PMunch_ quit (Ping timeout: 264 seconds) |
12:11:13 | PMunch | https://www.krackattacks.com/ |
12:11:18 | PMunch | Shit, this is not good |
12:14:31 | PMunch | Yardanico, the common criticism page should use the same type for OCaml and Nim to make it a bit easier to understand |
12:18:16 | crem | krackattacks is not THAT bad. |
12:19:05 | crem | Eavesdropper should be in the range of wifi network, and also most of traffic is encrypted anyway. |
12:19:12 | * | Ven joined #nim |
12:19:55 | * | Ven is now known as Guest23284 |
12:20:09 | PMunch | Still, voiding the security of WPA2 is pretty bad.. |
12:20:48 | PMunch | WPA2 really only offers security in the range of the WiFi network anyways, so the attack applies to wherever it could apply |
12:20:57 | dom96 | I find it difficult to remember the common questions |
12:21:08 | dom96 | If you guys have any that should be answered in the FAQ please let us know |
12:21:42 | crem | Also fixes for most devices will be released soon. |
12:22:11 | Yardanico | dom96, common question or misunderstanding - "translating" vs "compiling" |
12:22:16 | Yardanico | e.g. |
12:22:22 | Yardanico | "Is Nim transpiled to C?" |
12:22:25 | PMunch | crem, tell that to all the people that never updates their routers/phones.. |
12:22:40 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:22:49 | Yardanico | and maybe rename unofficial FAQ to FAQ? |
12:23:09 | * | ShalokShalom_ joined #nim |
12:23:09 | dom96 | No, we've got one here: https://nim-lang.org/faq.html |
12:25:57 | * | ShalokShalom quit (Ping timeout: 240 seconds) |
12:35:27 | * | arnetheduck quit (Ping timeout: 260 seconds) |
12:40:11 | * | claudiuinberlin joined #nim |
12:41:09 | federico3 | PMunch: wifi has been a mess since day 1 |
12:41:18 | * | Guest23284 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:43:33 | * | manjaro-kde5- joined #nim |
12:46:17 | * | Arrrr quit (Ping timeout: 252 seconds) |
12:51:26 | skrylar | PMunch, these things wouldn't be a problem if people didn't have a radio fetish |
12:51:55 | * | skrylar still hardlines things that can be hardlined, but sadly it can be hard to find jacks these days |
12:52:50 | * | NimBot joined #nim |
12:54:44 | Yardanico | how to get current time via NimBot ? :) easy |
12:54:53 | Yardanico | !eval echo CompileTime |
12:54:55 | NimBot | 12:54:53 |
12:56:29 | * | Ven joined #nim |
12:56:53 | * | Ven is now known as Guest98574 |
13:00:21 | Yardanico | Araq, where "crash" label should be generally added? in ALL issues where compiler crashes? |
13:00:56 | dom96 | yes |
13:01:06 | Araq | yes except for "I fooled Nim by setting .extern names that clash with other C identifiers" |
13:01:21 | Araq | Nim doesn't perform a linking step checking |
13:01:33 | Yardanico | okay |
13:01:42 | Araq | but I suppose these could just be closed as "won't fix" |
13:01:56 | * | yglukhov quit (Read error: Connection reset by peer) |
13:02:15 | * | yglukhov joined #nim |
13:02:37 | Yardanico | and "semcheck" for issues where there is a C compiler error, but nim compiler should prevent it? |
13:03:46 | Yardanico | or even if there's no C/Nim compiler error, but code is invalid |
13:04:22 | Araq | yeah |
13:05:39 | Yardanico | there's only 63 issues without labels now :) |
13:06:23 | * | Guest98574 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:10:49 | * | ipjk joined #nim |
13:11:07 | * | Arrrr joined #nim |
13:11:07 | * | Arrrr quit (Changing host) |
13:11:07 | * | Arrrr joined #nim |
13:12:21 | * | Laon quit (Ping timeout: 240 seconds) |
13:20:05 | FromGitter | <krux02> yay just fixed for an hour breaking changes in the Nim language |
13:20:09 | PMunch | federico3, skrylar yeah WiFi is a bit of a hack. I still use cable whenever I can, but phones and lap-tops are easier to use on WiFi (don't have cat5s to my couch). |
13:20:46 | Araq | krux02: what are you talkinga bout? |
13:21:04 | skrylar | PMunch, i wouldn't say it's a hack, it's just overused decadence |
13:21:05 | FromGitter | <krux02> quote does not create stmtLists anymore |
13:21:11 | Yardanico | not only quote do |
13:21:18 | FromGitter | <krux02> at least not, when it can avoid that node |
13:21:26 | FromGitter | <krux02> I kind of relied of stmtList |
13:21:34 | Araq | krux02: oh sorry. |
13:21:38 | FromGitter | <krux02> var node = quote do: ... |
13:21:42 | Araq | I was aware of this breaking change |
13:21:45 | FromGitter | <krux02> node.add quote do: |
13:21:54 | Araq | but I thought I improved things |
13:21:54 | skrylar | doesn't `quote` break often |
13:21:55 | Yardanico | yeah, I've helped to fix issue related to nnkStmtList in another nim project on github too |
13:22:00 | FromGitter | <krux02> I fixed it by now |
13:22:09 | Yardanico | https://github.com/xomachine/NESM if anyone is interested |
13:22:23 | Araq | wasn't obvious to me it breaks so much code out there :-( |
13:23:28 | FromGitter | <krux02> well it's not exactly trivial to fix all the quote do issues if you don't exactly know what is going on |
13:23:34 | FromGitter | <krux02> the erros are quite weird |
13:23:42 | skrylar | nesm looks pretty neat |
13:23:50 | Yardanico | yeah |
13:23:59 | Yardanico | https://github.com/xomachine/NESM/blob/master/tests/basic.nim |
13:24:09 | Yardanico | it uses "endians" and "streams" module internally |
13:24:14 | Yardanico | for serialization |
13:24:42 | Yardanico | and code generated by it is very small |
13:25:10 | Yardanico | example from docs - https://xomachine.github.io/NESM/ |
13:25:28 | FromGitter | <krux02> well I have a serialization library that works with generics entirely. |
13:25:35 | skrylar | i have a partial one that does finite state machines. earmarked to fiddle with one for generating netcode |
13:25:42 | FromGitter | <krux02> I don't need macros to generate methods |
13:25:51 | FromGitter | <krux02> I just have a generic serialize funciton |
13:25:51 | Yardanico | krux02: is it public? |
13:26:13 | FromGitter | <krux02> no it's not |
13:26:23 | FromGitter | <krux02> but I can show you that part if you want |
13:27:08 | Arrrr | Does this fix speed up compilation https://github.com/nim-lang/Nim/issues/5007 ? |
13:27:09 | Yardanico | NESM supports almost all nim types |
13:27:47 | Yardanico | including object variants with nested case statements |
13:27:47 | Araq | Arrrr: only for edge cases |
13:28:05 | Yardanico | also endianess |
13:28:16 | Yardanico | https://xomachine.github.io/NESM/#endianness-switching looks pretty cool |
13:28:33 | FromGitter | <krux02> http://ix.io/Bko |
13:28:47 | Arrrr | I see. |
13:29:19 | Yardanico | krux02: hmm, nice, it's probably faster than using streams |
13:29:43 | FromGitter | <krux02> well I wrote it to be fast |
13:29:45 | PMunch | That is pretty cool |
13:29:50 | PMunch | The endianess thing |
13:29:58 | FromGitter | <krux02> not handled |
13:31:04 | FromGitter | <krux02> I just use copyMam on numbers |
13:31:53 | FromGitter | <krux02> if you want to, you can add support for endianness |
13:32:49 | FromGitter | <krux02> I use it to cache a json file |
13:33:17 | FromGitter | <krux02> I have a json file and parsing that at every startup of the program takes to long, so I wrote a simple but fast binary dump |
13:33:23 | FromGitter | <krux02> and I load that instead |
13:33:54 | FromGitter | <krux02> much faster and no unnecessary memory allocation |
13:35:06 | Arrrr | How is faster than streams? |
13:35:25 | FromGitter | <krux02> well streams are a concept of the past |
13:35:29 | Arrrr | I think it does the same thing. Probably more comfortable to write code with |
13:35:39 | FromGitter | <krux02> I use memory mapped files |
13:35:45 | * | sz0 joined #nim |
13:35:48 | * | nsf quit (Quit: WeeChat 1.9) |
13:35:56 | Arrrr | Ah- |
13:37:07 | FromGitter | <krux02> memory mapped files pretend that a file is completely in memory, but under the hood it uses a memory paging algorithm that is also used for memory swapping |
13:37:48 | Araq | they also eat up address space like there is no tomorrow |
13:38:14 | Arrrr | And myreadwrite i guess is a seq[byte] |
13:38:19 | FromGitter | <krux02> yes but with 64 bit being the norm, I don't that that is a problem |
13:39:05 | FromGitter | <krux02> it's just a struct/object holding a memory mapped file handle and a write offset |
13:39:50 | Araq | 64 bit pointers are foolish though and most devices (phones?) are 32 bit ARM machines. I think. |
13:40:03 | FromGitter | <krux02> I forgot these lines: ```nim ⏎ ⏎ import memfiles ⏎ ⏎ type ... [https://gitter.im/nim-lang/Nim?at=59e4b6b3614889d475bf634f] |
13:40:46 | FromGitter | <krux02> well I don't develop for phones |
13:41:01 | FromGitter | <krux02> and on desktop machines 32 bit is really a small minority |
13:41:43 | FromGitter | <krux02> bit even on 32 bit, creating one memory mapped file to dump a file and close it afterwards is also not really a big deal |
13:42:17 | FromGitter | <krux02> The file I am processing is just a few hundred MB not necessarily huge |
13:43:02 | FromGitter | <krux02> and the memory mapping is releast as fast as possible |
13:43:26 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:44:38 | Arrrr | Interesting, i have to give it a shot. Hope the api is not too different from files |
13:45:58 | * | claudiuinberlin joined #nim |
13:46:15 | * | user0 quit (Quit: user0) |
13:48:42 | * | user0 joined #nim |
13:50:46 | * | user0 quit (Client Quit) |
13:51:02 | * | user0 joined #nim |
13:51:52 | * | Arrrr quit (Ping timeout: 260 seconds) |
13:56:08 | FromGitter | <krux02> The api is just pointer arithmetic |
14:07:02 | * | yglukhov quit (Remote host closed the connection) |
14:09:46 | * | yglukhov joined #nim |
14:13:51 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:19:11 | * | endragor quit (Remote host closed the connection) |
14:19:38 | * | endragor joined #nim |
14:21:32 | * | endragor_ joined #nim |
14:22:02 | euantor | Quit a lot of phones are ARM64 now, including all current supported iOS devices |
14:22:18 | Araq | madness :-) |
14:22:42 | euantor | yep |
14:22:55 | euantor | But I guess it's required when some andorid phones are shipping with like 6GB of RAM |
14:23:02 | euantor | Because Java likes to eat memory :) |
14:23:44 | * | UxerUospr joined #nim |
14:23:48 | * | endragor quit (Ping timeout: 240 seconds) |
14:23:55 | FromGitter | <Bennyelg> Anyone can explain me once and for all what is the different (key difference) between type of tuple and ref object ? |
14:24:27 | * | TjYoco joined #nim |
14:24:31 | Yardanico | well, firstly I want to say that there's no difference between tuple and usual "object" |
14:24:38 | Yardanico | "ref object" is a reference to an object |
14:24:51 | FromGitter | <Bennyelg> yea i know |
14:24:59 | FromGitter | <Bennyelg> so object and tuple are equal? |
14:25:07 | FromGitter | <Bennyelg> just a way of typing ? |
14:25:28 | Yardanico | there are differences between tuple an an object - https://nim-lang.org/docs/manual.html#types-tuples-and-object-types |
14:25:49 | * | endragor_ quit (Ping timeout: 252 seconds) |
14:28:08 | FromGitter | <Bennyelg> @Yardanico thanks |
14:28:14 | FromGitter | <Bennyelg> this is what I was looking for |
14:29:09 | * | claudiuinberlin joined #nim |
14:33:21 | * | endragor joined #nim |
14:37:27 | * | endragor quit (Ping timeout: 240 seconds) |
14:37:30 | Yardanico | guys, is there a way to get a seed for randomize() at compile-time? without system commands/files |
14:38:10 | Yardanico | maybe we can add a new constant CompileTimestamp? |
14:39:33 | Araq | system.NimVersion |
14:39:52 | Araq | it changes to frequently that's good enough |
14:40:00 | Araq | so* |
14:40:07 | Yardanico | xD |
14:40:17 | PMunch | Updated genui, now it's structured much nicer :) |
14:40:27 | PMunch | And I can begin implementing the DSL Yardanico ;) |
14:40:32 | Yardanico | PMunch, nice! |
14:40:56 | Yardanico | Araq, it's for this issue: https://github.com/nim-lang/Nim/issues/6424. It can be closed, but I don't know a way to get some seed which changes on every compilation |
14:41:15 | * | user0 quit (Quit: user0) |
14:41:26 | Yardanico | oh wait, it seems to be a random module issue |
14:41:31 | * | user0 joined #nim |
14:41:32 | Yardanico | ah, no |
14:42:47 | PMunch | Heading home now but would love some input on the DSL design, you had some good ideas when I was implementing it for NiGui :) |
14:43:01 | PMunch | I started dabling with it in the test2 file |
14:43:37 | * | libman joined #nim |
14:45:21 | * | miran_ joined #nim |
14:45:24 | * | Ven joined #nim |
14:45:46 | * | user0 quit (Client Quit) |
14:45:48 | * | Ven is now known as Guest84089 |
14:45:53 | dom96 | Yardanico: the labels beginning with 'S' are mainly for PRs |
14:46:00 | * | user0 joined #nim |
14:46:04 | Yardanico | dom96, ah, ok |
14:47:22 | PMunch | https://github.com/PMunch/genui/issues/1 |
14:47:33 | PMunch | Created an issue were we can discuss the design :) |
14:47:42 | * | PMunch quit (Quit: Leaving) |
14:47:53 | skrylar | i would just throw the miglayout cheat sheet at you and call it done |
14:54:21 | FromGitter | <krux02> when I install an executable with nimble, how can I access resources like pictures and fonts? |
14:54:26 | * | smt joined #nim |
14:55:24 | FromGitter | <krux02> lets say my binary is in "~/.nimble/bin/bybin" |
14:55:52 | FromGitter | <krux02> and the resuorces are in "~/.nimble/pkgs/mylib-1.0.0/resources" |
14:56:13 | FromGitter | <krux02> how do I read platform independent from this folder? |
14:58:11 | Araq | I doubt it's possible. it's the /usr/bin problem which has no solution either |
14:58:17 | Yardanico | yay, gcv2 is stable - https://github.com/nim-lang/Nim/commit/309838c6edc67b17e6366a0681db2875997ccd0d |
14:58:32 | Yardanico | Araq, will you eventually remove gc v1 ? |
14:59:21 | FromGitter | <krux02> that sucks |
15:00:21 | FromGitter | <krux02> well when there is no solution to this, I can generally eliminate nimble as a solution to distribute my library |
15:03:22 | federico3 | krux02: the problem has been solved in Python, Ruby and most languages. Open a bug on nimble if needed |
15:03:59 | dom96 | krux02: getAppFilename() |
15:04:49 | dom96 | although hrm |
15:05:03 | dom96 | I guess you need to query Nimble for the package's directory |
15:05:03 | FromGitter | <krux02> dom96: what is that supposed to help me |
15:05:12 | federico3 | dom96: if you do that you are hardcoding in your code the assumption that the binary in installed in a given location relative to the other files |
15:06:09 | FromGitter | <krux02> if nimble would build the project with a flag like "-d:libdir=mylib-1.0.0" then it would be possible to recover the directory |
15:07:03 | dom96 | that seems fragile to me |
15:07:21 | dom96 | I'm curious how Python and others solve this problem |
15:07:25 | federico3 | krux02: it should be discovered at runtime, so it's not hardcoded in the binary |
15:07:58 | FromGitter | <krux02> getAppDir / ".." / "pkgs" / libdir / resources |
15:07:59 | federico3 | dom96: Python asks a library where the extra files are located |
15:08:34 | dom96 | federico3: how? |
15:08:37 | FromGitter | <krux02> federico3: well actually it should be hardcoded in the binary |
15:09:00 | FromGitter | <krux02> because a binary is always build for exactly one version and not dynamic in any way |
15:09:48 | dom96 | krux02: so you can just use `staticExec("nimble path yourpkg") / resources` |
15:09:58 | federico3 | krux02: the location of the binary and the extra files should not be relevant |
15:10:52 | FromGitter | <krux02> federico well yes, it should not be |
15:11:05 | federico3 | dom96: setuptools and pkg_resouces do that |
15:11:34 | FromGitter | <krux02> dom96: that seems fragile to me |
15:11:56 | dom96 | it is |
15:11:56 | FromGitter | <krux02> staticExec("nimble path yourpkg" ) does not guarantee the same version |
15:12:00 | dom96 | but that's what you want |
15:12:09 | FromGitter | <krux02> not really |
15:12:45 | FromGitter | <krux02> I want that my binary can be bundled with resources and that I have a secure way to access those resources |
15:12:51 | dom96 | In the future you'll be able to script the build process in the .nimble file |
15:12:58 | FromGitter | <krux02> with secure I mean reliable |
15:13:12 | FromGitter | <krux02> I don't want to script the build process in the nimble file |
15:13:48 | FromGitter | <krux02> I just want a binary with resources attached to it |
15:13:51 | FromGitter | <krux02> nothing more |
15:13:54 | FromGitter | <krux02> very simple task |
15:14:16 | FromGitter | <krux02> coda and data distributed as a bundle |
15:14:20 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:14:40 | federico3 | isn't there already a nimbledir env var that defaults to ~/.nimble ? |
15:14:46 | Yardanico | krux02: embed resources in a binary :D |
15:15:18 | dom96 | so you think Nimble should pass -d:jesterDir=~/.nimble/pkgs/jester-0.1.0 for each package when building? |
15:15:28 | FromGitter | <krux02> Yardanico yes if I want to explode my build time, then I will do it |
15:15:37 | federico3 | urgh |
15:15:53 | dom96 | What happens when someone moves their Nimble directory? |
15:15:55 | FromGitter | <krux02> dom96 |
15:15:58 | FromGitter | <krux02> no I don't think so |
15:16:07 | federico3 | that's why you should not hardcode it... |
15:16:20 | federico3 | dom96: isn't there already a nimbledir env var that defaults to ~/.nimble ? |
15:16:36 | FromGitter | <krux02> I think it should onld define the path after "~/.nimble/pkgs/ |
15:16:56 | FromGitter | <krux02> the other part depends on the environment and should not be passed as a compile time argument |
15:16:56 | dom96 | federico3: no. |
15:17:00 | federico3 | ouch |
15:17:46 | dom96 | krux02: so -d:jesterDir=jester-0.1.0? |
15:17:56 | dom96 | and then how will you get the Nimble dir? |
15:18:14 | federico3 | then a basic implementation could be getPkgDataDir() that returns "~/.nimble/pkgs/<name>-<version>/extras/" |
15:18:42 | FromGitter | <krux02> getAppDir / ".." / "pkgs" / libdir / "resources" |
15:18:46 | federico3 | the binary needs to hardcode its own package name and version and that's actually a good thing |
15:19:22 | FromGitter | <krux02> or ``getNimbleDir / "pkgs" / libdir / "resources"`` |
15:19:24 | dom96 | krux02: actually if you want to do that: just define a const in your .nim file |
15:19:29 | dom96 | with the version of your package |
15:20:00 | FromGitter | <krux02> how do I do that with nimble? |
15:20:02 | dom96 | then in your .nimble file write: import myPkgVersions; requires "myPkg " & myPkgVersions.myPkgVersion |
15:20:28 | FromGitter | <krux02> I am confused |
15:20:36 | federico3 | dom96: if the package contains a call to "getPkgDataDir" it can bake in the version |
15:21:00 | FromGitter | <krux02> federico3: yes exactly, thank you |
15:21:01 | FromGitter | <Bennyelg> what is not ok with my example ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4ce5d210ac26920f21a1d] |
15:21:33 | dom96 | federico3: and what is this "getPkgDataDir"? |
15:21:45 | FromGitter | <krux02> @Bennyelg: you concept uses an undefined identifier b |
15:21:56 | federico3 | a simple helper that bakes in the name and version at build time but *not* the path |
15:22:13 | federico3 | and discovers the path at runtime using getNimbleDir (and in future an env var) |
15:22:36 | dom96 | ahh because the package knows its version |
15:22:46 | federico3 | yup |
15:23:10 | federico3 | so at runtime the user can move the binary and/or the nimbledir to any new location |
15:23:11 | dom96 | Okay, no need to implement anything new in Nimble for that |
15:23:13 | FromGitter | <krux02> now you get it |
15:23:42 | federico3 | dom96: indeed - but adding a paragraph on the documentation perhaps ;) |
15:24:19 | dom96 | sure. |
15:24:23 | dom96 | PRs welcome :P |
15:24:23 | * | Senketsu joined #nim |
15:24:29 | * | Senketsu quit (Client Quit) |
15:24:32 | * | skrylar quit (Quit: Leaving) |
15:24:39 | FromGitter | <krux02> dom96: please implement that. It seems very easy to implement and it should provide a very important feature |
15:24:49 | dom96 | implement what? |
15:25:05 | FromGitter | <Bennyelg> the only example in Doms book regarding concepts and it's not working :| |
15:25:09 | FromGitter | <krux02> waht federice3 just suggested |
15:25:11 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4cf5701110b7231c1da35] |
15:25:27 | FromGitter | <krux02> I already make at lot of Nim PR and it is very time consuming to get into that codebase |
15:25:34 | dom96 | krux02: You want me to add docs? |
15:25:34 | FromGitter | <krux02> and with nimble it is very similar |
15:25:46 | dom96 | I feel like you're misunderstanding what federico3 suggested. |
15:26:06 | FromGitter | <Yardanico> @Bennyelg are you sure there's that example in the book? |
15:26:16 | FromGitter | <Bennyelg> why not just do that ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4cf9701110b7231c1db9c] |
15:26:22 | FromGitter | <Bennyelg> why do concepts ? |
15:26:35 | dom96 | You put `proc getPkgDataDir*(): string = "pkg-" & pkgVer / "resources"` |
15:26:39 | dom96 | into your package's source code |
15:26:50 | FromGitter | <Yardanico> @Bennyelg are you sure this example is in the book? |
15:26:59 | federico3 | well the function should be in a library just for convenience |
15:27:17 | FromGitter | <krux02> @Bennyelg you never need concepts, you can always just use generics it is just for better error messages |
15:27:29 | FromGitter | <krux02> if you don't understand Concepts you won't miss out on anything |
15:27:55 | * | claudiuinberlin joined #nim |
15:28:05 | FromGitter | <Bennyelg> I'm on my learning phase now so I am trying anything Nims offer |
15:28:10 | FromGitter | <Bennyelg> @Yardanico yes Im sure |
15:28:25 | Yardanico | ah, found it |
15:28:31 | FromGitter | <krux02> @Bennyelg you concept should ony use a, not b |
15:28:42 | Yardanico | yeah |
15:28:44 | FromGitter | <Bennyelg> I know |
15:28:46 | FromGitter | <krux02> you have a single type that can compare to itself |
15:28:47 | FromGitter | <Bennyelg> but it's not working |
15:28:58 | Yardanico | you changed it |
15:29:00 | * | nsf joined #nim |
15:29:03 | Yardanico | please re-read it in the book |
15:29:07 | Yardanico | it's (a < a) in the book |
15:29:10 | dom96 | yeah, I just looked at the book |
15:29:12 | dom96 | It's different |
15:29:34 | FromGitter | <Bennyelg> you right it's a < a |
15:30:25 | FromGitter | <Bennyelg> i couldn't understand why it's not working. ⏎ this writing style is so strange. ⏎ why I check a < a |
15:30:28 | FromGitter | <Bennyelg> a is a |
15:30:31 | FromGitter | <Bennyelg> I cant get it |
15:30:59 | FromGitter | <krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4d0b3f7299e8f53f4273e] |
15:31:24 | * | claudiuinberlin quit (Client Quit) |
15:31:48 | FromGitter | <krux02> You only have a single typo of concept Comparable and call that type T |
15:32:03 | FromGitter | <krux02> then both argument are of that same type as well as the result |
15:32:38 | FromGitter | <krux02> Concepts should restrict the types allowed for a generic |
15:32:51 | FromGitter | <Bennyelg> yea the example in the book itself not wokring ⏎ ⏎ proc getMax(a, b :Comperable): Comperable = ⏎ ... [https://gitter.im/nim-lang/Nim?at=59e4d123f7299e8f53f429a9] |
15:33:00 | * | d10n-work joined #nim |
15:33:02 | FromGitter | <krux02> oh |
15:33:05 | FromGitter | <krux02> yea that is a problem |
15:33:25 | FromGitter | <krux02> That is a bug I guess |
15:33:28 | * | claudiuinberlin joined #nim |
15:33:36 | FromGitter | <Bennyelg> book example is not align with the nim version any more or it's just typo |
15:33:55 | FromGitter | <krux02> I don't know I don't have the book next to me |
15:36:21 | FromGitter | <Yardanico> @Bennyelg what example you're referring to? |
15:36:30 | FromGitter | <Yardanico> ```code paste, see link``` ⏎ ⏎ Works [https://gitter.im/nim-lang/Nim?at=59e4d1fe177fb9fe7e863ef8] |
15:36:46 | dom96 | yep, doesn't work |
15:37:40 | FromGitter | <Bennyelg> lol now it's work |
15:37:44 | FromGitter | <Bennyelg> I dont get it anymore |
15:37:45 | FromGitter | <Bennyelg> :D |
15:38:34 | FromGitter | <Bennyelg> no |
15:38:44 | FromGitter | <Bennyelg> @Yardanico change the name of you proc |
15:38:47 | FromGitter | <Bennyelg> to what ever you want |
15:38:49 | FromGitter | <Bennyelg> and try |
15:38:51 | FromGitter | <Bennyelg> |
15:38:54 | Yardanico | ah |
15:38:58 | FromGitter | <Bennyelg> :D * |
15:39:01 | Yardanico | seems to be a regression |
15:39:02 | Yardanico | cc Araq :) |
15:39:04 | FromGitter | <Bennyelg> this is strange |
15:39:28 | Yardanico | Araq, is this supposed to work? https://gist.github.com/Yardanico/62b62f39c4c7f7a17d367bb5d3cacf3d |
15:39:50 | dom96 | weird |
15:39:51 | FromGitter | <Bennyelg> only if you change it to max :D |
15:40:26 | dom96 | but then you're probably just calling the 'max' stdlib proc... |
15:40:30 | FromGitter | <Bennyelg> or if you do this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4d2ed177fb9fe7e86448c] |
15:40:33 | dom96 | please report this as a bug |
15:41:09 | FromGitter | <Bennyelg> I want to fix it, it's time for me to add my first contribution to the nim community |
15:41:17 | FromGitter | <Bennyelg> Start hint me what to do LOL |
15:41:34 | Yardanico | it's one of the most complicated things in nim compiler |
15:41:37 | Yardanico | concepts |
15:41:49 | FromGitter | <Bennyelg> :) I''l report it than |
15:42:08 | FromGitter | <Bennyelg> you always welcome to push me a "Easy" missions to build my strength |
15:42:26 | Yardanico | maybe it's not valid to return a variable of a type Comparable? |
15:42:27 | Yardanico | ah |
15:42:29 | Yardanico | probably it is |
15:42:41 | Yardanico | yeah |
15:42:59 | Yardanico | dom96, I think this code is invalid because Comparable (return type) is not a concrete type |
15:43:12 | Yardanico | you should use generics + concepts here to make it work, as Bennyelg suggested |
15:43:17 | FromGitter | <Bennyelg> Maybe, so you need to "cast" it |
15:43:35 | Yardanico | probably it was a bug that this worked before |
15:43:48 | Yardanico | so e.g. something like this: https://gist.github.com/Yardanico/2d5c1dd444918ec34a43929cfa2c9a87 |
15:43:50 | dom96 | well, it's in my book so it must have worked at some point |
15:43:55 | Yardanico | yeah |
15:44:27 | dom96 | and it makes sense for that to work IMO |
15:44:33 | FromGitter | <Bennyelg> Yea, but it's good its not working |
15:45:05 | FromGitter | <Bennyelg> because its drive me insane, @Yardanico looks far more readable |
15:47:02 | FromGitter | <Bennyelg> this is also working |
15:47:09 | FromGitter | <Bennyelg> ```proc x[T](a, b: T): Comparable = ⏎ if a < b: ⏎ return b ⏎ return a ``` [https://gitter.im/nim-lang/Nim?at=59e4d47c614889d475c025b0] |
15:47:23 | TjYoco | Is it part of Nim's style to use `self: T` on objects or are you supposed to use a more descriptive name? |
15:47:31 | Yardanico | it's only for generics |
15:47:36 | Yardanico | Bennyelg: oh |
15:47:37 | TjYoco | In procs I mean |
15:47:41 | Yardanico | then I have no clue |
15:47:50 | Yardanico | TjYoco, no, I dont' think so |
15:48:09 | Yardanico | you can always use "using" thing to make your proc declarations shorter |
15:48:09 | FromGitter | <Bennyelg> If my newest example is also working than its a bug. |
15:48:27 | miran_ | another beginner question: how do i process nested json? is there some working example somewhere available? |
15:48:36 | Yardanico | miran_, what do you mean by process? |
15:48:58 | miran_ | i want to extract some values |
15:49:20 | Yardanico | miran_, myjsonobj["somefield"]["someanotherfield"] |
15:49:36 | Yardanico | myjsonobj["somefield"]["someanotherfield"].getBool() |
15:49:44 | Yardanico | myjsonobj["somefield"]["someanotherfield"].getBVal() if you're on 0.17.2 |
15:50:13 | miran_ | i don't have `somefield` names, i should iterate through them... |
15:50:24 | miran_ | it is AoC task, of course :) |
15:50:38 | Yardanico | ah, you mean you have actualy json fields and you don't know names of them? |
15:50:46 | Yardanico | https://nim-lang.org/docs/json.html#getFields |
15:50:57 | miran_ | i can share the json file |
15:51:15 | Yardanico | I think getFields would work for your use-case |
15:51:22 | miran_ | i started with `getfields`, but didn't get much further than that |
15:52:13 | * | Trustable joined #nim |
15:52:34 | miran_ | with `getFields` i get a nested table. so i have to do it recursively until i come to the values? |
15:53:17 | Yardanico | yeah, you just check kind of current field |
15:53:28 | Yardanico | if it's a JObject - iterate over it |
15:53:32 | * | couven92 quit (Quit: Client disconnecting) |
15:53:37 | Yardanico | otherwise you have an actual value |
15:54:30 | FromGitter | <krux02> dom96: I actually try at the moment to fix nimple to give each executable it builds a define with the directoryname that is used in the .nimble/pkgs/ folder |
15:54:41 | FromGitter | <krux02> but I am sorry I don't understand that codebase |
15:55:20 | dom96 | Why are you trying to do this? |
15:55:20 | FromGitter | <krux02> for you it would probably be just a single line that you have to write for me it is 100s of lines that I have to read and understand |
15:55:48 | FromGitter | <krux02> didn't you just say pull requests are welcome when we were talking about exactly that? |
15:55:50 | dom96 | No changes to Nimble are necessary from what I understand. |
15:56:08 | dom96 | federico3 suggested a solution |
15:56:14 | FromGitter | <krux02> yes he did |
15:56:20 | dom96 | it requires no changes to Nimble |
15:56:37 | FromGitter | <krux02> ??? |
15:56:43 | FromGitter | <krux02> then how do I do it? |
15:56:47 | * | abeaumont quit (Ping timeout: 248 seconds) |
15:57:10 | FromGitter | <krux02> to be honest I don't know a lot about nimble |
15:58:18 | miran_ | thanks Yardanico, i'll try this what you've said |
15:58:35 | dom96 | krux02: https://irclogs.nim-lang.org/16-10-2017.html#15:26:35 |
15:59:11 | dom96 | Your package knows its version |
15:59:19 | dom96 | so it can provide that procedure for all software that uses it |
15:59:31 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:01:15 | * | user0 quit (Quit: user0) |
16:01:28 | FromGitter | <krux02> `proc getPkgDataDir*(): string = "pkg-" & pkgVer / "resources"` |
16:01:29 | * | user0 joined #nim |
16:01:41 | FromGitter | <krux02> undeclared identifier: 'pkgVer' |
16:02:34 | dom96 | let pkgVer = "0.1.0" |
16:02:37 | dom96 | or const |
16:02:39 | Yardanico | dom96, https://github.com/nim-lang/Nim/issues/5506 is easy to do, but what should be the error message? |
16:02:44 | dom96 | Just hardcode this |
16:02:53 | FromGitter | <krux02> args |
16:02:55 | FromGitter | <krux02> :( |
16:03:00 | FromGitter | <krux02> :'( |
16:03:07 | dom96 | If you want to get rid of the duplication you can import the module that defines it in your .nimble file |
16:03:17 | * | claudiuinberlin joined #nim |
16:03:35 | FromGitter | <krux02> really you are making it harder that it needs to be |
16:03:47 | FromGitter | <vindarel> Hello there, little question on a Nimble error: I get "Could not read package info file in /tmp/[… ] reading as ini file failed with [blah] Error: system module needs 'string'". Does that look familiar ? On Nimble v0.8.8 and Nim compiler v0.17.2. I ran "nimble install nimquery". Thanks ! |
16:04:08 | dom96 | vindarel: how did you install Nim? |
16:04:17 | FromGitter | <krux02> what is so bad about nimble providing by default a compilation flag that tells the library what version it is? |
16:04:27 | FromGitter | <krux02> nimble know the version? |
16:04:44 | FromGitter | <vindarel> with choosenim. |
16:04:44 | FromGitter | <krux02> the application should know it, too |
16:04:54 | * | claudiuinberlin quit (Client Quit) |
16:04:56 | FromGitter | <krux02> why not providing a default way to do it? |
16:05:35 | dom96 | krux02: because you can do it without the need for Nimble to provide this |
16:05:44 | dom96 | And there are in fact multiple solutions |
16:05:47 | * | user0 quit (Client Quit) |
16:06:00 | * | user0 joined #nim |
16:06:31 | dom96 | vindarel: that's very strange |
16:06:56 | dom96 | krux02: but okay, let's add it |
16:07:03 | FromGitter | <krux02> nimble uses the function "weiredMagic" to generate the folder name in the "pkgs" folder, please understand me, if I don't want to reimplement the function weirdMagic from nimble into my library |
16:07:58 | FromGitter | <vindarel> @dom96 may it be an old init file ? I installed Nim 0.16 (also with choosenim) a few months ago. And if it's strange I can open a github issue, for reference. |
16:07:58 | * | yglukhov quit (Remote host closed the connection) |
16:08:04 | dom96 | krux02: Here is the relevant code, think you can take it from there? https://github.com/nim-lang/nimble/blob/master/src/nimble.nim#L229 |
16:08:27 | dom96 | hrm, wait |
16:09:05 | dom96 | You'll need access to the deps, so you'll need to do it here https://github.com/nim-lang/nimble/blob/master/src/nimble.nim#L356 |
16:09:54 | * | Arrrr joined #nim |
16:09:54 | * | Arrrr quit (Changing host) |
16:09:54 | * | Arrrr joined #nim |
16:09:55 | dom96 | vindarel: and Nimble works with 0.16.0? |
16:10:25 | Yardanico | vindarel: but please open it in the choosenim repo :) |
16:10:30 | dom96 | vindarel: but yeah, please submit an issue. If you could zip up your ~/.nimble and ~/.choosenim and attach it |
16:11:20 | Yardanico | because often people open website/choosenim related issues in main nim repo :) |
16:13:30 | FromGitter | <vindarel> ok I'll do that. Nimble has worked (will downgrade and tell you but rather no). I had this same error when trying Karax, then upgraded to the latest Nim and it worked. Now I want to install another lib, and same pb. I'll open the issue at the right place :) regards |
16:14:14 | Yardanico | you can also try to fully uninstall choosenim and bim |
16:14:16 | Yardanico | *nim |
16:14:18 | Yardanico | and reinstall it |
16:14:36 | * | ShalokShalom_ is now known as ShalokShalom |
16:16:01 | * | Guest84089 quit (Ping timeout: 240 seconds) |
16:17:49 | * | ofelas joined #nim |
16:18:41 | * | Ven joined #nim |
16:19:04 | * | Ven is now known as Guest49263 |
16:22:51 | FromGitter | <Yardanico> https://josjong.com/2017/10/16/null-vs-empty-strings-why-oracle-was-right-and-apple-is-not/ |
16:29:59 | FromGitter | <vindarel> @Yardanico you'r right, and it helped. So I deleted ~/.nimble and re-installed choosenim. It began with Nim 0.16. Installing a lib failed, upgrading to Nim 0.17.2 (which was instantaneous, looks like there is a hidden cached version somewhere) made installing my lib ok. |
16:32:15 | * | Guest49263 quit (Ping timeout: 258 seconds) |
16:33:24 | FromGitter | <brentp> anyone know of an interval tree package in nim? |
16:33:58 | FromGitter | <krux02> how do I use the --define flag in nim when I acutally want to assigne it a value? |
16:34:16 | FromGitter | <krux02> when defined(mysym): echo mysym |
16:34:30 | FromGitter | <krux02> error: undeclared identifier 'mysym' |
16:34:40 | FromGitter | <krux02> I just checked if it is defined, but it is still undeclared |
16:34:48 | FromGitter | <krux02> so how do I use it? |
16:36:57 | Arrrr | there is a special pragma for that |
16:37:46 | * | Ven joined #nim |
16:38:09 | * | Ven is now known as Guest48109 |
16:38:14 | FromGitter | <krux02> ah I found it |
16:38:16 | FromGitter | <krux02> thanks |
16:39:57 | * | claudiuinberlin joined #nim |
16:40:12 | * | claudiuinberlin quit (Client Quit) |
16:51:54 | * | nsf quit (Quit: WeeChat 1.9) |
16:53:18 | * | yglukhov joined #nim |
16:58:02 | * | yglukhov quit (Ping timeout: 255 seconds) |
16:58:48 | * | UxerUospr quit (Ping timeout: 240 seconds) |
17:01:34 | * | Guest48109 quit (Ping timeout: 264 seconds) |
17:05:44 | * | lastjedi joined #nim |
17:10:40 | shashlick | can a nim program load a nimble script at runtime? as a configuration file of sorts? |
17:10:57 | Yardanico | shashlick, not nimble, but nimscript - yes |
17:11:13 | Yardanico | if it's what you want |
17:11:44 | Yardanico | shashlick, https://github.com/Serenitor/embeddedNimScript |
17:11:49 | Yardanico | sorry for bold text |
17:12:48 | shashlick | Yardanico: thanks will check out |
17:13:13 | Yardanico | you can for example return a table from your nimscript to your program |
17:13:17 | Yardanico | but your program would be a bit too big |
17:13:28 | Yardanico | because it would include some parts of the compiler including VM |
17:13:46 | shashlick | dom96: I used gorge() in the {.passC.} declaration and have gotten the include headers to work |
17:13:51 | Yardanico | shashlick, maybe you can try parsecfg or nimyaml or parsetoml? |
17:13:57 | Yardanico | parsecfg is in stdlib |
17:14:19 | FromGitter | <krux02> dom96: my approach to fix nimble failed, when I use the compilation parameter, then a library never knows it's own package folder name, only the package folder name of the package that the library is being built for |
17:14:25 | shashlick | Yardanico: I see - might not be worth it - I'm using the parsecfg for now but since the lib needs a nimble file too, figured I could use it for the cfg parameters too |
17:14:42 | Yardanico | shashlick, well I don't think you can do that with a nimble file at runtime |
17:14:49 | Yardanico | nimble files are meant for compile-time only |
17:14:57 | Yardanico | and with parsecfg you can read some config at runtime |
17:15:29 | shashlick | makes sense, trying to oversimplify |
17:17:52 | shashlick | can't you write files in nimscript? |
17:17:57 | Yardanico | you can |
17:18:16 | Yardanico | so you can use https://github.com/Serenitor/embeddedNimScript to interpret nimscript with your program at runtime |
17:19:41 | ldlework | neat |
17:28:32 | * | yglukhov joined #nim |
17:28:39 | Yardanico | bah |
17:28:44 | Yardanico | appveyor time limit again |
17:28:53 | Yardanico | on all recent commits |
17:29:08 | Yardanico | oh wait, our tests are failing :P |
17:30:25 | Yardanico | it doesn't even compile - https://ci.appveyor.com/project/dom96/nim/build/539 |
17:31:15 | * | user0 quit (Quit: user0) |
17:31:32 | * | user0 joined #nim |
17:32:57 | * | gmpreussner quit (Ping timeout: 240 seconds) |
17:33:10 | * | Trustable quit (Remote host closed the connection) |
17:33:14 | * | Demos joined #nim |
17:35:09 | * | gmpreussner joined #nim |
17:35:46 | * | user0 quit (Client Quit) |
17:36:01 | * | user0 joined #nim |
17:39:28 | Araq | http://www.strawpoll.me/14163114 |
17:40:40 | Yardanico | Araq, wow, streaming every day? you're a god |
17:40:44 | * | lastjedi quit (Quit: Leaving) |
17:41:02 | Araq | it's a poll about the next topic |
17:41:09 | Yardanico | Araq, well anyway |
17:41:21 | * | lastjedi joined #nim |
17:43:17 | * | claudiuinberlin joined #nim |
17:45:38 | * | firstjedi joined #nim |
17:45:45 | * | lastjedi quit (Client Quit) |
17:46:01 | * | firstjedi quit (Remote host closed the connection) |
17:46:22 | * | lastjedi joined #nim |
17:47:18 | * | lastjedi quit (Client Quit) |
17:47:33 | * | lastjedi joined #nim |
17:48:17 | Yardanico | Araq, is there an estimated day of the next stream? |
17:49:19 | Araq | maybe today |
17:53:50 | Arrrr | Are those streams recorded? |
17:54:26 | Yardanico | Arrrr, yes, but AFAIK Araq has uploaded them yet |
17:54:28 | Yardanico | *hasn't |
17:54:37 | Arrrr | were |
17:54:41 | Arrrr | *where |
17:54:42 | Arrrr | ok |
17:56:14 | Arrrr | I'm out of the loop |
17:56:47 | shashlick | how do you get the pkgname within a Nimble script? |
18:05:23 | * | abeaumont joined #nim |
18:07:37 | Araq | shashlick: 'pkgname' is a variable you can access iirc |
18:11:53 | Araq | lol poor guy who keeps asking for state machines |
18:13:20 | Yardanico | Araq, xD |
18:13:40 | Yardanico | I think you will eventually have only 1 topic - state machines for game programming |
18:13:49 | Yardanico | (only one topic for a poll) |
18:14:01 | Araq | I think I might do that first as it looks "really really simple" |
18:14:12 | Araq | and you know the saying, "if it looks simple, it's hard" |
18:14:23 | Araq | "if it looks hard, it's almost impossible" |
18:20:53 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:21:48 | * | claudiuinberlin joined #nim |
18:24:33 | Yardanico | oh no |
18:24:44 | Yardanico | application development with Karax and Ormin has almost the same number of votes as destructors :P |
18:27:35 | Yardanico | ``nil`` strings are equal to empty strings. yay! |
18:28:24 | * | UxerUospr joined #nim |
18:29:49 | * | nsf joined #nim |
18:32:23 | Yardanico | is this valid "Constants cannot be of type ptr, ref, var or object, nor can they contain such a type."? |
18:32:30 | Yardanico | I think that constants can be of type "object" |
18:34:30 | Araq | true |
18:34:35 | FromGitter | <Bennyelg> well it's a girl |
18:35:01 | FromGitter | <Bennyelg> I'm going to be a father to girl :D I wanted a boy nimmer |
18:35:04 | Araq | congratulations! |
18:35:26 | Arrrr | Congrats my friend. You got a girl nimmer |
18:35:41 | Yardanico | congrats!! |
18:35:42 | FromGitter | <Bennyelg> heheh I wish |
18:36:04 | FromGitter | <Bennyelg> Thanks all |
18:36:11 | Araq | we need more programmer girls |
18:36:21 | FromGitter | <Bennyelg> I know |
18:36:26 | Araq | why should only the boys suffer all the time, right? |
18:36:35 | FromGitter | <Bennyelg> I'll send her to Nim Confereance 2030 |
18:36:42 | FromGitter | <Bennyelg> Conference |
18:36:56 | Araq | that will be in Tokio |
18:37:19 | FromGitter | <Bennyelg> Wow So I'm In too |
18:37:22 | FromGitter | <Bennyelg> ;] |
18:39:03 | Yardanico | Araq, so can I just remove "or object" there ? |
18:39:12 | Araq | yep |
18:39:20 | Araq | but case objects are still not supported |
18:39:31 | FromGitter | <Bennyelg> @Yardanico what about what we spoke earlier about the Concept & Comperable |
18:39:35 | FromGitter | <Bennyelg> is it a bug? right ? |
18:40:25 | Yardanico | you can post an issue |
18:40:54 | FromGitter | <Bennyelg> I''ll create on |
18:43:19 | * | sleepyqt quit (Quit: Leaving) |
18:45:42 | Araq | btw can we change the master/devel roles slightly? |
18:45:54 | Yardanico | Araq, how exactly? |
18:46:01 | Araq | when the tests are green, changes should be merged from devel to master automatically |
18:46:35 | Yardanico | that's nice, but is there any services for this? or we'll need to have our custom webhook |
18:46:46 | Yardanico | but I like this change |
18:46:57 | Araq | well not sure how this "automatically" can be implemented |
18:48:09 | Yardanico | github api for merging stuff |
18:48:18 | Yardanico | travis has notifications on build success |
18:48:25 | Yardanico | but they're only sent to slack, email and IRC |
18:49:02 | FromGitter | <Bennyelg> https://github.com/nim-lang/Nim/issues/6521 |
18:50:38 | Yardanico | oh wait |
18:50:44 | Yardanico | Araq, we are lucky - https://developer.github.com/v3/activity/events/types/#statusevent |
18:51:15 | * | user0 quit (Quit: user0) |
18:51:18 | dom96 | I'm sure there is a tool that does this |
18:51:30 | * | user0 joined #nim |
18:51:38 | Araq | what's the difference between на and в? |
18:52:02 | Yardanico | Araq, "на" means "on", on a table, on the floor (на столу, на полу) |
18:52:25 | Yardanico | "в" means "in", in the house - в доме |
18:52:37 | Araq | ok that's simpler than I thought then |
18:52:49 | dom96 | "Na stole"? :) |
18:53:00 | Yardanico | yeah |
18:53:00 | Araq | "stolu" |
18:53:02 | FromGitter | <Bennyelg> @Araq do you plan any Conference soon ? |
18:53:09 | dom96 | I just translated it to Polish heh |
18:53:18 | Yardanico | well "на столе" is gramatically correct |
18:53:23 | Yardanico | but sometimes people say "на столу' |
18:53:37 | Yardanico | Araq, http://masterrussian.com/vocabulary/na_preposition.htm for "na" |
18:53:46 | Yardanico | and for "в" - http://masterrussian.com/vocabulary/v_preposition.htm |
18:53:47 | FromGitter | <Bennyelg> Doulingo |
18:54:08 | FromGitter | <Bennyelg> Moscow Svaniatka lakala Moscow Rodina maya :P |
18:55:06 | Araq | Bennyelg: not really, any suggestions? |
18:55:38 | FromGitter | <Bennyelg> Amsterdam ? :P ⏎ I dont care where I'm In. ⏎ and you are always invited to israel |
18:55:46 | * | user0 quit (Client Quit) |
18:56:00 | * | user0 joined #nim |
18:56:06 | FromGitter | <Bennyelg> Yardanico where you live in russia? |
18:56:35 | FromGitter | <mratsim> Remember my question this morning about nimsuggest not seeing optional modules gated by `when defined(cuda): import ./tensor_cuda` is there something instead to do `when not defined(cuda): unimportant ./tensor_cuda` ? |
18:57:06 | FromGitter | <Bennyelg> If you would like @Araq I can speak to my boss in my company to invite you come and introduce Nim. |
18:58:26 | * | Ven joined #nim |
18:58:49 | * | Ven is now known as Guest97114 |
19:00:00 | Araq | mratsim: nimsuggest reads the .nim.cfg files |
19:00:12 | Araq | bennyelg: which country? |
19:00:23 | FromGitter | <Bennyelg> Israel :D |
19:00:47 | FromGitter | <Bennyelg> Gettaxi Is like Uber but samller, we work on UK, RUSSIA & Israel |
19:01:04 | Araq | ok |
19:01:12 | * | couven92 joined #nim |
19:02:08 | FromGitter | <Bennyelg> So Should I talk to him ? |
19:02:27 | FromGitter | <Bennyelg> I'll try to see if it's an option |
19:03:49 | Araq | sure |
19:04:27 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:05:06 | * | gangstacat quit (Quit: Ĝis!) |
19:06:03 | FromGitter | <stisa> @mratsim I think you can use `when defined nimcheck` if you are using vscode, or you could hack nimsuggest to define nimssugest |
19:06:55 | * | claudiuinberlin joined #nim |
19:07:37 | Yardanico | Bennyelg: http://goo.gl/4s5jpW |
19:07:44 | Yardanico | I live there |
19:08:14 | FromGitter | <mratsim> @stisa right I can use a hack like that |
19:08:32 | Yardanico | my town is next to Kazan |
19:08:44 | * | Guest97114 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:08:46 | Yardanico | only ~40km to Kazan |
19:10:31 | Yardanico | Bennyelg: you work at Getttaxi? |
19:11:59 | * | gangstacat joined #nim |
19:13:55 | FromGitter | <mratsim> @Araq I'm developing on VScode on a Mac without Cuda and syncing with a server with GPU, so I want to avoid having to modify nim.cfg before each compilation |
19:18:42 | * | Demos quit (Read error: Connection reset by peer) |
19:20:44 | FromGitter | <Bennyelg> Ya I work on gettaxi |
19:22:10 | FromGitter | <Bennyelg> Uber yandex are strong in your region |
19:22:40 | FromGitter | <Bennyelg> @Yardanico |
19:22:46 | Yardanico | yeah they are |
19:23:19 | FromGitter | <Bennyelg> I know |
19:23:42 | Yardanico | but I don't use them anyway, I don't really know if they're available in my town :P |
19:23:55 | FromGitter | <Bennyelg> Gettaxi yes |
19:24:04 | FromGitter | <Bennyelg> At least In kazan they are |
19:24:36 | FromGitter | <Bennyelg> Im big data developer their so I came across the data heheh |
19:28:07 | * | Laon joined #nim |
19:31:43 | * | Laon89 joined #nim |
19:32:43 | * | Laon quit (Ping timeout: 252 seconds) |
19:37:06 | Yardanico | if someone didn't vote yet - vote for the next topic on Araq's stream - http://www.strawpoll.me/14163114 |
19:38:11 | FromGitter | <Bennyelg> tomorrow? |
19:38:27 | Yardanico | I don't know, maybe today, maybe tomorrow |
19:44:36 | * | ofelas quit (Quit: shutdown -h now) |
19:48:26 | FromGitter | <Bennyelg> i can't do this? ⏎ echo("Failed on try: NO# 1$, because: $2" % [i.intToStr, $err.msg]) |
19:48:36 | FromGitter | <Bennyelg> import strutils of course |
19:48:54 | Yardanico | btw, |
19:48:57 | Yardanico | don't use intToStr |
19:49:02 | Yardanico | just use $i |
19:49:05 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
19:49:14 | FromGitter | <Bennyelg> I did, what is the different between them? |
19:49:57 | FromGitter | <Bennyelg> strutils.nim % ⏎ strutils.nim addf ⏎ strutils.nim invalidFormatString ⏎ Error: unhandled exception: invalid format string [ValueError] [https://gitter.im/nim-lang/Nim?at=59e50d65b20c6424290dc753] |
19:50:07 | Yardanico | you can generate "00001" for int 1 with intToStr(1, 5) |
19:50:27 | FromGitter | <Bennyelg> echo("Failed on try: NO# 1$, because: $2" % [$i, err.msg]) |
19:50:52 | FromGitter | <Yardanico> "1$" |
19:50:56 | FromGitter | <Yardanico> it should be "$1" |
19:51:11 | FromGitter | <Bennyelg> Thanks! |
19:52:56 | * | Vladar quit (Remote host closed the connection) |
20:00:05 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e50fc401110b7231c36ae6] |
20:00:11 | FromGitter | <Bennyelg> this is why I freaking love nim. |
20:00:33 | FromGitter | <Yardanico> you also don't need to specify numberOfTimes and sleepTimeInSec |
20:00:37 | FromGitter | <Yardanico> just retry(5, 5) |
20:00:46 | FromGitter | <Bennyelg> I know I'ts just for readability |
20:03:18 | FromGitter | <Yardanico> also it should be sleepTimeInSec * 1000 |
20:03:24 | FromGitter | <Yardanico> because 1 second is 1000 ms :) |
20:03:30 | FromGitter | <Bennyelg> yea I misplled it |
20:06:37 | * | Laon joined #nim |
20:09:01 | * | Laon89 quit (Ping timeout: 252 seconds) |
20:18:45 | * | Jesin quit (Quit: Leaving) |
20:20:17 | * | Jesin joined #nim |
20:20:20 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e5148332e080696eea8d84] |
20:20:37 | FromGitter | <Bennyelg> little help with Option[person] which means I dont always will get a result? |
20:21:46 | FromGitter | <Yardanico> @Bennyelg https://nim-lang.org/docs/options.html |
20:22:47 | FromGitter | <Yardanico> you should return some(person) |
20:23:05 | FromGitter | <Bennyelg> proc `[]`*(persons: seq[Person], pName: string): Option[Person] = ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e51529614889d475c1b47a] |
20:23:06 | FromGitter | <Bennyelg> thanks |
20:23:09 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e5152de44c43700a3f114f] |
20:23:11 | FromGitter | <Bennyelg> :) |
20:23:29 | FromGitter | <Yardanico> and you don't need none(Person) |
20:23:31 | FromGitter | <Yardanico> it's optional :) |
20:23:56 | FromGitter | <Bennyelg> oh, brilliant I'm always inspired & get surprised more |
20:24:48 | Yardanico | well in some places nim requires you to be explicit |
20:24:57 | Yardanico | e.g. with async procedures you should write Future[mytype] as return type |
20:25:12 | Yardanico | but this can be actually made to be implicit - macro can change proc definition |
20:25:25 | Yardanico | so in this case it's optional |
20:25:29 | Yardanico | Option(al) |
20:25:33 | FromGitter | <Bennyelg> Ya, I save macros to the end because this is pretty hard subject |
20:33:42 | * | Ven joined #nim |
20:34:06 | * | Ven is now known as Guest35881 |
20:34:21 | * | Arrrr quit (Read error: Connection reset by peer) |
20:37:07 | shashlick | Araq: I tried echo pkgname and it doesn't work within a .nimble file. echo version works. However, I'm only setting version and not pkgname since it wasn't mentioned in the docs to be set |
20:37:48 | Yardanico | shashlick, are you sure it wasn't? |
20:38:09 | Yardanico | ah yes |
20:38:14 | Yardanico | it's not :P |
20:38:31 | shashlick | i presume nimble deciphers it from the nimble file name |
20:39:28 | Araq | oh yeah right |
20:39:40 | Araq | so ... your script should know the name :P |
20:41:00 | shashlick | it doesn't so not quite sure what to do other than hard code |
20:41:24 | * | Nobabs27 joined #nim |
20:42:43 | Yardanico | Araq, I assume you will not stream today? |
20:54:09 | FromGitter | <hcorion> what platform does Araq stream to? |
20:54:58 | FromGitter | <mratsim> twitch |
20:55:03 | FromGitter | <hcorion> link? |
20:55:14 | * | miran_ quit (Quit: Leaving) |
20:55:59 | * | Guest35881 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:57:04 | Yardanico | https://go.twitch.tv/araq4k |
20:57:08 | Yardanico | but he doesn't stream now |
21:00:08 | * | Laon89 joined #nim |
21:00:57 | * | Laon quit (Ping timeout: 240 seconds) |
21:02:41 | Araq | sorry no |
21:05:49 | Yardanico | Araq, just save this poll link for tomorrow :) |
21:06:15 | * | user0 quit (Quit: user0) |
21:08:42 | * | user0 joined #nim |
21:10:07 | * | derlafff quit (Ping timeout: 255 seconds) |
21:10:46 | * | user0 quit (Client Quit) |
21:11:01 | * | user0 joined #nim |
21:13:27 | * | lastjedi quit (Ping timeout: 260 seconds) |
21:19:58 | * | Laon89 quit (Ping timeout: 252 seconds) |
21:24:46 | * | fauzi joined #nim |
21:26:04 | * | fauzi left #nim (#nim) |
21:32:09 | * | couven92 quit (Quit: Client Disconnecting) |
21:37:27 | * | yglukhov quit (Remote host closed the connection) |
21:40:35 | * | derlafff joined #nim |
21:45:01 | * | dhalinar joined #nim |
21:47:28 | * | derlafff quit (Ping timeout: 255 seconds) |
21:55:20 | * | derlafff joined #nim |
22:00:21 | * | kafke joined #nim |
22:03:48 | * | nsf quit (Quit: WeeChat 1.9) |
22:17:02 | FromGitter | <zacharycarter> o/ |
22:18:28 | Yardanico | hi |
22:18:34 | Yardanico | it's 01:18 am here |
22:19:20 | FromGitter | <zacharycarter> late |
22:19:23 | FromGitter | <zacharycarter> I'm about to start modeling again |
22:24:52 | * | JappleAck quit (Ping timeout: 252 seconds) |
22:29:22 | * | def-pri-pub joined #nim |
22:30:18 | * | SusWombat quit (Remote host closed the connection) |
22:31:16 | FromGitter | <mratsim> @Araq, I think the mutable iterator in C++ issue is not completely solved ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ bug report coming tomorrow when I have a test case with seqs [https://gitter.im/nim-lang/Nim?at=59e53334177fb9fe7e88965c] |
22:37:35 | * | JappleAck joined #nim |
22:37:58 | * | yglukhov joined #nim |
22:42:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
22:42:37 | FromGitter | <Yardanico> @mratsim btw, nimsuggest doesn't check for errors |
22:42:40 | FromGitter | <Yardanico> "nim check" does |
22:47:42 | Yardanico | dom96, probably you're not here, but I think I know why you didn't spot that your concepts example is wrong |
22:48:12 | Yardanico | simply because it executed built-in "max" procedure, and not yours :) so that's why it "worked", it "works" the exact same way now |
22:48:52 | Yardanico | you can already know that because nim check says that our "max" proc isn't used |
22:50:27 | * | dhalinar quit (Ping timeout: 240 seconds) |
22:51:12 | Yardanico | probably you don't use concepts very often :) I think most of us doesn't :D |
22:56:09 | Yardanico | dom96, also this vscode extension can be helpful for twitch - https://marketplace.visualstudio.com/items?itemName=irth.twitchlint |
23:04:33 | * | kafke quit (Ping timeout: 248 seconds) |
23:05:58 | * | arnetheduck joined #nim |
23:06:34 | FromGitter | <mratsim> This morning we were talking about list comprehension, this is quite another way to do it: https://forum.nim-lang.org/t/2223 |
23:07:58 | Yardanico | that's actually a nice way |
23:08:21 | Yardanico | btw I tested now how good can I stream on twitch, and the quality is pretty good - https://go.twitch.tv/yardanico |
23:08:48 | * | kafke_ joined #nim |
23:09:03 | Yardanico | it's also because I have Nvidia GPU |
23:09:40 | Yardanico | so I can use NVENC for video encoding in OBS studio (on linux) |
23:10:45 | * | TjYoco quit (Quit: Leaving) |
23:11:09 | Yardanico | mratsim: yeah, the whole implementation is only ~100 lines |
23:11:21 | Yardanico | https://gist.github.com/Yardanico/3ec5b9a83421a3de5d220dde66a6ee63 |
23:14:48 | * | Yardanico quit (Remote host closed the connection) |
23:17:23 | * | def-pri-pub quit (Quit: Leaving.) |
23:33:48 | * | dhalinar joined #nim |
23:38:42 | * | ryanhowe joined #nim |
23:45:59 | * | zolk3ri quit (Quit: Lost terminal) |
23:48:29 | * | JappleAck quit (Ping timeout: 258 seconds) |
23:50:24 | * | ryanhowe quit (Read error: Connection reset by peer) |
23:50:28 | * | def-pri-pub joined #nim |
23:50:38 | * | def-pri-pub quit (Client Quit) |
23:54:41 | * | voiceftp quit (Quit: Leaving) |
23:57:27 | * | ipjk quit (Quit: Leaving) |