00:07:14 | * | athenot quit (Read error: Connection reset by peer) |
00:10:54 | * | athenot joined #nim |
00:10:54 | * | athenot quit (Remote host closed the connection) |
00:11:10 | * | athenot_ joined #nim |
00:14:27 | * | CodeVance2 quit (Ping timeout: 240 seconds) |
00:16:02 | * | CodeVance joined #nim |
00:21:13 | * | athenot_ quit (Read error: Connection reset by peer) |
00:21:30 | * | athenot joined #nim |
00:22:01 | * | lukas__ quit (Ping timeout: 256 seconds) |
00:24:25 | * | lukas__ joined #nim |
00:28:13 | * | athenot quit (Ping timeout: 265 seconds) |
00:31:06 | * | athenot joined #nim |
00:50:19 | * | CodeVance quit (Ping timeout: 260 seconds) |
00:58:52 | * | CodeVance joined #nim |
01:01:31 | * | g-glitch quit (Remote host closed the connection) |
01:09:07 | * | yglukhov joined #nim |
01:13:35 | * | yglukhov quit (Ping timeout: 256 seconds) |
01:28:02 | * | vivus quit (Quit: Leaving) |
01:40:22 | * | flaviu joined #nim |
01:42:21 | flaviu | I just wanted to drop in and complain that appveyor takes for-fucking-ever to run tests :P |
01:44:11 | * | CodeVance quit (Ping timeout: 256 seconds) |
01:53:10 | * | leorize quit (Read error: Connection reset by peer) |
02:02:16 | * | leorize joined #nim |
02:36:02 | * | athenot quit (Ping timeout: 276 seconds) |
02:45:30 | FromGitter | <Varriount> CodeVance: Well, for "dyamic" variables I would just use object variants. |
02:45:59 | FromGitter | <Varriount> Or have overloaded procedures deal with different types. |
02:46:04 | FromGitter | <Varriount> Or use generics. |
03:02:41 | * | dddddd quit (Remote host closed the connection) |
03:19:53 | * | endragor joined #nim |
03:21:57 | * | leorize quit (Ping timeout: 264 seconds) |
03:23:42 | * | leorize joined #nim |
03:30:26 | * | CodeVance joined #nim |
03:42:10 | * | lukas__ quit (Ping timeout: 268 seconds) |
04:04:49 | * | leorize quit (Ping timeout: 248 seconds) |
04:08:45 | * | lukas__ joined #nim |
04:11:32 | * | r3d9u11 joined #nim |
04:15:29 | * | lukas__ quit (Ping timeout: 256 seconds) |
04:37:17 | * | darithorn quit (Quit: Leaving) |
04:39:48 | * | girvo quit (Quit: Ping timeout (120 seconds)) |
04:40:14 | * | girvo joined #nim |
04:50:25 | * | miran joined #nim |
04:53:14 | * | r3d9u11 quit (Remote host closed the connection) |
05:06:42 | * | bl4rk_ quit (Remote host closed the connection) |
05:16:03 | * | rokups joined #nim |
05:18:28 | * | leorize joined #nim |
05:31:01 | leorize | hi, can someone please resend the confirmation email for the account leorize on the Nim forum? |
05:34:49 | * | nsf joined #nim |
05:36:23 | * | xet7 joined #nim |
05:41:59 | * | CodeVance quit (Ping timeout: 260 seconds) |
05:42:06 | * | def- quit (Quit: -) |
05:43:58 | * | CodeVance joined #nim |
05:44:55 | * | def- joined #nim |
05:46:32 | * | tiorock joined #nim |
05:46:32 | * | tiorock quit (Changing host) |
05:46:32 | * | tiorock joined #nim |
05:46:32 | * | rockcavera quit (Killed (verne.freenode.net (Nickname regained by services))) |
05:46:32 | * | tiorock is now known as rockcavera |
05:52:40 | * | gangstacat quit (Remote host closed the connection) |
05:53:10 | * | gangstacat joined #nim |
05:59:04 | * | leorize quit (Ping timeout: 268 seconds) |
06:11:06 | FromGitter | <Varriount> Leorize: You may have to wait until some of the admins are awake. What happened to the original email? |
06:12:13 | * | miran quit (Ping timeout: 256 seconds) |
06:12:37 | * | leorize joined #nim |
06:52:19 | * | NimBot joined #nim |
06:56:43 | FromGitter | <gogolxdong> I'm issuing request from javascript websocket. |
07:29:39 | FromGitter | <gogolxdong> question is how to adjust javascript websocket headers. |
07:37:08 | * | PMunch joined #nim |
07:41:51 | FromGitter | <gogolxdong> never mind ,figured it out. |
07:54:04 | FromGitter | <gogolxdong> javascript websocket will cause ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aeac01cb37eab7d0463554d] |
07:54:19 | * | noonien joined #nim |
08:03:07 | * | yglukhov joined #nim |
08:04:51 | * | sendell joined #nim |
08:12:40 | FromGitter | <gogolxdong> @PMunch , readAll doesn't read as I newFileStream of the protobuf data file. |
08:17:33 | FromGitter | <gogolxdong> strange , readFile() and FileStream.readAll doesn't read protobuf data file. |
08:18:50 | FromGitter | <gogolxdong> data file sizes 152.6KB |
08:19:38 | * | floppydh joined #nim |
08:21:02 | PMunch | Hmm, that sounds like you're either doing something wrong, or that it's a bug with streams. |
08:21:07 | PMunch | Code and file? |
08:22:29 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aeac6c4b37eab7d04636cca] |
08:24:12 | FromGitter | <gogolxdong> data file has messy code in gist ,because of chinese character. https://gist.github.com/gogolxdong/cc9c4f63c63104af88f68a55ffdaed2a |
08:25:39 | FromGitter | <gogolxdong> It's not only stream , system.readFile() doesn't read neither. |
08:31:01 | * | yglukhov quit (Read error: Connection reset by peer) |
08:31:36 | * | yglukhov joined #nim |
08:32:59 | * | PMunch quit (Quit: Leaving) |
08:34:14 | * | PMunch joined #nim |
08:37:32 | PMunch | Seems to work fine for me |
08:40:03 | PMunch | gogolxdong: http://ix.io/19ip/ |
08:40:14 | FromGitter | <survivorm> What's common error type for type mismatch? |
08:40:52 | FromGitter | <survivorm> And is there a way to add compile-time check to the template? |
08:41:38 | FromGitter | <survivorm> Like `+=` template check for `a[T] + b = c[T]`? |
08:42:38 | PMunch | Not quite sure what you want to do there |
08:44:57 | * | Vladar joined #nim |
08:45:14 | FromGitter | <survivorm> I want to perform a check on ⏎ ⏎ ```template `+=`*(a, b: typed)= ⏎ ## Mutator for a[T] if a + b = c[T] operation is declared``` ⏎ ⏎ Check a + b = c[T], where T = type of a [https://gitter.im/nim-lang/Nim?at=5aeacc19b982f08504ed792f] |
08:47:22 | FromGitter | <survivorm> It produces error otherwise, but not quite the exact one, in my opinion |
08:47:53 | PMunch | Ah, you want to improve the error message |
08:48:03 | * | Sembei quit (Ping timeout: 256 seconds) |
08:48:03 | * | MyMind joined #nim |
08:48:21 | PMunch | Well, you could use "when compiles" |
08:48:28 | PMunch | But that will take any error |
08:49:17 | PMunch | Or use "static: assert" to check the types yourself |
08:51:38 | FromGitter | <survivorm> How to get the type of expression? |
08:52:12 | PMunch | Silly little example: http://ix.io/19iv/ |
08:52:40 | PMunch | Will throw the error like that on compile-time. But if you change 5.0 to 5 it doesn't throw an error and runs fine. |
08:53:13 | PMunch | Oh, you don't need the typetraits module for that either |
08:53:20 | PMunch | So you can remove the import |
08:56:20 | PMunch | If you want to use the type name in the error message you can include it though: http://ix.io/19ix/ |
08:58:07 | FromGitter | <survivorm> Oh, thanks, it's precisely that i needed |
08:58:37 | PMunch | No problem :) |
09:08:15 | * | Ven`` joined #nim |
09:08:26 | * | Ven`` quit (Read error: Connection reset by peer) |
09:09:30 | * | Ven`` joined #nim |
09:10:34 | FromGitter | <survivorm> except last one doesn't work without typetraits... |
09:10:58 | FromGitter | <survivorm> And i'm not quite sure to add it as a dependency |
09:16:30 | FromGitter | <mratsim> typetraits is part of stdlib |
09:16:45 | * | def- quit (Quit: -) |
09:16:46 | FromGitter | <mratsim> you don’t need to add it as a dependency, just import it |
09:18:34 | * | def- joined #nim |
09:27:24 | FromGitter | <survivorm> Thanks |
09:29:29 | * | yglukhov quit (Read error: Connection reset by peer) |
09:30:02 | * | yglukhov joined #nim |
09:47:27 | FromGitter | <data-man> @PMunch: You don't want to add your binaryparse library to this list? https://github.com/dloss/binary-parsing |
09:50:14 | PMunch | Uh, sure. I'm doing a little cleanup of the project and writing a bit about it right now. I'll add it when it's done :) |
10:00:06 | * | leorize quit (Ping timeout: 240 seconds) |
10:02:44 | * | xkapastel quit (Quit: Connection closed for inactivity) |
10:16:17 | * | sz0 quit (Quit: Connection closed for inactivity) |
10:18:58 | * | yglukhov_ joined #nim |
10:21:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
10:33:07 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:37:41 | PMunch | gogolxdong, how is protobuf working for you now? Got it running? |
10:48:14 | * | rockcavera quit (Ping timeout: 260 seconds) |
10:55:56 | FromGitter | <alehander42> what is the best way to read async from a process ? osproc seems to be sync only |
10:57:01 | PMunch | From a process? |
10:58:13 | dom96 | asynctools package |
10:58:15 | dom96 | or use a thread |
11:01:45 | FromGitter | <alehander42> asynctools seems good thanks |
11:04:21 | FromGitter | <alehander42> ok it worked, I will use it |
11:06:47 | * | yglukhov_ quit (Ping timeout: 268 seconds) |
11:10:25 | * | yglukhov joined #nim |
11:25:19 | * | leorize joined #nim |
11:28:51 | * | crem quit (Ping timeout: 240 seconds) |
11:31:54 | FromGitter | <gogolxdong> @PMunch ,yes ,thanks for asking , stuck at the websocket sending. |
11:31:57 | * | crem joined #nim |
11:34:04 | * | rockcavera joined #nim |
11:57:19 | PMunch | Vindaar, doing some functional programming in Nim? |
11:57:29 | PMunch | Saw you had stared my persistent vectors library :) |
12:18:47 | planetis[m] | Hey can you review this PR https://github.com/nim-lang/Nim/pull/7276 |
12:26:10 | FromGitter | <krux02> planetis: why did you remove {.nosideeffect.}? |
12:27:33 | planetis[m] | because factTable in the previous commit was global |
12:27:43 | planetis[m] | think is I dont know if I need to make it global or have it as now |
12:28:00 | planetis[m] | *thing |
12:31:34 | planetis[m] | Thanks for the comments! |
12:31:37 | * | dddddd joined #nim |
13:03:50 | * | athenot joined #nim |
13:10:12 | * | FuntDobra joined #nim |
13:10:25 | * | SenasOzys quit (Ping timeout: 248 seconds) |
13:11:03 | * | endragor quit (Remote host closed the connection) |
13:14:51 | * | SenasOzys joined #nim |
13:19:50 | PMunch | Hmm, is there a way to get the name of fields in a type? |
13:32:02 | * | endragor joined #nim |
13:32:48 | * | SenasOzys quit (Remote host closed the connection) |
13:35:31 | * | nixfreak joined #nim |
13:36:27 | * | endragor quit (Ping timeout: 240 seconds) |
13:38:25 | * | FuntDobra quit (Quit: Leaving) |
13:38:26 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:38:57 | * | nixfreak quit (Client Quit) |
13:43:33 | FromGitter | <xmonader> Any practical Idea for nim day 5? |
13:45:32 | * | xkapastel joined #nim |
13:47:23 | FromGitter | <Bennyelg> echoing jsonNode |
13:52:55 | * | athenot_ joined #nim |
13:54:38 | * | athenot quit (Ping timeout: 276 seconds) |
13:57:42 | * | rockcavera quit (Remote host closed the connection) |
13:59:56 | PMunch | Yeah what is this nim day thing of yours xmonader? |
14:00:00 | PMunch | I'm enjoying it :) |
14:02:29 | * | leorize quit (Ping timeout: 260 seconds) |
14:10:55 | * | rockcavera joined #nim |
14:14:42 | FromGitter | <survivorm> @dom96 here? |
14:15:30 | FromGitter | <survivorm> then you said to move `+=` and other mutators to system, you've meant lib/system.nim? |
14:15:44 | FromGitter | <survivorm> or somethere else? |
14:16:19 | dom96 | yes, but I talked with Araq about it and he thinks we'll need to solve this some other way |
14:16:19 | * | Vladar quit (Quit: Leaving) |
14:16:24 | dom96 | so maybe an issue is better |
14:16:39 | FromGitter | <survivorm> And if so, then how to do with typetraits? system.nim have no imports, and i think for a reason |
14:16:57 | * | leorize joined #nim |
14:17:03 | FromGitter | <survivorm> then what will we do with my pr? |
14:20:16 | dom96 | survivorm: your PR doesn't depend on these operators |
14:20:25 | dom96 | We can figure out how to introduce them later |
14:20:59 | FromGitter | <survivorm> then what? Throw out the mutators commit? |
14:22:23 | FromGitter | <survivorm> Frankly, that was one of the points why i started the pr. Consistency. Times had plenty places where you have, for example, `+` and don't have `+=` and etc. |
14:22:43 | FromGitter | <survivorm> That was just infuriating me |
14:24:21 | dom96 | I see. I think this should be a separate PR, we can add these procs as a stop-gap until we figure out a nicer way to introduce them. But I want us to have a discussion about the long-term of how these procs should be implemented, I don't want every single damn library to define twice as many operators to have `+=` and `+`. |
14:24:43 | * | miran joined #nim |
14:32:17 | livcd | hmm I am trying to run the mofuw example but when I visit the localhost:8080 it just crashes |
14:33:50 | PMunch | What example? |
14:35:19 | livcd | basically this: https://github.com/2vg/mofuw/blob/master/tests/helloworld/minimal.nim |
14:36:21 | PMunch | Oh, a new webserver thingy? |
14:37:15 | livcd | can anyone check it out on windows nim 0.18.1 |
14:39:04 | PMunch | I think my brain strained something reading that README :P |
14:39:21 | PMunch | I'm on linux so I can't help you :( |
14:39:33 | livcd | well the guy is japanese :) |
14:39:53 | PMunch | That makes sense |
14:40:13 | PMunch | I was more talking about the S T Y L E of his writing |
14:42:43 | * | yglukhov quit (Read error: Connection reset by peer) |
14:43:17 | * | yglukhov joined #nim |
14:43:21 | livcd | hmm bummer |
14:46:11 | livcd | I'll try on linux then. |
14:51:57 | * | leorize quit (Quit: WeeChat 2.1) |
14:54:50 | * | ieatnerds joined #nim |
14:55:28 | * | darithorn joined #nim |
14:59:15 | PMunch | Yeees, join the dark side of the force |
14:59:15 | dom96 | It's possible mofuw was never tested on Windows |
14:59:29 | dom96 | I specifically ignored Windows for my httpbeast package |
14:59:36 | PMunch | Well he does have a build badge for Windows which says passed |
14:59:52 | PMunch | But then it says that Windows is shitty two sentences below.. |
14:59:53 | livcd | well it compiles but that's it |
14:59:56 | PMunch | So who knows |
14:59:59 | livcd | that's a shame tbh |
15:00:18 | dom96 | What's wrong with asynchttpserver? :) |
15:01:34 | livcd | nothing i just wanted to test this one out |
15:14:19 | * | PMunch quit (Quit: Leaving) |
15:20:09 | * | floppydh quit (Quit: WeeChat 2.1) |
15:30:28 | * | Trustable joined #nim |
15:44:07 | * | yglukhov_ joined #nim |
15:46:49 | * | yglukhov quit (Ping timeout: 256 seconds) |
15:59:16 | FromGitter | <data-man> It's correct. use s.len-1 or s.high |
16:03:33 | miran | something is broken again, i don't see stisa's message on IRC |
16:03:45 | FromGitter | <Vindaar> @PMunch: nope, not exactly. Just really like the persistent vectors in Clojure and might want to play around with it :) |
16:04:03 | miran | (but i see vindaar's and data-man's messages) |
16:04:06 | ieatnerds | @miran: same... |
16:04:43 | miran | hmmm, maybe is the same thing in the gitter settings that has made mratsim's messages invisible |
16:06:00 | * | Vindaar joined #nim |
16:06:23 | shashlick | miran: I don't see stisa in either gitter (via irc.gitter.com) or #nim |
16:06:32 | shashlick | but i see it on gitter proper |
16:06:50 | FromGitter | <narimiran> hey @mratsim what does @stisa have to do so his messages are seen on IRC? |
16:07:02 | Vindaar | Let's see if I have problems with irc too. Have noticed before though that sometimes @mratsim's messages don't pop up on gitter |
16:07:23 | FromGitter | <mratsim> Deactivate Gitter “next" |
16:07:42 | Vindaar | I can see that :) |
16:07:58 | FromGitter | <mratsim> but I don’t see stisa’s messages on Gitter, when was it? |
16:08:07 | FromGitter | <Vindaar> 18:03 |
16:08:16 | miran | 17:35 |
16:08:27 | FromGitter | <Vindaar> I meant the last one |
16:08:38 | * | icebattle joined #nim |
16:08:52 | FromGitter | <stisa> lets try, I deactivated next, is this visible? |
16:08:55 | FromGitter | <mratsim> yes |
16:08:59 | miran | yes!! |
16:09:00 | FromGitter | <mratsim> now I see your message |
16:09:20 | FromGitter | <stisa> great, thanks |
16:09:47 | FromGitter | <mratsim> I guess they still didn’t solve the issue from yesterday or the day before for their dev version |
16:12:21 | FromGitter | <mratsim> by the way @miran, regarding the slowness vs Python, Arraymancer is heavily impacted by this: https://github.com/nim-lang/Nim/issues/7743 |
16:13:28 | miran | yeah, i've seen that you have raised it. hopefully this will be fixed in the near future so we can have our performance back |
16:13:49 | FromGitter | <mratsim> I think what’s happening is that when you have an object that contains a seq as a result value, the GC will run at the start of the proc, and then it will re-run again when I actually assign the `result=`. To avoid this I used {.noInit.} but now they are ignored to solve another bug. |
16:14:19 | miran | that is way above my level of understanding nim :) |
16:15:01 | FromGitter | <mratsim> proc foo(): seq[int] = —> upon entering the proc, GC runs for the result |
16:15:18 | FromGitter | <mratsim> result = @[1, 2, 3] —> GC runs again to allocate the seq |
16:15:37 | FromGitter | <mratsim> (and maybe it runs again a 3rd time for the = assignment ?) |
16:15:44 | miran | ouch |
16:15:44 | FromGitter | <krux02> is the GC really started for every allocation? |
16:16:30 | FromGitter | <krux02> @mratsim well soon seq shouldn't depend on the GC anymore at all. |
16:16:31 | FromGitter | <mratsim> it’s been a while since I hunted this kind of perf issue but, basically {.noInit.} allowed me to remove a bunch of GenericReset/Aux that are super slow |
16:16:34 | FromGitter | <krux02> (I think) |
16:16:52 | miran | "soon (TM)"? :) |
16:16:59 | FromGitter | <mratsim> Soon Valve Time |
16:17:19 | FromGitter | <Vindaar> now that's just mean :P |
16:17:25 | FromGitter | <krux02> λ3? |
16:17:30 | FromGitter | <mratsim> :P |
16:18:02 | FromGitter | <krux02> I always thought λ has an h like in halflife |
16:18:04 | dom96 | mratsim: why does it run upon entering the proc? |
16:18:08 | FromGitter | <krux02> until I learned differently |
16:19:15 | FromGitter | <mratsim> @dom96, I’m not really sure, actually I think the GC is inserting some GenericReset where it can. I remember while debugging a slowness in my go playing bot, I had GenericResetAux call in a completely unrelated proc. |
16:19:22 | FromGitter | <mratsim> I turned it into an iterator to avoid that |
16:20:01 | FromGitter | <mratsim> https://github.com/mratsim/golem-prime/commit/a61b3d41051208ce22ff5c332c514dd3379b1fb1 |
16:23:24 | FromGitter | <Vindaar> @mratsim would you be willing to someday write some notes about how you do that kind of performance profiling? Or point me the right direction if there's anything out there? |
16:24:05 | FromGitter | <mratsim> Apple Instruments —> Time profiler. It gives you timing, details on each proc, the call counts, the inline assembly. |
16:24:51 | FromGitter | <mratsim> I should write a blog about that yes |
16:24:57 | FromGitter | <mratsim> I actually should code my blog :P |
16:25:33 | FromGitter | <mratsim> example of the high level view: https://github.com/mratsim/Arraymancer/issues/221, and the assembly view when you click on any proc: https://github.com/status-im/nim-stint/issues/10 |
16:26:18 | FromGitter | <Vindaar> that would be sweet! ⏎ Ahh, I remember seeing that screenshot before. I guess I need to find a Linux tool providing the same then |
16:27:19 | FromGitter | <mratsim> gcc -S might help but the ASM still has a lot of useless fluff, also `perf` can give you cache misses and instruction per cycle |
16:27:28 | FromGitter | <mratsim> and maybe can be more instrumentalized. |
16:28:59 | FromGitter | <Vindaar> yeah, used `perf` at some point in the past, but didn't spend enough time with it to get much use out of it. Unfortunately performance profiling is not *needed* for me, so I can hardly justify time spent on it, although I like doing it :/ |
16:29:12 | * | FromDiscord quit (Remote host closed the connection) |
16:29:51 | dom96 | IIRC somebody wrote an article explaining how to use Apple Instruments with Nim |
16:29:53 | * | FromDiscord joined #nim |
16:30:04 | dom96 | maybe I was dreaming though |
16:30:46 | * | sendell quit (Remote host closed the connection) |
16:38:18 | * | lukas_ joined #nim |
16:39:06 | * | vivus joined #nim |
16:40:23 | * | Eyess is now known as SunDwarf |
16:41:35 | * | kier quit (Ping timeout: 240 seconds) |
16:41:39 | * | Ven`` joined #nim |
16:43:21 | * | Ven`` quit (Read error: Connection reset by peer) |
16:45:41 | * | kier joined #nim |
16:50:13 | * | jrbrt joined #nim |
16:52:45 | shashlick | do we want github issue updates in here? |
16:52:47 | * | thor77_ is now known as thor77 |
16:58:03 | FromGitter | <data-man> @stisa: Done #7763 |
16:58:08 | FromGitter | <data-man> Thanks! |
17:01:21 | * | xet7 quit (Ping timeout: 248 seconds) |
17:12:09 | * | xet7 joined #nim |
17:15:00 | * | xkapastel quit (Quit: Connection closed for inactivity) |
17:20:35 | * | brainproxy quit (Quit: WeeChat 2.1) |
17:25:27 | dom96 | shashlick: nah, too noisy |
17:30:27 | * | lukas_ quit (Ping timeout: 240 seconds) |
17:33:55 | Araq | please |
17:34:07 | Araq | dom96: I want them here |
17:34:16 | Araq | people need to be exposed to the action |
17:35:06 | miran | can't we just click "watch" on the github repo and be exposed to the action? |
17:37:00 | ieatnerds | Yeah, I don't see much reason to have the updates pop up on here. Already quite a few ways to keep an eye on them without cluttering a text chat. |
17:37:41 | FromGitter | <krux02> I also don't like issue updates here |
17:38:31 | FromGitter | <krux02> it is like those online offline messages in IRC, you just have to work very hard to get them finally be filtered out. |
17:38:43 | FromGitter | <krux02> but nobody cares |
17:39:25 | FromGitter | <krux02> but maybe I am wrong, issues are not that many as people coming/leaving |
17:41:15 | ieatnerds | I doubt any of us have access to irc without access to email updates for the issues or other notifications from github. just seems like it might be excessive. |
17:43:25 | Araq | ok, never mind then |
17:44:18 | * | PMunch joined #nim |
17:48:51 | FromGitter | <data-man> I don't use receiving github notifications to the mail. |
17:51:12 | FromGitter | <krux02> @data-man you get notifications to the mail on your own issues. And that is quite fine to me. |
17:52:36 | FromGitter | <data-man> No, I don't get notifications. I turned off this option. |
17:54:30 | FromGitter | <alehander42> what would be cool would be some kind of updates in the right panel (under people in gitter), one can see it in the Julia room |
17:54:40 | FromGitter | <alehander42> it doesn't mess with the chat and it's easily hide-able |
17:54:44 | FromGitter | <alehander42> but that's gitter-only |
17:55:00 | ieatnerds | could just have another room specifically for issue updates. |
17:55:37 | FromGitter | <alehander42> I meant the activity tab in https://gitter.im/JuliaLang/julia |
17:55:59 | FromGitter | <alehander42> (they use it for SO, but it can be easily adapted for other stuff) |
18:08:32 | * | lukas_ joined #nim |
18:12:25 | * | Vindaar left #nim ("ERC (IRC client for Emacs 26.0.50.2)") |
18:20:32 | FromGitter | <krux02> I think IRC is too important to people here |
18:21:55 | shashlick | we could always have a separate channel for that |
18:22:23 | shashlick | like #nimbuild which isn't really used looks like |
18:23:58 | shashlick | in the last 3 hours, I have 7 messages |
18:29:50 | FromGitter | <Vindaar> just created a PR to `nim-mode` to add the `func` keyword https://github.com/nim-lang/nim-mode/pull/194 |
18:30:11 | FromGitter | <Vindaar> (after seeing @mratsim using it all the time already, haha) |
18:47:05 | * | lukas_ quit (Ping timeout: 240 seconds) |
18:50:55 | * | lukas_ joined #nim |
18:56:28 | * | Vladar joined #nim |
18:58:31 | livcd | so i cant use choosenim on x64 windows |
18:58:59 | miran | livcd: yeah, it's a bummer, and a problem i faced recently |
18:59:11 | dom96 | Huh? You totally can |
18:59:22 | miran | nim-64bit |
18:59:23 | dom96 | You'll get 32bit Nim, but why is that a big deal? |
18:59:44 | livcd | i do not want 32bit nim! |
19:00:09 | miran | livcd: install from https://nim-lang.org/install_windows.html |
19:00:27 | livcd | i will! |
19:01:09 | dom96 | why not? |
19:01:20 | shashlick | dom96: what's the main limitation in choosenim for x64? anything architectural or just implementation + test |
19:02:31 | * | xkapastel joined #nim |
19:02:33 | FromGitter | <krux02> choosenim can't do 64 bit? what? |
19:02:35 | dom96 | Just implementation. Also a good plan of how the CLI should work for choosing a specific cpu arch |
19:02:46 | miran | krux02: on windows |
19:02:47 | dom96 | choosenim --cpu:amd64 stable? |
19:02:51 | FromGitter | <krux02> isn't 32 bit CPU almost non-existent |
19:02:59 | dom96 | choosenim cpu amd64; choosenim stable? |
19:03:15 | dom96 | krux02: Windows supports 32bit apps for backwards compatibility |
19:03:22 | shashlick | i think x64 OS should install x64 by default, unless user says 32bit |
19:03:36 | livcd | so now i am reinstalling nim...ill report on experience |
19:03:36 | shashlick | obviously installing 64bit on 32bit OS should not be allowed at all |
19:03:43 | dom96 | shashlick: Okay, that's what I thought. Good. |
19:04:09 | shashlick | is there any compiler detection code in choosenim? |
19:04:34 | miran | livcd: for me it was surprisingly simple and problem-free |
19:04:38 | dom96 | I guess the architecture of Nim doesn't really matter, rather it's about the C compiler that is installed. |
19:04:49 | livcd | miran: choosenim worked flawlessly on linux |
19:04:51 | FromGitter | <data-man> And 32bit apps on Windows have memory limitations. |
19:05:02 | livcd | so i have an existing mingw64 installed |
19:05:08 | miran | livcd: yeah, for me too. linux at home, win at work.... |
19:05:09 | livcd | now unziping Nim |
19:05:27 | * | darithorn quit (Ping timeout: 240 seconds) |
19:05:29 | dom96 | oh yeah, if you have an existing mingw64 install then choosenim will fail |
19:06:10 | dom96 | FWIW when I used Nim on Windows I always compiled software for 32bit because finding 64bit DLLs for things was a nightmare |
19:06:35 | shashlick | I do the same thing - I just use 32bit since none of my progs need 64bit plus easier to distribute one binary |
19:07:13 | * | darithorn joined #nim |
19:07:16 | shashlick | now I don't know if 64-bit compiled program is faster or whatever but i'm not trying to break any world records either |
19:07:53 | shashlick | so dom96, if choosenim is downloading source and compiling, why does it care what the arch is? |
19:08:04 | Araq | I use Win64 all the time without problems fwiw |
19:08:05 | shashlick | assuming a compiler is already present, it should simply detect and use it |
19:08:30 | livcd | nim.exe is not in your PATH...buuut it is... |
19:08:32 | shashlick | i asked this question on the issue tracker as well but couldn't figure out the response |
19:08:47 | shashlick | livcd: using finish.exe? |
19:08:49 | dom96 | choosenim doesn't know what arch the C compiler in your PATH targets |
19:09:20 | livcd | shashlick: yes |
19:09:27 | * | lukas_ quit (Ping timeout: 240 seconds) |
19:09:43 | shashlick | okay so if you compile csources with a 64-bit compiler, you just get a 64-bit nim right? why does choosenim then not support a 64-bit setup? |
19:09:51 | shashlick | livcd: i fixed some bugs in finish recently |
19:10:03 | livcd | doing koch nimble |
19:11:00 | dom96 | shashlick: because I decided to simply go with 32bit as it always worked for me |
19:11:44 | dom96 | 32bit vs 64bit is just a case of running build.bat vs. build64.bat and having a C compiler with the correct architecture in your PATH |
19:11:55 | FromGitter | <data-man> choosenim could parse the output of gcc -v |
19:12:33 | livcd | ok smooth installation |
19:12:39 | shashlick | that code's already in finish.exe to detect compiler |
19:13:22 | FromGitter | <data-man> Or gcc -dumpmachine |
19:13:30 | shashlick | aah - that's the key - run build.bat vs build64.bat |
19:13:54 | livcd | nvm i thought the problem for the mofuw thing was 0.18.1 Nim |
19:14:07 | livcd | that's why I installed 0.18.0 but it still crashes |
19:14:43 | Araq | versions come and go, crashes persist |
19:14:56 | shashlick | so looking at build.bat and build64.bat, there's no difference besides 1_1 vs 1_2 |
19:15:27 | Araq | quality of Nim -- it's reliably unreliable throughout the decades |
19:15:28 | livcd | so what do i do to check where it crashes ? |
19:16:06 | shashlick | so why are there two batch files? what's the difference between 1_1 and 1_2 in csources |
19:16:12 | Araq | livcd: gdb it? |
19:16:28 | Araq | data-man: please read finish.nim |
19:16:36 | Araq | what you suggest is unreliable |
19:17:09 | shashlick | if we could merge the two bat files into one like build.sh, it will be great |
19:17:15 | Araq | shashlick: 1_2 is the 64bit build |
19:17:45 | Araq | 1_1 is the 32 bit build |
19:18:31 | shashlick | okay - i'll see if we can merge the two into a single batch file - that way choosenim will just work on 64-bit |
19:18:35 | Araq | dunno how to detect this, it doesn't depend on the OS |
19:18:47 | Araq | but on the installed mingw. |
19:19:18 | Araq | you can ask finish.exe in the bat file... |
19:19:27 | livcd | I never used gdb doh |
19:19:33 | dom96 | noooo |
19:19:33 | FromGitter | <data-man> @Araq: I already suggested that everyone use MSYS2 |
19:19:47 | dom96 | This is a conscious choice for the user IMO |
19:19:54 | Araq | MSYS2 is crap. |
19:19:55 | livcd | from the quick tutorial i just read I get this: https://paste.fedoraproject.org/paste/eOQg7kPIe8tomLFQVUlQTQ |
19:20:18 | shashlick | well, so i think installing a compiler should be separate |
19:20:23 | dom96 | At least 4% of Windows users still use 32bit Windows |
19:20:29 | shashlick | nim installer should detect, not install |
19:20:47 | Araq | the Nim installer is called "finish.exe" and it does detect it. |
19:20:48 | dom96 | So I'd rather distribute my binaries as 32bit exes |
19:21:00 | shashlick | user could use mingw, msys, vc++, tcc or whatever |
19:21:01 | miran | dom96: ...and they can install 32bit version from nim main page |
19:21:01 | Araq | the installation process also does NOT involve build(64).bat |
19:21:13 | shashlick | Araq: in choosenim, it does |
19:21:23 | miran | other 96% users can choose either official install or choosenim 64bit |
19:21:26 | shashlick | cause it installs from source today |
19:21:38 | shashlick | that's another feature that needs to come - install the binary already posted |
19:22:05 | Araq | well from source builds are for people who know more things |
19:22:08 | dom96 | oh right, forgot we distribute binaries for Windows |
19:22:23 | * | yglukhov_ quit (Read error: Connection reset by peer) |
19:22:28 | Araq | not sure what choosenim should do. |
19:22:50 | shashlick | feature list: finish GUI, finish independence from binary package, choosenim 64-bit, choosenim binary install, finish use choosenim |
19:22:59 | * | yglukhov joined #nim |
19:23:08 | livcd | when I try to compile with --debugger:on i get this https://paste.fedoraproject.org/paste/-nHMJ1sniGI2FHpBVVNLmQ |
19:23:20 | Araq | compile with --debugger:native |
19:23:29 | livcd | oops |
19:23:48 | FromGitter | <xmonader> https://github.com/xmonader/nim-configparser day 5: reviews are appreciated |
19:23:49 | planetis[m] | Sup, Araq: what is needed for https://github.com/nim-lang/Nim/pull/7276 to be merged? |
19:25:23 | Araq | uuhh wait 2 weeks until my mood gets better? |
19:25:24 | dom96 | xmonader: Please follow NEP: 2 spaces, no space before ':', 'type' on its own line. |
19:26:13 | FromGitter | <xmonader> @dom96 thanks! I think i got spoiled by auto formatters on save :) |
19:26:34 | dom96 | xmonader: Also types should be capitalised :) |
19:26:47 | planetis[m] | whats wrong with your mood ? :p |
19:27:04 | dom96 | xmonader: cool tutorial though. You need to create a website that lists all of your days :) |
19:27:23 | FromGitter | <xmonader> @dom96 capitalized as in Ini not INI? |
19:27:31 | miran | Ini |
19:27:48 | FromGitter | <xmonader> @dom96 I'm considering though, or even donating them to nim-lang.org if they're good enough |
19:27:55 | dom96 | Yes, but also `parserState` |
19:28:03 | shashlick | araq, dom96: of my feature list in my last message, what's the priority? |
19:28:15 | shashlick | i'm thinking choosenim 64-bit |
19:28:24 | shashlick | followed by choosenim binary install |
19:28:24 | FromGitter | <xmonader> ah of course you're right will update |
19:28:25 | Araq | shashlick: fix that bloody website |
19:28:30 | FromGitter | <data-man> @Araq: What can improve your mood? It's a pity that there is no Araq'sMood repository :( |
19:28:35 | shashlick | araq: oh ya, install instructions |
19:28:48 | shashlick | ya I'll fix that, only able to do it at home since i need jekyll on my linux box |
19:28:51 | Araq | that's prio no 1, nobody understands it |
19:28:56 | shashlick | okay done |
19:29:17 | dom96 | What's wrong with the website? |
19:29:21 | dom96 | shashlick: https://github.com/dom96/choosenim/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Araq%27s+wishlist%22 |
19:29:45 | Araq | dom96: the installation instructions for Windows are misleading to the point that Windows users don't want to install it |
19:29:49 | shashlick | super confusing - shows finish is optional, asks to install mingw when finish can do that for you, etc. |
19:30:03 | * | rokups quit (Quit: Connection closed for inactivity) |
19:30:14 | shashlick | the windows dlls, are not required if doing binary download |
19:30:23 | PMunch | Nice little parser tutorial there xmonader |
19:30:29 | shashlick | they are only needed if you build from source I think |
19:30:34 | shashlick | does choosenim download those dlls? |
19:30:40 | dom96 | yes |
19:30:53 | shashlick | can I also mention choosenim on this website? |
19:30:59 | shashlick | as another way to install |
19:31:11 | dom96 | shashlick: Not until that wishlist is taken care of |
19:31:26 | FromGitter | <xmonader> @PMunch thanks! reviews are pretty important so i don't mislead ppl reading, as i'm not nim expert myself |
19:32:33 | PMunch | xmonader, what is that link in the "How to" section doing there? |
19:32:38 | PMunch | It seems a bit out of place |
19:32:58 | Araq | my mood is at an all-time low, cannot go jogging, hunting some bizarre memory corruptions |
19:33:01 | * | lukas__ joined #nim |
19:33:23 | shashlick | okay i'll work on those dom96 |
19:33:38 | * | athenot_ quit (Remote host closed the connection) |
19:33:48 | FromGitter | <xmonader> @PMunch: the page supposed to be example section on how to use the parser and a how to section a `tutorial` |
19:33:49 | dom96 | shashlick: great :) |
19:34:09 | livcd | hmm so it's this: https://paste.fedoraproject.org/paste/k2Y8Va4OYLhjZAHhPln29A |
19:34:17 | PMunch | Araq, we all appreciate your hard work. But your health (mental and otherwise) is more important! If you're that bummed out go for a jog, you might even have a eureka moment :) |
19:34:22 | * | athenot joined #nim |
19:34:24 | miran | xmonader: "Simple toString proc using * operator" - this should be "... using $ operator", right? |
19:34:53 | shashlick | dom96: one other thing, does choosenim carry some binaries within it? dlls, etc? |
19:35:03 | FromGitter | <xmonader> you're right @miran my bad |
19:35:06 | PMunch | xmonader, yeah I know but the sentence is about regexes, so I'm not sure what a link to pythons cfgparser is doing there :P |
19:35:08 | Araq | PMunch: can't, I have a ligament rupture |
19:35:13 | PMunch | Ah :P |
19:35:18 | PMunch | Well that's a bummer |
19:35:48 | dom96 | Araq: You should get a rowing machine and do some rowing when you can't do jogging :) |
19:36:00 | FromGitter | <xmonader> @PmunchI added that link as an example of parsing with regex, in python maybe i should remove it all together though |
19:37:15 | PMunch | Or go to a pool, aren't those good for such things? |
19:38:05 | PMunch | xmonader, you could just change it to "You can certainly use regular expressions, like pythons configparser, but we will go for a simpler approach here" |
19:38:13 | PMunch | Just makes the sentence a bit more cohesive |
19:38:16 | Araq | the only sport I could do is lifting some barbells |
19:38:41 | PMunch | Well that sucks |
19:39:02 | FromGitter | <xmonader> @PMunch (y) |
19:39:18 | Araq | yeah. but it will be over in 2 weeks |
19:39:53 | PMunch | Well that's good, at least it's not something that will take a really long time to heal, like a broken leg or something |
19:40:49 | livcd | uh well this is a bummer |
19:41:31 | * | rockcavera quit (Remote host closed the connection) |
19:41:40 | PMunch | "ini is the object to be returned after parsing", normally in Nim we use the result implicit variable for that |
19:45:07 | PMunch | I'm liking these daily small projects of yours by the way, very neat |
19:50:47 | FromGitter | <data-man> Something's wrong with AppVeyor again |
19:50:59 | * | jjido joined #nim |
19:51:45 | planetis[m] | Araq: injury? |
19:52:19 | Araq | planetis[m]: yeah... |
19:52:45 | FromGitter | <xmonader> @Pmunch @dom96 I updated the the tutorial with ur feedback, except for the space count can't set it to nim files only in vscode |
19:52:49 | planetis[m] | Well no offence jogging sucks |
19:53:10 | miran | xmonader: yes you can |
19:53:30 | planetis[m] | Have you tried swimming, or biking |
19:53:53 | miran | "[nim]": {"editor.tabSize": 2} |
19:53:55 | FromGitter | <xmonader> @Pmunch oh thanks! I hope it helps new comers. they're basically things i did in my job or excited about and familiar with so i try to implement them in nim ^_^ |
19:54:51 | Araq | planetis[m]: don't be silly, swimming and biking suck, jogging rules |
19:55:12 | dom96 | Cycling is awesome |
19:55:31 | FromGitter | <data-man> chess, checkers, go or dominoes is awesome :) |
19:55:42 | miran | backgammon is awesome! |
19:55:58 | Araq | chlorine or saddles, no thanks |
19:57:36 | FromGitter | <xmonader> @miran do i need a formatter? is there any ? ⏎ I added ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aeb69b01eddba3d04ce1a4e] |
19:58:13 | Araq | Valve is working on a Nim formatter |
19:58:26 | livcd | Valve ? |
19:58:33 | miran | xmonader: i have it in my settings as i have typed it here, and it works |
19:58:45 | FromGitter | <data-man> Yesterday I played badminton for several hours, and today everything hurts. Oh, yes, there were dances. :) |
19:59:00 | Araq | yeah, it's confirmed. |
19:59:12 | FromGitter | <xmonader> I see, thank you nevertheless :) |
19:59:13 | Araq | they can't develop Half Life 3 without one. |
19:59:33 | FromGitter | <narimiran> @xmonader this is copypasted from my user settings: ⏎ ⏎ ```"[nim]": { ⏎ "editor.insertSpaces": true, ⏎ "editor.tabSize": 2, ⏎ },``` [https://gitter.im/nim-lang/Nim?at=5aeb6a2540f24c43044e87ef] |
20:00:27 | FromGitter | <narimiran> don't forget to save that file (if you don't have autosave), and the next time you're working on .nim file, pressing Tab should give you two spaces |
20:01:39 | FromGitter | <xmonader> @narimiran I think i know the problem, i don't have tabs in my file they're all converted to 4 spaces already i guess |
20:01:59 | livcd | is this the infamous german humor ? :P |
20:02:29 | miran | well, the next time you press tab it will be converted to 2 spaces. it doesn't magically convert 4 spaces to 2 spaces |
20:02:46 | planetis[m] | Then you get what you signed for :p |
20:02:58 | miran | you can use `ctrl+[` to de-indent your code |
20:03:05 | * | lukas__ quit (Ping timeout: 240 seconds) |
20:03:39 | FromGitter | <xmonader> yup thanks a lot ^_^ |
20:04:42 | livcd | there's haxe summit in Seattle atm |
20:08:08 | * | brainproxy joined #nim |
20:15:17 | * | Vladar quit (Quit: Leaving) |
20:19:02 | FromGitter | <krux02> I have the impression I only see half the conversation |
20:21:00 | FromGitter | <data-man> You need to turn around at the proper angle. Use quaternions. |
20:21:34 | miran | but it is for younger than 24, you know |
20:23:04 | FromGitter | <mratsim> wow this is pretty: https://github.com/emekoi/cactus |
20:23:44 | FromGitter | <mratsim> ah I thought this was in Nim as the guy as a Nim library |
20:23:49 | FromGitter | <mratsim> > _> |
20:23:56 | livcd | This looks like a Nim introduction in Japanese https://2vg.github.io/Nim-World/ |
20:27:10 | PMunch | data-man, dom96, now Nim has an article on file handling: https://peterme.net/handling-files-in-nim.html |
20:28:04 | dom96 | PMunch: Nice! |
20:30:25 | * | miran quit (Ping timeout: 268 seconds) |
20:35:15 | * | rockcavera joined #nim |
20:36:02 | FromGitter | <data-man> @PMunch: Thanks! I'm thinking about adding MemoryMappedStream. |
20:37:46 | PMunch | Oooh, that would be nice |
20:38:10 | PMunch | Oh well, I'm off to bed |
20:38:11 | * | PMunch quit (Quit: leaving) |
20:38:48 | FromGitter | <data-man> But I don't know how well this will work in Windows. :( |
20:48:31 | * | yglukhov quit (Remote host closed the connection) |
20:50:42 | * | CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
20:54:34 | * | CodeVance joined #nim |
20:58:49 | * | athenot quit (Read error: Connection reset by peer) |
20:59:03 | * | athenot_ joined #nim |
20:59:53 | FromGitter | <Varriount> Windows has memory maps |
21:01:25 | CodeVance | > |
21:01:27 | CodeVance | ? |
21:02:06 | CodeVance | oh |
21:03:21 | * | athenot_ quit (Ping timeout: 240 seconds) |
21:03:47 | * | yglukhov joined #nim |
21:06:05 | * | ieatnerds quit (Ping timeout: 240 seconds) |
21:06:53 | FromGitter | <data-man> AFAIR, in Windows zero-length file can't be mapped. E.g. libmdbx and lmdb heavily used memory mapping, but use "hacking" techniques with the importing of some functions from ntdll. |
21:07:06 | FromGitter | <xmonader> ```code paste, see link``` ⏎ ⏎ here i get undefined el in expr `el > 2` any idea why? [https://gitter.im/nim-lang/Nim?at=5aeb79f900dc4888049268f7] |
21:10:51 | FromGitter | <xmonader> apparently that's why i'm looking for https://github.com/nim-lang/Nim/blob/master/lib/pure/future.nim#L126, thought i could do it with templates |
21:11:53 | CodeVance | xmonader make it a proc |
21:12:24 | FromGitter | <xmonader> @codevance yeah it works with proc already ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aeb7b38b37eab7d0466383b] |
21:12:27 | FromGitter | <Vindaar> @xmonader: with a slight change you can do it: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Your `el` variable needs to be injected into the calling scope for `el > 2` to make sense [https://gitter.im/nim-lang/Nim?at=5aeb7b3a6d98e53e044df473] |
21:12:59 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:13:09 | FromGitter | <xmonader> @Vindaar nice!! thanks a ton |
21:13:53 | FromGitter | <Vindaar> glad I could help :) |
21:14:02 | FromGitter | <CodeVance> That's initeresting |
21:15:45 | * | jjido joined #nim |
21:16:18 | FromGitter | <xmonader> i tried to use .inject pargma but couldn't find the correct way i was like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aeb7c2100dc488804926fdd] |
21:17:00 | FromGitter | <Vindaar> well, you can simplify it slightly I just realized: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aeb7c4c00dc488804927242] |
21:18:12 | FromGitter | <Vindaar> and a tip: if you use the code blocks here, just add nim right after the three ` to get proper higlighting |
21:19:05 | FromGitter | <xmonader> shouldn't it be converted to after processign into ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aeb7cc900dc488804927400] |
21:19:52 | * | leru joined #nim |
21:21:19 | FromGitter | <xmonader> ```code paste, see link``` ⏎ ⏎ this makes sense to me but doesn't work don't know why cond {.inject.} doesn't get replaced by `el>3` [https://gitter.im/nim-lang/Nim?at=5aeb7d4e5cf0b8300454a533] |
21:21:29 | FromGitter | <Vindaar> the inject is used to mark the variable in front of it such that it is known in the calling scope. Hence you can use `el` in the untyped `cond`. So that `cond` can simply be a statement which is allowed to contain the variable `el` |
21:22:21 | FromGitter | <Vindaar> The thing is that injecting is *upwards* and not *downwards* so to say |
21:22:30 | FromGitter | <xmonader> @Vindaar according to u the prev snippet should be valid because cond includes a variable el that's already defined in the el |
21:22:44 | FromGitter | <xmonader> oh that's tricky!! |
21:23:33 | FromGitter | <Vindaar> so yeah, your last snippet is valid, but it doesn't do what you were expecting |
21:23:57 | FromGitter | <Vindaar> oh, nevermind |
21:24:07 | FromGitter | <Vindaar> misread that snippet :) |
21:26:35 | * | jrbrt quit (Quit: jrbrt) |
21:29:36 | * | sz0 joined #nim |
21:42:05 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:44:22 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:47:57 | FromGitter | <Varriount> Araq: It appears that I will be writing an interpreter in Nim for a summer university project. :D |
21:51:36 | CodeVance | interpreter for what? |
21:51:50 | FromGitter | <Varriount> Probably some made up language. |
21:52:11 | FromGitter | <Varriount> I mean, I'm writing an interpreter for a small programming language that I will be designing. |
21:52:53 | CodeVance | have you seen https://min-lang.org/? |
21:53:48 | CodeVance | or is the point to design your own? |
21:54:47 | FromGitter | <Varriount> The point is to design my own |
21:55:27 | FromGitter | <Varriount> The course I'm taking is an "independent study course", which either means writing a paper, or doing a project. |
21:56:53 | FromGitter | <Varriount> Though, a stack-oriented programming language seems like a good idea, as it's probably easier to implement. |
21:57:13 | CodeVance | Nah I was just wanting to show you a interesting link |
21:57:22 | CodeVance | Showing "it has been done" |
21:57:53 | CodeVance | if dsl counted nim would certainly be clear leader in this area |
21:58:03 | * | jrbrt joined #nim |
22:04:00 | FromGitter | <sherjilozair> If int and float are caster to cint and cfloat implicitly, why isn't string casted to cstring implicitly? |
22:04:12 | FromGitter | <Varriount> I believe it is. |
22:04:34 | FromGitter | <Varriount> Also, int and float are not casted to cint and cfloat implicitly. |
22:04:45 | FromGitter | <Varriount> Well, not on 64-bit platforms, anyway |
22:06:19 | dom96 | IIRC cstring->string is implicit, the other way around isn't |
22:06:37 | FromGitter | <sherjilozair> If I'm wrapping a C library, I have to do a lot of type-casting for it to work. Is there a way to automatically specify which types should be casted to what? |
22:08:21 | FromGitter | <sherjilozair> Yeah int doesn't cast to cint implicitly, but if I wrap a C function and use int instead of cint in the declaration, that somehow works, but the same thing doesn't work for strings. |
22:09:04 | FromGitter | <sherjilozair> This works: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aeb888003cafa797b255abd] |
22:09:18 | FromGitter | <sherjilozair> This doesn't work: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aeb888dda323a7c04f58628] |
22:09:52 | FromGitter | <sherjilozair> But passing a `string` to `InitWindow`works. |
22:10:17 | FromGitter | <sherjilozair> So it's not clear what's happening where. |
22:10:33 | dom96 | cstring is a pointer to an array of chars |
22:10:41 | dom96 | string is a struct containing a cstring + len field |
22:10:46 | dom96 | This is why they are distinct |
22:14:19 | FromGitter | <sherjilozair> @dom96 Is there a way generate bindings automatically by parsing C headers? |
22:14:22 | FromGitter | <Varriount> @sherjilozair I wouldn't use `int` in C functions. In Nim the `int` type is roughly equivalent to `size_t` |
22:14:40 | dom96 | sherjilozair: yes, c2nim |
22:14:46 | FromGitter | <Varriount> @sherjilozair https://github.com/nim-lang/c2nim and https://github.com/genotrance/nimgen |
22:16:48 | FromGitter | <Varriount> @sherjilozair Also, what are you planning to do if a Nim float/int can't be converted to a cfloat/cint without data loss? |
22:16:50 | FromGitter | <xmonader> How is strtabs compared to Table[string, string]? someone suggested i use strtabs instead, but I also can't find delete function on that? |
22:17:41 | FromGitter | <sherjilozair> @Varriount loss of precision is okay for me, but I understand why it's not being done automatically. |
22:18:08 | FromGitter | <Varriount> Integers will overflow too. :/ |
22:18:40 | FromGitter | <sherjilozair> Don't need larger than 2**32 integers as well. :D |
22:18:50 | FromGitter | <sherjilozair> Do I have to feed preprocessed header to c2nim? |
22:20:33 | FromGitter | <Varriount> Not entirely preprocessed, but C2Nim can't parse the entirety of the C language. |
22:20:58 | FromGitter | <Varriount> I'd recommend NimGen, it's a layer on top of C2Nim that makes translation of larger libraries easier. |
22:21:14 | dom96 | xmonader: just use Table[string, string], strtabs has some small performance gains and ability to use style insensitive keys |
22:21:55 | FromGitter | <xmonader> and no deletes @dom96 too? |
22:22:14 | dom96 | dunno |
22:23:02 | FromGitter | <sherjilozair> @Varriount I can't figure out how to use NimGen. It's not clear where to specify the file which must be converted. |
22:23:06 | FromGitter | <xmonader> ok i'll stick to table[string, string] thanks |
22:23:19 | FromGitter | <sherjilozair> @Varriount There are no examples. |
22:23:24 | FromGitter | <mratsim> @sherjilozair this works: `let a: cstring = “Foo”` |
22:24:03 | FromGitter | <mratsim> also here is an actual example of nimgen with the result: https://github.com/numforge/nim-clblast/blob/master/clblast_nimgen.cfg |
22:27:42 | * | Trustable quit (Remote host closed the connection) |
22:36:41 | * | darithorn quit (Quit: Leaving) |
22:38:40 | * | jrbrt quit (Quit: jrbrt) |
22:46:54 | FromGitter | <sherjilozair> Thanks @mratsim. This example was useful. |
22:47:11 | FromGitter | <mratsim> you’re welcome |
22:47:37 | FromGitter | <sherjilozair> I think the nimcache folder that's created should be hidden. Doing it in linux and macos is easy. Just need to add a period, i.e. `.nimcache`. |
22:47:44 | FromGitter | <sherjilozair> Any reason why it's not hidden right now? |
22:48:27 | FromGitter | <mratsim> I think there was some proposition to put it into /tmp/username |
22:49:00 | FromGitter | <mratsim> it was also one of my main annoyance when I came to Nim at first, to easy to litter your folders with nimcache everywhere |
22:49:18 | FromGitter | <mratsim> but now, I look at the generated C/C++ code quite often so ... |
22:49:55 | FromGitter | <sherjilozair> Most regular users of Nim won't. And I don't think it should go to `/tmp`. It can remain in the same folder but hidden. This is what Python does with `__pycache__`. |
22:50:38 | FromGitter | <sherjilozair> Python used to generate pyc files, until the users rebelled, and now we there's `__pycache__`. I think changing from `nimcache` to `.nimcache` would be a really simple change. |
22:53:24 | * | leru quit (Quit: Leaving) |
22:55:41 | dom96 | Araq really won't like that :) |
22:55:54 | dom96 | He wants me to change ~/.nimble to ~/nimble |
22:57:01 | FromGitter | <sherjilozair> That's crazy. It's better to follow convention on such matters than be "innovative". |
22:57:18 | FromGitter | <sherjilozair> Does Araq specify any reasons for this preference? |
22:57:53 | dom96 | Crazy is a bit of an exaggeration. |
22:58:14 | FromGitter | <mratsim> “Be explicit and don’t hide things” I suppose |
22:58:56 | dom96 | He gives good reason: he accesses ~/nimble often and it contains many files (and is thus large) and so should not be hidden. |
22:59:56 | FromGitter | <sherjilozair> pip uses `~/.local`, and it's pretty large too. |
23:01:09 | FromGitter | <sherjilozair> Should regular users be accessing nimble? That compiler devs access it often doesn't seem like good enough reason. |
23:01:38 | FromGitter | <mratsim> nimble should stay ~/.nimble |
23:02:07 | FromGitter | <sherjilozair> Another principle to keep in mind for UX design is "Don't surprise users.", and putting a nimcache directory and binaries in their folder qualifies as very surprising. |
23:02:10 | FromGitter | <mratsim> though when playing with Rust I don’t really like when dustup/cargo stores 700MB of stuff in there |
23:02:27 | FromGitter | <mratsim> dustup-> rustup |
23:06:00 | dom96 | sherjilozair: I agree that it should stay ~/.nimble but it's important to realise if we never surprise users then we will never innovate anywhere. |
23:07:09 | dom96 | Regular users might indeed access Nimble. You might wish to fix a package that's broken for example. |
23:07:57 | FromGitter | <sherjilozair> What about nimcache? How often do you think they should be accessing nimcache? |
23:08:25 | dom96 | Probably less often |
23:12:12 | dom96 | ugh, I really wish Github's search was better |
23:13:39 | FromGitter | <mratsim> github search is awful ... |
23:14:15 | dom96 | Thankfully Google works better: https://irclogs.nim-lang.org/27-04-2017.html#18:21:36 |
23:15:53 | dom96 | I need to create a markov chain based on Nim's IRC logs |
23:33:16 | FromGitter | <gogolxdong> @PMunch are you around? |
23:35:49 | FromGitter | <sherjilozair> @dom96 If you have a cuda-capable GPU you could also try char-rnn: https://github.com/sherjilozair/char-rnn-tensorflow |
23:36:26 | dom96 | Cool. Just got a MacBook right now though, no idea if it even supports CUDA |
23:38:12 | FromGitter | <Varriount> OSX is notorious for being out-of-date with regard to opengl |
23:40:09 | FromGitter | <mratsim> nop, Nvidia and Apple are not friends anymore |
23:40:14 | FromGitter | <sherjilozair> @dom96 I see. You could try training with the CPU. Would be slower but if your dataset is small, might still work. |
23:41:50 | FromGitter | <mratsim> by the way if it helps I added PCA today to Arraymancer |
23:43:59 | FromGitter | <mratsim> if you have some suggestion I can implement them |
23:44:09 | FromGitter | <mratsim> going to sleep now |
23:51:48 | * | Pisuke joined #nim |
23:52:01 | * | MyMind quit (Ping timeout: 248 seconds) |
23:53:16 | * | noonien quit (Quit: Connection closed for inactivity) |
23:58:29 | FromGitter | <sherjilozair> Can nimgen/c2nim include comments from the original header? How do I enable this? |