00:07:31 | * | Hideki_ joined #nim |
00:12:19 | FromDiscord | <exelotl> I'm not a physics student but I watched the latest kurzgesagt so I'm basically an expert |
00:12:38 | FromDiscord | <exelotl> what you need is a spinning tether in the atmosphere |
00:13:07 | FromDiscord | <exelotl> on your way up, you simply catch the tether and it flings you to the moon |
00:14:10 | FromDiscord | <Rika> LMAO |
00:21:23 | * | Hideki_ quit (Remote host closed the connection) |
00:22:47 | * | Hideki_ joined #nim |
00:23:37 | disruptek | !github sealmove/ |
00:23:38 | disbot | https://github.com/sealmove/nimitai -- Implementation of Kaitai Struct as a compile-time library in Nim |
00:23:38 | disbot | https://github.com/sealmove/hexalepis -- Raw byte manipulation 👑 |
00:23:39 | disbot | https://github.com/sealmove/xhronicle -- Xonsh History Frontend |
00:24:21 | disruptek | where's my yaml? |
00:26:02 | * | Hideki_ quit (Remote host closed the connection) |
00:26:19 | * | Hideki_ joined #nim |
00:27:35 | * | Hideki_ quit (Remote host closed the connection) |
00:31:08 | * | gangstacat quit (Ping timeout: 245 seconds) |
00:32:51 | * | gangstacat joined #nim |
00:54:49 | * | uu91 quit (Read error: Connection reset by peer) |
00:55:05 | * | uu91 joined #nim |
01:00:22 | * | Hideki_ joined #nim |
01:17:35 | * | Hideki_ quit (Ping timeout: 276 seconds) |
01:20:43 | * | seni joined #nim |
01:21:08 | * | uu91 quit (Read error: Connection reset by peer) |
01:21:45 | * | uu91 joined #nim |
01:33:38 | * | exelotl quit (Ping timeout: 245 seconds) |
01:37:42 | * | MarquisdeFalbala joined #nim |
01:39:05 | * | seni quit (Quit: Leaving) |
01:42:04 | * | NimBot joined #nim |
01:42:20 | * | uu91 joined #nim |
01:42:46 | FromGitter | <kayabaNerve> ```code paste, see link``` ⏎ ⏎ Anyone here have any ideas? [https://gitter.im/nim-lang/Nim?at=5dd34895e75b2d5a19fa2587] |
01:47:26 | FromGitter | <s0kil> @kayabaNerve Code? |
01:56:41 | FromGitter | <kayabaNerve> Oh. Sorry, I found the issue. I forgot adding `Future[]` to an async function's result type. |
02:03:56 | * | MarquisdeFalbala quit () |
02:05:43 | * | drewr joined #nim |
02:09:02 | * | dddddd quit (Remote host closed the connection) |
02:44:12 | madprops | is there a way to delete an item(s) by value name in a seq? |
02:44:18 | madprops | like myseq.remove("someString") ? |
02:44:24 | madprops | apart from looping through it i mean |
03:06:09 | * | rockcavera quit (Remote host closed the connection) |
03:14:04 | * | Hideki_ joined #nim |
03:15:00 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
03:15:14 | * | uu91 quit (Read error: Connection reset by peer) |
03:15:33 | * | uu91 joined #nim |
03:18:26 | * | Hideki_ quit (Ping timeout: 240 seconds) |
03:21:05 | FromGitter | <TensorTom> does the db_mysql module prepare sql query strings to prevent injection? |
03:21:32 | FromGitter | <TensorTom> or any module cool kids might be using |
03:36:06 | leorize | db_* family prepares sql queries |
03:36:36 | leorize | cool kids modules include: ormin, ndb and norm |
03:36:42 | leorize | they don't support mysql though |
03:40:02 | disruptek | !github ormin |
03:40:03 | disbot | https://github.com/Araq/ormin -- Ormin -- An ORM for Nim. |
03:40:14 | disruptek | have fun with the docs. |
03:40:35 | shashlick | docs? |
03:41:23 | disruptek | we don need no steenking docs! |
03:51:46 | leorize | disruptek: any list of commands for disbot? |
03:52:11 | disruptek | not yet. |
03:53:41 | disruptek | i am out for the week but maybe when i get back. |
03:53:56 | disruptek | been working on nimph mostly. |
03:57:32 | disruptek | gonna write a bayes filter for pmunch, i guess. maybe something for RFCs and PRs like we have for issues. |
03:58:11 | disruptek | maybe a docs search command, but probably will wait until ndoc for that. |
04:00:04 | madprops | how can i get "from index 2 onwards" on a seq? |
04:00:06 | disruptek | will probably put a feed in #nim-news or something; just new package links, new issues, PRs, etc. |
04:00:33 | disruptek | aseq[2..^1] |
04:01:01 | disruptek | that was a pita to type with thumbs. |
04:01:14 | madprops | lol, thanks |
04:01:25 | disruptek | np |
04:01:39 | disruptek | !github madprops/ |
04:01:40 | disbot | https://github.com/madprops/dirfun -- Experimental directory and file creator |
04:01:40 | disbot | https://github.com/madprops/nimbars -- Create bar charts in the terminal based on data files |
04:01:41 | disbot | https://github.com/madprops/nap -- Nim Argument Parser |
04:02:03 | madprops | how is this getting indexed? |
04:02:24 | disruptek | beats the hell outta me. |
04:02:44 | disruptek | the internet is a fucking miracle, i tell you. |
04:02:51 | madprops | i love it |
04:04:54 | disruptek | i bet itd be too hard to have nimsuggest warn about nim 1.0 syntax in nim 1.1 source. |
04:07:33 | shashlick | disruptek - i have a channel that collects all instances of nim in the forum, reddit and stack overflow |
04:07:41 | shashlick | might be nice to put that into irc |
04:08:17 | disruptek | good idea. |
04:08:28 | disruptek | i would watch that show. |
04:08:46 | shashlick | of course i can make it look nice in slack from rss, irc is more limited |
04:09:25 | disruptek | zevv says rainbow brite can kiss his noodle. |
04:09:47 | disruptek | actually, what he said was both more and less colorful. |
04:12:41 | disruptek | i will add issue search, too. that's about all i need, so far, anyway. |
04:14:27 | madprops | how can i iterate over nre captures ? |
04:14:47 | disruptek | index .capture? |
04:17:15 | * | lritter joined #nim |
04:39:44 | * | chemist69 quit (Ping timeout: 276 seconds) |
04:40:55 | * | chemist69 joined #nim |
04:58:02 | * | nsf joined #nim |
05:16:25 | * | uu91 quit (Read error: Connection reset by peer) |
05:16:40 | * | uu91 joined #nim |
05:24:23 | FromGitter | <TensorTom> damn. importing the sequoia module produces `fatal.nim(39) sysFatal Error: unhandled exception: over- or underflow [OverflowError]` . Was hoping to use pgp. |
05:48:38 | * | theelous3 quit (Ping timeout: 276 seconds) |
05:52:21 | * | theelous3 joined #nim |
05:59:25 | FromGitter | <TensorTom> python interop should be okay |
06:24:35 | * | narimiran joined #nim |
06:33:44 | * | solitudesf joined #nim |
06:45:26 | * | Jjp137 quit (Quit: Leaving) |
06:47:43 | * | Jjp137 joined #nim |
06:47:48 | * | uu91 quit (Ping timeout: 265 seconds) |
06:48:43 | * | uu91 joined #nim |
07:03:50 | * | filcuc joined #nim |
07:15:49 | * | Hideki_ joined #nim |
07:19:18 | Zevv | disruptek: go wash your mouth dud |
07:19:48 | Zevv | don't make my terminal light up all yellow with your nonsense! |
07:20:17 | * | Hideki_ quit (Ping timeout: 250 seconds) |
07:21:06 | Zevv | look what you did! http://zevv.nl/div/bah.png |
07:22:02 | * | filcuc quit (Ping timeout: 240 seconds) |
07:25:20 | FromGitter | <zacharycarter> how can kissing rainbow brite's ass be any less colorful than I am imagining? |
07:27:33 | FromDiscord | <Rika> Zevv what client? Looking into switching from a gui client to a cli one because I just don't like the look of the gui ones |
07:31:32 | FromGitter | <zacharycarter> irssi is pretty popular |
07:35:12 | * | miran joined #nim |
07:36:15 | Zevv | tui things generally dont have a look or a style |
07:36:24 | Zevv | which is part of their strength |
07:36:54 | Zevv | its just a f.+load of letters crammed in a rectangle |
07:39:25 | * | miran quit (Quit: leaving) |
07:40:23 | leorize | narimiran: I've pushed the new NimTypeOf to the 'con' branch in nim.nvim, please give it a test drive |
07:40:48 | leorize | It's still a WIP, and there are a few compiler bugs that may manifest via it |
07:40:50 | * | PMunch joined #nim |
07:41:31 | Zevv | leorize: whats that? |
07:43:44 | leorize | Zevv: https://asciinema.org/a/JbWzKxkwCUjHlaxHle76SrP74 |
07:44:54 | Zevv | dude enough is enough |
07:45:16 | Zevv | people will want to leak vscode if you keep that nonsense up |
07:45:41 | Zevv | imagine, araq moving to vim |
07:47:34 | leorize | lol |
07:47:46 | leorize | although I'll have to say that the feature is currently buggy as hell :p |
07:47:55 | narimiran | leorize: thanks, i'll give it a try |
07:49:15 | zedeus | nim-mode also shows a preview of the documentation |
07:50:07 | leorize | that's also possible here once I'm done wiring everything |
07:51:05 | leorize | it currently exists in autocompletion, but no support for showing it for a given symbol (yet) |
07:58:31 | Araq | so frustrating, simple programs work, complex ones don't |
07:59:59 | * | Kevin5 joined #nim |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:00:09 | * | Kevin5 quit (Client Quit) |
08:03:06 | FromGitter | <zacharycarter> with the new gc / runtime? or in general? |
08:04:03 | Araq | hmm on osx it actually works |
08:04:10 | * | jjido joined #nim |
08:04:20 | Araq | nim c --gc:arc -r tests/async/tasyncawait.nim |
08:04:33 | Araq | milestone reached! |
08:04:44 | * | gmpreussner joined #nim |
08:04:48 | FromGitter | <zacharycarter> nice |
08:04:50 | Araq | crashes on Windows though :P |
08:05:16 | narimiran | who uses windows? :P |
08:05:43 | FromGitter | <zacharycarter> everyone that matters |
08:05:53 | * | jjido quit (Client Quit) |
08:06:08 | narimiran | nah, he also has a mac |
08:06:30 | FromGitter | <zacharycarter> well good, I have a mac too |
08:06:41 | FromGitter | <zacharycarter> windows is a PITA at times though for sure |
08:07:36 | narimiran | *everything* is a PITA from time to time ;) |
08:08:01 | FromGitter | <zacharycarter> truth |
08:08:38 | Araq | Araq's OS is coming. but disruptek can't use it as it lacks symlinks |
08:09:36 | narimiran | will it have a package manager? :D |
08:09:49 | Araq | nah |
08:10:16 | Araq | it will simply have a directory structure that is not braindead |
08:14:14 | * | jwm224 quit (Ping timeout: 252 seconds) |
08:16:06 | * | jwm224 joined #nim |
08:27:08 | Zevv | Araq: wow congrats! |
08:27:34 | Zevv | next is to compile nim itself with arc, right? :) |
08:33:29 | Araq | Zevv, no because it's not the right GC for Nimc, Nimc loves mark&sweep |
08:33:31 | FromGitter | <gogolxdong> What's it like? |
08:33:53 | PMunch | Well this is fun.. Trying to import a C function, I do "nodecl, cimport, header" it complains that it doesn't exists on link time, if I remove nodecl it gives me conflicting types.. |
08:35:51 | Zevv | Araq: sure, but maybe not optimal, it *should* be able to run |
08:40:06 | Araq | eventually yes, but Nimc isn't even at Nim v1.0 |
08:40:54 | Araq | it relies on define:nimOldCaseObjects |
08:42:08 | Araq | but I'll make it the default GC for Nim's tooling (koch, nimgrep, niminst) etc |
08:50:50 | * | solitudesf quit (Ping timeout: 240 seconds) |
08:51:01 | * | uu91 quit (Read error: Connection reset by peer) |
08:51:16 | * | uu91 joined #nim |
08:51:25 | PMunch | Great, I've managed to get the C compiler to hang.. |
08:54:01 | PMunch | Or maybe something else is going on.. Running the command it hangs on in a terminal works just fine |
08:54:49 | Araq | --parallelBuild:1 |
08:56:44 | leorize | Araq: what's this new --gc:arc? |
08:57:50 | PMunch | Aha |
08:59:26 | Araq | leorize, it's the same as --gc:destructors and roughly the same as --newruntime |
08:59:39 | PMunch | Hmm, tried something else. But now I get some completely bogus error message: http://ix.io/22fL |
08:59:49 | Araq | it may look like we get a new GC every week now, but really we don't, it simply evolves |
08:59:55 | PMunch | Complaining that members I don't try to access doesn't exists.. |
09:00:29 | leorize | Araq: so we're still going for owned or has that concept deemed a failure? |
09:00:57 | FromDiscord | <exelotl> What is arc short for? :o |
09:03:56 | leorize | Araq's reference counting :P |
09:04:46 | Araq | leorize, https://github.com/nim-lang/RFCs/issues/177 |
09:05:55 | Araq | ARC means Automatic/Atomic/Araq's Reference counting |
09:13:33 | PMunch | Anyone have any good idea what causes my weird C errors? |
09:14:16 | leorize | PMunch: macros |
09:14:51 | leorize | you're probably missing some headers |
09:15:11 | PMunch | Those are types defined within my own project.. |
09:15:42 | leorize | s_addr and s6_addr are usually macros in posix... |
09:15:54 | PMunch | Wait, really? |
09:16:34 | leorize | well, at least that's the case on linux |
09:16:37 | * | letto quit (Ping timeout: 240 seconds) |
09:16:49 | PMunch | Oh wow |
09:16:57 | PMunch | Renaming the fields worked.. |
09:17:11 | PMunch | Well that should be a bug.. |
09:17:37 | leorize | guess we have to implement a way for Nim to figure out every single defined symbol so as to avoid them :P |
09:17:42 | leorize | or just ditch C altogether |
09:17:43 | * | theelous3 quit (Ping timeout: 250 seconds) |
09:18:03 | PMunch | Oh wait, they are C macros.. |
09:18:12 | leorize | yep |
09:18:46 | PMunch | Maybe Nim should obfuscate fields in structs as well? |
09:19:27 | PMunch | But it works fine on Linux.. |
09:19:31 | leorize | basically making debugging worse... |
09:19:39 | PMunch | It was just when cross-compiling to Windows I got this error.. |
09:21:29 | * | lritter quit (Quit: Leaving) |
09:21:38 | leorize | the C preprocessor itself is a huge minefield :P |
09:22:56 | leorize | iirc nim used to obfuscate everything possible |
09:25:27 | Araq | yeah and then we got "I need to be able to use debuggers" features |
09:26:18 | Araq | in the longer run we should just embrace nlvm, there is a reason C++ doesn't compile to C anymore, C is unusable even as a code generation target |
09:27:40 | Araq | no idea how we are gonna get exceptional C++ interop then though... :-( |
09:29:23 | * | floppydh joined #nim |
09:33:42 | ehmry | Araq: is nlvm llvm based? is there an issue with the llvm unwinder? |
09:34:26 | ehmry | I was looking at the llvm c++ runtime and thought the stack unwinder could be used directly by nim |
09:35:30 | leorize | yes, it's llvm based |
09:40:48 | lqdev[m] | does .compile work for nlvm? |
09:40:52 | * | clyybber joined #nim |
09:42:30 | leorize | maybe |
09:52:05 | * | ng0 joined #nim |
09:52:20 | * | Vladar joined #nim |
10:05:20 | * | endragor joined #nim |
10:08:46 | * | ITChap joined #nim |
10:12:41 | FromDiscord | <YahArt> Hello everybody |
10:12:41 | FromDiscord | <YahArt> I just discovered the nim language recently and I am quite fond of it. |
10:12:41 | FromDiscord | <YahArt> I wanted to try out the nimgl library for game development (https://github.com/nimgl/nimgl) |
10:12:41 | FromDiscord | <YahArt> |
10:12:41 | FromDiscord | <YahArt> I managed to get the green window example running. |
10:12:44 | FromDiscord | <YahArt> However when I clone the repo navigate inside the examples folder and try to run any of the examples I get this weird compile error about not finding a vulkan.c file. |
10:12:46 | FromDiscord | <YahArt> |
10:12:47 | FromDiscord | <YahArt> I am running this on kubuntu (linux) |
10:12:49 | FromDiscord | <YahArt> |
10:12:51 | FromDiscord | <YahArt> If anyone has any experience regarding this topic I would really appreciate it 😄 |
10:12:53 | FromDiscord | <YahArt> https://cdn.discordapp.com/attachments/371759389889003532/646291747185623059/unknown.png |
10:14:00 | PMunch | You need to initialise submodules: https://github.com/nimgl/nimgl/blob/master/.gitmodules |
10:15:10 | PMunch | https://git-scm.com/book/en/v2/Git-Tools-Submodules#_cloning_submodules |
10:15:57 | PMunch | @YahArt ^ |
10:16:32 | * | letto joined #nim |
10:35:32 | PMunch | Hmm, with --threads:on and --tlsEmulation:off when cross compiling I get a dependency for a "libgcc_s_seh-1.dll" |
10:35:55 | PMunch | And without tlsEmulation it crashes when I run it, but not when I run it under Gdb (yay..) |
10:37:09 | PMunch | The import is for a "__emutls_get_address" |
10:40:41 | PMunch | Ah, --passL:"-static" removes that |
10:42:28 | PMunch | How can I create conditions in my nim.cfg file? I want to only use the --os:windows switch to set all the parameters I need |
10:42:50 | * | narimiran quit (Ping timeout: 240 seconds) |
10:43:11 | lqdev[m] | @if windows |
10:43:17 | lqdev[m] | @elif |
10:43:18 | lqdev[m] | @endif |
10:43:27 | lqdev[m] | s/endif/end |
10:44:25 | lqdev[m] | also, you can create a config.nims. they're much better than nim.cfg |
10:46:06 | PMunch | I've tried to use config.nims, but they are a bit clumsy.. |
10:47:42 | Araq | please stick to nim.cfg, I hate nims config files now |
10:48:02 | PMunch | Why? |
10:48:18 | Araq | not because the concept it bad, it's good, but it was such a PITA to get it reasonably bug-free |
10:48:39 | PMunch | So now that it is reasonably bug-free we should all stop using them? :P |
10:49:14 | Araq | how else can we get out of the mess of having 2 separate config systems? |
10:51:32 | federico3 | officially deprecating one of the two? |
10:52:00 | Araq | which one? |
10:52:13 | livcd | The one that you dont like anymore |
10:52:21 | PMunch | I like the idea of .nims |
10:52:39 | PMunch | Shows how flexible Nim DSLs are when you can use them as a configuration file |
10:53:38 | * | letto quit (Ping timeout: 245 seconds) |
10:58:45 | * | letto joined #nim |
11:05:19 | clyybber | I also like config.nims more |
11:09:00 | clyybber | It also means that nims gets more usage which is great *because* it reveals bugs |
11:10:14 | Araq | the bugs it revealed were mostly system.nim design defects |
11:10:35 | Araq | the VM is used extensively for macros already and we know its bugs |
11:12:31 | FromGitter | <kaushalmodi> Logged in at right time? +1000 for config.nims |
11:13:25 | Araq | maybe with another system.nim refactoring it doesn't matter anymore |
11:16:59 | * | rockcavera joined #nim |
11:17:06 | * | uu91 quit (Read error: Connection reset by peer) |
11:17:16 | * | Hideki_ joined #nim |
11:17:20 | * | uu91 joined #nim |
11:21:51 | * | Hideki_ quit (Ping timeout: 265 seconds) |
11:28:12 | clyybber | I think I found a template symbol binding bug. |
11:29:26 | clyybber | Araq: I'm getting "undeclared routine: 'runeAt'" , but runeAt is available in the defining scope |
11:29:35 | clyybber | Is it intended to work like that or not? |
11:30:08 | Araq | depends, report it properly |
11:30:20 | clyybber | On it |
11:49:02 | * | ITChap quit (Quit: ITChap) |
11:49:21 | * | solitudesf joined #nim |
11:49:31 | * | ITChap joined #nim |
11:57:17 | clyybber | Araq: Here: https://github.com/nim-lang/Nim/issues/12683 |
11:57:19 | disbot | ^ Symbol binding bug with generics and template |
11:57:20 | disbot | ^ snippet at https://play.nim-lang.org/#ix=22g5 😏 |
11:58:16 | * | ITChap quit (Quit: ITChap) |
12:00:13 | Zevv | oh I ran into the same thing a few times with npeg, I had to export all those. Never realized if it was supposed to work or not... |
12:00:42 | clyybber | IMO it should work |
12:01:04 | clyybber | Because the string is not generic |
12:01:28 | clyybber | *a generic param |
12:06:39 | PMunch | Hmm, what is the equivalent of & in powershell? |
12:07:11 | * | Hideki_ joined #nim |
12:17:17 | * | letto_ joined #nim |
12:18:02 | * | letto quit (Ping timeout: 240 seconds) |
12:22:17 | * | Hideki_ quit (Remote host closed the connection) |
12:24:01 | * | bacterio quit (Read error: Connection reset by peer) |
12:26:36 | * | Hideki_ joined #nim |
12:31:20 | * | ITChap joined #nim |
12:31:27 | * | Hideki_ quit (Ping timeout: 265 seconds) |
12:33:47 | FromGitter | <kaushalmodi> Pmunch: https://stackoverflow.com/a/185798/1219634 ? |
12:34:36 | * | PMunch quit (Read error: Connection reset by peer) |
12:34:40 | FromGitter | <kaushalmodi> Linked the wrong answer but seems like there's no elegant way |
12:35:02 | * | PMunch joined #nim |
12:35:05 | FromGitter | <kaushalmodi> I've never used powershell and reading such answers, looks like I never will :P |
12:40:39 | * | Hideki_ joined #nim |
12:41:46 | FromGitter | <alehander92> the only tjhing i am afraid for |
12:41:47 | FromGitter | <alehander92> with llvm |
12:41:56 | FromGitter | <alehander92> is build times etc, llvm is a big dependency |
12:42:26 | FromGitter | <alehander92> but i guess if many projects use it, it isn't such a big problem as i imagine |
12:46:21 | * | CcxWrk joined #nim |
12:46:31 | PMunch | kaushalmodi... Why is this so hard.. |
12:54:54 | livcd | PMunch: what do you need to do ? |
13:00:16 | PMunch | I'm just trying to run multiple DNS lookups to my server at the same time |
13:00:25 | PMunch | To test that my Nim DLL works with multithreading |
13:00:39 | PMunch | On Linux I did this with dig & dig & dig etc. |
13:04:07 | livcd | You can wrap Start-Process { } |
13:08:20 | * | endragor quit (Remote host closed the connection) |
13:11:32 | * | Vladar quit (Quit: Leaving) |
13:20:37 | * | PMunch quit (Read error: Connection reset by peer) |
13:21:03 | * | PMunch joined #nim |
13:21:27 | * | PMunch quit (Read error: Connection reset by peer) |
13:21:33 | * | sagax quit (Quit: Konversation terminated!) |
13:21:53 | * | sagax joined #nim |
13:22:28 | * | PMunch joined #nim |
13:22:43 | * | PMunch quit (Read error: Connection reset by peer) |
13:23:09 | * | PMunch joined #nim |
13:23:44 | * | PMunch quit (Read error: Connection reset by peer) |
13:23:50 | * | PMunch_ joined #nim |
13:24:04 | * | PMunch_ quit (Read error: Connection reset by peer) |
13:24:29 | * | PMunch_ joined #nim |
13:24:59 | * | PMunch_ quit (Read error: Connection reset by peer) |
13:25:07 | * | PMunch__ joined #nim |
13:25:30 | * | PMunch__ quit (Read error: Connection reset by peer) |
13:25:40 | * | PMunch__ joined #nim |
13:26:29 | * | PMunch__ quit (Read error: Connection reset by peer) |
13:26:36 | * | PMunch_ joined #nim |
13:26:36 | * | PMunch_ quit (Client Quit) |
13:26:55 | * | PMunch joined #nim |
13:27:32 | * | PMunch quit (Read error: Connection reset by peer) |
13:27:38 | * | PMunch_ joined #nim |
13:27:52 | * | PMunch_ quit (Read error: Connection reset by peer) |
13:30:31 | * | tklohna joined #nim |
13:35:29 | FromDiscord | <mratsim> @Clyybber, known issues |
13:38:32 | * | sealmove joined #nim |
13:40:00 | sealmove | hey Zevv: do you think we can make something like this possible in npeg? https://play.nim-lang.org/#ix=22gu |
13:45:59 | disruptek | narimiran: think we can backport the nim.cfg fixes? |
13:49:21 | FromGitter | <alehander92> maybe {4} iirc its used similarly in some regex? |
13:49:25 | lqdev[m] | clyybber: it's not a problem with generics, but with templates overall |
13:49:34 | lqdev[m] | s/templates/templates and macros/ |
13:49:55 | clyybber | but it only happens inside a generic |
13:50:21 | clyybber | because generics bind late, but only the actual generic params should bind late |
13:51:51 | lqdev[m] | it's not just related to generics, if you remove the generic param it will happen too, unless something has been fixed and I don't know about it |
13:51:58 | clyybber | sealmove: Just change `example <- Alphas[4] * !1` to `example <- Alphas(4) * !1` |
13:52:39 | lqdev[m] | it will work if you import unicode in module A |
13:52:48 | clyybber | lqdev[m]: I know |
13:52:58 | clyybber | But I dont use the template in module A |
13:53:03 | clyybber | Just the generic. |
13:53:22 | lqdev[m] | oh, I see now |
13:53:31 | lqdev[m] | you don't use the template directly |
13:53:48 | * | kungtotte quit (Quit: WeeChat 2.6) |
13:53:58 | lqdev[m] | so yeah, you're right |
13:54:42 | lqdev[m] | note to self: always look into the bug closely, not just skim through it in half a second |
13:55:10 | sealmove | clyybber: yes, that was a mis-type, but does it work? |
13:55:30 | Zevv | sealmove: I hate it when users make up all these ridiculous use cases |
13:55:35 | clyybber | sealmove: Try it :) I dont have the file 'AAAAA' |
13:55:58 | Zevv | How do you even think of that stuff? |
13:55:59 | sealmove | clyybber: not a file arrrggg another mis-type by me |
13:56:01 | sealmove | w8 |
13:56:03 | disruptek | zevv: damn users! |
13:56:04 | Zevv | let me see if I can make that work |
13:56:24 | Zevv | because I think it just might |
13:56:38 | sealmove | https://play.nim-lang.org/#ix=22gw |
13:56:57 | sealmove | wow nvm it works!! |
13:56:59 | sealmove | <3 |
13:57:04 | * | thomasross quit (Ping timeout: 252 seconds) |
13:57:09 | sealmove | that's awesome |
13:57:42 | Zevv | right |
13:59:15 | * | thomasross joined #nim |
14:00:29 | * | vsantana joined #nim |
14:03:11 | sealmove | well, templates can be extended indefinately I guess |
14:03:32 | clyybber | wdym? |
14:03:34 | sealmove | for example it could work with arbitary number of parameters |
14:03:39 | clyybber | Ah |
14:03:48 | clyybber | You mean npeg templates? |
14:03:51 | sealmove | yup |
14:04:00 | sealmove | or allow arithmetic |
14:04:08 | Zevv | not that |
14:04:16 | sealmove | why not? |
14:04:17 | Zevv | it's only substitution |
14:05:25 | sealmove | yes, that would require proper typing which is a big stretch |
14:05:32 | sealmove | i agree it's not a good idea |
14:05:58 | sealmove | just saying, the possibilities are infinite :P |
14:06:00 | * | vsantana quit (Quit: leaving) |
14:08:46 | lqdev[m] | oh nice, since when does the playground have nimble packages? |
14:09:01 | Zevv | a few weeks |
14:09:18 | clyybber | mratsim: My issue is different |
14:09:36 | clyybber | `chars` is not a generic parameter |
14:09:52 | clyybber | As such it can be typechecked at instantiation time |
14:12:43 | * | narimiran joined #nim |
14:20:10 | sealmove | Zevv: what's the meaning of "unhandled infix operator" error? |
14:20:26 | * | NimBot joined #nim |
14:20:44 | Zevv | well you're passing an infix operator that npeg is not handling :) |
14:21:11 | Zevv | * - ^ and ^^ are valid infixes |
14:21:18 | Zevv | any other will show that error |
14:21:20 | Zevv | so what are you doing? |
14:21:27 | sealmove | oh, I'm using '|' |
14:22:10 | sealmove | Meta(n) | Doc(n) | Seq(n) | Types(n) |
14:22:11 | Zevv | oh yeah that one is valid as well, but it gets macro'ed out before npeg sees it |
14:22:30 | Zevv | ah these are template calls? |
14:22:34 | sealmove | yes |
14:22:42 | * | PMunch joined #nim |
14:23:08 | Zevv | let me check that, these are not properly represented in the tests |
14:23:53 | sealmove | Thanks. Another annoyance is the ordering restrictions. You have to put templates high in your grammar. |
14:24:30 | Zevv | true |
14:24:36 | Zevv | Can you dump your whole grammar, I can't reproduce. |
14:25:02 | Zevv | oh damn, I can :( |
14:25:53 | sealmove | well, I guess templates should be used lightly |
14:29:03 | Zevv | fixed, pull master. Or do you want a release? |
14:29:14 | * | shadowbane quit (Quit: Konversation terminated!) |
14:43:47 | * | junland quit (Quit: %ZNC Disconnected%) |
14:44:59 | * | junland joined #nim |
14:49:41 | clyybber | Why is Rune a distinct RuneImpl? And not simply distinct int32? |
14:53:30 | sealmove | I prefer a release :D |
15:01:53 | FromGitter | <nixfreakz_twitter> dumb question: How do you update a nimble package that you already installed previously , meaning if the package was updated |
15:02:02 | FromDiscord | <mratsim> @Clyybber unfortunately I think your issue is unfixable in the short term. I have plenty of issues with generics bindings, I've extracted a few choice ones for your viewing pleasure 😉 |
15:02:09 | narimiran | nimble install will do the update |
15:02:22 | clyybber | mratsim: No problem, its not a blocking issue for me :) |
15:02:36 | FromDiscord | <mratsim> or it might mess up and install master head and 1.0 ... |
15:02:36 | clyybber | But its good to track what the issues are |
15:03:50 | * | ITChap quit (Quit: ITChap) |
15:03:54 | FromDiscord | <mratsim> I think destructors are easier than generics, I didn't touch much of the internals of both but from the peon eye, generics are quite scary |
15:06:17 | * | ITChap joined #nim |
15:06:36 | * | tklohna quit (Ping timeout: 240 seconds) |
15:07:08 | * | PMunch quit (Quit: Leaving) |
15:23:57 | clyybber | mratsim: Definitely. |
15:28:28 | FromGitter | <nixfreakz_twitter> dumb question: How do you update a nimble package that you already installed previously , meaning if the package was updated |
15:28:45 | FromGitter | <nixfreakz_twitter> Do I just re-install the pkg again ? |
15:29:14 | narimiran | i told you earlier |
15:29:16 | narimiran | nimble install will do the update |
15:29:38 | FromGitter | <nixfreakz_twitter> oh sorry I didn't see your reply thanks |
15:32:24 | * | drewr quit (Ping timeout: 246 seconds) |
15:37:23 | leorize | narimiran: so... hit me with the bugs you found from :NimTypeOf :p |
15:38:06 | narimiran | leorize: will do. i need to restart nvim to be able to use that, and i just don't want to do it now as i'm in the middle of something :) but i'll do it later today |
15:39:05 | narimiran | in other news, nim is slow: https://embark.status.im/news/2019/11/18/nim-vs-crystal-part-1-performance-interoperability/ |
15:39:46 | narimiran | and that's coming from status.im website, nice :P |
15:40:52 | FromDiscord | <Rika> lmao RIP |
15:43:14 | FromDiscord | <Rika> oh i expected super slow, like python vs some other language, for some odd reason |
15:46:39 | * | drewr joined #nim |
15:48:03 | * | Hideki_ quit (Remote host closed the connection) |
15:49:06 | * | Hideki_ joined #nim |
15:49:22 | shashlick | yay parsing giant json files ftw |
15:51:58 | * | Hideki_ quit (Remote host closed the connection) |
15:52:11 | * | Hideki_ joined #nim |
15:52:37 | * | theelous3 joined #nim |
15:56:01 | dom96 | "Developer Education lead" |
15:56:29 | dom96 | at Status wrote this post |
15:58:18 | dom96 | narimiran, JSON in Nim is slow(er) than Crystal. |
15:58:43 | dom96 | That's because Crystal's JSON parser is very performant, something we could certainly replicate in Nim |
15:58:55 | narimiran | !github json |
15:58:57 | disbot | https://github.com/status-im/nim-json-rpc -- Nim library for implementing JSON-RPC clients and servers |
15:58:59 | disbot | https://github.com/status-im/nim-json-serialization -- Flexible JSON serialization not relying on run-time type information |
15:58:59 | r4vi | what about the other test? base64 encoding / decoding |
15:59:01 | disbot | https://github.com/OpenSystemsLab/jsmn.nim -- Jsmn - a world fastest JSON parser - in pure Nim |
15:59:27 | dom96 | r4vi, heh, that also happens to be a slow part of the stdlib |
15:59:48 | * | nsf quit (Quit: WeeChat 2.6) |
15:59:49 | dom96 | treeform made a PR to fix this very recently |
15:59:53 | dom96 | it's only in devel |
16:00:02 | narimiran | disbot: you silly bot, you didn't show us https://github.com/Araq/packedjson |
16:00:50 | dom96 | as usual benchmarks can tell an often misleading story |
16:01:12 | Zevv | sealmove: 0.21.1, at your service |
16:01:30 | sealmove | great! ;D |
16:01:37 | dom96 | in practice Crystal and Nim are likely to have effectively the same performance |
16:04:34 | FromDiscord | <Rika> thats great to hear |
16:04:52 | FromDiscord | <Rika> now i wonder why the last benchmark was slow |
16:09:12 | * | Hideki_ quit (Remote host closed the connection) |
16:09:59 | * | Hideki_ joined #nim |
16:11:16 | * | CcxWrk quit (Ping timeout: 252 seconds) |
16:14:58 | * | tklohna joined #nim |
16:15:14 | * | Hideki_ quit (Ping timeout: 276 seconds) |
16:16:39 | * | kcvinu joined #nim |
16:17:34 | * | kcvinu quit (Remote host closed the connection) |
16:19:50 | FromDiscord | <mratsim> Unless those json parser can process over 2GB of data per second they can't claim to be the fastest though |
16:20:11 | Zevv | it says "*a* fastest" |
16:20:54 | FromDiscord | <mratsim> laybe a pure Nim fastest? :p |
16:20:57 | FromDiscord | <mratsim> maybe* |
16:21:45 | FromDiscord | <mratsim> Paper on what is involved: https://arxiv.org/abs/1902.08318 |
16:22:08 | clyybber | that comparison is a bit dry |
16:23:21 | * | Trustable joined #nim |
16:23:26 | clyybber | it compares the stdlib not the compilers |
16:30:05 | shashlick | exactly - these benchmarks are dumb - how much time did the language authors spend tweaking some random area of their stdlib |
16:30:21 | Zevv | well, in practice, does it matter? |
16:30:34 | Zevv | it just shows that having a good stdlib is just as important |
16:30:47 | Zevv | if mundane things like base64 and json both happen to be slow |
16:33:44 | FromGitter | <alehander92> @dom96 have you benchmarked e.g. json-serialization : iirc it doesnt generate intermediate json nodes, so it might be fast |
16:34:05 | FromGitter | <alehander92> (but i only care about time from json to typed obj usually, so it depends on the people) |
16:34:52 | FromGitter | <alehander92> on the other hand i agree that usually very fast parsers/etc arise as third party libraries |
16:34:59 | FromGitter | <alehander92> this seems almost inevitable |
16:35:17 | FromGitter | <alehander92> what a stdlib can do is learn from them/incorporate their internals |
16:35:18 | dom96 | Zevv, it matters, because until someone actually sees that in practice their JSON parsing is too slow then the stdlib is fine |
16:35:35 | dom96 | anything else is just optimising to win synthetic benchmarks |
16:35:56 | FromGitter | <Willyboar> @alehander92 i was find your http framework yesterday |
16:35:58 | dom96 | which is nice, but at the end of the day doesn't have as much impact as other things. Like general stability of the language, or... *cough* windows support |
16:36:01 | disruptek | slow json costs users money. |
16:36:03 | FromGitter | <Willyboar> why do you stopped? |
16:36:10 | FromGitter | <alehander92> well, not much time |
16:36:31 | FromGitter | <Willyboar> :( |
16:36:41 | FromGitter | <alehander92> and i have to design something like 0.1 of the whole framework imo |
16:36:44 | FromGitter | <alehander92> before continuing |
16:36:56 | FromGitter | <alehander92> like, deciding on api/dsl-s and seeing if people would like them |
16:37:02 | * | ITChap quit (Quit: ITChap) |
16:37:07 | FromGitter | <alehander92> i might do it and see if there is interest |
16:37:26 | clyybber | Well, this shows that stdlib json is *not* fine IMO |
16:37:28 | FromGitter | <alehander92> if you are interested, you can do your own framework, i think we need some |
16:37:50 | FromGitter | <alehander92> dom96 i think windows doesnt matter a lot to `crystal` |
16:37:50 | clyybber | But the conclusion from that article is what bothers me |
16:37:56 | FromGitter | <alehander92> compared to nice multithreading |
16:37:57 | dom96 | clyybber, how? |
16:38:05 | clyybber | Well, its slow |
16:38:06 | FromGitter | <alehander92> as they have their niche: web / server stuff similar to go imho |
16:38:11 | clyybber | And stdlib should be fast |
16:38:16 | FromGitter | <Willyboar> Well i am new to both programming and nim so it is a little difficult |
16:38:36 | dom96 | clyybber, no, it's slower than Crystal in this particular benchmark |
16:39:05 | clyybber | dom96: Yeah, and? It shows that we can and should improve our implementation |
16:39:21 | FromGitter | <Willyboar> I think nim needs a railslike framework |
16:39:29 | FromGitter | <Willyboar> Crystal has 2-3 |
16:39:31 | FromGitter | <Willyboar> :) |
16:39:41 | dom96 | clyybber, we certainly can, but there are always more important things to be done |
16:39:41 | FromGitter | <alehander92> yeah |
16:39:59 | FromGitter | <alehander92> maybe: on the other hand big monolith frameworks are not as popular these days |
16:40:07 | FromGitter | <alehander92> but still one would be useful |
16:40:27 | clyybber | dom96: Yeah of course. I just meant to say that its something relatively important. |
16:40:32 | FromGitter | <alehander92> thats another posibility for `http`: i mostly wanted to port some `rails`/`phoenix` ideas there |
16:40:43 | dom96 | clyybber, relative to what? |
16:40:58 | planetis[m] | !github html_dsl |
16:40:59 | disbot | https://github.com/juancarlospaco/nim-html-dsl -- Nim HTML DSL |
16:41:01 | disbot | https://github.com/stisa/zircon -- Basic DSL for Html, in nim |
16:41:05 | FromGitter | <alehander92> on the other hand, it might be interesting to look at `rust` frameworks |
16:41:24 | FromGitter | <Willyboar> i didn't play with rust |
16:41:25 | FromGitter | <alehander92> planetis[m] karax can be used as well on server side |
16:41:45 | clyybber | dom96: Relative to other things to do on the stdlib, like new features/modules |
16:41:57 | planetis[m] | nice |
16:42:47 | FromGitter | <Willyboar> I would love to help where i can if we can make a team |
16:42:55 | FromGitter | <nixfreakz_twitter> Phoenix is a very well maintain web framework , but also took years to create and a ton of help |
16:43:13 | FromGitter | <alehander92> absolutely agree |
16:43:17 | dom96 | clyybber, we've already got a supposedly faster json module though |
16:43:20 | dom96 | it's in Nimble |
16:43:25 | FromDiscord | <onelivesleft> Macro question; can you have a macro which looks like this: var foo = bar: ...followed by a block of statements. The macro, bar, would run on the block of statements, and the result be assigned to foo |
16:43:28 | FromGitter | <alehander92> maybe the most important thing around such a frmework would be the community |
16:43:53 | FromGitter | <nixfreakz_twitter> Most people don't even know of Nim is , so give it time I'm sure someone will come up with an amazing web framework for nim besides Jester |
16:44:17 | * | dddddd joined #nim |
16:44:28 | FromGitter | <alehander92> i agree |
16:44:32 | FromGitter | <nixfreakz_twitter> dom96 needs to scribe and write a new book for jester alone (: |
16:44:40 | clyybber | dom96: Yeah, maybe we should replace the old stdlib implementation with it? |
16:44:43 | FromGitter | <alehander92> i think one good option would be to just make a new one incorporating |
16:45:03 | FromGitter | <alehander92> many existing ideas from rails/phoenix just to showcase they can be implemented with nim metaprogramming |
16:45:14 | narimiran | leorize: either i don't know how to use it, or :NimTypeOf doesn't do anything on my machine :) |
16:45:18 | FromGitter | <Willyboar> I agree @alehander92 . Under a new organization |
16:45:39 | dom96 | clyybber, maybe. In any case, my point is we shouldn't be basing a decision to spend a lot of resources optimizing something just because there is a single benchmark out there saying that it's slow |
16:46:02 | dom96 | if it's actually slow to someone that has a practical use case then it's very important |
16:46:10 | planetis[m] | hi alehander92, I was wondering if these libs are different than karax |
16:46:12 | FromGitter | <alehander92> @Willyboar yeah: however i am not sure if people would like the "design first" idea, maybe it sounds impractical |
16:46:18 | FromGitter | <nixfreakz_twitter> unless a webapp or services is actually needed for "real-time" does it matter the speed? |
16:46:24 | FromGitter | <alehander92> one thing i imagine is making 1-2 nice examples |
16:46:35 | disruptek | any use of json is affected and there are many, many practical uses of json. |
16:46:37 | FromGitter | <alehander92> similar to the `make a medium clone` / `other mvc clone` examples |
16:46:48 | clyybber | dom96: The existance of alternate faster implementations is more or less proof that our stdlib json is too slow |
16:46:56 | FromGitter | <alehander92> so we can compare how would this framework look compared to those others |
16:47:00 | FromGitter | <Willyboar> The think is that this frameworks grows communities |
16:47:09 | FromGitter | <alehander92> to make sure the supposed design would seem nice |
16:47:10 | FromGitter | <nixfreakz_twitter> which one ? |
16:47:12 | clyybber | My point is: The stdlib should either provide the "best" implementation or none at all IMO. |
16:47:22 | FromGitter | <alehander92> this supposed new framework |
16:47:23 | planetis[m] | onelivesleft: totally possible |
16:47:24 | FromGitter | <Willyboar> ruby community grows because of rails |
16:47:38 | FromDiscord | <onelivesleft> ty |
16:47:44 | disruptek | when you pay by the 1/10th of a second to run nim code, then yes, it matters how fast it is. |
16:47:58 | FromGitter | <nixfreakz_twitter> then put sometime into Jester and make it grow (: |
16:48:16 | FromGitter | <alehander92> i think jester is more like sinatra/flask |
16:48:16 | FromGitter | <nixfreakz_twitter> you can't expect these devs to do everything do you? |
16:48:19 | FromGitter | <alehander92> but i might be wrong |
16:48:29 | FromGitter | <nixfreakz_twitter> it is like sinatra |
16:48:29 | FromGitter | <Willyboar> yes jester is like sinatra |
16:48:29 | FromGitter | <alehander92> @nixfreakz_twitter who are you addressing this to? |
16:48:34 | FromGitter | <Willyboar> not flask |
16:48:40 | FromGitter | <nixfreakz_twitter> @Clyybber |
16:48:53 | FromGitter | <Willyboar> i think flask is someone in the middle |
16:49:19 | FromGitter | <nixfreakz_twitter> I like nimwc right now |
16:49:20 | clyybber | nixfreak_twitter: ? Your message is empty |
16:49:23 | FromGitter | <alehander92> i just think somebody can PR `json` stdlib if the need is there |
16:49:40 | planetis[m] | just the macro should generate ``result = newTree(nnkStmtListExpr, newVarStmt(tmp, something), body, tmp)`` |
16:49:44 | clyybber | yeah, its just a matter of time :) |
16:50:01 | * | Hideki_ joined #nim |
16:50:16 | FromGitter | <Willyboar> nimwc is kind of CMS |
16:50:34 | dom96 | clyybber, I also disagree with that :) |
16:50:38 | FromGitter | <nixfreakz_twitter> @Willyboar kind of , more like a static generator |
16:50:52 | dom96 | It's not always easy to provide the "best" implementation, it's not even always clear what the "best" implementation is. |
16:50:56 | FromGitter | <nixfreakz_twitter> @Willyboar but it has the potential to become a framework |
16:51:36 | FromGitter | <nixfreakz_twitter> Thats why speed doesn't matter unless the app or service is in "real-time" |
16:51:40 | FromGitter | <Willyboar> I think it is differerent than framework |
16:52:02 | FromGitter | <nixfreakz_twitter> @Willyboar it is I'm saying it has the potential to become a good framework |
16:52:10 | disruptek | time is money. it /does/ matter. |
16:52:12 | planetis[m] | onelivesleft: ^ |
16:52:17 | FromGitter | <nixfreakz_twitter> It already has plugin capabilities |
16:52:24 | FromGitter | <Willyboar> I think is more than a framework |
16:52:41 | clyybber | dom96: Of course, thats why I wrote it in `"`, let me rephrase it as: "We should strive to make our implementation as good as possible" |
16:52:51 | disruptek | poor performance is heat, and heat is money. |
16:52:52 | clyybber | And I'm sure you'll agree on that :) |
16:53:32 | dom96 | Sure, but that's a vague statement :) |
16:55:58 | FromGitter | <Willyboar> @alehander92 i must leave now. You can send me to talk about it if you want. |
16:57:04 | disruptek | narimiran: porting nim.cfg fixes to 1.0? |
16:57:24 | narimiran | disruptek: which one(s)? link or something please |
16:58:03 | disruptek | on a cell, but its my only recent PRs. |
16:58:06 | narimiran | btw, 1.0.4beta will be ready in a day or two, so if anybody wants to test it, let me know |
16:59:10 | narimiran | disruptek: this one? https://github.com/nim-lang/Nim/pull/12611 |
16:59:35 | * | tane joined #nim |
17:00:32 | shashlick | How about back porting --clearNimbleDir |
17:00:37 | narimiran | it wasn't marked with `[backport]`, so it'll be backported if Araq gives a green light |
17:00:37 | disruptek | that one and #12609 |
17:00:38 | disbot | https://github.com/nim-lang/Nim/issues/12609 |
17:00:38 | disbot | ^ add --clearNimblePath; fixes #12601 |
17:01:16 | narimiran | the same applies: i need some approval for both of them |
17:01:34 | narimiran | but if shashlick is for it, that already counts as a good candidate :) |
17:05:16 | * | Hideki_ quit (Ping timeout: 240 seconds) |
17:15:00 | leorize | narimiran: then it's probably a bug |
17:15:39 | leorize | I might actually used nimsuggest's `con` command the wrong way :P |
17:23:51 | * | nsf joined #nim |
17:28:03 | * | floppydh quit (Quit: WeeChat 2.6) |
17:42:11 | * | Trustable quit (Remote host closed the connection) |
17:48:58 | * | shadowbane joined #nim |
17:54:01 | * | Kaivo quit (Quit: WeeChat 2.6) |
17:59:05 | * | shadowbane quit (Quit: Konversation terminated!) |
18:03:17 | * | shadowbane joined #nim |
18:09:26 | * | shadowbane quit (Quit: Konversation terminated!) |
18:10:00 | * | leorize quit (Ping timeout: 260 seconds) |
18:11:40 | * | ITChap joined #nim |
18:12:13 | * | shadowbane joined #nim |
18:19:32 | * | GordonBGood joined #nim |
18:23:17 | * | njoseph quit (Ping timeout: 276 seconds) |
18:23:38 | * | GordonBGood quit (Ping timeout: 240 seconds) |
18:23:53 | madprops | having some weird problem https://play.nim-lang.org/#ix=22hs |
18:24:06 | madprops | if i do this. `vars` is not available in the main file for some reason |
18:24:14 | madprops | but if i echo `vars` in `get_vars` it works fine |
18:25:02 | clyybber | call get_vars |
18:25:07 | clyybber | and then echo |
18:25:08 | madprops | i call get_vars |
18:25:14 | clyybber | Hmm |
18:25:33 | * | GordonBGood joined #nim |
18:25:47 | Zevv | what is your file called? vars.nim? |
18:25:52 | madprops | yea |
18:25:55 | Zevv | :( |
18:25:59 | madprops | ohhhhhhh |
18:26:02 | clyybber | thats why :) |
18:26:12 | Zevv | I hate that, it happens to me again and again |
18:26:45 | * | njoseph joined #nim |
18:27:17 | clyybber | same |
18:32:30 | * | GordonBGood quit (Ping timeout: 265 seconds) |
18:44:18 | * | kungtotte joined #nim |
18:44:46 | * | jjido joined #nim |
18:45:23 | * | uu91 quit (Ping timeout: 250 seconds) |
18:46:26 | * | uu91 joined #nim |
18:55:47 | * | leorize joined #nim |
18:57:05 | FromDiscord | <mratsim> it doesn't happen to me anymore but yeah +1 |
18:57:25 | FromDiscord | <mratsim> when you try to debug static and you call you file static 😉 |
19:02:23 | * | tiorock joined #nim |
19:02:23 | * | rockcavera is now known as Guest28628 |
19:02:23 | * | tiorock quit (Changing host) |
19:02:23 | * | tiorock joined #nim |
19:02:23 | * | Guest28628 quit (Killed (cherryh.freenode.net (Nickname regained by services))) |
19:02:23 | * | tiorock is now known as rockcavera |
19:04:53 | * | sagax quit (Quit: Konversation terminated!) |
19:04:57 | * | noonien joined #nim |
19:13:53 | * | krux02 joined #nim |
19:21:42 | lqdev[m] | but, `vars` is not a reserved word is it? |
19:27:04 | clyybber | no |
19:27:41 | clyybber | but that isn't the problem. The problem is that when you import vars, vars is gonna be a Module and will shadow other variables called vars |
19:27:55 | lqdev[m] | oh. |
19:28:07 | lqdev[m] | yeah, happened to me, too. |
19:28:47 | * | nsf quit (Quit: WeeChat 2.6) |
19:29:03 | lqdev[m] | still happens to me sometimes when I try to create a new project using rapid, I import `rapid/gfx`, and create a variable named `window`. except, there already *is* a module named `window`, so I call the var `win` |
19:29:17 | clyybber | yeah |
19:41:17 | * | ITChap quit (Ping timeout: 250 seconds) |
19:44:58 | * | adeohluwa joined #nim |
19:51:26 | * | bacterio joined #nim |
19:51:26 | * | bacterio quit (Changing host) |
19:51:26 | * | bacterio joined #nim |
19:51:58 | * | prometheus joined #nim |
20:06:28 | * | ITChap joined #nim |
20:06:44 | * | ITChap quit (Client Quit) |
20:11:54 | * | ITChap joined #nim |
20:34:01 | * | krux02 quit (Remote host closed the connection) |
20:35:01 | * | ITChap quit (Quit: ITChap) |
20:50:16 | madprops | is there a way to do what "cd" does? |
20:50:22 | madprops | i want to change the user's path in the terminal |
20:50:35 | madprops | setCurrentDir just does it internally it seems |
20:51:06 | clyybber | setEnv ? |
20:51:12 | clyybber | $CWD |
20:51:37 | clyybber | nevermind |
20:52:39 | clyybber | madprops: I think you may have to execute cd |
20:52:58 | clyybber | Because usually cd is implemented by the shell itself |
20:53:04 | madprops | ah ok |
20:55:27 | madprops | this didn't work: execCmd(&"cd {path.path}") |
20:55:37 | madprops | probably changes it internally |
20:55:56 | shashlick | That's just for the current cmd instance |
20:56:05 | shashlick | Once that subprogram ends, it's done |
20:56:24 | shashlick | Are you in nimscript? |
20:56:32 | madprops | it's a normal nim program |
20:57:54 | madprops | maybe there's no way.. |
20:58:45 | FromGitter | <Vindaar> madprops: what are you trying to do exactly? |
20:59:17 | madprops | im making a tagging system, which tags paths. i give each path an id. So i want the user to be able to do 'goto 22' and cd to that path |
21:00:08 | * | tane quit (Quit: Leaving) |
21:00:46 | FromGitter | <Vindaar> and what do you want to do once a path is selected by the user? |
21:01:01 | madprops | just change the termina (cd) to the path |
21:01:17 | madprops | kinda like 'z' does if you know what that is. but that's a bash script |
21:01:30 | FromGitter | <Vindaar> ah, so your program acts as a CLI and changes the path of the shell the user is in? |
21:01:48 | madprops | pretty much |
21:02:15 | FromGitter | <Vindaar> I guess in that case it's a question of the shell allowing that and not Nim |
21:02:36 | * | Hideki_ joined #nim |
21:02:41 | shashlick | you are trying to change the current directory of a parent process |
21:02:52 | shashlick | i don't think that is possible |
21:03:00 | madprops | i guess my only option is setting up some env variable and let the user use that |
21:03:24 | shashlick | even env vars won't work once your process exits since they don't propagate to parents |
21:04:00 | madprops | check this https://www.geeksforgeeks.org/chdir-in-c-language-with-examples/ |
21:04:00 | shashlick | i wrote a fzf wrapper for windows and in my case, i had to spawn a new process |
21:04:10 | madprops | somehow that c function is able to do it |
21:04:16 | * | narimiran quit (Ping timeout: 240 seconds) |
21:04:39 | shashlick | note how once the program exits, the shell is still in the same dir |
21:04:47 | madprops | oh wait |
21:04:49 | madprops | yeah |
21:04:51 | madprops | i misread |
21:05:45 | shashlick | bash might allow this since you are in the same process in theory |
21:05:59 | shashlick | if you source scriptfile |
21:06:06 | shashlick | but if you run bash scriptfile, it won't |
21:07:05 | * | Hideki_ quit (Ping timeout: 250 seconds) |
21:09:34 | * | Trustable joined #nim |
21:11:14 | FromDiscord | <itmuckel> Hey guys! What libraries do you use to load images for opengl usage? I used SDL2/SDL2_Image to load images and display them before, but now I want to use shaders and need to move to OpenGL only. I still use SDL2 to create the context though. |
21:12:13 | FromDiscord | <itmuckel> Or is there a better library for my purposes I don't know about? 🤔 |
21:13:27 | clyybber | shashlick, madprops: It must be possible somehow. |
21:13:40 | clyybber | Because nnn succeeds in doing it |
21:15:20 | FromGitter | <dumjyl> they use shell functions. simplified: `foo() { cd my_nim_program }`. Look at how autojump works. |
21:16:38 | * | NimBot joined #nim |
21:17:21 | FromDiscord | <Generic> itmuckel: sdl image can also be used with opengl and it's not a bad choice |
21:17:56 | FromDiscord | <Generic> though if you want something more lightweight and you don't necessairly need for example jpeg |
21:18:59 | FromDiscord | <Generic> you can try stb_image(which now as I'm thinking about it does support jpeg) |
21:19:00 | clyybber | dumjyl, madprops, shashlick: Aah, nnn cheats. It just spawns a new shell |
21:19:24 | madprops | oh lol |
21:20:46 | clyybber | but what dumjyl said should work. |
21:23:28 | * | Simerax joined #nim |
21:24:21 | FromDiscord | <itmuckel> @Generic Oh man thanks! Googling SDL_Surface to opengl texture gave me exactly what I wanted. stb_image sounds nice too, but I think SDL2_Image is lightweight enough. 🙂 |
21:24:23 | clyybber | And apparently you can use gdb to hack it somehow |
21:24:46 | clyybber | madprops: Do what dumjyl said, but for your reading pleasure: https://stackoverflow.com/questions/2375003/how-do-i-set-the-working-directory-of-the-parent-process |
21:26:35 | * | tklohna quit (Ping timeout: 252 seconds) |
21:28:26 | * | filcuc joined #nim |
21:29:14 | * | adeohluwa quit (Ping timeout: 240 seconds) |
21:30:07 | madprops | im trying to just echo path. but can't seem to make it pipeable |
21:30:13 | madprops | tags 22 | cd |
21:30:23 | madprops | "SIGPIPE: Pipe closed." |
21:30:35 | clyybber | Because cd doesnt read from pipe |
21:30:41 | madprops | oh |
21:30:53 | clyybber | You have to do command substitution |
21:43:40 | * | ITChap joined #nim |
21:50:38 | FromGitter | <alehander92> @Willyboar thanks i will if i think of soemthing |
21:50:55 | * | ITChap quit (Quit: ITChap) |
21:55:07 | * | filcuc quit (Quit: Konversation terminated!) |
21:56:10 | * | filcuc joined #nim |
21:58:55 | FromGitter | <Willyboar> Do you live in Bulgary? |
21:58:56 | FromGitter | <xmonader> guys if ur company wants to have ur open source project under its organization and doing some relicensing.. what is the proper response? also how to make sure u have all the rights if that move happen? |
21:59:59 | FromGitter | <s0kil> Turns out nimsuggest is mining crypto in the background |
22:01:49 | clyybber | nimble install funding :p |
22:02:58 | FromGitter | <s0kil> I would not mind that compared to burning CPU cycles in vain |
22:03:41 | * | uu91 quit (Ping timeout: 246 seconds) |
22:05:20 | * | uu91 joined #nim |
22:07:51 | FromDiscord | <Solitude> who is in the wrong? |
22:07:51 | FromDiscord | <Solitude> https://cdn.discordapp.com/attachments/371759389889003532/646471720487878656/unknown.png |
22:09:17 | FromGitter | <Willyboar> @xmonander welcome back. I think you are describe a very complicated situation. |
22:09:22 | FromDiscord | <itmuckel> 😄 |
22:09:38 | FromDiscord | <itmuckel> @Solitude 😄 |
22:13:09 | FromGitter | <xmonader> @Willyboar thank you it's still some rough days at work :( |
22:14:15 | FromGitter | <xmonader> Yeah it's very complex indeed, not sure the correct way to react. |
22:15:24 | FromGitter | <Willyboar> My advise is to don't do nothing but keep records like photos that proves repos is yours |
22:17:44 | * | solitudesf quit (Ping timeout: 265 seconds) |
22:18:00 | FromDiscord | <Winton> https://www.youtube.com/watch?v=Iro4l0bMBb4&list=PLvxZJTnSXMLrCF9lXyg8D5kxTlXjwPsHE |
22:19:12 | FromGitter | <Willyboar> nice! |
22:24:21 | * | leorize quit (Remote host closed the connection) |
22:24:58 | * | leorize joined #nim |
22:27:53 | FromGitter | <alehander92> @Willyboar yes |
22:28:04 | FromGitter | <alehander92> i am indeed, how did you know |
22:28:25 | FromGitter | <Willyboar> From your profile here |
22:28:35 | FromGitter | <alehander92> ah it probably writes sofia |
22:28:42 | FromGitter | <alehander92> yea |
22:28:43 | FromGitter | <Willyboar> I am a little southern |
22:28:56 | FromGitter | <alehander92> no green hair tho, black hair and a beard |
22:29:00 | FromGitter | <alehander92> simpler time today |
22:29:47 | FromGitter | <Willyboar> I am from Greece |
22:29:57 | FromGitter | <alehander92> nice |
22:30:10 | FromGitter | <alehander92> i just ate greek food eariler |
22:30:33 | FromGitter | <Willyboar> gyro? |
22:30:34 | FromGitter | <alehander92> good memories from naxos as well |
22:30:42 | FromGitter | <alehander92> well .. gyro of course :P |
22:30:47 | FromGitter | <Willyboar> naxos is great |
22:31:13 | FromGitter | <Willyboar> but i lived 2 years in ikaria in the past |
22:31:55 | FromGitter | <Willyboar> Gyros is nice with a ton of tzatziki :) |
22:32:19 | FromGitter | <alehander92> looks great |
22:32:30 | FromGitter | <alehander92> amazing how many islands you ahve |
22:32:50 | FromGitter | <alehander92> yeah, i like the paprica ones |
22:33:02 | FromGitter | <alehander92> but honestly stills struggle to remember the different greek salad names |
22:33:11 | FromGitter | <alehander92> doners are simpler, they're like iphones |
22:33:18 | FromGitter | <alehander92> you get only one configuration with different sizes |
22:33:28 | FromGitter | <alehander92> (said oversimpified :P) |
22:33:52 | clyybber | doener is my main source of nutrition :D |
22:34:27 | Araq | er ... we have a faster base64 module now in the stdlib... and my packedjson module could be faster too |
22:34:37 | FromGitter | <alehander92> clyybber gyro is kinda similar, but different, i'd say more interesting in taste |
22:35:31 | clyybber | yeah, here in germany doener is much more common though |
22:35:32 | FromGitter | <Willyboar> you must try club sandwich with gyro |
22:35:50 | clyybber | and there are some variations of doener here too |
22:35:55 | FromGitter | <alehander92> clyybber it was like that here before, but honestly greek fast food is making a comeback here imo |
22:36:05 | Araq | but if you want to compare speeds, maybe compare languages not stdlibs... dude... |
22:36:22 | FromGitter | <alehander92> the doeners in germany seem a bit blander to me, but still tasty |
22:36:35 | clyybber | they were invented here :p |
22:36:44 | clyybber | dunno, maybe youve been to the wrong ones |
22:36:56 | FromGitter | <alehander92> Araq the point was that if 90% of people just use the stdlib, nobody would start analyzing if the problem is there or in the language |
22:37:31 | FromGitter | <alehander92> clyybber also possible |
22:37:32 | Araq | the tests obviously test the stdlib |
22:37:51 | Araq | "90% of people do crap" is not an argument for anything |
22:38:00 | FromGitter | <alehander92> i am still sad that bulgaria didnt manage to have its own breakthrough international fast food |
22:38:09 | FromGitter | <alehander92> maybe balkan banitsa is close |
22:38:24 | FromGitter | <alehander92> Araq well, no, it is |
22:39:09 | Araq | "blah blah blah in practice C code is full of malloc/free and so I cannot use it for embedded development" |
22:39:25 | Araq | see the problem with this line of reasoning? |
22:39:29 | Araq | it's wrong. |
22:40:39 | Araq | yes there is average code. and then there is code where you squeeze out every cycle. and when you do the "average code" is irrelevant |
22:41:09 | Araq | and yes when you have to do this different programming patterns emerge |
22:41:38 | Araq | and it might mean not to use glib's super slow two phase destruction logic with atomic refcounting |
22:41:46 | FromGitter | <alehander92> yeah, i just see it as an argument that sometimes stdlib modules can shape subjectively the people feelings about a language |
22:41:49 | * | Trustable quit (Remote host closed the connection) |
22:42:24 | FromGitter | <alehander92> of course, in nim you can theoretically write everything you can in C with enough tweaking |
22:42:33 | FromGitter | <alehander92> its about the default thing |
22:43:08 | Araq | maybe it's time to educate ignorant programmers instead of bending over all the time for the average joe |
22:43:09 | FromGitter | <alehander92> not a big deal, i was just agreeing with the more general speed-is-subjective thing |
22:43:44 | clyybber | but speed is not subjective? |
22:43:51 | clyybber | unless you are on a very fast ship :p |
22:44:09 | FromGitter | <alehander92> i mean that what people perceive as "language" speed is subjective |
22:44:20 | Araq | if you want to measure json parsing, say so. don't pretend that you're measure programming languages. ffs. |
22:44:29 | FromGitter | <alehander92> you cant expect people to profile everything they use |
22:44:36 | FromGitter | <alehander92> it already happened so many times before |
22:44:41 | FromGitter | <alehander92> with java and other langs |
22:44:54 | FromGitter | <alehander92> people see that some kind of software in them is slow in some situation |
22:44:59 | FromGitter | <alehander92> and bam, "java is heavy and slow" |
22:45:00 | clyybber | You can expect someone writing an article to know his shit though. And this fellow didn't |
22:45:02 | FromGitter | <alehander92> nobody cares |
22:45:05 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:45:10 | FromGitter | <alehander92> about "but if you do this smar thing" |
22:45:15 | Araq | I can expect people to not be utter morons at their job. |
22:45:20 | FromGitter | <Willyboar> where did you read that? |
22:45:48 | FromGitter | <alehander92> but i cant understand what is "moronic" about it |
22:46:05 | FromGitter | <alehander92> this "lets all talk like linus about how very smart we are" is tiring sometimes |
22:46:39 | Araq | not as tiresome as your gibberish |
22:46:43 | FromGitter | <alehander92> i dont expect from normal users to start analyzing my whole ecosystem to see what and why is fast |
22:46:53 | FromGitter | <alehander92> its about impressions |
22:46:56 | Araq | "Normal users"? |
22:47:41 | Araq | so ok, I get it, nowadays nobody understands what a library is and what a language implementation is. great. |
22:47:52 | clyybber | alehander92: But why? If people want performance they should analyze. |
22:48:20 | clyybber | Thats like saying: "I don't want people to think about the problem they wish to solve" |
22:48:21 | FromGitter | <alehander92> average users |
22:48:31 | clyybber | Broad generalization |
22:48:45 | FromGitter | <alehander92> but i am talking about something completely different |
22:48:50 | clyybber | Our users are programmers |
22:48:53 | FromGitter | <alehander92> probably my english is not good enough |
22:48:57 | FromGitter | <alehander92> to express my point |
22:49:15 | Araq | no, it's clear what you mean but it's a futile race to the bottom |
22:49:47 | FromGitter | <alehander92> for you and araq and me it might be obvious if `moduleX` is bottleneck and if thats because of its impl or of the language |
22:49:59 | FromGitter | <alehander92> but if you expect nim to has X new users |
22:50:12 | clyybber | Not everyone must use nim :) |
22:50:46 | clyybber | In fact Nim doesn't gain something from being used by people who are unwilling to think about the problems they wish to solve |
22:51:04 | FromGitter | <alehander92> for their first Y months its understandable to not always be aware of why is something slow, is there this hidden alternative module with 20 stars on github which does it quicker or if you need to do this other Z thing |
22:51:15 | Araq | look, if you *write* an article claiming to compare language implementations |
22:51:19 | FromGitter | <alehander92> this is valid for all langs not just nim |
22:51:20 | Araq | then better do so. |
22:51:44 | Araq | and don't hide behind "oh I actually don't understand what I'm doing" |
22:51:48 | FromGitter | <alehander92> clyybber but languages which are just used by people who are smart and willing to think very hard of problems are |
22:51:50 | FromGitter | <alehander92> "haskell" |
22:51:53 | FromGitter | <alehander92> good luck with that |
22:51:58 | FromGitter | <alehander92> oh maybe f* |
22:52:03 | Araq | Rust. |
22:52:04 | FromGitter | <alehander92> (like `F*`) |
22:52:16 | clyybber | alehander92: The point being? |
22:52:17 | FromGitter | <alehander92> rust is used by many "average" programmers as well |
22:52:28 | FromGitter | <alehander92> well my point is that you cant expect that |
22:53:01 | clyybber | Yes, of course we can't "expect" anything |
22:53:02 | FromGitter | <alehander92> and in rust is the same: probably many people tried something, they saw it didnt obviously work and they blamed the language |
22:53:07 | * | MarquisdeFalbala joined #nim |
22:53:07 | FromGitter | <alehander92> instead of e.g. the lib they used |
22:53:11 | clyybber | You can never "expect" anything from a stranger on the internet |
22:53:24 | clyybber | But we can critizice his assessment |
22:53:41 | Araq | not the point. if you write about something, anything really, there must be a minimum on knowledge involved. |
22:53:48 | Araq | *of |
22:54:11 | FromGitter | <alehander92> my point is that it might be a useful assesment because it probably describes better what a random newcomer might thing |
22:54:19 | FromGitter | <alehander92> it doesnt matter if its an artcile or not |
22:54:38 | FromGitter | <alehander92> we're not a journalism exam reviewers |
22:54:40 | clyybber | sure |
22:54:47 | clyybber | But it does matter if its an article or not |
22:54:59 | clyybber | Because if that user bothered to ask on IRC why his code is slow |
22:55:03 | FromGitter | <alehander92> i didnt even know its an article |
22:55:06 | clyybber | (which is not hard to do) |
22:55:17 | clyybber | (ok its a blog post I think) |
22:55:19 | FromGitter | <alehander92> so many people dont use irc |
22:55:25 | clyybber | discord |
22:55:26 | FromGitter | <alehander92> i didnt really use irc before starting with nim |
22:55:27 | clyybber | gitter |
22:55:35 | FromGitter | <alehander92> i didnt use any chats |
22:55:41 | FromGitter | <alehander92> i just searched google / stack overflow |
22:55:52 | FromGitter | <alehander92> and i still know *many* people who are just not used to the idea |
22:56:00 | FromGitter | <alehander92> they can just chat directly with lang communities |
22:56:14 | Araq | this is all besides the point |
22:56:15 | clyybber | my point is: write a blog post/open your mouth about stuff you know your shit about |
22:56:40 | FromGitter | <alehander92> but ok, if this was a github issue, not a blog post |
22:56:54 | FromGitter | <alehander92> ok |
22:57:27 | clyybber | a github issue is asking for help, thats a different thing then writing a blog post/article |
22:58:03 | Araq | even writing the article is fine if you say clearly what you are doing. you benchmark base64 and json handling |
22:58:10 | FromGitter | <alehander92> sorry, i didnt read it, i just thought that the "people can easily confuse tool/lib problem for a lang problem" to be very useful observation |
22:58:11 | clyybber | yeah |
22:58:22 | FromGitter | <alehander92> i dont care about that particular example |
22:58:46 | clyybber | alehander92: A discussion will never end well if one party argues non-concretely :) |
22:59:08 | FromGitter | <alehander92> and i also really want people to just convert their json to typed objects |
22:59:18 | clyybber | heh |
22:59:25 | FromGitter | <alehander92> and people just use json nodes |
22:59:29 | FromGitter | <alehander92> and thats very dynamic |
22:59:34 | FromGitter | <alehander92> are you in ruby-land people |
22:59:41 | FromGitter | <alehander92> ok silly rant over :P |
22:59:46 | Araq | as I said, arguing about the "average code out there" is problematic because the average is a race to the bottom |
23:01:43 | FromGitter | <alehander92> well, the nim web frameworks i know just import the stdlib json, so its a good argument |
23:02:05 | FromGitter | <Willyboar> Well i am a bad hobbyist programmer but i found nim wonderfull |
23:02:30 | FromGitter | <alehander92> there is proof that people might just use something directly not really bothering with benchmarking all possible options or chaning stuff whenever a faster lib appears |
23:02:39 | FromDiscord | <itmuckel> Hey, why can `addr()` not take addresses of let and const values? |
23:02:39 | Araq | alehander92: how is it a good argument? |
23:02:40 | FromGitter | <alehander92> and i dont say its bad i also use often `json` |
23:03:01 | clyybber | itmuckel: Because you could change their values that way |
23:03:13 | clyybber | And let and const are immutable |
23:03:15 | FromGitter | <alehander92> well it proves that even very experienced nim programmers sometime use not the fastest possible impl |
23:03:16 | FromDiscord | <itmuckel> Oh, yeah, makes sense! |
23:03:21 | FromGitter | <alehander92> which can make other nim libs slower |
23:03:35 | FromDiscord | <itmuckel> thx. 👽 |
23:03:41 | FromGitter | <alehander92> and make other newcomers think thats a nim property not a lib one |
23:03:55 | FromGitter | <alehander92> very far fetched, but in very small cases possible |
23:04:27 | Araq | and why is that an argument for anything? the same problem exists in every other language, including mystical C code that happens to use glib |
23:04:37 | FromGitter | <alehander92> i never said its just a nim problem |
23:04:54 | FromGitter | <alehander92> its an useful observation for any language ecosystem imo |
23:05:03 | clyybber | people are dumb, im westen nix neues |
23:05:21 | FromDiscord | <exelotl> @itmuckel const only exists at compile time (the value is substituted in during compilation) |
23:05:21 | FromDiscord | <exelotl> let variables technically do have an address. If you know what you're doing, you can get it with `unsafeAddr` |
23:06:16 | clyybber | Even const could theoretically have an address, with some section_ stuff in C afaik |
23:06:19 | clyybber | But it doesn't currently in Nim |
23:06:33 | FromDiscord | <exelotl> yeah I really need that actually clyybber |
23:06:40 | FromGitter | <alehander92> clyybber i am dumb as well, we're all dumb in slightly different ratios |
23:06:53 | FromDiscord | <exelotl> made a handful of posts about it, but I don't have the time and expertise to implement it myself right now |
23:07:04 | FromDiscord | <itmuckel> @exelotl Oh no, I don't want nothing to do with that. Just started with the opengl wrapper where I need to pass a lot of stuff as pointers while I'm used to declaring everything as const/let. 🙂 |
23:07:20 | clyybber | alehander92: Yeah, and thats why its fine to critizise each other :) |
23:08:09 | FromGitter | <alehander92> we're not even rocket surgeons man |
23:08:17 | FromGitter | <alehander92> what are we talking about at all |
23:08:25 | FromDiscord | <itmuckel> I love the internet |
23:08:26 | FromDiscord | <itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/646486967625973800/unknown.png |
23:15:35 | * | filcuc quit (Quit: Konversation terminated!) |
23:18:37 | Araq | Nim doesn't give you performance. It gives you the tools to get performance. We already know that Python can beat Nim easily when it uses optimized C code under the hood |
23:19:41 | Araq | but not everything is a web app with business logic pumping json around until it ends up in a database. |
23:20:49 | madprops | gotta love the fact that nim is compiled. thought about doing some python script .. the dependencies would be over 100mb |
23:21:09 | Araq | Nim was created to replace the common Python/C combo with a single language because mixed language programming is a pita |
23:22:14 | madprops | i wish nim makes it. get better and widely relevant. it's a great language |
23:23:14 | FromDiscord | <itmuckel> I can guess that the answer is no, but I'll ask anyway. Can this be done without introducing the extra variable, preferably in one line? |
23:23:14 | FromDiscord | <itmuckel> |
23:23:14 | FromDiscord | <itmuckel> let shaderSource = allocCStringArray(vertexSource) |
23:23:15 | FromDiscord | <itmuckel> glShaderSource(vertexShader, 1, shaderSource, nil) |
23:23:15 | FromDiscord | <itmuckel> deallocCStringArray(shaderSource) |
23:24:42 | Araq | nowadays you can do this with a custom cstringArray that has an attached destructor. |
23:26:50 | clyybber | Which is more than one line :P, so no itmuckel |
23:27:11 | FromDiscord | <itmuckel> 🤪 |
23:27:33 | clyybber | But you can indeed do it without the extra variable |
23:27:43 | clyybber | THough behind the scenes it will still exist :p |
23:28:42 | FromDiscord | <itmuckel> Well, I stopped reading "Nim in Action" pretty early, so I didn't make it to all the interesting stuff (templates, macros). Gotta finish it.... |
23:28:44 | FromDiscord | <itmuckel> 😄 |
23:29:41 | clyybber | just learn by doing :) |
23:31:50 | FromDiscord | <itmuckel> Well without some theory behind it, it's just trial and error. At some point I have to read some concepts. |
23:34:27 | FromDiscord | <itmuckel> I wonder how many million times the same opengl code has been written to compile shaders, load images, check errors. And how many hundred different abstractions have been written for it. 🤔 |
23:36:44 | clyybber | oh |
23:37:38 | clyybber | Did you ever hear the tragedy of the stupid amount of boilercode required with vulkan? |
23:39:07 | FromDiscord | <itmuckel> No, is it possible to learn this power? |
23:40:09 | clyybber | Not from a jedi |
23:40:19 | clyybber | unfortunately I am not a jedi |
23:40:23 | clyybber | so yes |
23:42:13 | FromDiscord | <itmuckel> Writing shaders is low level enough for my purposes. 😉 |
23:43:00 | Araq | check out fancygl please |
23:43:17 | FromDiscord | <itmuckel> |
23:43:17 | FromDiscord | <itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/646495731187843073/hF057D1BD.jpg |
23:43:46 | Araq | it compiles Nim code to shaders |
23:46:13 | * | abm joined #nim |
23:46:32 | FromDiscord | <itmuckel> I put it on my watchlist, thanks for the tip! |
23:49:00 | FromDiscord | <Rika> I went into templating and macros knowing barely anything and I've made some pretty crazy dumb macros |
23:56:54 | * | Simerax quit (Remote host closed the connection) |