00:04:06 | * | ipjk joined #nim |
00:04:36 | ipjk | Araq: sorry for the bogus pull-request, I had totally missed that os-module exported ospaths. |
00:07:26 | * | Trustable quit (Remote host closed the connection) |
00:18:51 | * | ipjk quit (Quit: Leaving) |
00:23:00 | * | yglukhov joined #nim |
00:27:21 | * | yglukhov quit (Ping timeout: 264 seconds) |
01:03:10 | * | arecacea1 quit (Remote host closed the connection) |
01:03:33 | * | arecacea1 joined #nim |
01:06:59 | * | MJCaley quit (Quit: MJCaley) |
02:25:54 | * | noonien quit (Quit: Connection closed for inactivity) |
02:55:25 | * | SenasOzys quit (Ping timeout: 256 seconds) |
03:04:08 | * | libman_ joined #nim |
03:32:15 | * | libman3 joined #nim |
03:35:40 | * | libman3 quit (Client Quit) |
03:41:42 | FromGitter | <gogolxdong> How to use auto jump to definition in CentOS GNOME Desktop enviroment? |
03:44:37 | FromGitter | <gogolxdong> VSCode has been installed as well as Nim extension, everything is No definition found for .... , this works well in windows. |
03:47:19 | libman_ | Does that OS package nimsuggest with nim / where you able to compile it manually? |
03:47:39 | * | libman_ had much annoyance with it on FreeBSD. |
03:50:57 | * | rauss quit (Ping timeout: 248 seconds) |
03:54:24 | * | rauss joined #nim |
04:03:08 | * | rauss quit (Read error: Connection reset by peer) |
04:04:43 | * | rauss joined #nim |
04:19:01 | * | rauss quit (Read error: Connection reset by peer) |
04:21:17 | * | rauss joined #nim |
04:27:14 | FromGitter | <gogolxdong> Doesn't nimsuggest compile automatically? There is no nimsuggest executable after the installation instruction . |
04:31:03 | FromGitter | <gogolxdong> done. use ./koch tools. |
05:03:07 | * | ftsf quit (Quit: Leaving) |
05:03:31 | * | ieatnerds quit (Read error: Connection reset by peer) |
05:04:05 | * | libman_ quit (Read error: Connection reset by peer) |
05:05:34 | * | nkk joined #nim |
05:35:13 | * | MJCaley joined #nim |
05:45:37 | * | MJCaley quit (Quit: MJCaley) |
05:54:50 | * | nkk quit (Ping timeout: 260 seconds) |
06:03:59 | * | user11101 joined #nim |
06:44:58 | * | libman_ joined #nim |
07:17:49 | * | miran joined #nim |
07:21:19 | * | dddddd quit (Remote host closed the connection) |
07:22:51 | * | gokr joined #nim |
07:31:20 | FromGitter | <konqoro> hey guys is that a bug? ``` ⏎ var b: bool ⏎ try: var b = true ⏎ except: discard ``` [https://gitter.im/nim-lang/Nim?at=5aa4db480a1614b712079234] |
07:31:41 | FromGitter | <konqoro> should it through redefinition error? |
07:37:46 | * | nsf joined #nim |
07:41:46 | * | r3d9u11 joined #nim |
07:56:05 | * | arnetheduck joined #nim |
08:40:27 | * | SenasOzys joined #nim |
08:47:02 | * | jaco60 joined #nim |
08:50:27 | * | gokr quit (Ping timeout: 240 seconds) |
08:56:54 | GitDisc | <2vg> not a bug. |
08:57:31 | GitDisc | <2vg> variable b is shadowing in the try block. |
09:01:42 | * | rauss quit (Read error: Connection reset by peer) |
09:03:30 | * | rauss joined #nim |
09:03:33 | * | user11101 quit (Ping timeout: 256 seconds) |
09:06:34 | * | user11101 joined #nim |
09:22:44 | planetis[m] | ok thanks |
09:24:01 | * | rokups joined #nim |
10:04:04 | r3d9u11 | Hello. Is there in nim a conditional operator, something like a "<condition" ? "value_if_true" : "value_if_false" in c# ? |
10:05:26 | Yardanico | r3d9u11, you want to use something like in python: if condition: value_if_true else: value_if_false |
10:05:37 | Yardanico | let myval = if condition: value_if_true else: value_if_false |
10:10:10 | r3d9u11 | thanks |
10:11:33 | miran | Araq, dom96: this compiles and gives output, but it shouldn't, right? `for n in countdown(7, 3, -1): echo n` |
10:13:26 | * | xkapastel quit (Quit: Connection closed for inactivity) |
10:21:29 | FromGitter | <jaco60> in fact, the sames goes with countup(4, 10, -1)… :( |
10:30:16 | * | nsf quit (Quit: WeeChat 2.0.1) |
10:32:30 | FromGitter | <gogolxdong> What's the identical in Nim of `ioctl(sockfd, SIOCGIFINDEX, &if_idx)` and `ioctl(sockfd, SIOCGIFHWADDR, &if_mac)`? |
10:41:05 | planetis[m] | make the step param Positive? |
11:02:33 | * | tefter quit (Remote host closed the connection) |
11:18:43 | * | Vladar joined #nim |
11:27:11 | FromGitter | <zacharycarter> miran, @jaco60 - those aren't bugs |
11:27:48 | FromGitter | <zacharycarter> look at the source - https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L2026 & https://github.com/nim-lang/Nim/blob/master/lib/system.nim#L690 |
11:32:31 | FromGitter | <krux02> Do you really need coutup? |
11:34:20 | FromGitter | <krux02> I mean if I had to do something like that, I have the best experience to alwas use this range: `0 ..< N` and then transform the I to match the actual values I need. For examle `let x = N - 2 * i` |
11:36:28 | miran | zacharycartes: docstring says: `step` may only be positive. why is then negative allowed? |
11:36:58 | FromGitter | <zacharycarter> the type system isn't preventing it |
11:37:12 | miran | krux02: that way is less readable and more error prone, imo |
11:38:19 | FromGitter | <zacharycarter> if you really want to figure it out miran, you need to dive into compiler magic probably |
11:38:35 | FromGitter | <zacharycarter> of mInc |
11:39:08 | FromGitter | <krux02> miran: well I like to disagree. Most of the time I also need the untransformed i, so I prefer to loop my i starting from 0 to N (not inclusive) and when there is the rare case that I don't need the untransformed i, yea I just don't need it, it doesn't bother me. |
11:39:48 | FromGitter | <krux02> and when you always create it with a formula like I showed, it is not error prone at all. |
11:39:54 | FromGitter | <krux02> It is just all about consistencey. |
11:40:06 | miran | zacharycarter: it's not that i want to figure it out, i just find it strange to be allowed |
11:40:46 | FromGitter | <krux02> miran: just because something isn't allowed doesn't mean you can't do it |
11:41:09 | FromGitter | <krux02> jave doesn't allow to access the real pointer values of their objects, but you can do it if you really really want to |
11:41:22 | miran | krux02: `for i in 0 ..< (seq.len div 2):` to iterate over every other element (with `let n = 2*i`) is unreadable to me :) |
11:42:22 | FromGitter | <zacharycarter> wouldn't you want to write anyway |
11:42:31 | FromGitter | <krux02> that is true, but to be honest I naver wanted to iterate over every n'th element of a list. |
11:43:24 | FromGitter | <zacharycarter> ```var n: uint ⏎ for i in in 0 ..< (seq.len div 2): ⏎ n = 2 * i``` [https://gitter.im/nim-lang/Nim?at=5aa5165b35dd17022e4766ce] |
11:44:01 | FromGitter | <zacharycarter> I guess it doesn't matter |
11:44:28 | FromGitter | <krux02> @zacharycarter don't use uint |
11:44:32 | miran | to be honest, i would be more satisfied if we could do `100 .. 0`, and something like `0..10|2`, rather than use countup/countdown, but that's another story :) |
11:44:55 | FromGitter | <zacharycarter> can always issue a RFC |
11:45:11 | FromGitter | <krux02> well what would 100 .. 0 be? |
11:45:18 | FromGitter | <zacharycarter> counting down I assume |
11:45:20 | miran | countdown(100, 0) |
11:45:25 | FromGitter | <krux02> 100, 99, 98, ..., 0? |
11:45:31 | FromGitter | <zacharycarter> you could do that in a macro probably miran |
11:45:36 | FromGitter | <zacharycarter> but you'd have to use a different symbol I imagine |
11:45:45 | FromGitter | <zacharycarter> or even a template I think |
11:45:50 | FromGitter | <krux02> and what would 1, 0 be? |
11:46:00 | miran | tuple? :D |
11:46:01 | FromGitter | <krux02> sorry I mean `1 .. 0` |
11:46:23 | FromGitter | <krux02> 1 .. 0 is already defined |
11:46:26 | miran | it would be the same as countdown(1, 0), and that should be [1, 0] |
11:46:29 | FromGitter | <krux02> and it is the empty seq |
11:47:08 | FromGitter | <zacharycarter> but wouldn't that be an array? |
11:47:08 | FromGitter | <krux02> so if negative ranges would be allowed, it would only work with both ends exclisive |
11:47:11 | FromGitter | <zacharycarter> of 1,0 ? |
11:47:41 | FromGitter | <krux02> `2 .. 0` would only contain 1, nothing else |
11:47:51 | miran | why? |
11:48:06 | miran | it's not like that in other languages, from what i can remember |
11:48:07 | FromGitter | <krux02> because otherwise you would not be able to represent the empty seq |
11:48:14 | FromGitter | <krux02> the empty range |
11:49:16 | FromGitter | <krux02> or you change the rangle, to have an exclusive upper bound. |
11:50:56 | miran | in F# you can use `..` to go both ways and both bounds are included |
11:51:13 | FromGitter | <krux02> with an exclusive upper bound `0 .. 0` in empty no matter what direction you would interpret it. |
11:51:26 | miran | indeed |
11:51:34 | FromGitter | <krux02> then how does in F# the emty range look like |
11:52:46 | miran | you need to specify -1 if you're counting down, so i guess any (n+x)..(n) is an empty seq |
11:53:24 | miran | btw, having a minus for counting down seems more logical than a positive number |
11:53:56 | FromGitter | <krux02> well with exclusive upper bounds a -1 would not be required |
11:54:43 | miran | i agree and i prefer exclusive upper bound, but both you and i know who doesn't like that :) and he is in charge :) |
11:55:45 | FromGitter | <krux02> `0 .. 3` ^= `0,1,2` ; `0 .. 0` ^= <empty> and `0 .. -3` ^= -1, -2,-3 |
11:56:11 | FromGitter | <krux02> well to be honest one would need to discussil if 0 .. -3 is `-1, -2, -3` or `0,-1,-2` |
11:56:14 | miran | i don't like the las example |
11:56:23 | miran | the latter, imo |
11:56:47 | FromGitter | <krux02> I would not be so fast |
11:56:56 | miran | all examples should be like current `..<`, no? |
11:56:56 | FromGitter | <krux02> 0 is already included in 0 .. 3 |
11:57:35 | FromGitter | <krux02> and remember exclusive upper bound to be consistent |
11:57:49 | FromGitter | <krux02> exclusive upper bound would mean -1, -2, -3 |
11:57:58 | miran | exclusive "second parameter" |
11:58:13 | FromGitter | <krux02> don't like it |
11:58:48 | miran | 0..-11|-3 = ? |
11:58:56 | FromGitter | <krux02> I see the starting and end point as infinitively small points, and the numbers as boulders that are either in the range or not. |
11:59:00 | miran | (that's step = 3 in negative direction) |
11:59:40 | FromGitter | <krux02> and when you go from one starting point in one direction and you go over a boulder, and then you start at the exact same point and go in the other direction and go over the same boulder, then there is something wrong. |
11:59:53 | miran | also, give me first three members of 0..-1234|-56 |
12:00:20 | FromGitter | <krux02> we didn't discuss what step means |
12:00:24 | miran | in my way, it is easy: 0, -56, -112. in your way: i have no idea |
12:00:33 | FromGitter | <krux02> and for my representation there would not be a negative step |
12:00:36 | FromGitter | <krux02> only positive |
12:01:25 | FromGitter | <krux02> or if you declare a negative step it would invert the order of the order of the number and then take eath n'th element |
12:01:55 | FromGitter | <krux02> miran: it is always easy in your way for you, because it is your way and your way of thinking about it |
12:02:41 | miran | well, i'm still waiting for your answer about first three members where 0 is excluded ;) |
12:02:43 | FromGitter | <krux02> what I think is to not create braching |
12:02:53 | FromGitter | <krux02> no branching in your head and no branching in the implementation |
12:03:07 | FromGitter | <krux02> just consistency, so it is easier to work with in generic algorithms |
12:04:14 | FromGitter | <krux02> 0 .. -1234, would be [-1, -2, -3, ..., -1234] |
12:04:21 | FromGitter | <krux02> then the - would invert the order |
12:04:32 | miran | your way is similar to python's `reversed(range(-1234, 0, 56))`, right? while my is `range(0, -1234, -56)` |
12:04:38 | FromGitter | <krux02> so [-1234, -1233, -1232, ...] |
12:05:13 | FromGitter | <krux02> and 56 would skip the the first 55 numbers |
12:07:31 | FromGitter | <krux02> miran, yes |
12:10:50 | Araq | miran, what's wrong with countdown? |
12:10:54 | FromGitter | <krux02> so the seq would be, [-1234, -1178, -1122, ... ] |
12:11:34 | FromGitter | <krux02> but this is something that won't change in the language, that much I do know. |
12:12:00 | miran | Araq: well, in documentation for both countup and countdown it says that `step` should be positive. but you can pass the negative value, and it works!? |
12:12:27 | miran | is this the wanted behaviour? |
12:13:56 | FromGitter | <jaco60> Step should be checked, imho |
12:14:29 | FromGitter | <jaco60> (by Nim, not by the developper) |
12:15:00 | Araq | well we could make it take 'natural' but the point is |
12:15:30 | Araq | that countdown(x, y, -1) is not the normal usage |
12:15:45 | Araq | but countdown(x, y, 1) since it uses dec already |
12:16:26 | FromGitter | <krux02> the documentation could be changed from "is not allowed" to "smells a lot" |
12:16:53 | * | SitiSchu joined #nim |
12:17:45 | FromGitter | <krux02> ok people was fun to talk to you, I have to go. |
12:17:50 | miran | what about having only one proc which alows both x<y and x>y, and by default the step is 1, and to go down, you need step=-1? |
12:18:17 | FromGitter | <jaco60> like Python’s range, then ? |
12:18:28 | Araq | that requires a pointless branch |
12:18:47 | miran | well, i would like to write `N..0`, instead of `countdown` |
12:18:56 | miran | but if it is not feasible, ok |
12:19:01 | Araq | and I would not like you to write that ;-) |
12:19:02 | FromGitter | <krux02> Araq: least branching with exclisive upper bound ;) |
12:19:25 | FromGitter | <krux02> reverse possible by swapping a and b |
12:19:38 | FromGitter | <krux02> but yea I really have to go |
12:22:10 | Araq | Copying bad design is not good design. And Python's design which pretends you want to base the iteration direction on runtime values is a bad design. |
12:23:17 | FromGitter | <jaco60> i’m not a big fan of Python’s range… Especially when i want to countdown with these f**g semi-open intervals |
12:26:55 | FromGitter | <sivakon> When will we get to version 1? Just curious |
12:29:43 | miran | soon (TM) |
12:46:20 | dom96 | Sometime before the predicted Heat Death of the Universe |
12:46:33 | * | douglascorrea quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:58:05 | miran | ...if there are no delays |
12:59:12 | dom96 | Honestly though, we don't know. |
12:59:34 | dom96 | I personally don't want to make any predictions |
12:59:57 | dom96 | But me and Araq are definitely feeling the pressure to do it ASAP |
13:00:05 | planetis[m] | miran: about the gnuplot wrapper you can use whatever you like I just did my changes |
13:03:28 | * | Lite5h4dow joined #nim |
13:08:18 | dom96 | Lite5h4dow: Use gitter if you can instead, webchat is muted and I can only see it |
13:10:10 | * | Lite5h4dow quit (Quit: Page closed) |
13:12:09 | FromGitter | <Lite5h4dow> Right, I'm on gutter now |
13:12:19 | FromGitter | <Lite5h4dow> Gitter* |
13:12:34 | FromGitter | <Lite5h4dow> How are you guys? |
13:32:05 | dom96 | Okay. Working on a Nim presentation for Friday |
13:32:22 | miran | where/what will you present? |
13:34:37 | dom96 | What Nim is, what makes it great, how to install it, etc. |
13:35:05 | dom96 | In Belfast: a FOSS event has been organised at my Uni http://belfoss.eeecs.qub.ac.uk/ |
13:39:32 | miran | will the slides be available online? |
13:39:40 | dom96 | sure |
13:39:50 | dom96 | I doubt you'll learn anything new from them though |
13:55:08 | * | douglascorrea joined #nim |
13:59:37 | miran | probably, but it might be interesting for people not familiar with nim (reddit/HN) |
14:03:28 | dom96 | truer |
14:03:30 | dom96 | *true |
14:04:36 | * | nsf joined #nim |
14:12:17 | * | adeohluwa joined #nim |
14:12:58 | adeohluwa | dom96: bless! |
14:13:40 | * | NimBot joined #nim |
14:15:13 | dom96 | adeohluwa: Is this a blessing for my upcoming presentation? :) |
14:16:28 | adeohluwa | 💫 no idea ... that'd be cool tho |
14:42:35 | dom96 | I love that the official Twitter account for Rust liked this tweet: https://twitter.com/d0m96/status/972466310864130049 |
15:02:33 | Yardanico | dom96, lol |
15:02:46 | Yardanico | well their twitter account is quite active too |
15:05:39 | * | r3d9u11 quit (Ping timeout: 256 seconds) |
15:06:05 | * | dddddd joined #nim |
15:18:44 | * | r3d9u11 joined #nim |
15:53:36 | * | leorize joined #nim |
15:55:12 | leorize | :qcd |
16:00:06 | * | Trustable joined #nim |
16:07:36 | * | nsf quit (Quit: WeeChat 2.0.1) |
16:12:16 | * | xkapastel joined #nim |
16:22:03 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
16:23:30 | * | user11101 quit (Quit: user11101) |
16:25:11 | * | user11101 joined #nim |
16:25:16 | Trustable | Hi, is there a way, to have implicit conversion from "int" into "int64" on a 64 bit program? |
16:25:28 | * | user11101 quit (Remote host closed the connection) |
16:28:29 | leorize | Trustable: when defined(amd64): converter toInt64(i: int): int64 = i.int64 |
16:31:47 | Yardanico | Trustable, int is 64-bit on 64bit platform |
16:31:48 | * | user11101 joined #nim |
16:32:05 | Trustable | @leorize: thank you, this works for me (the other way around as you wrote it) |
16:32:19 | Yardanico | ah, I see |
16:32:53 | * | user11101 quit (Remote host closed the connection) |
16:32:59 | Trustable | @Yardanico: I know, that's why I don't want to bother as programmer, because both int and int64 are 64 bit, so a conversion is no problem |
16:36:23 | * | user11101 joined #nim |
16:36:39 | * | user11101 quit (Remote host closed the connection) |
16:42:04 | * | user11101 joined #nim |
16:46:11 | * | user11101 quit (Client Quit) |
16:47:51 | * | user11101 joined #nim |
16:54:04 | * | kunev quit (Ping timeout: 268 seconds) |
16:54:58 | * | user11101 quit (Quit: user11101) |
16:55:00 | FromGitter | <zetashift> dom86 you should've mentioned that Nim also supports wasm through C no? |
16:56:16 | * | user11101 joined #nim |
16:56:21 | * | kunev joined #nim |
17:12:33 | Yardanico | Through C+ Emscripten :) |
17:18:03 | FromGitter | <mratsim> That’s like saying Mac supports windows game through VirtualBox ;) |
17:18:38 | FromGitter | <mratsim> (without the performance penalty though) |
17:34:37 | * | r3d9u11 quit (Quit: Leaving) |
17:45:36 | dom96 | mratsim: not quite |
17:46:07 | dom96 | I often wonder whether creating a webasm backend is worth the trouble |
17:50:33 | * | nsf joined #nim |
17:58:47 | FromGitter | <zetashift> Is it that much of a trouble? I thought Nim's C backend would take care of most of it |
17:59:03 | FromGitter | <zetashift> iirc Rust piggybacks a lot on LLVM's wasm target |
18:04:28 | FromGitter | <xomachine> Hi there! I wonder if there is a proper way to init Nim runtime for dynamic library? While rewriting my project to Nim I've encountered a problem that Nim runtime overwrites a part of callers memory (the caller - windows application under wine and the library is winelib [steam_api.dll.so]). This problem persists only in 64-bit code. ⏎ ⏎ The best way for me would be to alloc the memory region by external code and |
18:04:28 | FromGitter | ... give it to runtime (like a sandbox where Nims GC can play without interference with environment). I've already tried -d:useNimRtl, but it does not compile with macros and I have a lot of compile time code. (https://github.com/nim-lang/Nim/issues/6855) |
18:13:00 | FromGitter | <xomachine> Here is a way I use to initialize the runtime now: https://github.com/xomachine/SteamForwarder/blob/master/steam_api.nim#L26 |
18:16:36 | * | MJCaley joined #nim |
18:22:28 | dom96 | xomachine: hrm, I'm not much help in this area. Might be worth asking on the Nim Forum or just reporting an issue for this (it's possible that -d:useNimRtl not working with macros is an issue itself) |
18:23:31 | dom96 | Your project is really cool btw :D |
18:25:11 | Yardanico | dom96, he also wrote an article on habrahabr about his project if you didn't know that yet :) |
18:25:50 | dom96 | Damn, is there some sort of Russian Nim community that I'm not aware of? :) |
18:27:21 | Yardanico | dom96, not really :P |
18:28:31 | dom96 | I really wish I found the prospect of presenting less daunting |
18:28:51 | Yardanico | dom96, this is the article (well I know you don't know russian, but just for info) - https://habrahabr.ru/post/349388/ |
18:29:03 | Yardanico | it received quite a lot of views |
18:29:06 | Yardanico | (10k) |
18:29:11 | dom96 | ooh |
18:29:45 | dom96 | is habrhabr sorta like Reddit/HN? |
18:29:51 | Yardanico | dom96, yes |
18:30:07 | Yardanico | but you don't need to make your articles on medium and link them on HN for example |
18:30:22 | Yardanico | habrahabr combines that - you write articles on habrahabr, and others can read them :) |
18:30:54 | Yardanico | Well there's something like reddit equivalent - Pikabu |
18:31:08 | dom96 | Perhaps one of you could translate this post to English and we could post it to nim-lang.org? |
18:38:26 | * | vlad1777d joined #nim |
18:40:43 | FromGitter | <xomachine> @dom96 thanks! =) ⏎ ⏎ I'd like to learn more about how GC works. It is pretty strange that the library crashes with default gc, does not work but calling DllMain a few times with gc:stack and works with both of gc:v2 and gc:none. |
18:52:25 | dom96 | that is strange |
18:52:30 | dom96 | have you tried --gc:refc and --gc:boehm? |
18:52:51 | Yardanico | well gc:v2 should replace default gc *somewhere in the future time* |
18:53:01 | Yardanico | s/future time/time |
18:57:12 | dom96 | I'm not so sure |
18:57:38 | dom96 | but if the default gc doesn't work but others do then there is surely an issue in the default gc |
18:59:10 | * | Vladar quit (Quit: Leaving) |
19:15:24 | * | MJCaley quit (Quit: MJCaley) |
19:16:29 | Temperance[m] | so... let me see if I get this correctly |
19:16:37 | Temperance[m] | var are regular mutable variables |
19:16:47 | Temperance[m] | let is what in other languages would be const |
19:16:51 | Temperance[m] | and const is done at compile time? |
19:17:04 | FromGitter | <xomachine> refc crashes like the default one (on growObj), boehm crashes somewhere in NimMain (it is hard to collect stack traces when the program tries to handle crash itself) |
19:19:30 | FromGitter | <xomachine> @Temperance[m] well that's correct. But I would not say that `let` equals to const. It just like a var but compiler ensures that you won't change it in explicit way. |
19:22:48 | Temperance[m] | well, just line const in c++, right? |
19:22:59 | Temperance[m] | I mean, you don't set const values at compile time in C++ |
19:23:01 | Temperance[m] | or c |
19:24:35 | * | smt` joined #nim |
19:24:51 | * | smt` quit (Max SendQ exceeded) |
19:25:18 | * | smt` joined #nim |
19:27:10 | * | smt quit (Ping timeout: 240 seconds) |
19:29:45 | Temperance[m] | Anyway, I'm loving Nim's compile time powers. |
19:30:02 | Temperance[m] | It's embarrasing that C doesn't have stuff like this out of the box. |
19:30:04 | FromGitter | <xomachine> Not sure about the `const` representation in C, but in C code produced by Nim it is just a regular variable |
19:31:14 | Temperance[m] | const in C, as much as I know, just indicates that the variable will not be modified once set up. For example, a const declaration inside a for loop can take parameters generated on runtime. |
19:31:43 | * | MJCaley joined #nim |
19:34:19 | FromGitter | <xomachine> Well, in Nim you can change the `let` value by manipulation with unsafeAddr or from emitted C code. |
19:34:55 | * | kunev quit (Ping timeout: 252 seconds) |
19:36:06 | * | kunev joined #nim |
19:36:37 | Temperance[m] | just as you can in C :P |
19:36:43 | Temperance[m] | with consts I mean. |
19:39:37 | Temperance[m] | It probably wouldn't hurt to actually make let be consts in C, I mean, it does seem like the same thing so far. |
19:42:12 | * | MJCaley quit (Quit: MJCaley) |
20:35:42 | * | natrys joined #nim |
20:39:50 | * | rokups quit (Quit: Connection closed for inactivity) |
20:41:07 | * | gokr joined #nim |
20:46:56 | * | natrys quit (Read error: Connection reset by peer) |
20:51:22 | * | natrys joined #nim |
20:55:42 | dom96 | I wonder if this is also written in Nim: https://www.youtube.com/watch?v=KgEZ-xqFXLo |
20:56:39 | * | miran quit (Quit: Konversation terminated!) |
21:00:08 | dom96 | It's a pretty good trailer |
21:15:07 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:19:45 | Temperance[m] | c: uint8 = 256 # Compile time error |
21:19:55 | Temperance[m] | What happens if someone wants to rely on overflows? |
21:31:04 | Temperance[m] | also, what does the asterisk in this line means? |
21:31:05 | Temperance[m] | type |
21:31:05 | Temperance[m] | MyInteger* = int |
21:37:00 | Temperance[m] | I understand the asterisk next to a proc name means the function will get exported for module imports... right? but what does it mean here? Does it mean that the type MyInteger will get exported too?= |
21:37:01 | Temperance[m] | I understand the asterisk next to a proc name means the function will get exported for module imports... right? but what does it mean here? Does it mean that the type MyInteger will get exported too? |
21:37:17 | dom96 | yes |
21:38:25 | Temperance[m] | oh, thanks, I was getting my hear over it, the tutorial I'm following does this kind of stuff without explaining |
21:38:55 | Temperance[m] | and, about my previous question, anyone? |
21:39:55 | Temperance[m] | I mean I could do newvalue%255, but wouldn't that be like, slower? |
21:41:28 | dom96 | isn't overflow behaviour undefined? |
21:41:35 | dom96 | or at least dangerous in some way? |
21:42:14 | Temperance[m] | I'm not saying it isn't. I'm asking what would I do If I wanted to go "expert mode" and knew the consequences. |
21:43:29 | * | user11101 quit (Ping timeout: 260 seconds) |
21:54:39 | * | natrys quit (Quit: natrys) |
21:59:31 | dom96 | Temperance[m]: Not sure, I guess there is a way to disable these checks. You could also probably just emit C code using the {.emit.} pragma |
21:59:58 | * | Ven`` joined #nim |
22:01:51 | * | livcd quit (Remote host closed the connection) |
22:04:31 | FromGitter | <xomachine> @dom96 ⏎ ⏎ relative to that post on habrahabr about the SteamForwarder. It actually doesn't require Russian speaker to translate. Google translator performs the translation very well. I hardly can do it better (except a few obvious fragments). But the thing it really needs is a proofreading made by native or advanced English speaker. |
22:05:30 | dom96 | xomachine: well, first question is: do you want to post it on nim-lang.org? :) |
22:05:59 | dom96 | I guess the answer is yes, but just want to confirm |
22:06:07 | * | xet7 quit (Quit: Leaving) |
22:06:08 | FromGitter | <mratsim> @dom96 @Temperance[m]: uint have defined overflow behaviour: it rolls over |
22:06:25 | dom96 | If so, please make a PR on the website repo (just create a .md file in the appropriate place, you should be able to see the other posts and use them as an example) |
22:06:42 | dom96 | Then we can have someone proofread it |
22:11:10 | FromGitter | <xomachine> I'm not sure that whole post will be interesting for Nim community. At least a half of the post is about wine, steam and the problem investigation. Only the second half is related to Nim. |
22:13:08 | dom96 | There is a big overlap between people interested in Nim, wine and steam :) |
22:13:22 | dom96 | plus, it's not for Nim devs, it's for developers in general |
22:14:41 | FromGitter | <xomachine> ok, then I'll start working on it |
22:16:26 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:17:36 | * | Trustable quit (Remote host closed the connection) |
22:38:27 | * | gokr quit (Ping timeout: 240 seconds) |
22:43:39 | * | leorize quit (Quit: WeeChat 2.0.1) |
22:47:19 | * | couven92 joined #nim |
22:50:35 | * | fredrik92 joined #nim |
22:58:53 | Temperance[m] | what are the ide options for nim? |
22:59:06 | Temperance[m] | I'm using visual studio code, but I would love to see if there's something better. |
22:59:28 | dom96 | https://github.com/nim-lang/Nim/wiki/Editor-Support |
23:08:22 | shashlick | I was using vscode for a while, loved it but it's too much of a memory hog for my VM so I've moved to Vim |
23:11:12 | FromGitter | <krux02> Temperance[m]: I use emacs, but it not great. I think with VS code you are pretty much on the good end of the IDE support. |
23:13:00 | shashlick | here's my list of vim plugins - ale, fzf, fzf.vim, numbers, nvim-nim, vim-airline, vim-airline-themes, vim-autoclose, vim-better-whitespace, vim-buftabline, vim-fugitive, vim-gitgutter, vim-multiple-cursors, vim-startify, vim-unimpaired |
23:13:07 | shashlick | ale supports nim for syntax checking |
23:13:12 | * | jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:14:46 | * | user11101 joined #nim |
23:21:06 | Temperance[m] | Never got to like vim, so It seems I'll have to stick with vscode |
23:21:09 | FromGitter | <krux02> systax checking workin in emacs, too. |
23:21:20 | FromGitter | <krux02> but sometimes it just grows too big in memory and I need to kill it. |
23:21:27 | FromGitter | <krux02> so the support is not great. |
23:21:44 | FromGitter | <krux02> yea vim is really crufty |
23:23:50 | FromGitter | <krux02> and yes probably you are good with vscode |