00:06:45 | * | dddddd quit (Remote host closed the connection) |
00:10:15 | FromGitter | <data-man> Is there an official Nim Telegram channel? I asked because https://github.com/VPashkov/awesome-nim/pull/29 was merged. |
00:30:14 | * | skellock joined #nim |
00:33:25 | * | skellock quit (Client Quit) |
00:36:05 | leorize | data-man: I don't see it mentioned in https://nim-lang.org/community.html |
00:39:30 | FromGitter | <data-man> @leorize: Exactly! I'm sure that such PRs can only be done by @Araq and @dom. |
00:40:04 | * | SenasOzys__ joined #nim |
00:40:35 | * | SenasOzys quit (Ping timeout: 240 seconds) |
00:40:47 | leorize | AFAIK all official real time communication channel is linked to IRC, so if telegram is also an official channel, it should be linked to IRC as well, but it doesn't seem to be the case |
00:50:45 | FromGitter | <gogolxdong> Is there any example code showing programming without GC? |
00:53:01 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
00:57:40 | * | CodeVance joined #nim |
01:04:11 | * | cavariux joined #nim |
01:07:28 | FromGitter | <data-man> @gogolxdong: https://github.com/pascalmouret/assyria |
01:09:43 | * | cavariux left #nim ("WeeChat 2.1") |
01:11:06 | FromGitter | <data-man> https://hookrace.net/blog/nim-binary-size/ |
01:22:49 | * | saml__ joined #nim |
01:28:06 | * | saml__ quit (Remote host closed the connection) |
01:30:22 | * | skrylar joined #nim |
02:01:21 | * | CodeVance quit (Quit: Leaving.) |
02:03:36 | * | tefter quit (Remote host closed the connection) |
02:16:04 | FromGitter | <kayabaNerve> How many people here would be interested in a job offer to code in Nim? |
02:19:55 | * | SenasOzys__ quit (Remote host closed the connection) |
02:20:14 | FromGitter | <gogolxdong> @data-man means have to count the allocate size on our own? |
02:20:33 | FromGitter | <gogolxdong> @Varriount Do you mean ``` ⏎ proc `==`*(x, y: MemSlice): bool = ⏎ ## Compare a pair of MemSlice for strict equality. ⏎ proc memcmp(a, b: pointer, n:int):int {.importc: "memcmp",header: "string.h".} ⏎ result = (x.size == y.size and memcmp(x.data, y.data, x.size) == 0) [https://gitter.im/nim-lang/Nim?at=5b0772f1160c567d16d67d5a] |
02:20:42 | FromGitter | <gogolxdong> `````` |
02:21:00 | FromGitter | <gogolxdong> ```code paste, see link``` ⏎ ⏎ in memfiles.nim? [https://gitter.im/nim-lang/Nim?at=5b07730b4eaffb692d5379ee] |
02:27:22 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
02:27:55 | * | yglukhov[i] joined #nim |
02:56:10 | * | xkapastel joined #nim |
03:06:05 | * | gokr quit (Ping timeout: 245 seconds) |
03:35:50 | FromGitter | <gogolxdong> What will happen with --gc:none with acctually referenced to the GC'd memory? |
03:41:19 | skrylar | i would assume dangerous things would happen; you'd be poking memory without altering the hidden reference counts/roots |
03:53:20 | * | endragor joined #nim |
03:56:44 | Tanger | Hey guys, I'm trying to use copyMem any I'm (unsurprisingly) hitting a SIGSEGV from it. https://pastebin.com/50fhpM2G <- Code. When I check the pointer addresses of source and destination in my example (using cast[uint32](pointer)), they look like valid allocated memory (like this: Dest: 3739193392 | Source: 3739168852). Any ideas? |
04:02:08 | leorize | Tanger: what is the definition of the source and destination type? |
04:04:21 | * | leorize quit (Quit: WeeChat 2.1) |
04:05:20 | FromGitter | <data-man> @Tanger: Is a platform x32? |
04:07:49 | FromGitter | <data-man> Use ```cast[ByteAddress]``` instead of ```cast[uint32]``` |
04:09:33 | FromGitter | <gogolxdong> I got this error : ``` ⏎ lib/pure/lexbase.nim(156, 13) Error: VM is only allowed to 'cast' between integers of same size |
04:10:05 | FromGitter | <data-man> Yes. |
04:11:02 | FromGitter | <gogolxdong> Anyone knows this error? |
04:13:22 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b078d61016ae21a4ce12e8e] |
04:14:38 | FromGitter | <gogolxdong> It used to compile before I updated nim. |
04:16:54 | FromGitter | <gogolxdong> and never used lexbase directly. |
04:19:37 | shashlick | data-man, did you try the untar package? It crashes still on read Str |
04:20:46 | shashlick | newTarFile("xyz.tar.gz").extract("directory") |
04:21:23 | shashlick | Works fine on 0.18.0, crashes on #head |
04:22:34 | FromGitter | <data-man> @shashlick: No, I don't use it. |
04:23:02 | shashlick | That's why I opened the bug |
04:23:12 | shashlick | Choosenim uses untar |
04:23:52 | FromGitter | <data-man> untar's implementation isn't very good. :) |
04:23:52 | shashlick | I'm working on choosenim features, it doesn't pass tests on #head since untar crashes in readStr |
04:25:00 | shashlick | https://pastebin.com/cRwjCAu8 |
04:28:15 | FromGitter | <data-man> streams.nim(254) is ```result = newString(length).TaintedString``` for me. |
04:29:27 | shashlick | It's before your last commit |
04:30:14 | FromGitter | <gogolxdong> Can I rollback nimcrypto' verion requirement? |
04:30:16 | shashlick | The line addr(string(result[0])) |
04:30:33 | shashlick | Should become cstring(result) |
04:31:27 | FromGitter | <data-man> I figured, bug for readStr(0) |
04:31:49 | FromGitter | <gogolxdong> It requires nimcrypto>0.18.0 and `Error: undeclared field: 'bits'` for 0.18.0, while 0.18.1 devel `Error: VM is only allowed to 'cast' between integers of same size` , how to fix this? |
04:31:52 | shashlick | Line 256 and 263 |
04:33:10 | shashlick | Also the other procs I mentioned might need review |
04:33:38 | shashlick | No more [x] address of strings |
04:47:27 | FromGitter | <data-man> @shashlick: Fixed now, I hope. |
04:50:42 | Tanger | data-man: Oooh, thanks. I'll give that a try, should give me a better idea of what's happening |
04:51:30 | Tanger | Also data-man: 64 bit |
04:51:34 | Tanger | Oh yeah lol |
04:51:38 | Tanger | So dumb |
04:51:44 | FromGitter | <data-man> :) |
04:58:39 | Tanger | You legend data-man. That was the problem! |
04:59:37 | FromGitter | <data-man> lol You're embarrassing me. |
05:05:21 | FromGitter | <data-man> And it isn't true. ;) |
05:15:10 | FromGitter | <data-man> @shashlick: Can you provide a problematic tarball, please? |
05:19:03 | FromGitter | <gogolxdong> `Error: module names need to be unique per Nimble package; module clashes with /mnt/d/third_party/src/github.com/nim-lang/Nim/lib/pure/httpclient.nim` |
05:19:36 | FromGitter | <data-man> @gogolxdong: Sure. |
05:21:52 | FromGitter | <gogolxdong> which I have no idea where to check, does this mean I have a file named httpclient.nim? |
05:22:55 | FromGitter | <data-man> httpclient.nim is part of stdlib |
05:23:50 | FromGitter | <gogolxdong> yes ,does this mean I have a file named httpclient.nim clashes with stdlib.httpclient? |
05:24:03 | FromGitter | <data-man> Yes. |
05:24:14 | FromGitter | <gogolxdong> which I haven't |
05:24:37 | FromGitter | <data-man> locate "httpclient.nim" |
05:32:54 | * | nsf joined #nim |
06:29:19 | * | Guest46886 is now known as awal |
06:34:59 | * | couven92 joined #nim |
06:36:28 | * | PMunch joined #nim |
06:36:46 | * | sz0 quit (Quit: Connection closed for inactivity) |
06:43:50 | FromGitter | <gogolxdong> How to do with this ? `Error: 'spawn' takes a GC safe call expression` |
06:43:54 | * | gokr joined #nim |
06:50:15 | FromGitter | <gogolxdong> Can parseJson work at compile time? |
06:51:42 | FromGitter | <data-man> No. |
06:55:54 | FromGitter | <gogolxdong> I want to parse a json file. |
06:56:29 | FromGitter | <data-man> Why at compile time? |
06:57:51 | FromGitter | <gogolxdong> It's known at compile time, do I have to push it to runtime? |
07:03:34 | FromGitter | <data-man> How big is this file? |
07:07:05 | * | Electrux joined #nim |
07:07:44 | Electrux | hello is anyone here? i need a bit of help. i am trying to implement bubble sort but it is not sorting at all |
07:07:45 | FromGitter | <gogolxdong> It's mysql configuration , as mysql connection cannot be multiplex , I have to add parseFile() before everywhere opened a database connection instead of using const values. |
07:08:16 | def- | Electrux: hi. post the code on gist or pastebin |
07:09:33 | Electrux | def-: https://pastebin.com/VB03PFuH |
07:11:32 | Electrux | the values are never changed :/ |
07:11:42 | def- | to me it looks like they're changing |
07:11:48 | def- | you just forgot the first value |
07:11:57 | def- | [5, 1, 2, 3, 6] |
07:12:05 | FromGitter | <data-man> @gogolxdong: Just load this file to const and parse this const at compile time. |
07:13:21 | FromGitter | <data-man> s/compile time/runtime :) |
07:13:24 | Electrux | oh... yes u are right! but the loops seem to be correct to me... why is first value not being modified? |
07:15:14 | def- | not sure, seems like you're not iterating over the correct elements |
07:15:34 | def- | this one should work, for reference: https://github.com/def-/nim-unsorted/blob/master/bubblesort.nim |
07:15:35 | FromGitter | <gogolxdong> It's global json variable which would be GC'ed. |
07:15:48 | Electrux | oh i see now... there definitely was wrong... the second loop must start from the minimum value, not from i |
07:16:08 | Electrux | thank u so much ^_^ |
07:17:04 | Electrux | one more question... why can't i repr open array? it says: Error: interal error: genRepr() |
07:22:28 | livcd | dom96: it's kinda tricky to comment on non-tech topics |
07:23:39 | FromGitter | <data-man> ```code paste, see link``` ⏎ ⏎ @Electrux: works for me on devel branch. [https://gitter.im/nim-lang/Nim?at=5b07b9fbba1a351a68c19b12] |
07:25:30 | * | yglukhov[i] quit (Remote host closed the connection) |
07:26:05 | * | yglukhov[i] joined #nim |
07:27:01 | * | leorize joined #nim |
07:30:05 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
07:30:40 | hohlerde | dom96: excellent job with the forum! |
07:34:54 | * | Vladar joined #nim |
07:41:49 | Electrux | so is stable branch not good? |
07:42:10 | Electrux | i mean is it missing something? |
07:43:51 | PMunch | Well, stable branch is stable |
07:44:11 | PMunch | But there are always some bugs or missing features on it with the pace that Nim is developing |
07:45:30 | * | xkapastel quit (Quit: Connection closed for inactivity) |
07:45:45 | PMunch | When 1.0 drops bugs will start to be back-ported to that version. So if a bug is discovered and fixed it will also be backported into the stable version, but new features will wait until another minor or major version. |
07:49:15 | FromGitter | <data-man> @Electrux: A bugs exist always and everywhere. Even a gods are doing them. :-D |
07:50:42 | * | dddddd joined #nim |
07:51:56 | PMunch | data-man, made another Nim org? |
07:52:57 | FromGitter | <data-man> Yeah. There are big plans. :) |
07:53:52 | PMunch | Haha :) |
07:54:44 | PMunch | Ah, the way Nim wraps C just makes it so nice to use: http://ix.io/1bkM/Nim |
07:54:50 | Electrux | ok it's ok... i was just wondering... i find nim to be a pretty cool language so would really like to use it as a primary language |
07:55:22 | PMunch | Got the roller-mouse I'm playing around with at work to scroll when I move the roller :) |
07:55:28 | Electrux | data-man: thanks a lot :D |
07:55:39 | Electrux | should i use the devel version? |
07:55:47 | PMunch | I think most people do |
07:56:02 | PMunch | I try to use stable when I'm writing a library though |
07:56:30 | PMunch | But I like to push things to the limit so I often end up having to jump to devel anyways :P |
07:56:37 | Electrux | lol |
07:56:39 | Electrux | :D |
07:56:45 | PMunch | Just install choosenim, then you can jump between versions easily |
07:57:03 | Electrux | :O i used homebrew... i guess choosenim would actually be better |
07:57:15 | PMunch | And update to the newest stable/devel with ease as well |
07:57:32 | PMunch | Uhm, what does your "nim --version" say? |
07:57:53 | PMunch | Not sure about homebrew, but many package managers out there have really outdated Nim packages.. |
07:57:54 | Electrux | it is 0.18.0 stable |
07:57:59 | PMunch | Ah okay :) |
08:00:41 | Electrux | i have been looking for an interesting but not too verbose programming language... i, for some reason, do not like "popular" languages... so i guess nim fits the bill perfectly... is it usable enough for daily use? and would nim with lua scripting be good? i m thinking of learning lua as scripting language |
08:01:36 | PMunch | I've used Nim daily for years now, perfectly fine |
08:01:52 | PMunch | You will however find yourself without a library from time to time |
08:02:46 | PMunch | Never really got into Lua, so not sure how good it would be with Nim |
08:03:03 | * | floppydh joined #nim |
08:03:56 | Electrux | nim is able to use C libraries right? |
08:04:02 | FromGitter | <kayabaNerve> Yes |
08:04:30 | PMunch | Yeah, Nim compiles down to C, so calling C is super easy |
08:04:46 | Electrux | then i guess missing library should not be that big a problem... hopefully... i just started with nim yesterday haha :) |
08:05:06 | PMunch | If you look at the snippet I just posted: http://ix.io/1bkM/Nim you can see those top XTest procedure definitions are actually imported from a C library |
08:05:47 | PMunch | The x and xlib import all the way at the top are also just thin pre-made wrappers around their corresponding C library |
08:06:09 | Electrux | oh yes! that code looks pretty neat btw! :) |
08:06:23 | hohlerde | Electrux: nim is perfectly fine for daily use, however, if you use the devel branch and build it on your own, you might encounter breaking changes sometimes. The impact of those are not that big, though. |
08:06:27 | FromGitter | <data-man> @Electrux: There is https://github.com/jangko/nimLUA |
08:07:20 | PMunch | Electrux, haha thanks. It's a bit heavy on the discards, should probably turn those into proper errors with some sort of handling, but for what I'm using it for it doesn't matter much if it doesn't work 100% of the time |
08:08:20 | PMunch | hohlerde, yeah I wouldn't worry too much about breaking changes. Even libraries I wrote a year or more ago only need a thing or two changed to work fine with latest Nim. |
08:08:31 | Electrux | hohlerde: oh... well i guess considering that this language is not that mature ( i guess? ) i can expect some major changes... thanks for warning me :) |
08:08:34 | PMunch | And mostly just minor stuff as well |
08:09:13 | Electrux | PMunch: ooh... well what are u using it for? |
08:09:33 | PMunch | All sorts of things really |
08:10:25 | Electrux | interesting :D |
08:10:30 | PMunch | Started doing university projects in it, then I went on to do my master thesis in it, and of course now I've written a couple small and large libraries, a game, and a utility program here and there |
08:10:46 | PMunch | Just the other day I wrote a generator for some binary test data for work |
08:11:47 | Electrux | ok idk what is this about... https://imgur.com/a/cGgSIO7 i m now on development branch |
08:12:00 | Electrux | wow a game?!! |
08:12:02 | hohlerde | wrote an atm driver in nim using libusb and made heavy use of OOP. works really well. |
08:12:10 | PMunch | https://github.com/PMunch?tab=repositories |
08:12:13 | Electrux | may i have a link to those things if they are open source please? |
08:12:15 | Electrux | oh thanks :D |
08:12:51 | PMunch | The game was just a fairly short game-jam game |
08:13:03 | PMunch | An atm driver? |
08:13:35 | hohlerde | yep |
08:13:45 | PMunch | https://pmunch.itch.io/hold-the-line |
08:13:49 | PMunch | What's that? |
08:14:21 | hohlerde | it communicates with the firmware of the atm abd offers a restful interface to issue commands such as withdrawal or bank account statement |
08:14:31 | livcd | hohlerde: is it on github ? :) |
08:14:49 | PMunch | Wait, an actual ATM? |
08:15:00 | hohlerde | nope, it is not open source, as it is used by the company I work for |
08:15:07 | hohlerde | yes, an actual ATM |
08:15:13 | PMunch | Huh, cool |
08:15:24 | PMunch | Better hope you don't have some strange bug then :P |
08:15:28 | Electrux | oh wow! u wrote a driver in Nim at production environment? that's awesome! :D |
08:15:38 | hohlerde | the ProCash 1500 you see in some bank branches |
08:15:57 | hohlerde | the driver is used for showcases, not for production in the wild |
08:15:57 | PMunch | If someone enters ARAQ as their PIN it empties the vault |
08:16:12 | PMunch | Ah right, makes sense |
08:16:16 | PMunch | Still cool though |
08:16:34 | Electrux | btw cool repositories PMunch :D |
08:16:52 | hohlerde | I just wanted to try out if nim is capable of doing that |
08:16:55 | PMunch | Electrux, haha thanks :) |
08:16:57 | livcd | PMunch: i cant start your game :S |
08:17:15 | PMunch | livcd, from the binary on itch or from source? |
08:17:19 | PMunch | Win or Linux? |
08:17:22 | livcd | from the binary on windows |
08:17:22 | PMunch | Errors? |
08:17:45 | livcd | https://glot.io/snippets/f1cyngmfw5 |
08:18:52 | hohlerde | and Electrux, the nim community is really nice and helpful, if you encounter problems or have questions |
08:19:11 | PMunch | Hmm, strange.. |
08:19:44 | PMunch | TBH I never tried the Windows version myself. But all of my teammates were on Windows so it should work.. |
08:20:00 | livcd | doh :D |
08:20:31 | hohlerde | in my beginner days with nim had an debugging session with araq on a sunday afternoon. he solved my problem and I really appreciated that he took his precious time to help me. |
08:23:02 | * | yglukhov[i] joined #nim |
08:23:40 | Electrux | that's great! hohlerde :D |
08:24:04 | PMunch | livcd, what kind of machine are you running on. Win10 I assume? |
08:24:22 | * | Vladar quit (Remote host closed the connection) |
08:24:26 | Electrux | can anyone please tell me what this means? https://imgur.com/a/cGgSIO7 has anyone encountered this? ( it's ok if it's a bug... i just want to know ) |
08:24:43 | * | Vladar joined #nim |
08:25:08 | Electrux | PMunch: is your game available for Mac? |
08:25:13 | livcd | PMunch: yes win10 |
08:25:38 | * | sendell joined #nim |
08:25:39 | livcd | PMunch: tried with the compatibility setting but did not work |
08:27:21 | PMunch | Electrux, well it requires SDL |
08:27:30 | PMunch | But if you have SDL then it should work |
08:27:52 | Electrux | SDL is available on Mac OS |
08:28:01 | hohlerde | Electrux, have not encountered that |
08:28:36 | PMunch | livcd, might be some issue with the amount of channels or the size of the buffer.. |
08:30:39 | Electrux | hohlerde: ok it occurs when u pass a var openarray to a function and use repr in that function |
08:54:53 | * | arecaceae quit (Remote host closed the connection) |
08:55:17 | * | arecaceae joined #nim |
08:57:03 | FromGitter | <matrixbot> `monday smalltalk` anyone seen this error before: nimcache\stdlib_system.c:13746:16: error: '_O_BINARY' undeclared |
09:01:37 | FromGitter | <7sDream> I meet it when I use msys2 instand of gcc as compiler in windows |
09:01:54 | FromGitter | <7sDream> instand of mingw |
09:04:07 | * | yglukhov[i] quit (Remote host closed the connection) |
09:04:40 | * | yglukhov[i] joined #nim |
09:04:54 | FromGitter | <matrixbot> `monday smalltalk` that makes sense actually, thanks |
09:05:16 | * | yglukhov[i] quit (Remote host closed the connection) |
09:05:30 | * | yglukhov[i] joined #nim |
09:06:53 | * | yglukhov[i] quit (Remote host closed the connection) |
09:07:28 | * | yglukhov[i] joined #nim |
09:07:45 | * | yglukhov[i] quit (Remote host closed the connection) |
09:07:59 | * | yglukhov[i] joined #nim |
09:08:13 | * | yglukhov[i] quit (Remote host closed the connection) |
09:08:49 | FromGitter | <matrixbot> `monday smalltalk` is it documented that msys/cygwin doesnt work? I get it all sorted now though |
09:09:06 | * | xet7 joined #nim |
09:19:43 | FromGitter | <7sDream> install guide say that mingw works, but say nothing about other ⏎ https://nim-lang.org/install_windows.html#notes-about-compiler-dependencies |
09:34:03 | FromGitter | <mratsim> @skrylar, I’ve fixed https://github.com/mratsim/Arraymancer/issues/240 |
09:42:11 | skrylar | hooray. |
09:47:14 | FromGitter | <mratsim> I’m pretty sure I copy pasted like a dumb machine :P |
09:47:45 | FromGitter | <mratsim> I forgot to remove the return value and to add the var parameter and obvviously no test |
10:28:43 | PMunch | Hmm, this article someone linked to on the forum in the topic "Perfecting Nim" (or something like that), is really interesting: http://joeduffyblog.com/2016/02/07/the-error-model/ |
10:28:49 | PMunch | About error models |
10:29:29 | PMunch | Especially the require/ensure stuff and the abandon/fail differentiation is really interesting |
10:31:28 | FromGitter | <mratsim> @PMunch we will provide and use tools to implement thmost of the suggestion in this article as it is a big inspiration for how we will handle errors at Status |
10:33:25 | FromGitter | <data-man> @PMunch: https://github.com/arnetheduck/nim-result/pull/1 |
10:34:23 | PMunch | mratsim, ooh interesting |
10:34:31 | PMunch | All done through macros I assume |
10:34:45 | PMunch | Is there a way in Nim to disable exceptions by the way? |
10:35:05 | FromGitter | <data-man> If you missed this in the chat. :) |
10:35:16 | PMunch | And have the compiler stop you from calling anything that can throw one |
10:36:21 | PMunch | data-man, what is that? |
10:38:12 | FromGitter | <data-man> Just read https://github.com/arnetheduck/nim-result/blob/a41157eda91bd1fff589262e4d82cbd0d0a1e0f4/result.nim |
10:39:18 | PMunch | Yeah I'm reading that rightnow |
10:40:41 | PMunch | Not a huge fan of the return type errors though. Too much strain the the success-path of your program with all those checks.. |
10:41:59 | Araq | yeah, I'm writing a blog post on why exceptions are superior and should be used... |
10:42:06 | PMunch | What would be great in Nim, since we have the powerful compile-time stuff, would be to have handler code injected at the fault site, instead of adding an extra branch. |
10:42:32 | Araq | just look at the result.nim implementation |
10:42:55 | Araq | so it lifts '+' from the ground types to Result[] |
10:43:18 | Araq | what next? lift -, div, mod, ==, <=, plus every other operation that can be lifted? |
10:43:26 | Araq | that would be *every* operation. |
10:43:29 | Araq | impossible. |
10:43:49 | Araq | contrast this with exceptions: There is no code to write, exceptions propagate. |
10:44:13 | Araq | it's like having a dedicated side channel for the error path that simply does the right thing. |
10:44:29 | PMunch | Depends on what you mean by the right thing.. |
10:44:38 | FromGitter | <mratsim> @dom96 no way to change our profile picture in the forum at the moment? |
10:44:55 | Araq | it unwinds the call stack, the *same* thing that Result tries to emulate. |
10:46:01 | euantor | The fact that Rust already has two different approaches to error handling is quite telling: https://github.com/rust-lang-nursery/error-chain and https://github.com/rust-lang-nursery/failure |
10:46:13 | euantor | And both are from `rust-lang-nursery` |
10:46:47 | FromGitter | <mratsim> Haskell too has both exceptions and Result/Either |
10:46:57 | FromGitter | <mratsim> Rust is inspired by Haskell ;) |
10:47:26 | Araq | and the star of reliability, Erlang, has exceptions too. |
10:47:27 | FromGitter | <mratsim> C++ has both exceptions and error codes |
10:48:34 | FromGitter | <dom96> @mratsim settings |
10:48:35 | euantor | I do like Rust's `try!` macro and `?` for when calling a method that returns a `Result` |
10:48:49 | FromGitter | <mratsim> as long as the solution pass my design smell detector `c = a + b` I’m fine with it. `check foo_add(c, a, b)` ist verboten |
10:49:05 | FromGitter | <dom96> @mratsim in your profile page. Why haven't you looked there? |
10:49:39 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/Rywd/2018-05-25_12-49-13.png) |
10:49:52 | FromGitter | <mratsim> tried clicking on the photo as well but nothing happens |
10:50:10 | PMunch | Yeah, there's no change picture button there |
10:50:12 | FromGitter | <mratsim> aah it’s gravatar |
10:50:47 | FromGitter | <mratsim> ugh :/ that’s a pain. |
10:53:13 | Araq | the only reason why exceptions are bad is because you can write open(); write(); close() solution? pack 'close' in a destructor (C++) or invent a {.finally.} pragma so that close can only be called in a 'finally' part |
10:57:08 | Araq | but no, we don't need no stinkin' decent problem analysis, we can just hype some inferior FP inspired solution instead... |
10:57:34 | PMunch | A finally pragma would actually be kinda neat. But it hides the bigger problem that unchecked exceptions are just that, unchecked. If I have to go dig up some documentation or do some other magic to check if a procedure might randomly terminate my program I think that's room for improvement. |
10:57:56 | Araq | and solve the problem with MOAR boilerplate and brute force, that has always served us well |
10:57:57 | PMunch | With return values and discard at least it's painfully obvious that I'm not doing something I possibly should do |
10:59:17 | PMunch | I agree that the way exceptions are handled is cleaner than return values, but I still don't feel like it's a very robust solution.. |
10:59:34 | Araq | feelings are irrelevant. |
11:00:03 | PMunch | s/feel/think |
11:00:41 | PMunch | Or rather s/feel like/think that/, |
11:01:33 | FromGitter | <alehander42> so why can't checked exceptions do the job ? people don't like the writing code overhead, but it might be less than error types |
11:02:06 | FromGitter | <alehander42> (I still think error results with some sugar for easily bubbling up / marking which calls can error can be also good, haven't looked much at nim-result) |
11:02:52 | FromGitter | <brechtm> Hi all |
11:03:42 | PMunch | As he mentions in the article here: http://joeduffyblog.com/2016/02/07/the-error-model/#preconditions-and-postconditions by having ensures and requires they greatly reduces the number of exceptions |
11:03:57 | PMunch | I think that if that was the case then checked exceptions would be nice |
11:04:00 | Electrux | m not even sure if m qualified to say this... and no offense... it would be very nice if exceptions are used at a minimum... :/ |
11:04:07 | FromGitter | <brechtm> Are nakefiles still Good Practise or should I use Nimble instead? |
11:04:36 | PMunch | Having to catch an ArgumentException that you know can't happen because you are passing in a static integer is just annoying |
11:05:11 | PMunch | brechtm, I think nimble replaced nake |
11:05:32 | FromGitter | <alehander42> ahh, so smarter inference of which exception paths are impossible for a callsite is needed |
11:05:33 | FromGitter | <data-man> @Araq @dom96 ⏎ Returning to the night question. ⏎ Is https://t.me/nim_lang the official channel? If so, then we need to add it to the site. |
11:05:47 | FromGitter | <alehander42> that might be hard |
11:05:58 | zahary_ | At Status, we had some very long discussions about error handling after the "Perfecting Nim" post. We have an internal proposal for how to error handling in our own projects that is not so secret anymore. You can take a look here: |
11:05:58 | zahary_ | https://gist.github.com/zah/d2d729b39d95a1dfedf8183ca35043b3 |
11:06:24 | zahary_ | I think it solves many of the raised concerns from both sides of the argument |
11:06:25 | PMunch | data-man, it is the "official" yes. It was created before FOSDEM so we had a way to more easily co-ordinate while there |
11:06:40 | FromGitter | <brechtm> @PMunch I'm using this nakefile (https://github.com/yglukhov/nim-sdl-template/blob/master/nakefile.nim) that handles multi-platform (macOS, iOS, Android) builds. Should it be possible to do the same with Nimble? |
11:06:48 | PMunch | As IRC isn't really all that great on mobile :P |
11:07:11 | Araq | zahary_, I'm completely sold on exceptions now fwiw. array's [] index operator doesn't return an Either |
11:07:24 | Araq | integer operations don't produce an Either. |
11:07:46 | Araq | so you have to deal with these failures anyway |
11:07:53 | Araq | via exception handling. |
11:08:10 | PMunch | I again kinda agree with the article again on that one, those should be hard errors, not something you can recover from.. |
11:08:34 | dom96 | huh, you've changed your mind about exceptions Araq? |
11:08:41 | Araq | nope, wrong, there are no hard unrecoverable errors. |
11:08:58 | Araq | that's Erlang's key point. |
11:09:12 | Araq | you let the *subsystem* fail, not the full program. |
11:09:19 | PMunch | How often do you see: while true: try: echo myArray[i]; i+=1; except OutOfBoundsError: break |
11:09:23 | Araq | you can map subsystems to processes |
11:09:44 | Araq | but lacking lightweight processes, mapping them to proc calls is a good alternative |
11:09:48 | FromGitter | <brechtm> @PMunch: I've encountered such situations in Python |
11:10:11 | Araq | and why should subsystem arrangements depend on concurrency primitives anyway |
11:10:12 | zahary_ | well, I think I'm covering these subleties in my gist (when a non-recoverable error can be recovered, why error code doesn't work well for this type of errors, etc) |
11:10:19 | FromGitter | <brechtm> (except StopIteration) |
11:10:25 | Araq | dom96, yeah... |
11:10:28 | PMunch | Araq, that's fair. Nim lacks the granularity that Erlang has in that regard, so failing the entire program might be a bit too harsh. |
11:10:44 | dom96 | I'm a big proponent of exceptions too |
11:11:09 | dom96 | As far as I'm concerned, Nim's exceptions with exception tracking are perfect. |
11:11:24 | dom96 | The common downside quoted about exceptions is that they are not part of the function type |
11:11:33 | dom96 | Well, exception tracking makes it part of the function type |
11:11:54 | PMunch | Oh yeah, Nim exceptions are better than many other kinds of exceptions, that's for sure |
11:12:38 | PMunch | brechtm, what kind of horrible Python code have you been reading? |
11:12:49 | zahary_ | there are some flaws. a proper exception tracking system should still discrimate between recoverable and non-recoverable errors |
11:12:57 | dom96 | zahary_: I think your proposal can be handled via exception tracking too. |
11:13:01 | FromGitter | <brechtm> @PMunch: writing! |
11:13:06 | zahary_ | the reasoning is explained in my gist: https://gist.github.com/zah/d2d729b39d95a1dfedf8183ca35043b3 |
11:13:26 | zahary_ | dom, my proposal is based on the exception tracking mechanism with some features on top of it |
11:14:13 | FromGitter | <brechtm> @PMunch: though that was with iterators, not lists |
11:17:40 | PMunch | brechtm, with iterators? Do they throw an exception when they are exhausted in Python? |
11:18:11 | FromGitter | <brechtm> @PMunch: yes, next(exhausted_iterator) throws StopIteration |
11:18:13 | PMunch | zahary_, don't have time to read your proposal atm, but I'm looking forward to it :) |
11:18:27 | dom96 | At least Lobste.rs likes my post https://lobste.rs/s/6tougq/nimforum_lightweight_alternative |
11:20:34 | FromGitter | <alehander42> huh which community is lobste.rs :O looks interesting |
11:21:57 | * | gokr quit (Ping timeout: 240 seconds) |
11:22:05 | FromGitter | <alehander42> @zahary_ would the handleErrors be ergonomic enough to make e.g. try "useless" (work well even for simple try usecases)? If a user decides to adopt an error-handling strategy, he'd want to use it everywhere |
11:22:50 | zahary_ | well, it will support as-expression and as-statement syntax, so indeed one can use it everywhere instead of try |
11:24:06 | zahary_ | handleErrors is a codename chosen for clarity btw. so far 'rescue' (stolen from Ruby) is the favorite for the final name. other suggestions are welcome |
11:25:28 | FromGitter | <alehander42> isn't this a misleading name? in ruby one uses `begin rescue `, so I always translated `rescue` to `catch/except` in my head |
11:30:47 | Araq | zahary_, 'handleErrors' assumes that there are unrecoverable errors that are mapped to 'raise' anyway |
11:31:13 | Araq | I would argue that the true unrecoverable errors are mapped to quit() |
11:31:23 | Araq | and not of anyone's concern. |
11:32:00 | Araq | however, things we are currently unsure about like IndexError or OverflowError should be a properly recoverable error |
11:32:05 | zahary_ | well, as you said, something non-recoverable errors can be handled at the subsystem level |
11:32:11 | zahary_ | sometimes .. |
11:32:37 | Araq | IndexError and OverflowError turn Nim procs into total functions |
11:32:49 | Araq | (ignoring endless loops) |
11:33:20 | Araq | and that's a key ingredient of why this "in practice, I'm catching IndexError on this buggy subsystem" works so well |
11:34:13 | zahary_ | Otherwise, in an RFC I would actually recommend having control about how certain errors are handled at the raise site by introducing a compile-time define for this. You say that certain exceptions should be handled with quiting |
11:34:37 | Araq | and with a safety zone in the allocator even "out of memory" situations can be handled |
11:34:46 | zahary_ | The rationalle for this is enabling some optimizations in code that can assume no stack unwidning will be ever happening |
11:35:20 | Araq | this is essentially what an OS does too. it quits a subsystem on OOM and yet can continue to work |
11:36:35 | * | gokr joined #nim |
11:38:09 | Araq | assuming no OS, "assume no stack unwinding" is pretty much impossible. |
11:38:32 | Araq | conceptually "quit" does unwind the stack too. |
11:38:53 | zahary_ | sure, although I've discussed some alternative approaches here: |
11:38:53 | zahary_ | https://gist.github.com/zah/d2d729b39d95a1dfedf8183ca35043b3#appendix-aborting-tasks-and-the-need-for-a-resource-supervisor |
11:38:53 | zahary_ | You can have your own OS-like resources supervisor |
11:39:42 | zahary_ | stack unwinding is one way to release resources, a supervisor is the other. The OS is a kind of supervisor |
11:41:37 | * | gokr quit (Ping timeout: 252 seconds) |
11:42:13 | * | Snircle joined #nim |
11:42:53 | * | natrys joined #nim |
11:43:38 | Araq | ok, well, maybe outline how a supervisor would work in Nim user-land |
11:44:21 | Araq | I see that you cannot use 'quit' and are forced to use 'raise' |
11:44:41 | FromGitter | <brechtm> Does Nimble somehow support building for iOS? |
11:44:52 | Araq | I don't see why these unhandled exceptions that propagate into the type signature would hurt us |
11:45:12 | zahary_ | I've mentioned one way - relying on the GC heap, which is walkable. Another way is to put a Context structure in a thread-local var and register all the resources there (as some kind of collection that can be walked when things go awry) |
11:46:39 | Yardanico | @brechtm what do you mean by this? |
11:46:42 | Yardanico | nimble is a package manager |
11:48:04 | FromGitter | <brechtm> @Yardanico I understand it is supposed to replace Nake. And I want to convert this nakefile (https://github.com/yglukhov/nim-sdl-template/blob/master/nakefile.nim) that can build my project for macOS, iOS and Android. |
11:48:26 | zahary_ | because it's unreasonable to handle them - they are not expected to ever happen, so the software could not have a reasonable policy about how to handle them. the callers on the every level of the call graph would be annoyed for having to spend time thinking about these non-recoverable errors and figuring out that they should be propagated up |
11:48:27 | FromGitter | <brechtm> I suppose I could define a task that builds for IOS |
11:48:36 | Yardanico | @brechtm Nimble supports nimscript |
11:48:40 | FromGitter | <brechtm> But perhaps there are better ways |
11:48:57 | shashlick | data-man you can test the nim-0.16.0.tar.gz posted in the download directory on the website |
11:49:26 | Yardanico | nimscript is basically a interpreter (well, virtual machine) used for running compile-time stuff in Nim compiler |
11:49:39 | Yardanico | but it can be used separately (for nimble) |
11:50:25 | Yardanico | @brechtm most of the code in this nakefile can be run by nimble+nimscript easily without changes |
11:51:01 | FromGitter | <brechtm> @Yardanico can I call Nimble's build functionality in these tasks. There seems to be little documentation about these Nimble tasks. |
11:51:20 | PMunch | zahary_, yeah if we have checked exceptions we should also have require/ensure and a group of possibly unchecked exceptions that map to errors like div by zero, OOM, stack-overflow, etc. |
11:52:20 | PMunch | brechtm, my idea was to use the nimble tasks and basically do what you now do through the nakefile |
11:53:22 | FromGitter | <brechtm> So that's pretty much a 1-to-1 conversion. Nimble doesn't really provide anything extra wrt to management of the iOS versions of the dependencies? |
11:54:30 | shashlick | data-man: what's Nim compression |
11:54:58 | PMunch | brechtm, doubtful |
11:55:42 | FromGitter | <data-man> @shashlick: New Nim's org for compression/decopression stuff. The big plans. :) |
11:55:57 | * | gokr joined #nim |
11:58:46 | FromGitter | <data-man> All interested persons are welcomed! |
12:02:00 | * | gokr quit (Ping timeout: 260 seconds) |
12:04:28 | FromGitter | <data-man> @shashlick: This archive contains the sources only? |
12:04:57 | Araq | zahary_: ok, so you argue you need to write 'raise' which should not result in a .raises annotation? |
12:08:06 | zahary_ | I imagine two nice ways for this to work: 1) We can copy Java and introduce a base type for all non-recoverable errors. This exception may be implied by default from the higher-level `errors:` pragma in my proposal. 2) We may allow the user to specify the non-recoverable errors list per scope - errors can expand to something including the list specified in the current scope - system.nim provides a default |
12:08:46 | * | CodeVance joined #nim |
12:10:54 | Araq | proc hiddenRaise(e: ref Exception) {.raises: [], noreturn.} = |
12:11:10 | Araq | proc inner(e: ref Exception) = raise e |
12:11:38 | Araq | cast[proc (e: ref Exception) {.raises: [].}](inner)(e) |
12:12:05 | Araq | solves the problem? |
12:12:21 | Araq | if you don't want to track unrecoverable errors, don't track them |
12:13:00 | Araq | it's pretty much what we do for system.`+` |
12:13:01 | * | elrood joined #nim |
12:15:42 | zahary_ | well, we don't have control over built-in exceptions such as 'IndexError', 'OverflowError', etc. My reasoning is that they should be included in the list. We'll strive to use asserts for pretty much everything else |
12:17:39 | * | gokr joined #nim |
12:18:56 | Electrux | i literally cannot understand half of the second part of the nim guide.. :( ( the guide is good... just my fault probably ) |
12:19:16 | PMunch | Which guide? |
12:19:18 | PMunch | The manual? |
12:20:20 | Electrux | https://nim-lang.org/docs/tut2.html |
12:20:26 | Electrux | this one |
12:20:49 | FromGitter | <mratsim> same question about NimCompression :P |
12:20:55 | shashlick | data-man: yes Nim sources and csources combined |
12:22:50 | PMunch | Electrux, maybe just need the manual? |
12:22:55 | FromGitter | <data-man> @shashlick: Just use zip files from github releases. |
12:23:15 | PMunch | But to be fair, those are the advanced concepts. Might be good to master the basics first :) |
12:23:18 | shashlick | data-man: is there a write up on the goals of Nim compression |
12:24:06 | shashlick | I've added code to download from GitHub if archive isn't on Nim Lang, but haven't pushed yet |
12:24:26 | shashlick | Also, dom96 wanted to keep those archives as is for choosenim |
12:26:56 | Araq | Electrux: ignore the harder parts until you are ready for them. In fact, that's what most Nim starters do. |
12:27:01 | FromGitter | <data-man> @shashlick: Goals: wrappers for libarchive, zstd, lz4, etc. Common interface for these wrappers. Port some C libs to Nim. So far, that's enough. |
12:27:05 | Electrux | PMunch yea, i guess i will practice the language before understanding all of the 2nd tutorial page :) |
12:27:57 | Electrux | Araq: thanks... i will do that... |
12:28:31 | Electrux | can someone give me suggestions as to what should i program with the language? practice problems perhaps... or something? ( hopefully enjoyable ) |
12:28:46 | Electrux | thank you very much for all your help u guys :) |
12:28:56 | FromGitter | <mratsim> I find that the only way to learn is do something you want to do |
12:29:09 | FromGitter | <mratsim> otherwise it’s easy tog et discouraged. |
12:29:28 | FromGitter | <mratsim> say, you’re tired of the music players that exist, try doing one yourself. |
12:29:58 | FromGitter | <mratsim> or you want to automate stuff with your Raspberry Pi, well just do that |
12:30:10 | Electrux | i like making terminal based stuff... :D |
12:30:19 | Electrux | and perhaps delve into some GUI |
12:30:20 | PMunch | Other options include simple programming challenges such as advent of code |
12:30:29 | PMunch | At least just to get your feet wet |
12:30:35 | FromDiscord | <r00ster> how could I raise an error myself with a custom message? because my library can be only used on certain OSes so I raise when its the wrong OS |
12:30:42 | FromGitter | <mratsim> To get my feet wet I use Project Euker |
12:30:50 | FromGitter | <mratsim> Euler* |
12:31:02 | PMunch | r00ster, raise newException( |
12:31:11 | PMunch | Crap, didn't mean to hit enter |
12:31:30 | FromGitter | <mratsim> when defined(windows): {.error: “Unsupported OS”.} —> error is compile-time |
12:31:34 | PMunch | raise newException(<your error type>, "This is the message") |
12:31:39 | Electrux | ok then, i will try to make terminal based stuff and do some programming challenges... thanks a lot :D |
12:31:51 | PMunch | Oh yeah, that's a much better solution :) |
12:32:07 | FromDiscord | <r00ster> oh ok thank you |
12:32:10 | PMunch | Electrux, no problem. And be sure to ask any questions you might have :) |
12:32:33 | Electrux | sure thing! thanks again ^_^ |
12:34:09 | shashlick | data-man ya sure I can help with wrappers |
12:40:29 | FromGitter | <data-man> @shashlick: Join to us! :) |
12:50:34 | dom96 | data-man: Awesome organisation :) |
12:50:56 | dom96 | Electrux: I always start by making IRC bots :) |
12:53:47 | FromGitter | <data-man> @dom96: Why you haven't joined? :( |
12:54:13 | FromGitter | <data-man> And Araq :( |
12:54:32 | dom96 | because I don't check emails as soon as I wake up |
12:54:35 | * | gokr quit (Ping timeout: 252 seconds) |
12:55:09 | FromGitter | <data-man> Hmm, good morning? :) |
12:58:00 | * | couven92 quit (Read error: Connection reset by peer) |
12:58:04 | dom96 | I wake up late too :P |
12:58:11 | * | pwntus quit (Remote host closed the connection) |
13:00:38 | FromGitter | <data-man> Move untar to the new org. ;) |
13:01:51 | Yardanico | @data-man I got an invite too :D |
13:02:11 | FromGitter | <data-man> Of course! :) |
13:04:33 | FromGitter | <data-man> More Nim-orgs, more globalization. This is the trend. :-D |
13:05:11 | shashlick | I like the idea |
13:05:31 | shashlick | That way more people can check in code without having to wait for PR |
13:05:45 | FromGitter | <data-man> Yes. |
13:06:24 | FromGitter | <mratsim> You sound like a man with a plan |
13:07:06 | FromGitter | <mratsim> https://memegenerator.net/img/instances/68923504.jpg |
13:08:41 | FromGitter | <data-man> Also planned NimDB, NimGit, NimNet, NimAlgorithms, NimDataStructures, NimGraphics, NimSystem, NimMath, NimTinyTools, etc. :) |
13:09:48 | Yardanico | hmm, well, that's maybe useful, but still |
13:10:21 | Yardanico | you'll always need to be online to invite people to these orgs (so they can create/transfer their repos) |
13:10:22 | dom96 | I don't think we need to do that... |
13:10:25 | Yardanico | yeah |
13:10:29 | FromGitter | <brechtm> Is it possible to specify compiler options in a .nimble file? |
13:11:56 | dom96 | use a .nims or .nim.cfg file for that |
13:12:32 | dom96 | Here is an example: https://github.com/nim-lang/nimforum/blob/master/src/nim.cfg |
13:12:54 | FromGitter | <brechtm> thanks |
13:12:55 | dom96 | you can also name it mainFile.nim.cfg and it will only apply when compiling `mainFile.nim` |
13:19:15 | FromGitter | <brechtm> @dom96 Does that allow for the options to be dependent on the task being executed? |
13:19:39 | PMunch | brecdtm, if you are still looking at tasks the nimble file for that project has quite a lot of them: https://github.com/nim-lang/nimforum/blob/master/nimforum.nimble |
13:20:12 | FromGitter | <brechtm> @PMunch yeah... it's still all a little overwhelming :-) |
13:20:53 | FromGitter | <brechtm> I'm getting the feeling Nimble is not flexibly enough to the task of elegantly replacing my nakefile. At least if I want to use "nimble build" for creating the macOS binary (and tasks for iOS and Android targets). |
13:22:08 | FromGitter | <brechtm> Granted, that is a fairly non-standard task though. |
13:22:26 | dom96 | nimble tasks can do everything that a nakefile can |
13:22:45 | livcd | i always read nakefile like nakedfile |
13:23:40 | FromGitter | <brechtm> @dom96 yes, but how to pass one set of arguments to nim c on build, and another set for a task? |
13:23:56 | * | yglukhov[i] joined #nim |
13:24:29 | FromGitter | <brechtm> "nimble c" calls "nim c", after resolving dependencies, right? |
13:25:37 | dom96 | I'm not sure what you mean |
13:25:52 | dom96 | Maybe you could show me your current nakefile? |
13:26:45 | FromGitter | <brechtm> @dom96 https://github.com/yglukhov/nim-sdl-template/blob/master/nakefile.nim |
13:27:49 | FromGitter | <brechtm> Perhaps I should not use separate tasks for each target (macOS, iOS, Android), but instead set a target variable or something? |
13:28:11 | dom96 | s/runNim/exec "nim ..."/ ? |
13:28:51 | dom96 | The only thing Nimble tasks need is access to any parameters passed to a task |
13:28:57 | dom96 | But I don't think that nakefile is using this |
13:29:51 | FromGitter | <brechtm> @dom96 but how do I map "nimble build" do what's defined in defaultTask? |
13:30:38 | dom96 | `nimble c`? |
13:31:23 | FromGitter | <brechtm> @dom96 I'm sorry, I'm not following. nimble c where? |
13:32:01 | dom96 | I'm not sure what you mean to be honest |
13:32:06 | dom96 | What's there to map? |
13:32:22 | dom96 | You can literally execute the exact same thing this nake file is executing |
13:33:12 | FromGitter | <brechtm> By copying these tasks to the .nimble file. That, I understand. But how do I make "nimble build" execute defaultTask? |
13:33:26 | dom96 | oh, that's what you want |
13:33:28 | dom96 | You can't |
13:33:31 | dom96 | You need to define your own task |
13:33:39 | skrylar | mratsim: so this facebook paper.. amusingly, they aren't even using RNNs at all. it's just linear layers and a gaussian attention network |
13:34:01 | FromGitter | <brechtm> @dom96 aha, that's what I thought :-/ |
13:34:33 | FromGitter | <brechtm> @dom96 but nimble will still resolve any dependencies before a task is executed, I suppose? |
13:34:46 | dom96 | brechtm: yes, but you should execute `nimble c` for that |
13:35:05 | FromGitter | <brechtm> @dom96 yup, I figured so much. Thanks! |
13:35:21 | dom96 | brechtm: and not being able to override 'nimble build' is a Nimble issue, you can't do it with nakefiles either |
13:36:14 | * | Guest52326 quit (Quit: Discord > IRC) |
13:36:26 | * | SunDwarf joined #nim |
13:37:19 | FromGitter | <brechtm> @dom96 override 'nimble build' in a nakefile? Or something equivalent in nake? |
13:38:16 | FromGitter | <brechtm> Nake does have the notion of a default task which it executes on invoking nake without any arguments, no? |
13:38:52 | dom96 | brechtm: but then how will Nimble users use it? |
13:39:38 | dom96 | if you want a clever hack, you could create a Nim file that executed your default task and specify it in Nimble's `bin` (bin = @["mydefaulttask"]) :) |
13:40:04 | dom96 | `nimble build` will build that binary, but not run it |
13:40:17 | dom96 | you could however execute your default task at compile time with `staticExe` |
13:40:20 | dom96 | *staticExec |
13:40:23 | dom96 | but that might be going too far lol |
13:40:55 | * | CodeVance quit (Quit: Leaving.) |
13:41:10 | * | enthus1ast quit (Ping timeout: 264 seconds) |
13:41:21 | * | CodeVance joined #nim |
13:41:45 | * | xkapastel joined #nim |
13:42:27 | FromGitter | <brechtm> @dom96 It's a game, so it's not really of use to Nimble users. I only wanted to use Nimble for dependency management. |
13:45:04 | dom96 | I would just create an `android`/`ios` task and instruct your users to run `nimble android` etc. |
13:46:29 | PMunch | By the way brechtm, have you seen my SDLgamelib? It was born from the same repo as your nakefile |
13:46:57 | FromGitter | <brechtm> @PMunch no, but I will now :-) |
13:47:44 | FromGitter | <brechtm> @PMunch did you keep the multi-platform support? |
13:50:01 | PMunch | Think so |
13:50:03 | FromGitter | <Varriount> @data-man Love all the work you've been doing recently. I was especially amused by the recent "Use binary search everywhere". |
13:50:44 | PMunch | Don't see why it should be broken |
13:50:56 | PMunch | Last time I checked it was cross platform still :) |
13:51:20 | FromGitter | <brechtm> @PMunch I mean the building for iOS and Android, but since it's a Nimble package, I don't suppose so? |
13:51:27 | shashlick | dom96: you good with the choosenim and untar PRs? |
13:52:37 | PMunch | brechtm, it's just a library to more easily use SDL |
13:53:08 | PMunch | It's meant to be used _with_ nim-sdl-template, not _instead of_ |
13:54:25 | FromGitter | <data-man> @Varriount: Big thanks! More amusing things are planned! :) |
13:56:27 | Electrux | how would u reverse a string? does nim provide a built in function in some module? |
13:58:17 | PMunch | var s = newString(oldString.len); for i in 0 .. oldString.high: newString[oldString.high - i] = oldString[i] |
13:58:22 | Araq | unicode.reverse |
13:58:30 | PMunch | Yeah, or that |
13:58:47 | PMunch | There's one it strutils too for pure ASCII no? |
14:00:56 | shashlick | dom96: I've implemented binary build installs, 64bit and direct download from GitHub and intend adding some test cases for choosenim before pushing |
14:01:12 | Electrux | oh... thanks :) i was gonna go for strutils.split, algorithm.reverse, and perhaps create a new string from that... but this makes it much easier... thanks again |
14:02:04 | dom96 | shashlick: Untar - No, you need to investigate why it fails in 0.18.1 and not 0.18.0. Adding a try around this is just ignoring the problem. |
14:02:09 | Araq | and you all know what follows now... |
14:02:15 | Araq | https://nim-lang.org/docs/theindex.html search for 'reverse' |
14:02:29 | Araq | and you notice Araq is wrong and it's unicode.reversed() |
14:02:50 | Electrux | wow that's massive :O |
14:03:01 | dom96 | shashlick: You're doing similar things in choosenim |
14:04:55 | shashlick | Well if readstr is returning a blank string, you have to handle it in choosenim |
14:05:15 | FromGitter | <krux02> yay, I have my first example of compiling Nim to opengl instractions plus glsl running. |
14:05:36 | dom96 | shashlick: Added more comments on the PR |
14:05:41 | FromGitter | <krux02> meaning the first step is done so that Nim bocomes a hybrid GPU+CPU programming language |
14:08:03 | Electrux | btw, do we not need null terminator in string? |
14:09:16 | shashlick | Ok cool |
14:09:56 | FromGitter | <krux02> Electrux: The null terminator for strings is there just for C interop, nothing else |
14:10:09 | Electrux | oh ok |
14:10:27 | Electrux | so i don't need it if i don't explicitly interface with C code |
14:11:06 | FromGitter | <krux02> A lot of C APIs require strings to be null terminated. If Nim did not have the terminator, temporary string copies would be inevitable on each call |
14:11:15 | FromGitter | <krux02> yes |
14:12:39 | FromGitter | <krux02> It is not like Nim has no bugs. It can in fact happen that there is a nim library that relies on the null terminator, or you see the null terminator. But this should not be of interest to use until you actually face that bug |
14:16:37 | * | endragor quit (Remote host closed the connection) |
14:17:03 | Yardanico | Electrux in fact in devel branch of Nim you can't access null terminator anymore |
14:17:35 | Yardanico | well, you can if you convert it to cstring (maybe not to cstring) |
14:19:41 | FromGitter | <data-man> Discovered bug (by scanf) in ```parseUntil*(s: string, token: var string, until: string; start = 0): int``` when ```until``` == ```nil``` ⏎ What this proc should return in this case? Currently fixed with result == 0. ⏎ There are other opinions? |
14:20:58 | FromGitter | <arnetheduck> @PMunch most languages distinguish between recoverable and non-recoverable errors, since ages past.. c with `abort`, c++ with `std::terminate`, java with `RuntimeException`, rust with `panic` etc.. the concept is hardly new, it's merely a matter of where you put the bar / what you make convenient for developers to use |
14:21:17 | * | nsf quit (Quit: WeeChat 2.1) |
14:21:53 | PMunch | How do you mean RuntimeException relates to that? |
14:26:37 | FromGitter | <arnetheduck> `RuntimeException` was meant for unrecoverable stuff - the things that you would not include in your function signature (and therefore wasn't expected to handle - out of sight, out of mind).. only problem is that java checked exceptions suck, so everyone started using them for everything |
14:27:01 | FromGitter | <krux02> anyoen here doing game programming |
14:27:19 | FromGitter | <krux02> I have something to show |
14:28:17 | FromGitter | <krux02> http://ix.io/1bmy/nim |
14:35:21 | * | yglukhov[i] quit (Remote host closed the connection) |
14:36:16 | FromGitter | <krux02> that code I posted, I can compile it, and with macro magic the part that is written in the block under `framebuffer.renderDebug ...` is compiled to glsl including all the bridges to variables like M, V, P. |
14:37:05 | FromGitter | <arnetheduck> another way to look at it is that the fact that you *can* catch `RuntimeExceptions` de facto destroys the distinction between recoverable and unrecoverable errors - thus it's plausible to think that anything that opens a loophole for them in nim will be "abused", leading us back to where we are today, ie where function signatures don't teach you what can go wrong |
14:37:33 | jxy | Is there a way to know the details of the current memory pool? Like which file/line/statement allocated how much in the current pool at run time? |
14:39:04 | Araq | arnetheduck: yeah and my solution is to accept errors are recoverable. |
14:39:04 | jxy | or which object is holding refereces that cannot be GCed? |
14:39:09 | euantor | jxy: Try `dumpNumberOfInstances` and compile with `-d:nimTypeNames` |
14:39:13 | euantor | https://nim-lang.org/docs/gc.html |
14:39:41 | Araq | and unrecoverable errors call 'quit' |
14:40:01 | Araq | and 'quit' should never be used in a library... |
14:40:06 | * | endragor joined #nim |
14:40:33 | jxy | euantor: thanks |
14:41:09 | * | yglukhov[i] joined #nim |
14:43:32 | PMunch | Woo, just checked my first Nim code into a work repository. Vive la revolution! |
14:44:33 | * | endragor quit (Ping timeout: 256 seconds) |
14:48:36 | * | PMunch quit (Quit: Leaving) |
14:49:34 | jxy | How come '[GC] occupied memory' shows a much smaller number than '[Heap] total number of bytes'? |
14:49:51 | * | gokr joined #nim |
14:50:58 | skrylar | Araq, tell that to miguel de icaza |
14:51:30 | skrylar | "i can't find a file, instead of asking the process embedding me where it could possibly be i will just call abort()" -- Mono |
14:51:54 | skrylar | and this is the embedded api so there isn't the excuse of "you're being weird" |
14:54:17 | * | mostly-harmless joined #nim |
14:59:01 | Araq | jxy: the GC freed things? |
14:59:19 | Araq | usually the allocator doesn't return memory back to the OS. |
15:05:22 | jxy | I'm calling GC_fullcollect and echo GC_getStatistics() and dumpNumberOfInstances, in that sequence |
15:05:26 | * | BitPuffin joined #nim |
15:05:53 | jxy | shouldn't these two numbers agree? What's the difference between these two numbers? |
15:06:09 | FromGitter | <brechtm> I remember there being an online service like http://repl.it that also supported Nim, but I can't find it. Anyone? |
15:11:26 | Yardanico | play.nim-lang.org |
15:11:31 | Yardanico | ah, like repl.it ? |
15:11:41 | Yardanico | yeah, I remember one which supported a lot of langs including Nim |
15:12:29 | FromGitter | <brechtm> Got it: https://glot.io/new/nim |
15:12:36 | * | yglukhov[i] quit (Remote host closed the connection) |
15:13:00 | FromGitter | <brechtm> Ah, but I didn't know about play.nim-lang.org |
15:13:25 | shashlick | dom96: can you also please review https://github.com/nim-lang/nimble/pull/464 if you have a chance? |
15:14:56 | FromGitter | <brechtm> play.nim-lang.org doesn't seem to be linked from nim-lang.org? |
15:15:19 | * | DarkArctic joined #nim |
15:19:58 | Araq | jxy: well one is about the heap's size, the other about the used memory |
15:20:23 | Araq | there is allocated memory from the OS and then this is either "occupied" or "free" |
15:22:44 | jxy | ok |
15:23:33 | jxy | does the nim runtime uses anything like '[HEAP] ref cArray[system.char]'? |
15:24:26 | Araq | 'cArray' ? |
15:24:31 | Araq | never heard of it |
15:25:54 | jxy | right, that's my code doing |
15:26:26 | jxy | I need to figure out why they don't get GCed |
15:40:29 | FromDiscord | <treeform> Hey dom96, why in the untar package you have a zlib wrapper but statically link with zlib (on windows), while in the zip package you dynamically link with zlib? |
15:40:32 | FromDiscord | <treeform> https://github.com/dom96/untar/blob/master/src/untar/gzip.nim#L3 |
15:40:43 | * | CodeVance quit (Read error: Connection reset by peer) |
15:40:48 | FromDiscord | <treeform> https://github.com/nim-lang/zip/blob/master/zip/zlib.nim#L5 |
15:41:20 | FromDiscord | <treeform> I can't find a dll that works with nim on windows64. Why not always statically link on windows? |
15:41:26 | FromDiscord | <treeform> Why not always statically link? |
15:42:53 | shashlick | I think we need a static zlib wrapper which both libs can depend on |
15:43:18 | shashlick | can go in data-man's NimCompression org |
15:43:20 | FromDiscord | <treeform> I would go as far as to say zlib needs to be part of standard library. So many things depend on it. |
15:44:09 | FromDiscord | <treeform> It only has snappy? https://github.com/NimCompression |
15:46:04 | shashlick | so far |
15:47:16 | FromDiscord | <r00ster> it is right that I dont actually need to use a `cint` for my C binding right? because it works surprisingly when im just declaring the argument as `int` instead of `cint`. |
15:47:50 | * | SenasOzys joined #nim |
15:49:39 | FromDiscord | <treeform> you might have issues with 32bit/64bit |
15:50:07 | FromDiscord | <treeform> are you on 32 bit platform? |
15:51:01 | FromDiscord | <r00ster> im on 64 bit |
15:51:29 | FromDiscord | <r00ster> will 32 bit users have problems? im not sure now if i should also change all the other ints to cints. In C the functions have the type `int` |
15:51:51 | FromDiscord | <r00ster> i mean the arguments* |
15:54:07 | FromGitter | <Varriount> r00ster: For Nim, `int` is 64 bits on a 64 bit system, and 32 bits on a 32 bit system. For C, `int` is 32 bits on both 32 and 64 bit systems. |
15:54:53 | FromDiscord | <treeform> So he should have issues now because he is on 64 bit? It should just work on 32 bit system? |
15:56:09 | * | Trustable joined #nim |
15:56:10 | * | Trustable_2 joined #nim |
15:56:22 | * | Trustable_2 quit (Remote host closed the connection) |
15:56:35 | FromDiscord | <r00ster> well I dont have issues currently when im using the functions where i changed cint to int. Works perfectly fine. The cint functions too. I just there need to cast to .cint when i want to use an int variable there for example |
15:58:52 | * | yglukhov[i] joined #nim |
16:00:00 | * | skrylar quit (Remote host closed the connection) |
16:04:20 | FromGitter | <Vindaar> I need to give a short talk on neural networks on Saturday. Thought I'd be a good idea to bring something like a live demo. So I wrote some code to train an MLP on MNIST w/ arraymancer. Then have that send test samples during training with the predictions and current accuracy to another program built with nim-plotly on the JS backend. That way one can watch the training on the fly. ⏎ There's a gif on the repo here: |
16:04:20 | FromGitter | ... https://github.com/Vindaar/NeuralNetworkLiveDemo ⏎ everything's a little rushed right now, but it's still cool I think :) |
16:05:20 | FromDiscord | <treeform> that looks neat |
16:07:09 | FromGitter | <Vindaar> thanks! |
16:08:16 | Electrux | why did the creators of this language opt for camelCase function names? i am curious :) |
16:09:14 | FromDiscord | <treeform> probably because of pascal |
16:10:11 | Electrux | sorry i do not understand...? :/ |
16:11:25 | FromDiscord | <r00ster> pascal is a very old programming language. it used camelCase and yea it looks like Nim got inspired by Pascal |
16:12:04 | FromDiscord | <r00ster> pascal is an old programming language. it used camelCase and yea it looks like Nim got inspired by Pascal |
16:13:27 | * | floppydh quit (Quit: WeeChat 2.1) |
16:14:22 | * | yglukhov[i] quit (Remote host closed the connection) |
16:14:52 | Electrux | oh |
16:15:27 | Electrux | ok thanks for telling :) |
16:16:09 | FromGitter | <data-man> @Electrux: Pascal, evolution - https://en.wikipedia.org/wiki/Delphi_(IDE) |
16:23:51 | Electrux | how do u make a 2d array from an already provided matrix of numbers? |
16:24:16 | * | yglukhov[i] joined #nim |
16:24:39 | FromGitter | <Vindaar> when you say "provided matrix of numbers", what do you mean exactly? |
16:24:41 | Electrux | is it just [ [ ... ], [ ... ], [ ... ] ... ] |
16:25:19 | Electrux | i mean i have hard coded matrix of numbers for which i would like to create a 2D array |
16:25:54 | Electrux | so would i just have to do something like: arr = [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ]? |
16:26:03 | FromGitter | <Vindaar> yeah, you can do that |
16:26:04 | * | gokr left #nim (#nim) |
16:26:23 | Electrux | are there other ways too? |
16:26:48 | Araq | macros |
16:27:21 | FromGitter | <brentp> I am getting weird errors with --threads:on and using spawn, flowvars. The errors are saying that things are nil that are not. When I use `gc:boehm`, these problems go away. This happens with devel. How could I debug this? |
16:28:42 | * | yglukhov[i] quit (Ping timeout: 252 seconds) |
16:29:51 | Electrux | oh... well i guess i am too beginner right now to start delving into macros |
16:30:14 | * | yglukhov[i] joined #nim |
16:32:05 | * | BitPuffin quit (Ping timeout: 260 seconds) |
16:34:36 | * | yglukhov[i] quit (Remote host closed the connection) |
16:34:56 | jxy | Is there a way to make Nim's memory management more verbose? I want to make it scream at me when it allocates and frees something. |
16:44:32 | * | yglukhov[i] joined #nim |
16:46:01 | Electrux | i can do this right? var x, y = getx(), gety() |
16:46:20 | * | sendell quit (Remote host closed the connection) |
16:49:01 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
16:49:21 | Yardanico | Electrux var (x, y) = (getx(), gety()) |
16:49:24 | Yardanico | try it this way |
16:53:43 | Electrux | the first version is incorrect? or inconsistent? Yardanico |
16:53:48 | Yardanico | incorrect |
16:58:29 | Electrux | oh... ok thanks a lot :d |
16:58:31 | Electrux | :d |
16:58:33 | Electrux | :D |
17:14:21 | * | yglukhov[i] joined #nim |
17:18:27 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
17:19:11 | Araq | brentp: do you 'cast' thread local pointers? |
17:19:34 | Araq | jxy: compile with --gc:none and then the compiler reports allocations |
17:21:22 | Electrux | btw, that neural network thing is so awesome!!!! @Vindaar :O |
17:21:49 | FromGitter | <brentp> @Araq I am doing something like this: https://forum.nim-lang.org/t/3854#23978 which I see someone has just warned me is unsafe. |
17:22:13 | FromGitter | <brentp> @Vindaar indeed very cool! glad to see nim-plotly getting used. :) |
17:23:11 | FromGitter | <Systra72_twitter> Hi! Trying to install Arraymancer on Windows using Msys2. Missing the libcrypto-1_1-x64.dll. Anyone know what to do? |
17:24:25 | Araq | brentp: this will never work reliably with the default GC, stick to boehm for now :-) |
17:24:55 | FromGitter | <brentp> @Araq boehm is very slow for my workload. |
17:25:27 | Araq | well then you need to redesign your program |
17:25:44 | * | athenot quit (Remote host closed the connection) |
17:26:28 | * | athenot joined #nim |
17:27:01 | FromGitter | <brentp> ok. how? this is my first try and parallel stuff in nim and I'm not sure what are the best things to try. |
17:30:14 | FromGitter | <brentp> I need the large seq[int8] but can modify the program structure |
17:32:26 | * | natrys quit (Quit: natrys) |
17:34:26 | * | yglukhov[i] joined #nim |
17:38:44 | * | yglukhov[i] quit (Ping timeout: 252 seconds) |
17:48:17 | FromGitter | <Vindaar> @brentp thank *you* for starting nim-plotly :) |
17:51:14 | Araq | brentp: allocate the buffers in the main thread, don't realloc/add to them |
17:51:24 | Araq | and let the worker threads fill them. |
18:01:37 | FromGitter | <brentp> @Araq thanks. that's getting me further. |
18:02:27 | FromGitter | <data-man> @Araq: May I to add ```maxLen``` to parseOct and parseBin procs in parseutils? Tiny refactoring strutils.parseXXXint. |
18:03:52 | Araq | no. |
18:04:18 | FromGitter | <data-man> parseHex has maxLen. |
18:04:54 | FromGitter | <data-man> https://gist.github.com/data-man/f750df0593c71daacca1e5cb5c5b5573 |
18:04:56 | Araq | I'm tired of this bullshit, just a couple more parameters here, just another default parameter there (splitLines with keepLineEndings because we cannot ever learn how parsers work) |
18:05:39 | FromGitter | <data-man> Just parsing duplicated in strutils. |
18:06:11 | FromGitter | <Quelklef> @data-man careful adding extra parameters, you may end up with something like clisp's stdlib :-) |
18:06:43 | Araq | parseOct should never be used anyway because octal numbers are an abomination. |
18:07:02 | FromGitter | <data-man> untar use it. |
18:07:18 | Araq | untar should not be used because it uses fucking octals. |
18:11:49 | FromGitter | <data-man> This is the standard. We did not invent it. |
18:11:52 | * | SenasOzys quit (Ping timeout: 245 seconds) |
18:16:50 | Araq | we don't have to create ripple effects either |
18:17:08 | Araq | fixing Nim's untar package does not mean to add new features to the stdlib |
18:18:29 | FromGitter | <data-man> For consistency with parseHex. And maxLen is very useful. |
18:20:44 | Notkea | is nimble.directory broken? |
18:21:33 | Araq | let me tell you a secret. |
18:21:58 | FromGitter | <data-man> When I added these proc for scanf, I missed maxLen. :( |
18:24:01 | Araq | consistency is best way to bloat everything. so what if parseOct is not "consistent" with parseHex. one is called parseHex, the other is called parseOct. |
18:24:15 | Araq | parseJson doesn't have 'maxLen' either. |
18:25:00 | Araq | or parsecfg. and omg, parseCfg takes a Parser parameter and parseOct doesn't |
18:25:20 | Araq | similarities do not make laws. |
18:27:08 | FromGitter | <data-man> You too exaggerate. :) |
18:28:08 | Araq | yes, in the hope to stop this madness. |
18:28:25 | Yardanico | Notkea what do you mean by that? |
18:28:33 | Yardanico | Notkea website doesn't open for you? |
18:28:51 | Notkea | 502 Bad Gateway for me |
18:29:38 | Yardanico | Notkea oh, strange, federico3 is the creator of this website, so I pinged him :) |
18:30:01 | federico3 | looking... |
18:30:48 | Araq | I have patched over 60_000 loc the last weeks. and I noticed much in Nim's stdlib and in the compiler's featureset is was added to please some maniac's vision of "consistency" |
18:31:41 | FromGitter | <data-man> Did consistency binarySearch with other procs from algorithm is not useful? :) |
18:33:25 | Araq | strutils contains isUpper and tons of stuff for consistency with Python ffs. Python needs these because it's slow and lacks set[char]. |
18:34:02 | Araq | Nim is fast and has set[char], it's a different language, we don't have to copy Python. |
18:36:05 | Araq | and it's just wrong to assume that we help Python newcomers and it causes no harm otherwise. it does harm. the code needs to be maintained. these procs end up in the documentation making the useful things harder to find. |
18:36:36 | Araq | tests for these run whenever somebody pushes a PR. |
18:40:21 | FromGitter | <data-man> Duplicating a number's parsing code in strutils is also not very good. |
18:40:42 | Araq | that's indeed another problem. |
18:41:07 | Araq | usually the algorithm can be put into a template and then you write 1-5 different proc headers around it. |
18:41:13 | * | kobi joined #nim |
18:41:26 | * | kobi is now known as kobi7 |
18:41:34 | kobi7 | hi! congrats for the new forum |
18:42:34 | FromGitter | <data-man> One tiny PR. It's all. Please. :) |
18:42:42 | Araq | No. |
18:43:07 | Araq | I'm still waiting for the unicode update btw. |
18:44:08 | FromGitter | <data-man> Soon™. On the this week. |
18:44:16 | * | SenasOzys joined #nim |
18:46:52 | FromGitter | <data-man> Today is Monday, right? :) |
18:50:17 | dom96 | kobi7: thanks :) |
18:50:27 | kobi7 | guys, how do I make an object field readonly? |
18:51:05 | kobi7 | dom96, do you know apache has "ab" apache bench - which you can try for your beast |
18:51:31 | dom96 | kobi7: yes, wrk is better |
18:51:45 | kobi7 | wrk? |
18:51:55 | dom96 | https://github.com/wg/wrk |
18:52:10 | kobi7 | oh |
18:52:27 | kobi7 | cool |
18:52:53 | kobi7 | dom96: I have a field in an object, that I want to allow read access but not write access. how do I do that? |
18:53:17 | dom96 | proc field*(x: Type): RetType |
18:53:29 | kobi7 | * is rw, though |
18:53:48 | kobi7 | sorry, it's a proc then? |
18:53:49 | dom96 | Not if you define a proc |
18:54:00 | dom96 | procedures can be called without () in most instances |
18:54:21 | kobi7 | ok, good enough for me |
18:54:37 | kobi7 | just for the record, there's no shortcut in the syntax for that |
18:55:09 | Yardanico | you can make a template :D |
18:55:17 | Yardanico | or maybe a macro |
18:56:59 | kobi7 | if it's in the same file, I can read the type's private fields? I mean the module is the file, correct? |
18:58:06 | kobi7 | Yardanico: cool to try. |
18:58:20 | Yardanico | kobi7 yes, you can |
18:59:27 | * | yglukhov[i] joined #nim |
19:00:35 | kobi7 | so, template get ( name, type : untyped) ... then take name, prepend '_', create field, create proc with name that returns type |
19:01:01 | Yardanico | you want to have fields as _field ? |
19:05:55 | shashlick | dom96: simpler PR for untar - https://github.com/dom96/untar/pull/4 |
19:07:48 | dom96 | shashlick: Tested it? |
19:08:03 | kobi7 | Yardanico: we tinkered with the idea of readonly fields, so the _field is the private one, and proc field returns it. (theoretically) |
19:08:23 | kobi7 | I guess a template is enoough to do this? |
19:08:43 | Yardanico | well yeah, but you'll have to define your type with _field yourself |
19:09:11 | * | miran joined #nim |
19:09:15 | * | jhorwitz joined #nim |
19:09:30 | jhorwitz | Hi everyone, been a while but was thinking of getting back into Nim |
19:09:39 | kobi7 | right, but the definition can be the new keyword, say readonly field : string, which then creates it like that |
19:10:23 | dom96 | jhorwitz: great :) |
19:11:31 | FromGitter | <krux02> Araq: I like consistency. But copying the API from other languages doesn't make Nim as a language on it's own consistent it is the exact opposite. |
19:12:22 | FromGitter | <krux02> it basically is a poptential split in possible styles of the language for no benefit. |
19:12:48 | shashlick | dom96: yep |
19:12:55 | shashlick | let me run on Linux as well |
19:14:31 | jhorwitz | What is most needed as far as contributions currently? |
19:17:34 | shashlick | dom96: yep passes on linux as well |
19:18:41 | * | Guest79630 quit (Quit: Exiting) |
19:21:06 | dom96 | ok thanks, merged |
19:21:47 | shashlick | cool |
19:22:25 | shashlick | any other concerns on the choosenim PR? once that's in, I can start testing and deliver the new features |
19:22:51 | * | jhorwitz quit (Quit: leaving) |
19:23:35 | * | jhorwitz joined #nim |
19:28:20 | * | kobi7 quit (Ping timeout: 256 seconds) |
19:28:20 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
19:28:41 | * | yglukhov[i] joined #nim |
19:29:50 | Araq | jhorwitz: https://github.com/nim-lang/Nim/issues/7870 is rather easy to start with |
19:30:08 | Araq | or pick any issue tagged with "easy". |
19:30:24 | Araq | or look at the "needed libs" github repo |
19:30:44 | dom96 | or fix things that affect your own projects |
19:31:47 | shashlick | looking into wrapping 7z to extract archives, has this already been done before? |
19:32:06 | Araq | krux02: consistency causes bloat though, it needs to be a careful tradeoff |
19:32:39 | * | mwbrown joined #nim |
19:33:04 | Araq | when everybody uses 10% of what is in strutils but pays the cost for compiling it completely we either should trim it down or at least get incremental compilations to work |
19:33:19 | Araq | preferably both. |
19:33:29 | FromGitter | <krux02> yes |
19:34:29 | dom96 | A project that I would really like to see made is a langserver (https://langserver.org/) implementation for Nim. |
19:35:24 | dom96 | It should be a separate tool that performs its own analysis and relegates to nimsuggest (where appropriate) |
19:35:43 | dom96 | That's what I would be writing right now if I didn't have thousands of other projects :) |
19:35:45 | FromGitter | <data-man> That's just the point, that everyone has his own 10%, often not overlapping with others. |
19:37:49 | jhorwitz | I can take that issue Araq |
19:38:47 | shashlick | dom96: replied to your comments |
19:39:09 | shashlick | i'm trying to wrap 7z so that we can use the same mingw.7z in choosenim and finish |
19:39:21 | shashlick | this installer project is taking its own sweet time |
19:39:50 | dom96 | shashlick: I'd prefer xz |
19:40:57 | Araq | no, 7z is superior |
19:41:14 | dom96 | why? |
19:41:19 | FromGitter | <data-man> 7z supports xz |
19:41:27 | shashlick | well, that's what's on both nim-lang.org and sourceforge, if I can convince araq to link to the official mingw :D |
19:41:46 | Araq | xz doesn't work, it requires 'tar' as interim step |
19:41:57 | shashlick | well, so I'm only wrapping 7z extraction, xz is already covered in untar |
19:42:13 | dom96 | yeah, and we've already got a native untar library in Nim |
19:42:45 | dom96 | shashlick: Not on Windows |
19:42:55 | dom96 | and only if the OS has `unxz` in its PATH |
19:43:02 | jhorwitz | What is involved in running the tests in C++ mode? |
19:43:05 | Araq | 7z is one of my favourite tools and this is where the discussion ends for me. |
19:43:11 | jhorwitz | forgive my dumb question |
19:44:21 | shashlick | dom96: good point |
19:44:49 | shashlick | we can look into xz for windows as part of data-man's nimcompression effort |
19:45:03 | FromGitter | <data-man> No, ```7z t anyfile.xz``` works without tar. :) |
19:46:06 | FromGitter | <data-man> @shashlick: I prefer libarchive. Incredible library! |
19:46:23 | Araq | jhorwitz: it's not dumb at all. Nim's tester is called "testament" and there is logic that supports targets: "C JS Cpp" or similar |
19:46:52 | Araq | easiest is to change this logic so that "C" implies "also rerun as C++" |
19:47:45 | shashlick | 7z is lgpl though |
19:50:36 | Araq | ouch but at least lgpl doesn't affect our MIT license when we use it as a library |
19:51:03 | federico3 | that's the point of the linking exception |
19:51:22 | dom96 | sadly xz also appears to be lgpl |
19:51:48 | dom96 | if you want extra challenge: create a native 7z/xz library in Nim and license it under MIT :D |
19:52:33 | FromGitter | <data-man> zstd, brotli, lz4, lizard, etc. |
19:57:55 | FromDiscord | <awr> does the {.nimcall.} pragma implies that a procedure is not a closure |
19:57:58 | FromDiscord | <awr> *imply |
19:59:15 | dom96 | yep |
20:02:09 | * | miran quit (Ping timeout: 264 seconds) |
20:09:13 | * | DarkArctic_ joined #nim |
20:10:04 | shashlick | well, was thinking of compiling in 7z extraction into choosenim from source |
20:10:15 | * | jhorwitz quit (Ping timeout: 245 seconds) |
20:12:49 | * | DarkArctic quit (Ping timeout: 248 seconds) |
20:13:45 | * | DarkArctic_ quit (Ping timeout: 260 seconds) |
20:13:52 | shashlick | libarchive seems cool |
20:15:46 | * | yglukhov[i] quit (Remote host closed the connection) |
20:16:21 | * | yglukhov[i] joined #nim |
20:21:02 | * | yglukhov[i] quit (Ping timeout: 260 seconds) |
20:26:33 | dom96 | ooh google search console uncovers some interesting bugs in the forum |
20:26:54 | FromGitter | <Varriount> Like? |
20:28:19 | federico3 | marshal.store is able to generate invalid JSON that marshal.load cannot open :-/ |
20:34:38 | * | nsf joined #nim |
20:35:17 | * | Cthalupa- joined #nim |
20:38:23 | * | Cthalupa quit (Remote host closed the connection) |
20:39:22 | * | Cthalupa- is now known as Cthalupa |
20:40:31 | Araq | federico3, bug report please |
20:45:15 | * | Electrux quit (Ping timeout: 260 seconds) |
20:45:16 | dom96 | Varriount: UTF-8 profile name handling problems |
20:56:20 | * | Electrux joined #nim |
21:00:07 | * | max3 joined #nim |
21:01:00 | * | Electrux quit (Ping timeout: 260 seconds) |
21:06:41 | * | gb00s quit (Quit: The Lounge - https://thelounge.github.io) |
21:14:41 | * | pydsigner quit (Quit: I'll Be Back!) |
21:14:51 | * | pydsigner joined #nim |
21:15:13 | * | elrood quit (Quit: Leaving) |
21:16:20 | dom96 | Fixed :) |
21:16:38 | dom96 | Didn't realise we had profiles like this lol https://forum.nim-lang.org/profile/%F0%9F%98%80 |
21:26:57 | Yardanico | dom96 lol |
21:41:12 | * | sz0 joined #nim |
21:45:49 | * | gb00s joined #nim |
21:46:42 | * | CodeVance joined #nim |
21:55:19 | * | Electrux joined #nim |
21:56:17 | * | Trustable quit (Remote host closed the connection) |
21:59:55 | * | Electrux quit (Ping timeout: 260 seconds) |
22:01:12 | * | xkapastel quit (Quit: Connection closed for inactivity) |
22:11:23 | dom96 | In case anyone's curious, here is what happens when someone deletes their account https://forum.nim-lang.org/t/3800 |
22:16:20 | * | Electrux joined #nim |
22:17:48 | FromGitter | <kayabaNerve> How is everyone? |
22:18:10 | FromGitter | <kayabaNerve> dom96: Why would you want to leave? |
22:18:32 | dom96 | No idea. Some people apparently do. |
22:18:58 | FromGitter | <kayabaNerve> :O They must have been brainwashed by the Pythonites. Such a horrible gang... |
22:19:06 | FromGitter | <kayabaNerve> Or traumatized by seg faults. |
22:19:37 | * | Vladar quit (Quit: Leaving) |
22:20:27 | * | Electrux quit (Ping timeout: 240 seconds) |
22:24:03 | arecaceae | how do I offset a pointer? |
22:35:02 | arecaceae | nvm, I found it |
22:35:49 | arecaceae | how do I get a pointer to a string, even if its allocated as static-memory? - addr(s[0]) only seems to work if its a var string - I just want to read it |
22:38:16 | Araq | unsafeAddr |
22:39:11 | arecaceae | Araq: thanks |
22:44:00 | * | nsf quit (Quit: WeeChat 2.1) |
22:44:47 | FromGitter | <gogolxdong> got this on devel ,`Error: system module needs: nimGCunref` |
22:45:07 | FromGitter | <kayabaNerve> @gogolxdong What were you trying to do? |
22:50:11 | * | mostly-harmless quit (Ping timeout: 256 seconds) |
22:50:32 | FromGitter | <gogolxdong> using --gc:regions |
22:51:53 | * | mostly-harmless joined #nim |
22:55:02 | FromGitter | <gogolxdong> never mind , have made it right, it's container enviroment. |
23:03:15 | * | mostly-harmless quit (Ping timeout: 252 seconds) |
23:03:33 | * | leorize quit (Quit: WeeChat 2.1) |
23:04:56 | * | mostly-harmless joined #nim |
23:24:00 | * | xkapastel joined #nim |
23:36:00 | * | Electrux joined #nim |
23:40:34 | * | Electrux quit (Ping timeout: 264 seconds) |
23:40:41 | * | CodeVance1 joined #nim |
23:43:27 | * | CodeVance quit (Ping timeout: 240 seconds) |
23:45:16 | * | Guest71713 joined #nim |
23:47:50 | Guest71713 | Minere BTC enquanto navega e trabalha sem deixar o pc lentão. https://getcryptotab.com/718967 https://www.youtube.com/watch?v=luzqQN3kL4g&t=166s |