| 00:25:03 | * | theelous3_ quit (Ping timeout: 246 seconds) |
| 00:39:01 | * | sentreen quit (Quit: WeeChat 2.3) |
| 00:39:04 | * | chimez quit (Quit: chimez) |
| 00:39:42 | * | sentreen joined #nim |
| 00:56:34 | * | kapil____ quit (Quit: Connection closed for inactivity) |
| 01:31:55 | * | jjido quit (Quit: Connection closed for inactivity) |
| 01:41:17 | * | sentreen_ joined #nim |
| 01:42:10 | * | sentreen quit (Ping timeout: 255 seconds) |
| 01:45:18 | * | sentreen_ quit (Client Quit) |
| 01:45:31 | * | sentreen joined #nim |
| 01:52:58 | * | vlad1777d quit (Ping timeout: 255 seconds) |
| 02:20:14 | * | dddddd quit (Read error: Connection reset by peer) |
| 02:20:14 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
| 02:20:15 | * | lritter quit (Ping timeout: 250 seconds) |
| 02:55:20 | * | banc quit (Ping timeout: 250 seconds) |
| 02:58:44 | * | ng0_ joined #nim |
| 03:01:54 | * | banc joined #nim |
| 03:02:13 | * | ng0 quit (Ping timeout: 256 seconds) |
| 03:05:54 | * | banc quit (Client Quit) |
| 03:21:13 | * | revere quit (Ping timeout: 246 seconds) |
| 03:22:13 | * | leorize joined #nim |
| 03:23:13 | * | revere joined #nim |
| 03:27:30 | * | banc joined #nim |
| 03:53:11 | * | ptdel quit (Remote host closed the connection) |
| 04:18:04 | * | chemist69 quit (Ping timeout: 258 seconds) |
| 04:18:42 | * | leorize quit (Quit: WeeChat 2.3) |
| 04:18:52 | * | leorize joined #nim |
| 04:20:00 | * | chemist69 joined #nim |
| 04:27:43 | * | cyraxjoe quit (Ping timeout: 244 seconds) |
| 04:31:24 | * | cyraxjoe joined #nim |
| 04:38:44 | * | noeontheend joined #nim |
| 04:52:18 | * | leorize quit (Quit: WeeChat 2.3) |
| 04:54:02 | * | kapil____ joined #nim |
| 04:59:18 | * | nsf joined #nim |
| 05:03:40 | * | rnrwashere joined #nim |
| 05:06:24 | * | rnrwashere quit (Remote host closed the connection) |
| 05:23:15 | * | noeontheend quit (Ping timeout: 252 seconds) |
| 05:57:57 | * | leorize joined #nim |
| 06:00:42 | * | narimiran joined #nim |
| 06:01:47 | * | rnrwashere joined #nim |
| 06:07:44 | * | noonien quit (Quit: Connection closed for inactivity) |
| 06:25:51 | * | NimBot joined #nim |
| 06:42:16 | FromGitter | <Varriount> ryukoposting: Are you there? |
| 06:50:57 | * | rnrwashere quit (Remote host closed the connection) |
| 06:58:00 | * | krux02 joined #nim |
| 07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
| 07:00:49 | * | solitudesf joined #nim |
| 07:04:33 | * | gmpreussner joined #nim |
| 07:22:22 | Zevv | thanks for the const macro fix araq |
| 07:22:41 | Araq | don't thank me, thank Cooldome |
| 07:22:49 | Zevv | thanks for the const macro fix cooldome |
| 07:50:30 | * | PMunch joined #nim |
| 07:59:09 | * | ng0_ quit (Quit: Alexa, when is the end of world?) |
| 08:17:30 | * | neceve joined #nim |
| 08:32:36 | * | solitudesf quit (Ping timeout: 246 seconds) |
| 08:34:01 | * | solitudesf joined #nim |
| 08:44:31 | Araq | https://www.theregister.co.uk/2016/08/22/samsung_m1_core/ |
| 08:47:22 | Zevv | neural nets for branch prediction, well why not |
| 08:52:09 | * | vlad1777d joined #nim |
| 09:03:05 | Araq | „Proebsting’s Law5 |
| 09:03:06 | Araq | states that performance gains due to improvements in |
| 09:03:06 | Araq | compiler optimizations will double the speed of a program every 18 years“ |
| 09:03:11 | Araq | https://arxiv.org/pdf/1809.02161.pdf |
| 09:05:17 | * | floppydh joined #nim |
| 09:10:10 | PMunch | Zevv, well I guess that makes sense in a way. As long as you manage to make it silly fast |
| 09:11:06 | Zevv | oh yes, it definitely make sense. It's an unsolvable problem, so if you make something that's fast and cheap and right some of the time, it is a big improvement |
| 09:12:32 | Zevv | [...]most baroque IR-level peephole optimizer ever created[...], hehe |
| 09:16:58 | * | chimez joined #nim |
| 09:17:00 | * | chimez quit (Client Quit) |
| 09:18:14 | PMunch | I remember when I first learnt about branch predictors, mind boggling how they have a tiny "machine learning" component inside your CPU |
| 09:18:40 | PMunch | I mean it's a fairly rudimentary thing in most cases, but still |
| 09:19:47 | * | absolutejam joined #nim |
| 09:28:15 | Zevv | it is one of those cases that feels like a natural fit. If you can do better then a pure chance with a handful of transistors, go for it |
| 09:28:26 | Zevv | as long as you don't make it worse :) |
| 09:41:01 | Araq | alehander42: |
| 09:41:33 | Araq | „Reducing pointer chasing. Since the in-memory version of a compiler IR is typically pointer-intensive, traversing IR requires a lot of indirections. Informal measurements show that on a modern core with exclusive use of a 25 MB cache, |
| 09:41:33 | Araq | an optimizing C++ compile using GCC or LLVM still spends 30–35% of its runtime stalled on memory operations. The pointer-heavy representation follows from the desire to easily edit the IR on the fly using hand-written passes. |
| 09:41:33 | Araq | Future IRs that are less-often manipulated in ad hoc fashion can be be designed to be cache friendly and also suitable for processing using GPUs and GPU-like many-core processors. As an example of this kind of work, Vollmer et al. [32] report that “For traversals touching the whole tree, such as maps and |
| 09:41:35 | Araq | folds, packed data allows speedups of over 2× compared to a highly-optimized pointer-based baseline.”“ |
| 09:41:47 | Araq | here is your reference to "Packed IRs" |
| 09:52:04 | * | stefanos82 joined #nim |
| 10:03:12 | PMunch | Zevv, yeah. Although I guess sometimes it does bite you in the butt. But for most things the branch predictor does a pretty good job |
| 10:16:51 | * | dddddd joined #nim |
| 10:17:54 | * | sentreen quit (Ping timeout: 252 seconds) |
| 10:30:11 | * | sentreen joined #nim |
| 10:34:01 | * | leorize quit (Quit: WeeChat 2.3) |
| 10:35:08 | * | lf-araujo joined #nim |
| 10:45:50 | * | abm joined #nim |
| 10:47:28 | * | lf-araujo quit (Ping timeout: 246 seconds) |
| 10:58:45 | FromGitter | <alehander42> Araq thanks |
| 10:58:50 | FromGitter | <alehander42> where is this from |
| 10:59:18 | FromGitter | <alehander42> https://arxiv.org/pdf/1809.02161.pdf ? |
| 11:00:14 | FromGitter | <alehander42> hm and the ref http://drops.dagstuhl.de/opus/volltexte/2017/7273/pdf/LIPIcs-ECOOP-2017-26.pdf |
| 11:01:53 | FromGitter | <mratsim> I think we will have specialized IRs (for example for deep learning and image processing we're going there) that lowers into low=level IR like LLVM |
| 11:15:20 | Araq | alehander42: yeah, sorry forgot to send the link |
| 11:27:18 | * | couven92 joined #nim |
| 11:43:31 | FromGitter | <alehander42> interesting stuff thanks |
| 11:43:52 | FromGitter | <alehander42> how is the incremental compilation going |
| 11:44:30 | FromGitter | <mratsim> conference is on April 10 |
| 11:44:42 | FromGitter | <alehander42> which conf |
| 11:44:44 | FromGitter | <mratsim> ACCU2019 so it should be usable by then ;) |
| 11:44:53 | FromGitter | <alehander42> ooh |
| 11:45:02 | FromGitter | <alehander42> but i meant the incremental compilation, not hcr |
| 11:45:24 | FromGitter | <mratsim> oh right sorry |
| 11:45:27 | FromGitter | <mratsim> misread |
| 11:45:37 | FromGitter | <alehander42> i alreadyd watched a talk about hcr live :P |
| 11:45:43 | * | ng0 joined #nim |
| 11:46:42 | Araq | IC work got scheduled behind destructors |
| 11:46:49 | Araq | *after |
| 11:47:07 | FromGitter | <alehander42> i always thouight behind sounds like a german word btw |
| 11:47:26 | FromGitter | <alehander42> it just sounds german, the "HEEEEInd" |
| 11:50:23 | narimiran | be-heind :D |
| 12:02:19 | * | sentreen quit (Quit: WeeChat 2.3) |
| 12:02:33 | Araq | if you say so. |
| 12:04:45 | * | sentreen joined #nim |
| 12:07:39 | FromGitter | <mratsim> obligatory meme: https://i.kym-cdn.com/entries/icons/mobile/000/006/026/NOTSUREIF.jpg |
| 12:15:20 | * | neceve quit (Read error: Connection reset by peer) |
| 12:21:24 | * | neceve joined #nim |
| 12:38:28 | FromGitter | <alehander42> hm so whats would destructors article be about |
| 12:38:52 | FromGitter | <alehander42> what happened with ref after all, how would it look under this model |
| 12:41:29 | * | I_Right_I quit (Remote host closed the connection) |
| 12:42:49 | Araq | in a nutshell: you help the compiler out by annotating the refs that create the spanning tree of your graph data structure |
| 12:54:21 | * | Torro joined #nim |
| 13:15:58 | * | ryanhowe joined #nim |
| 13:16:40 | * | ryanhowe quit (Client Quit) |
| 13:18:48 | * | seni joined #nim |
| 13:49:01 | * | nsf quit (Quit: WeeChat 2.4) |
| 14:05:53 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
| 14:28:42 | * | hogeland quit (Ping timeout: 264 seconds) |
| 14:29:07 | * | hogeland joined #nim |
| 14:32:08 | shashlick | Is static bool broken on release? |
| 14:32:34 | shashlick | I have a macro with param: `recurse: static bool = false` |
| 14:32:53 | FromGitter | <liquid600pgm> I think it's `static[bool]`, not `static bool` |
| 14:33:04 | shashlick | It is always false in release even if called with true, but works on devel |
| 14:34:56 | Araq | what do you mean "works on devel, fails on release"? |
| 14:35:45 | narimiran | release = stable = 0.19.4? |
| 14:36:24 | FromGitter | <mratsim> @liquid600pgm: static bool works since 0.19 iirc |
| 14:37:14 | FromGitter | <mratsim> @shashlick, iirc static default parameters are broken |
| 14:37:29 | FromGitter | <mratsim> when they do not become integers |
| 14:38:14 | shashlick | it works on devel though, seems like it was fixed |
| 14:38:51 | FromGitter | <liquid600pgm> I always used `static[bool]`, not `static bool`, and it works perfectly fine |
| 14:39:05 | shashlick | with default values? |
| 14:39:06 | FromGitter | <liquid600pgm> is there any semantic difference between the two? |
| 14:39:09 | FromGitter | <liquid600pgm> yes |
| 14:39:43 | FromGitter | <liquid600pgm> see: https://github.com/liquid600pgm/rod/blob/master/src/rod/parser.nim#L186 |
| 14:39:50 | FromGitter | <liquid600pgm> it compiles just fine |
| 14:40:30 | FromGitter | <mratsim> static[bool] was first and static bool was added later for consistency |
| 14:41:47 | shashlick | can you try setting allowElse = false and see if it accepts it |
| 14:41:50 | shashlick | on 0.19.4 |
| 14:42:19 | FromGitter | <mratsim> it's a proc not a macro |
| 14:42:25 | FromGitter | <mratsim> proc would work |
| 14:42:32 | FromGitter | <liquid600pgm> aah, didn't notice that |
| 14:43:28 | shashlick | but static still means compile time right |
| 14:43:41 | shashlick | well, wont' help me because i am generating code |
| 14:44:13 | FromGitter | <mratsim> yes static mean compile-time but static proc works |
| 14:44:46 | FromGitter | <mratsim> it's pretty recent though |
| 14:45:10 | shashlick | but ya, seems to work on devel so would be cool to backport the fix |
| 14:45:12 | FromGitter | <mratsim> I think static enum were added quite recently for example |
| 15:01:18 | * | vlad1777d quit (Ping timeout: 245 seconds) |
| 15:04:53 | * | PMunch quit (Remote host closed the connection) |
| 15:11:13 | * | narimiran quit (Ping timeout: 272 seconds) |
| 15:13:11 | * | lritter joined #nim |
| 15:30:09 | * | krux02 quit (Remote host closed the connection) |
| 15:34:43 | * | Trustable joined #nim |
| 15:35:16 | FromGitter | <mratsim> dataman is back? https://forum.nim-lang.org/t/4730 |
| 15:41:58 | FromGitter | <mratsim> the mix of content and spam links in this reply is dumbfounding: https://forum.nim-lang.org/t/1779#28447 |
| 15:46:09 | FromGitter | <zacharycarter> Going to get back to work on my engine starting today |
| 15:46:18 | FromGitter | <mratsim> which one? :p |
| 15:46:27 | FromGitter | <zacharycarter> hahaha, good point |
| 15:46:30 | FromGitter | <zacharycarter> the last one I was working on |
| 15:46:55 | FromGitter | <zacharycarter> https://github.com/zacharycarter/zeal |
| 15:47:15 | FromGitter | <zacharycarter> Also - I officially have a game dev job finally |
| 15:47:35 | FromGitter | <zacharycarter> working on - https://warofrights.com/ |
| 15:48:50 | FromGitter | <mratsim> impressive work on the fonts and website look & feel |
| 15:49:26 | FromGitter | <zacharycarter> I had nothing to do with that :P I'm going to be working on in game UI / HUD etc... |
| 15:49:54 | FromGitter | <mratsim> yeah I know ;) but tell that to your colleague :p |
| 15:50:00 | FromGitter | <zacharycarter> I will :) |
| 15:50:33 | * | sealmove joined #nim |
| 15:57:09 | FromGitter | <data-man> @mratsim Yes! :-) Hello everyone! |
| 15:57:56 | FromGitter | <mratsim> welcome back |
| 16:00:11 | FromGitter | <data-man> Thanks! So many changes in many areas. |
| 16:00:14 | shashlick | welcome @data-man |
| 16:01:27 | FromGitter | <data-man> @shashlick I've feature request to toast - add space after commas :) |
| 16:02:59 | * | rnrwashere joined #nim |
| 16:11:47 | sealmove | Finalized syntax for structural typing: https://termbin.com/w6bs |
| 16:11:50 | * | noonien joined #nim |
| 16:12:17 | shashlick | 🙂 |
| 16:12:53 | * | rnrwashere quit (Remote host closed the connection) |
| 16:13:40 | FromGitter | <liquid600pgm> I think you forgot to change some namings in the commented out section |
| 16:15:16 | sealmove | which one? |
| 16:15:56 | sealmove | names are correct, but I forgot to write out the generated type... |
| 16:16:18 | * | floppydh quit (Quit: WeeChat 2.4) |
| 16:16:32 | sealmove | ah the proc names, thanks |
| 16:16:44 | FromGitter | <liquid600pgm> yes, that's what I was referring to |
| 16:18:22 | sealmove | sorry for the rushy paste, here is fixed one: https://termbin.com/p45j |
| 16:19:19 | sealmove | worth implementing, right? |
| 16:20:16 | FromGitter | <liquid600pgm> yes, but is it really possible to declare blocks like `implement MyContract float f`? I thought it needed to be `implement MyContract, float, f` |
| 16:20:22 | * | Torro left #nim ("-bye") |
| 16:21:23 | sealmove | it's possible, but a bit harder (will have to do manual checks). But seperating with commas is still nice I think |
| 16:21:24 | FromGitter | <mratsim> yes you can |
| 16:21:52 | FromGitter | <liquid600pgm> I never knew you could do that, good to know |
| 16:22:04 | sealmove | was also thinking for `implement MyContract for float as f` :D |
| 16:22:25 | sealmove | well, you just manually parse the string and then build up your types |
| 16:22:59 | FromGitter | <mratsim> actually no it doesn't work |
| 16:23:42 | FromGitter | <mratsim> for a proc |
| 16:23:55 | FromGitter | <mratsim> for an untyped macro as long as it parses you can do whatever |
| 16:24:11 | sealmove | yeah I am talking about macros |
| 16:24:50 | FromGitter | <mratsim> for example: https://github.com/mratsim/glyph/blob/master/glyph/snes/opcodes.nim#L17-L32 |
| 16:25:09 | FromGitter | <mratsim> (opcode for a SNES VM) |
| 16:25:24 | FromGitter | <liquid600pgm> oh cool, a SNES emulator written in Nim |
| 16:25:32 | FromGitter | <mratsim> https://github.com/numforge/laser/blob/master/laser/photon_jit/x86_64/x86_64_ops.nim#L24-L65 |
| 16:25:40 | FromGitter | <mratsim> opcode for a x86_64 JIT assembler |
| 16:25:56 | sealmove | this compiles and prints "ha!": https://termbin.com/ri7t |
| 16:25:59 | FromGitter | <mratsim> the SNES emulator is nowhere near implemented though :P I only have addressing modes properly done |
| 16:34:06 | * | Vladar joined #nim |
| 16:40:05 | sealmove | I've also been working on implementing this syntax: https://termbin.com/oz8b |
| 16:44:17 | planetis[m] | sealmove: Check out my lib it does somthing similar: https://github.com/b3liever/protocoled |
| 16:45:30 | planetis[m] | the example with the interface not the lamda |
| 16:46:28 | * | Jesin quit (Quit: Leaving) |
| 16:46:41 | sealmove | nice, indeed similar, though maybe a bit more Rust-inspired ;p mine is actually go-inspired |
| 16:47:35 | FromGitter | <mratsim> assimilate all the languages: https://github.com/micklat/NimBorg |
| 16:48:12 | * | pacujo joined #nim |
| 16:48:35 | sealmove | mratsim: :D nice project, too bad it's abandoned |
| 16:48:56 | FromGitter | <mratsim> nimpy works quite well. Not sure who is using Lua :p |
| 16:49:44 | pacujo | Yesterday I reported that "import seqs" fails on my improvised installation. It turns out "import seqs" fails even on Fedora 29's nim package. |
| 16:49:58 | pacujo | Does it work for you? |
| 16:50:22 | * | Jesin joined #nim |
| 16:50:41 | pacujo | I get ...nim-0.19.4/lib/core/seqs.nim(18, 13) Error: undeclared identifier: 'Allocator' |
| 16:51:30 | sealmove | planetis: just little observation. In README, in `class` macro section, it says "You need to separate the self parameter from the rest with a semicolon." but the example uses the keyword `this` instead. |
| 16:53:06 | FromGitter | <mratsim> @pacujo, import seqs? I don't think you're supposed to import that |
| 16:53:16 | pacujo | Oh, you're not? |
| 16:53:21 | FromGitter | <mratsim> it's probably for the upcoming destructors and is Nim internal |
| 16:53:49 | FromGitter | <mratsim> you might have been looking for sequtils instead |
| 16:53:53 | pacujo | https://nim-by-example.github.io/seqs/ |
| 16:54:17 | FromGitter | <mratsim> yes but no need to import seqs |
| 16:54:43 | FromGitter | <mratsim> you can follow this tutorial just with nim defaults |
| 16:55:05 | pacujo | Ok, got it. Thank you |
| 16:55:15 | FromGitter | <mratsim> I actually think that the fact that import seqs works is a bug cc @Araq @narimiran |
| 16:55:27 | * | nsf joined #nim |
| 16:57:05 | pacujo | Are you supposed to import sets? |
| 16:57:50 | pacujo | I suppose you are. |
| 17:01:21 | sealmove | pacujo: https://nim-lang.github.io/Nim/lib.html |
| 17:01:30 | sealmove | import stuff that are shown here |
| 17:02:29 | * | neceve quit (Read error: Connection reset by peer) |
| 17:02:56 | pacujo | Thanks |
| 17:03:24 | sealmove | hey planetis! are you Greek? |
| 17:09:27 | * | pacujo quit (Ping timeout: 252 seconds) |
| 17:22:50 | * | pacujo joined #nim |
| 17:22:55 | pacujo | Is there a balanced tree type (or equivalent) in the core lib? |
| 17:35:14 | sealmove | balanced, mm, there is b-trees |
| 17:36:49 | pacujo | Oh, found avltree.nim |
| 17:39:26 | pacujo | But again, not importable... |
| 17:39:50 | planetis[m] | sealmove: yes |
| 17:39:56 | planetis[m] | you too? |
| 17:39:59 | sealmove | yup! |
| 17:40:01 | pacujo | Not to be imported, that is |
| 17:41:25 | FromGitter | <data-man> @pacujo There is https://github.com/brianshannan/nim-trees |
| 17:41:45 | planetis[m] | nice too meet you, regarding your comment about self, it doesn't matter which name you choose |
| 17:42:55 | planetis[m] | it peeks the first that has an empty type |
| 17:42:56 | * | noeontheend joined #nim |
| 17:43:11 | planetis[m] | *picks |
| 17:43:51 | planetis[m] | do you have a long time since you been learning nim? |
| 17:44:49 | pacujo | Thanks, FromGitter. Anyway, interestingly the system lib seems to have an implementation but it's not made public |
| 17:44:50 | FromGitter | pacujo, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
| 17:45:57 | sealmove | pacujo: pacujo, the Nim/compiler folder is usually not in default paths. Try using the full path to the file. |
| 17:47:24 | * | noeontheend quit (Ping timeout: 252 seconds) |
| 17:47:26 | sealmove | planetis: nice to me meet you too! I see, still, the example is a little inconsistent. Not sure how long ago I started, but it should be 1year+. |
| 17:49:54 | * | narimiran joined #nim |
| 17:50:23 | sealmove | pacujo: sorry it wasn't in Nim/compiler. It's in Nim/lib/system/avltree.nim but seems to export no symbols. I suggest you make a copy of it in your project folder and add `*` to the procs that you want to use. |
| 17:50:48 | sealmove | also note the comment "# not really an AVL tree anymore, but still balanced ..." :D |
| 17:51:02 | pacujo | Thanks, sealmove, I can port my own implementation while I'm at it |
| 17:51:21 | sealmove | sure |
| 17:52:11 | sealmove | of course you can use "import" instead, if you don't want to have in your project folder. |
| 17:52:38 | sealmove | sorry, I mean "include" |
| 17:54:55 | pacujo | Yep |
| 17:55:08 | pacujo | Any preference between new(result) and result.new? |
| 17:56:01 | * | seerix quit (Remote host closed the connection) |
| 17:56:24 | sealmove | 1st |
| 17:57:18 | planetis[m] | true, it has some inconsistences, like the export marker syntax. But I don't think it worth maintaining it. |
| 17:57:37 | planetis[m] | btw do you have code for yours? |
| 18:02:32 | sealmove | planetis: not yet, probably tomorrow |
| 18:04:19 | planetis[m] | now you can see how its done :) |
| 18:06:37 | narimiran | pacujo: 3rd :) `new result` |
| 18:08:03 | sealmove | but the implementation I have in mind is very different. It's just better syntax for what Araq showed me. |
| 18:08:17 | sealmove | https://github.com/nim-lang/Nim/blob/devel/tests/closure/tclosure.nim#L573 |
| 18:09:15 | sealmove | the interface is a tuple of closures. |
| 18:11:04 | * | pacujo quit (Ping timeout: 252 seconds) |
| 18:12:39 | planetis[m] | right like this one: https://www.openmymind.net/Interfaces-In-Nim/ |
| 18:15:54 | sealmove | exactly |
| 18:16:07 | sealmove | this syntax is very confusing, so a macro fits perfectly I think |
| 18:16:34 | planetis[m] | yep |
| 18:17:04 | planetis[m] | (btw my internet sucks sorry if it takes long to reply) |
| 18:17:40 | sealmove | np |
| 18:18:46 | planetis[m] | so how are you planning on using nim? |
| 18:19:09 | planetis[m] | in job or just personal projects |
| 18:19:20 | * | Vladar quit (Ping timeout: 252 seconds) |
| 18:20:38 | sealmove | I hope it will be a life-long relationship :) But if you mean stuff I plan to do soon, one is a TUI library. |
| 18:22:49 | planetis[m] | i am learning programming in my free time. Btw I have ported JAMA to nim! |
| 18:23:30 | planetis[m] | I was thinking to release it but im not sure |
| 18:23:38 | sealmove | Nim is mostly research for me atm. I am still in uni and don't "need" Nim, but for example playing with macros/ast teaches a lot. |
| 18:23:50 | sealmove | JAMA |
| 18:24:04 | sealmove | what's JAMA? |
| 18:24:29 | planetis[m] | its java matrix library |
| 18:24:40 | sealmove | oh, nice |
| 18:24:49 | sealmove | yeah we have arraymancer |
| 18:25:00 | sealmove | maybe help there |
| 18:25:06 | planetis[m] | its used in my uni for computations |
| 18:25:20 | sealmove | where is your uni? |
| 18:25:23 | narimiran | my advice: use `neo` for matrices |
| 18:25:26 | planetis[m] | its different scope though |
| 18:25:48 | planetis[m] | neo cant do what I need! |
| 18:26:15 | narimiran | what is that? |
| 18:26:43 | planetis[m] | be portable dont depend on cblas |
| 18:26:48 | narimiran | :) |
| 18:28:09 | planetis[m] | sealmove: auth, are you a student too? |
| 18:29:06 | sealmove | yeah, uop |
| 18:29:36 | sealmove | that's pretty cool :) |
| 18:29:42 | planetis[m] | namiran: dont get me wrong, both neo and arraymancer seem nice but couldn't fit me |
| 18:30:43 | sealmove | maybe we can at least exchange e-mails :3 and in future start a Nim project together if the wind blows that way |
| 18:32:18 | planetis[m] | I wanted to share a project with someone since forever |
| 18:32:27 | planetis[m] | that would be cool |
| 18:34:31 | * | gangstacat quit (Ping timeout: 252 seconds) |
| 18:39:57 | planetis[m] | bear in mind my theoritical skills are pretty weak |
| 18:40:17 | Zevv | I got the compiler crashing, it is stuck in an endless loop of typeToString until it stack overflows |
| 18:40:29 | narimiran | Zevv: congrats :P |
| 18:40:55 | Zevv | it seems there's a loop in the AST, wow |
| 18:41:01 | planetis[m] | and I m stuck in lyceum structured programming |
| 18:41:22 | Zevv | planetis[m]: what's that? |
| 18:42:25 | * | kapil____ quit (Quit: Connection closed for inactivity) |
| 18:42:29 | planetis[m] | its greek name for highschool |
| 18:42:59 | Zevv | oh, that kind of lyceum. Thought it was some kind of paradign I hadn't heard of :) |
| 18:43:12 | planetis[m] | in the third grade we are taught structured programming, through a language which is like Pascal |
| 18:43:27 | FromGitter | <alehander42> is there a way to handle ctrlc in a nim program that invokes execShel |
| 18:43:30 | FromGitter | <alehander42> execShell |
| 18:44:12 | * | rnrwashere joined #nim |
| 18:44:38 | sealmove | use some kind of line editor? |
| 18:44:58 | * | ng0 joined #nim |
| 18:46:32 | sealmove | depends on the program, but you either have to find or implement a input controller. for programs that get text input you have stuff like nim-noise. |
| 18:50:14 | FromGitter | <alehander42> they dont really get input: they just start a loop invoking a "translator" and most of the time the invoked program runs |
| 18:50:27 | FromGitter | <alehander42> but the problem is that if i ctrlc i need to ctrlc all the remaining iterations of the loop |
| 18:52:55 | sealmove | this sounds like fork/exec issue |
| 18:53:06 | rayman22201 | This is a pretty good description of how ctrlc works in unix: https://unix.stackexchange.com/questions/176235/fork-and-how-signals-are-delivered-to-processes |
| 18:53:07 | sealmove | I am not sure what execShell does under the hood |
| 18:54:53 | FromGitter | <alehander42> it invokes system() |
| 18:56:57 | sealmove | is execShell in the loop? |
| 18:57:26 | sealmove | if yes, then you create one process per loop |
| 18:58:18 | sealmove | and these processes are left open |
| 18:58:59 | FromGitter | <alehander42> well, they do close |
| 18:59:04 | FromGitter | <alehander42> they happen serially |
| 18:59:12 | sealmove | it doesn't mean they close |
| 18:59:29 | FromGitter | <alehander42> they do, i can see it in htop |
| 18:59:46 | FromGitter | <alehander42> execShellCmd waits until the process is finished |
| 18:59:51 | FromGitter | <alehander42> but yeah the issue is that ctrlc is delivered to them instead of my app |
| 19:00:54 | sealmove | I see |
| 19:01:09 | FromGitter | <alehander42> lemme give an example\ |
| 19:01:19 | sealmove | I understand now |
| 19:02:09 | FromGitter | <alehander42> https://justpaste.it/3xqin |
| 19:03:00 | FromGitter | <alehander42> (here its incorrectly in the end, but even if i move it to the beginning) |
| 19:03:02 | FromGitter | <alehander42> (it happens) |
| 19:03:29 | FromGitter | <alehander42> i just have to directly start the process i guess |
| 19:03:29 | sealmove | can you check the error code of ShellCmd? |
| 19:03:42 | sealmove | and if it's the same sig that ctrl+d sends, then exit |
| 19:04:02 | sealmove | execShellCmd does return the code |
| 19:04:24 | FromGitter | <alehander42> well with ctrl+c it still exits with 0 |
| 19:04:31 | FromGitter | <alehander42> and ctrl+d doesnt do nothing for me |
| 19:06:00 | * | rnrwashere quit (Remote host closed the connection) |
| 19:06:18 | * | rnrwashere joined #nim |
| 19:06:25 | sealmove | maybe try execProcess? |
| 19:07:05 | sealmove | sorry, execCmd |
| 19:07:24 | FromGitter | <data-man> @alehander42 Maybe to use startProcess and close(process) from osproc? |
| 19:07:37 | * | ikan-keli_ quit (Ping timeout: 246 seconds) |
| 19:08:33 | * | rnrwashere quit (Remote host closed the connection) |
| 19:08:37 | sealmove | execCmd differ from execShellCmd in that the shell is involved. The 0 error code you get is the one of the shell. If you use plain execCmd then you should get back the correct error code. |
| 19:09:12 | * | rnrwashere joined #nim |
| 19:09:18 | * | rnrwashere quit (Remote host closed the connection) |
| 19:09:32 | * | rnrwashere joined #nim |
| 19:10:24 | * | absolutejam1 joined #nim |
| 19:10:32 | FromGitter | <alehander42> thanks |
| 19:10:34 | FromGitter | <alehander42> this works! |
| 19:10:41 | FromGitter | <alehander42> but still i wonder why the ctrlc didnt work |
| 19:10:46 | FromGitter | <alehander42> anyway, this is an ok workaround\ |
| 19:13:28 | sealmove | because when you pressed ctrlc a new process was always running |
| 19:14:06 | FromGitter | <alehander42> yeah, so a child should be able to override the parent |
| 19:14:14 | FromGitter | <alehander42> i thought it works in the opposite way, makes sense |
| 19:14:41 | FromGitter | <alehander42> that events "bubble" from parents to children |
| 19:18:24 | sealmove | I ran into an annoying thing too. {.discardable.} doesn't work for anonymous functions :| |
| 19:39:23 | FromGitter | <alehander42> hmm well people dont love discard too much here |
| 19:39:30 | FromGitter | <alehander42> discardable* |
| 19:39:38 | FromGitter | <alehander42> (but i find it very important for jsffi) |
| 19:46:04 | FromGitter | <arnetheduck> I love `discard` :) |
| 19:47:41 | * | nsf quit (Quit: WeeChat 2.4) |
| 19:49:50 | FromGitter | <alehander42> yeah, that's what i meant: having discardable |
| 19:51:44 | * | absolutejam1 quit (Ping timeout: 252 seconds) |
| 19:52:30 | * | ikan-keli_ joined #nim |
| 19:55:46 | * | absolutejam1 joined #nim |
| 19:56:07 | sealmove | I think discardable is simple not valid for plain expressions because nobody added it |
| 19:56:14 | sealmove | simply* |
| 20:00:45 | * | Jesin quit (Quit: Leaving) |
| 20:03:58 | * | Jesin joined #nim |
| 20:28:04 | * | rnrwashere quit (Remote host closed the connection) |
| 20:28:45 | * | rnrwashere joined #nim |
| 20:29:52 | * | shashlick quit (Ping timeout: 255 seconds) |
| 20:30:47 | * | rnrwashere quit (Remote host closed the connection) |
| 20:31:02 | * | rnrwashere joined #nim |
| 20:46:29 | * | lritter quit (Remote host closed the connection) |
| 20:46:51 | * | lritter joined #nim |
| 20:52:50 | * | narimiran quit (Read error: Connection reset by peer) |
| 20:53:07 | * | narimiran joined #nim |
| 20:58:09 | * | gangstacat joined #nim |
| 20:59:37 | * | absolutejam1 quit (Quit: WeeChat 2.4) |
| 21:03:09 | * | jjido joined #nim |
| 21:04:34 | * | Trustable quit (Remote host closed the connection) |
| 21:08:15 | * | narimiran quit (Remote host closed the connection) |
| 21:10:16 | * | narimiran joined #nim |
| 21:10:24 | * | ryukoposting joined #nim |
| 21:15:47 | * | vlad1777d joined #nim |
| 21:17:32 | * | narimiran quit (Ping timeout: 245 seconds) |
| 21:19:11 | ryukoposting | so I have codegen spitting out a few thousand converters, and it takes a looooong time to compile. If I change them to procs, then compilation takes just a few seconds. Anyone know why? |
| 21:26:31 | Zevv | is it busy nimming or busy cing? |
| 21:27:00 | ryukoposting | it's nimming |
| 21:27:01 | ryukoposting | lol |
| 21:27:05 | ryukoposting | I like that term |
| 21:27:34 | Zevv | hm, then its not like what happened to me - exploding C source size beacuse of nim constructs |
| 21:28:40 | ryukoposting | had a couple of weird compiler hangs on devel, but couldn't reproduce anything consistently |
| 21:28:46 | ryukoposting | stable seems fine, though |
| 21:34:28 | def- | ryukoposting: converters enhance the implicitly convertible types, so lookups into that become much more expensive |
| 21:34:34 | def- | procs are only used explicitly |
| 21:35:11 | def- | not sure I've seen a good use for converters yet, I'd prefer explicit anyway |
| 21:35:32 | ryukoposting | oooh yeah that would explain it |
| 21:35:54 | ryukoposting | making 1500 converters that all reference each other probably is ill-advised then |
| 21:36:08 | def- | sounds so, what's the use case? |
| 21:36:34 | ryukoposting | I'm working on making an AWS SDK for nim |
| 21:36:51 | ryukoposting | code is generated from amazon's official spec |
| 21:37:27 | ryukoposting | I was originally going to use macros to generate entire APIs at compile time, but the ceiling on how many times the compiler will let a macro loop got in the way |
| 21:37:54 | ryukoposting | surprisingly, speeds on the compile-time codegen were actually very respectable |
| 21:38:52 | ryukoposting | but the more brute-force code generator approach is a lot easier to debug, and will be less of a pain to distribute |
| 21:42:05 | * | sentreen_ joined #nim |
| 21:44:29 | ryukoposting | ec2 alone is up to 33000 lines lmao |
| 21:44:31 | * | sentreen quit (Ping timeout: 272 seconds) |
| 21:50:58 | * | sealmove quit (Quit: WeeChat 2.4) |
| 22:04:13 | * | solitudesf- joined #nim |
| 22:04:18 | * | solitudesf quit (Remote host closed the connection) |
| 22:13:01 | Shoozza | btw is there something like prettier or go-fmt for nim? |
| 22:13:04 | * | solitudesf- quit (Quit: Leaving) |
| 22:13:24 | * | solitudesf joined #nim |
| 22:16:30 | * | noeontheend joined #nim |
| 22:34:37 | federico3 | https://lobste.rs/s/mcwvhn/what_are_some_niche_features_you_d_like_see |
| 22:36:51 | * | rnrwashere quit (Remote host closed the connection) |
| 22:39:03 | * | theelous3_ joined #nim |
| 22:55:20 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 22:55:34 | avanderneut | Shoozza: https://github.com/nim-lang/Nim/tree/devel/nimpretty ? |
| 23:04:20 | * | jjido joined #nim |
| 23:13:54 | * | Jesin quit (Quit: Leaving) |
| 23:25:54 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
| 23:29:34 | * | Jesin joined #nim |
| 23:29:38 | * | sentreen_ quit (Ping timeout: 272 seconds) |
| 23:36:10 | * | sentreen_ joined #nim |
| 23:46:02 | * | rnrwashere joined #nim |
| 23:47:09 | * | I_Right_I joined #nim |
| 23:48:17 | * | rnrwashere quit (Remote host closed the connection) |
| 23:49:17 | Shoozza | maybe but considering that there isn't even a readme for this repo doesn't make it look promising :p |
| 23:49:55 | Shoozza | nvm that it's a subfolder didn't notice |