<< 19-11-2019 >>

00:07:31*Hideki_ joined #nim
00:12:19FromDiscord<exelotl> I'm not a physics student but I watched the latest kurzgesagt so I'm basically an expert
00:12:38FromDiscord<exelotl> what you need is a spinning tether in the atmosphere
00:13:07FromDiscord<exelotl> on your way up, you simply catch the tether and it flings you to the moon
00:14:10FromDiscord<Rika> LMAO
00:21:23*Hideki_ quit (Remote host closed the connection)
00:22:47*Hideki_ joined #nim
00:23:37disruptek!github sealmove/
00:23:38disbothttps://github.com/sealmove/nimitai -- Implementation of Kaitai Struct as a compile-time library in Nim
00:23:38disbothttps://github.com/sealmove/hexalepis -- Raw byte manipulation 👑
00:23:39disbothttps://github.com/sealmove/xhronicle -- Xonsh History Frontend
00:24:21disruptekwhere'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:46FromGitter<kayabaNerve> ```code paste, see link``` ⏎ ⏎ Anyone here have any ideas? [https://gitter.im/nim-lang/Nim?at=5dd34895e75b2d5a19fa2587]
01:47:26FromGitter<s0kil> @kayabaNerve Code?
01:56:41FromGitter<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:12madpropsis there a way to delete an item(s) by value name in a seq?
02:44:18madpropslike myseq.remove("someString") ?
02:44:24madpropsapart 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:05FromGitter<TensorTom> does the db_mysql module prepare sql query strings to prevent injection?
03:21:32FromGitter<TensorTom> or any module cool kids might be using
03:36:06leorizedb_* family prepares sql queries
03:36:36leorizecool kids modules include: ormin, ndb and norm
03:36:42leorizethey don't support mysql though
03:40:02disruptek!github ormin
03:40:03disbothttps://github.com/Araq/ormin -- Ormin -- An ORM for Nim.
03:40:14disruptekhave fun with the docs.
03:40:35shashlickdocs?
03:41:23disruptekwe don need no steenking docs!
03:51:46leorizedisruptek: any list of commands for disbot?
03:52:11disrupteknot yet.
03:53:41disrupteki am out for the week but maybe when i get back.
03:53:56disruptekbeen working on nimph mostly.
03:57:32disruptekgonna write a bayes filter for pmunch, i guess. maybe something for RFCs and PRs like we have for issues.
03:58:11disruptekmaybe a docs search command, but probably will wait until ndoc for that.
04:00:04madpropshow can i get "from index 2 onwards" on a seq?
04:00:06disruptekwill probably put a feed in #nim-news or something; just new package links, new issues, PRs, etc.
04:00:33disruptekaseq[2..^1]
04:01:01disruptekthat was a pita to type with thumbs.
04:01:14madpropslol, thanks
04:01:25disrupteknp
04:01:39disruptek!github madprops/
04:01:40disbothttps://github.com/madprops/dirfun -- Experimental directory and file creator
04:01:40disbothttps://github.com/madprops/nimbars -- Create bar charts in the terminal based on data files
04:01:41disbothttps://github.com/madprops/nap -- Nim Argument Parser
04:02:03madpropshow is this getting indexed?
04:02:24disruptekbeats the hell outta me.
04:02:44disruptekthe internet is a fucking miracle, i tell you.
04:02:51madpropsi love it
04:04:54disrupteki bet itd be too hard to have nimsuggest warn about nim 1.0 syntax in nim 1.1 source.
04:07:33shashlickdisruptek - i have a channel that collects all instances of nim in the forum, reddit and stack overflow
04:07:41shashlickmight be nice to put that into irc
04:08:17disruptekgood idea.
04:08:28disrupteki would watch that show.
04:08:46shashlickof course i can make it look nice in slack from rss, irc is more limited
04:09:25disruptekzevv says rainbow brite can kiss his noodle.
04:09:47disruptekactually, what he said was both more and less colorful.
04:12:41disrupteki will add issue search, too. that's about all i need, so far, anyway.
04:14:27madpropshow can i iterate over nre captures ?
04:14:47disruptekindex .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:23FromGitter<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:25FromGitter<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:18Zevvdisruptek: go wash your mouth dud
07:19:48Zevvdon't make my terminal light up all yellow with your nonsense!
07:20:17*Hideki_ quit (Ping timeout: 250 seconds)
07:21:06Zevvlook what you did! http://zevv.nl/div/bah.png
07:22:02*filcuc quit (Ping timeout: 240 seconds)
07:25:20FromGitter<zacharycarter> how can kissing rainbow brite's ass be any less colorful than I am imagining?
07:27:33FromDiscord<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:32FromGitter<zacharycarter> irssi is pretty popular
07:35:12*miran joined #nim
07:36:15Zevvtui things generally dont have a look or a style
07:36:24Zevvwhich is part of their strength
07:36:54Zevvits just a f.+load of letters crammed in a rectangle
07:39:25*miran quit (Quit: leaving)
07:40:23leorizenarimiran: I've pushed the new NimTypeOf to the 'con' branch in nim.nvim, please give it a test drive
07:40:48leorizeIt's still a WIP, and there are a few compiler bugs that may manifest via it
07:40:50*PMunch joined #nim
07:41:31Zevvleorize: whats that?
07:43:44leorizeZevv: https://asciinema.org/a/JbWzKxkwCUjHlaxHle76SrP74
07:44:54Zevvdude enough is enough
07:45:16Zevvpeople will want to leak vscode if you keep that nonsense up
07:45:41Zevvimagine, araq moving to vim
07:47:34leorizelol
07:47:46leorizealthough I'll have to say that the feature is currently buggy as hell :p
07:47:55narimiranleorize: thanks, i'll give it a try
07:49:15zedeusnim-mode also shows a preview of the documentation
07:50:07leorizethat's also possible here once I'm done wiring everything
07:51:05leorizeit currently exists in autocompletion, but no support for showing it for a given symbol (yet)
07:58:31Araqso 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:06FromGitter<zacharycarter> with the new gc / runtime? or in general?
08:04:03Araqhmm on osx it actually works
08:04:10*jjido joined #nim
08:04:20Araqnim c --gc:arc -r tests/async/tasyncawait.nim
08:04:33Araqmilestone reached!
08:04:44*gmpreussner joined #nim
08:04:48FromGitter<zacharycarter> nice
08:04:50Araqcrashes on Windows though :P
08:05:16narimiranwho uses windows? :P
08:05:43FromGitter<zacharycarter> everyone that matters
08:05:53*jjido quit (Client Quit)
08:06:08narimirannah, he also has a mac
08:06:30FromGitter<zacharycarter> well good, I have a mac too
08:06:41FromGitter<zacharycarter> windows is a PITA at times though for sure
08:07:36narimiran*everything* is a PITA from time to time ;)
08:08:01FromGitter<zacharycarter> truth
08:08:38AraqAraq's OS is coming. but disruptek can't use it as it lacks symlinks
08:09:36narimiranwill it have a package manager? :D
08:09:49Araqnah
08:10:16Araqit 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:08ZevvAraq: wow congrats!
08:27:34Zevvnext is to compile nim itself with arc, right? :)
08:33:29AraqZevv, no because it's not the right GC for Nimc, Nimc loves mark&sweep
08:33:31FromGitter<gogolxdong> What's it like?
08:33:53PMunchWell 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:51ZevvAraq: sure, but maybe not optimal, it *should* be able to run
08:40:06Araqeventually yes, but Nimc isn't even at Nim v1.0
08:40:54Araqit relies on define:nimOldCaseObjects
08:42:08Araqbut 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:25PMunchGreat, I've managed to get the C compiler to hang..
08:54:01PMunchOr maybe something else is going on.. Running the command it hangs on in a terminal works just fine
08:54:49Araq--parallelBuild:1
08:56:44leorizeAraq: what's this new --gc:arc?
08:57:50PMunchAha
08:59:26Araqleorize, it's the same as --gc:destructors and roughly the same as --newruntime
08:59:39PMunchHmm, tried something else. But now I get some completely bogus error message: http://ix.io/22fL
08:59:49Araqit may look like we get a new GC every week now, but really we don't, it simply evolves
08:59:55PMunchComplaining that members I don't try to access doesn't exists..
09:00:29leorizeAraq: so we're still going for owned or has that concept deemed a failure?
09:00:57FromDiscord<exelotl> What is arc short for? :o
09:03:56leorizeAraq's reference counting :P
09:04:46Araqleorize, https://github.com/nim-lang/RFCs/issues/177
09:05:55AraqARC means Automatic/Atomic/Araq's Reference counting
09:13:33PMunchAnyone have any good idea what causes my weird C errors?
09:14:16leorizePMunch: macros
09:14:51leorizeyou're probably missing some headers
09:15:11PMunchThose are types defined within my own project..
09:15:42leorizes_addr and s6_addr are usually macros in posix...
09:15:54PMunchWait, really?
09:16:34leorizewell, at least that's the case on linux
09:16:37*letto quit (Ping timeout: 240 seconds)
09:16:49PMunchOh wow
09:16:57PMunchRenaming the fields worked..
09:17:11PMunchWell that should be a bug..
09:17:37leorizeguess we have to implement a way for Nim to figure out every single defined symbol so as to avoid them :P
09:17:42leorizeor just ditch C altogether
09:17:43*theelous3 quit (Ping timeout: 250 seconds)
09:18:03PMunchOh wait, they are C macros..
09:18:12leorizeyep
09:18:46PMunchMaybe Nim should obfuscate fields in structs as well?
09:19:27PMunchBut it works fine on Linux..
09:19:31leorizebasically making debugging worse...
09:19:39PMunchIt was just when cross-compiling to Windows I got this error..
09:21:29*lritter quit (Quit: Leaving)
09:21:38leorizethe C preprocessor itself is a huge minefield :P
09:22:56leorizeiirc nim used to obfuscate everything possible
09:25:27Araqyeah and then we got "I need to be able to use debuggers" features
09:26:18Araqin 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:40Araqno idea how we are gonna get exceptional C++ interop then though... :-(
09:29:23*floppydh joined #nim
09:33:42ehmryAraq: is nlvm llvm based? is there an issue with the llvm unwinder?
09:34:26ehmryI was looking at the llvm c++ runtime and thought the stack unwinder could be used directly by nim
09:35:30leorizeyes, it's llvm based
09:40:48lqdev[m]does .compile work for nlvm?
09:40:52*clyybber joined #nim
09:42:30leorizemaybe
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:41FromDiscord<YahArt> Hello everybody
10:12:41FromDiscord<YahArt> I just discovered the nim language recently and I am quite fond of it.
10:12:41FromDiscord<YahArt> I wanted to try out the nimgl library for game development (https://github.com/nimgl/nimgl)
10:12:41FromDiscord<YahArt>
10:12:41FromDiscord<YahArt> I managed to get the green window example running.
10:12:44FromDiscord<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:46FromDiscord<YahArt>
10:12:47FromDiscord<YahArt> I am running this on kubuntu (linux)
10:12:49FromDiscord<YahArt>
10:12:51FromDiscord<YahArt> If anyone has any experience regarding this topic I would really appreciate it 😄
10:12:53FromDiscord<YahArt> https://cdn.discordapp.com/attachments/371759389889003532/646291747185623059/unknown.png
10:14:00PMunchYou need to initialise submodules: https://github.com/nimgl/nimgl/blob/master/.gitmodules
10:15:10PMunchhttps://git-scm.com/book/en/v2/Git-Tools-Submodules#_cloning_submodules
10:15:57PMunch@YahArt ^
10:16:32*letto joined #nim
10:35:32PMunchHmm, with --threads:on and --tlsEmulation:off when cross compiling I get a dependency for a "libgcc_s_seh-1.dll"
10:35:55PMunchAnd without tlsEmulation it crashes when I run it, but not when I run it under Gdb (yay..)
10:37:09PMunchThe import is for a "__emutls_get_address"
10:40:41PMunchAh, --passL:"-static" removes that
10:42:28PMunchHow 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:11lqdev[m]@if windows
10:43:17lqdev[m]@elif
10:43:18lqdev[m]@endif
10:43:27lqdev[m]s/endif/end
10:44:25lqdev[m]also, you can create a config.nims. they're much better than nim.cfg
10:46:06PMunchI've tried to use config.nims, but they are a bit clumsy..
10:47:42Araqplease stick to nim.cfg, I hate nims config files now
10:48:02PMunchWhy?
10:48:18Araqnot because the concept it bad, it's good, but it was such a PITA to get it reasonably bug-free
10:48:39PMunchSo now that it is reasonably bug-free we should all stop using them? :P
10:49:14Araqhow else can we get out of the mess of having 2 separate config systems?
10:51:32federico3officially deprecating one of the two?
10:52:00Araqwhich one?
10:52:13livcdThe one that you dont like anymore
10:52:21PMunchI like the idea of .nims
10:52:39PMunchShows 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:19clyybberI also like config.nims more
11:09:00clyybberIt also means that nims gets more usage which is great *because* it reveals bugs
11:10:14Araqthe bugs it revealed were mostly system.nim design defects
11:10:35Araqthe VM is used extensively for macros already and we know its bugs
11:12:31FromGitter<kaushalmodi> Logged in at right time? +1000 for config.nims
11:13:25Araqmaybe 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:12clyybberI think I found a template symbol binding bug.
11:29:26clyybberAraq: I'm getting "undeclared routine: 'runeAt'" , but runeAt is available in the defining scope
11:29:35clyybberIs it intended to work like that or not?
11:30:08Araqdepends, report it properly
11:30:20clyybberOn it
11:49:02*ITChap quit (Quit: ITChap)
11:49:21*solitudesf joined #nim
11:49:31*ITChap joined #nim
11:57:17clyybberAraq: Here: https://github.com/nim-lang/Nim/issues/12683
11:57:19disbot^ Symbol binding bug with generics and template
11:57:20disbot^ snippet at https://play.nim-lang.org/#ix=22g5 😏
11:58:16*ITChap quit (Quit: ITChap)
12:00:13Zevvoh 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:42clyybberIMO it should work
12:01:04clyybberBecause the string is not generic
12:01:28clyybber*a generic param
12:06:39PMunchHmm, 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:47FromGitter<kaushalmodi> Pmunch: https://stackoverflow.com/a/185798/1219634 ?
12:34:36*PMunch quit (Read error: Connection reset by peer)
12:34:40FromGitter<kaushalmodi> Linked the wrong answer but seems like there's no elegant way
12:35:02*PMunch joined #nim
12:35:05FromGitter<kaushalmodi> I've never used powershell and reading such answers, looks like I never will :P
12:40:39*Hideki_ joined #nim
12:41:46FromGitter<alehander92> the only tjhing i am afraid for
12:41:47FromGitter<alehander92> with llvm
12:41:56FromGitter<alehander92> is build times etc, llvm is a big dependency
12:42:26FromGitter<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:31PMunchkaushalmodi... Why is this so hard..
12:54:54livcdPMunch: what do you need to do ?
13:00:16PMunchI'm just trying to run multiple DNS lookups to my server at the same time
13:00:25PMunchTo test that my Nim DLL works with multithreading
13:00:39PMunchOn Linux I did this with dig & dig & dig etc.
13:04:07livcdYou 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:29FromDiscord<mratsim> @Clyybber, known issues
13:38:32*sealmove joined #nim
13:40:00sealmovehey Zevv: do you think we can make something like this possible in npeg? https://play.nim-lang.org/#ix=22gu
13:45:59disrupteknarimiran: think we can backport the nim.cfg fixes?
13:49:21FromGitter<alehander92> maybe {4} iirc its used similarly in some regex?
13:49:25lqdev[m]clyybber: it's not a problem with generics, but with templates overall
13:49:34lqdev[m]s/templates/templates and macros/
13:49:55clyybberbut it only happens inside a generic
13:50:21clyybberbecause generics bind late, but only the actual generic params should bind late
13:51:51lqdev[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:58clyybbersealmove: Just change `example <- Alphas[4] * !1` to `example <- Alphas(4) * !1`
13:52:39lqdev[m]it will work if you import unicode in module A
13:52:48clyybberlqdev[m]: I know
13:52:58clyybberBut I dont use the template in module A
13:53:03clyybberJust the generic.
13:53:22lqdev[m]oh, I see now
13:53:31lqdev[m]you don't use the template directly
13:53:48*kungtotte quit (Quit: WeeChat 2.6)
13:53:58lqdev[m]so yeah, you're right
13:54:42lqdev[m]note to self: always look into the bug closely, not just skim through it in half a second
13:55:10sealmoveclyybber: yes, that was a mis-type, but does it work?
13:55:30Zevvsealmove: I hate it when users make up all these ridiculous use cases
13:55:35clyybbersealmove: Try it :) I dont have the file 'AAAAA'
13:55:58ZevvHow do you even think of that stuff?
13:55:59sealmoveclyybber: not a file arrrggg another mis-type by me
13:56:01sealmovew8
13:56:03disruptekzevv: damn users!
13:56:04Zevvlet me see if I can make that work
13:56:24Zevvbecause I think it just might
13:56:38sealmovehttps://play.nim-lang.org/#ix=22gw
13:56:57sealmovewow nvm it works!!
13:56:59sealmove<3
13:57:04*thomasross quit (Ping timeout: 252 seconds)
13:57:09sealmovethat's awesome
13:57:42Zevvright
13:59:15*thomasross joined #nim
14:00:29*vsantana joined #nim
14:03:11sealmovewell, templates can be extended indefinately I guess
14:03:32clyybberwdym?
14:03:34sealmovefor example it could work with arbitary number of parameters
14:03:39clyybberAh
14:03:48clyybberYou mean npeg templates?
14:03:51sealmoveyup
14:04:00sealmoveor allow arithmetic
14:04:08Zevvnot that
14:04:16sealmovewhy not?
14:04:17Zevvit's only substitution
14:05:25sealmoveyes, that would require proper typing which is a big stretch
14:05:32sealmovei agree it's not a good idea
14:05:58sealmovejust saying, the possibilities are infinite :P
14:06:00*vsantana quit (Quit: leaving)
14:08:46lqdev[m]oh nice, since when does the playground have nimble packages?
14:09:01Zevva few weeks
14:09:18clyybbermratsim: My issue is different
14:09:36clyybber`chars` is not a generic parameter
14:09:52clyybberAs such it can be typechecked at instantiation time
14:12:43*narimiran joined #nim
14:20:10sealmoveZevv: what's the meaning of "unhandled infix operator" error?
14:20:26*NimBot joined #nim
14:20:44Zevvwell you're passing an infix operator that npeg is not handling :)
14:21:11Zevv* - ^ and ^^ are valid infixes
14:21:18Zevvany other will show that error
14:21:20Zevvso what are you doing?
14:21:27sealmoveoh, I'm using '|'
14:22:10sealmoveMeta(n) | Doc(n) | Seq(n) | Types(n)
14:22:11Zevvoh yeah that one is valid as well, but it gets macro'ed out before npeg sees it
14:22:30Zevvah these are template calls?
14:22:34sealmoveyes
14:22:42*PMunch joined #nim
14:23:08Zevvlet me check that, these are not properly represented in the tests
14:23:53sealmoveThanks. Another annoyance is the ordering restrictions. You have to put templates high in your grammar.
14:24:30Zevvtrue
14:24:36ZevvCan you dump your whole grammar, I can't reproduce.
14:25:02Zevvoh damn, I can :(
14:25:53sealmovewell, I guess templates should be used lightly
14:29:03Zevvfixed, 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:41clyybberWhy is Rune a distinct RuneImpl? And not simply distinct int32?
14:53:30sealmoveI prefer a release :D
15:01:53FromGitter<nixfreakz_twitter> dumb question: How do you update a nimble package that you already installed previously , meaning if the package was updated
15:02:02FromDiscord<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:09narimirannimble install will do the update
15:02:22clyybbermratsim: No problem, its not a blocking issue for me :)
15:02:36FromDiscord<mratsim> or it might mess up and install master head and 1.0 ...
15:02:36clyybberBut its good to track what the issues are
15:03:50*ITChap quit (Quit: ITChap)
15:03:54FromDiscord<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:57clyybbermratsim: Definitely.
15:28:28FromGitter<nixfreakz_twitter> dumb question: How do you update a nimble package that you already installed previously , meaning if the package was updated
15:28:45FromGitter<nixfreakz_twitter> Do I just re-install the pkg again ?
15:29:14narimirani told you earlier
15:29:16narimirannimble install will do the update
15:29:38FromGitter<nixfreakz_twitter> oh sorry I didn't see your reply thanks
15:32:24*drewr quit (Ping timeout: 246 seconds)
15:37:23leorizenarimiran: so... hit me with the bugs you found from :NimTypeOf :p
15:38:06narimiranleorize: 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:05narimiranin other news, nim is slow: https://embark.status.im/news/2019/11/18/nim-vs-crystal-part-1-performance-interoperability/
15:39:46narimiranand that's coming from status.im website, nice :P
15:40:52FromDiscord<Rika> lmao RIP
15:43:14FromDiscord<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:22shashlickyay 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:01dom96"Developer Education lead"
15:56:29dom96at Status wrote this post
15:58:18dom96narimiran, JSON in Nim is slow(er) than Crystal.
15:58:43dom96That's because Crystal's JSON parser is very performant, something we could certainly replicate in Nim
15:58:55narimiran!github json
15:58:57disbothttps://github.com/status-im/nim-json-rpc -- Nim library for implementing JSON-RPC clients and servers
15:58:59disbothttps://github.com/status-im/nim-json-serialization -- Flexible JSON serialization not relying on run-time type information
15:58:59r4viwhat about the other test? base64 encoding / decoding
15:59:01disbothttps://github.com/OpenSystemsLab/jsmn.nim -- Jsmn - a world fastest JSON parser - in pure Nim
15:59:27dom96r4vi, heh, that also happens to be a slow part of the stdlib
15:59:48*nsf quit (Quit: WeeChat 2.6)
15:59:49dom96treeform made a PR to fix this very recently
15:59:53dom96it's only in devel
16:00:02narimirandisbot: you silly bot, you didn't show us https://github.com/Araq/packedjson
16:00:50dom96as usual benchmarks can tell an often misleading story
16:01:12Zevvsealmove: 0.21.1, at your service
16:01:30sealmovegreat! ;D
16:01:37dom96in practice Crystal and Nim are likely to have effectively the same performance
16:04:34FromDiscord<Rika> thats great to hear
16:04:52FromDiscord<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:50FromDiscord<mratsim> Unless those json parser can process over 2GB of data per second they can't claim to be the fastest though
16:20:11Zevvit says "*a* fastest"
16:20:54FromDiscord<mratsim> laybe a pure Nim fastest? :p
16:20:57FromDiscord<mratsim> maybe*
16:21:45FromDiscord<mratsim> Paper on what is involved: https://arxiv.org/abs/1902.08318
16:22:08clyybberthat comparison is a bit dry
16:23:21*Trustable joined #nim
16:23:26clyybberit compares the stdlib not the compilers
16:30:05shashlickexactly - these benchmarks are dumb - how much time did the language authors spend tweaking some random area of their stdlib
16:30:21Zevvwell, in practice, does it matter?
16:30:34Zevvit just shows that having a good stdlib is just as important
16:30:47Zevvif mundane things like base64 and json both happen to be slow
16:33:44FromGitter<alehander92> @dom96 have you benchmarked e.g. json-serialization : iirc it doesnt generate intermediate json nodes, so it might be fast
16:34:05FromGitter<alehander92> (but i only care about time from json to typed obj usually, so it depends on the people)
16:34:52FromGitter<alehander92> on the other hand i agree that usually very fast parsers/etc arise as third party libraries
16:34:59FromGitter<alehander92> this seems almost inevitable
16:35:17FromGitter<alehander92> what a stdlib can do is learn from them/incorporate their internals
16:35:18dom96Zevv, it matters, because until someone actually sees that in practice their JSON parsing is too slow then the stdlib is fine
16:35:35dom96anything else is just optimising to win synthetic benchmarks
16:35:56FromGitter<Willyboar> @alehander92 i was find your http framework yesterday
16:35:58dom96which 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:01disruptekslow json costs users money.
16:36:03FromGitter<Willyboar> why do you stopped?
16:36:10FromGitter<alehander92> well, not much time
16:36:31FromGitter<Willyboar> :(
16:36:41FromGitter<alehander92> and i have to design something like 0.1 of the whole framework imo
16:36:44FromGitter<alehander92> before continuing
16:36:56FromGitter<alehander92> like, deciding on api/dsl-s and seeing if people would like them
16:37:02*ITChap quit (Quit: ITChap)
16:37:07FromGitter<alehander92> i might do it and see if there is interest
16:37:26clyybberWell, this shows that stdlib json is *not* fine IMO
16:37:28FromGitter<alehander92> if you are interested, you can do your own framework, i think we need some
16:37:50FromGitter<alehander92> dom96 i think windows doesnt matter a lot to `crystal`
16:37:50clyybberBut the conclusion from that article is what bothers me
16:37:56FromGitter<alehander92> compared to nice multithreading
16:37:57dom96clyybber, how?
16:38:05clyybberWell, its slow
16:38:06FromGitter<alehander92> as they have their niche: web / server stuff similar to go imho
16:38:11clyybberAnd stdlib should be fast
16:38:16FromGitter<Willyboar> Well i am new to both programming and nim so it is a little difficult
16:38:36dom96clyybber, no, it's slower than Crystal in this particular benchmark
16:39:05clyybberdom96: Yeah, and? It shows that we can and should improve our implementation
16:39:21FromGitter<Willyboar> I think nim needs a railslike framework
16:39:29FromGitter<Willyboar> Crystal has 2-3
16:39:31FromGitter<Willyboar> :)
16:39:41dom96clyybber, we certainly can, but there are always more important things to be done
16:39:41FromGitter<alehander92> yeah
16:39:59FromGitter<alehander92> maybe: on the other hand big monolith frameworks are not as popular these days
16:40:07FromGitter<alehander92> but still one would be useful
16:40:27clyybberdom96: Yeah of course. I just meant to say that its something relatively important.
16:40:32FromGitter<alehander92> thats another posibility for `http`: i mostly wanted to port some `rails`/`phoenix` ideas there
16:40:43dom96clyybber, relative to what?
16:40:58planetis[m]!github html_dsl
16:40:59disbothttps://github.com/juancarlospaco/nim-html-dsl -- Nim HTML DSL
16:41:01disbothttps://github.com/stisa/zircon -- Basic DSL for Html, in nim
16:41:05FromGitter<alehander92> on the other hand, it might be interesting to look at `rust` frameworks
16:41:24FromGitter<Willyboar> i didn't play with rust
16:41:25FromGitter<alehander92> planetis[m] karax can be used as well on server side
16:41:45clyybberdom96: Relative to other things to do on the stdlib, like new features/modules
16:41:57planetis[m]nice
16:42:47FromGitter<Willyboar> I would love to help where i can if we can make a team
16:42:55FromGitter<nixfreakz_twitter> Phoenix is a very well maintain web framework , but also took years to create and a ton of help
16:43:13FromGitter<alehander92> absolutely agree
16:43:17dom96clyybber, we've already got a supposedly faster json module though
16:43:20dom96it's in Nimble
16:43:25FromDiscord<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:28FromGitter<alehander92> maybe the most important thing around such a frmework would be the community
16:43:53FromGitter<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:28FromGitter<alehander92> i agree
16:44:32FromGitter<nixfreakz_twitter> dom96 needs to scribe and write a new book for jester alone (:
16:44:40clyybberdom96: Yeah, maybe we should replace the old stdlib implementation with it?
16:44:43FromGitter<alehander92> i think one good option would be to just make a new one incorporating
16:45:03FromGitter<alehander92> many existing ideas from rails/phoenix just to showcase they can be implemented with nim metaprogramming
16:45:14narimiranleorize: either i don't know how to use it, or :NimTypeOf doesn't do anything on my machine :)
16:45:18FromGitter<Willyboar> I agree @alehander92 . Under a new organization
16:45:39dom96clyybber, 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:02dom96if it's actually slow to someone that has a practical use case then it's very important
16:46:10planetis[m]hi alehander92, I was wondering if these libs are different than karax
16:46:12FromGitter<alehander92> @Willyboar yeah: however i am not sure if people would like the "design first" idea, maybe it sounds impractical
16:46:18FromGitter<nixfreakz_twitter> unless a webapp or services is actually needed for "real-time" does it matter the speed?
16:46:24FromGitter<alehander92> one thing i imagine is making 1-2 nice examples
16:46:35disruptekany use of json is affected and there are many, many practical uses of json.
16:46:37FromGitter<alehander92> similar to the `make a medium clone` / `other mvc clone` examples
16:46:48clyybberdom96: The existance of alternate faster implementations is more or less proof that our stdlib json is too slow
16:46:56FromGitter<alehander92> so we can compare how would this framework look compared to those others
16:47:00FromGitter<Willyboar> The think is that this frameworks grows communities
16:47:09FromGitter<alehander92> to make sure the supposed design would seem nice
16:47:10FromGitter<nixfreakz_twitter> which one ?
16:47:12clyybberMy point is: The stdlib should either provide the "best" implementation or none at all IMO.
16:47:22FromGitter<alehander92> this supposed new framework
16:47:23planetis[m]onelivesleft: totally possible
16:47:24FromGitter<Willyboar> ruby community grows because of rails
16:47:38FromDiscord<onelivesleft> ty
16:47:44disruptekwhen you pay by the 1/10th of a second to run nim code, then yes, it matters how fast it is.
16:47:58FromGitter<nixfreakz_twitter> then put sometime into Jester and make it grow (:
16:48:16FromGitter<alehander92> i think jester is more like sinatra/flask
16:48:16FromGitter<nixfreakz_twitter> you can't expect these devs to do everything do you?
16:48:19FromGitter<alehander92> but i might be wrong
16:48:29FromGitter<nixfreakz_twitter> it is like sinatra
16:48:29FromGitter<Willyboar> yes jester is like sinatra
16:48:29FromGitter<alehander92> @nixfreakz_twitter who are you addressing this to?
16:48:34FromGitter<Willyboar> not flask
16:48:40FromGitter<nixfreakz_twitter> @Clyybber
16:48:53FromGitter<Willyboar> i think flask is someone in the middle
16:49:19FromGitter<nixfreakz_twitter> I like nimwc right now
16:49:20clyybbernixfreak_twitter: ? Your message is empty
16:49:23FromGitter<alehander92> i just think somebody can PR `json` stdlib if the need is there
16:49:40planetis[m]just the macro should generate ``result = newTree(nnkStmtListExpr, newVarStmt(tmp, something), body, tmp)``
16:49:44clyybberyeah, its just a matter of time :)
16:50:01*Hideki_ joined #nim
16:50:16FromGitter<Willyboar> nimwc is kind of CMS
16:50:34dom96clyybber, I also disagree with that :)
16:50:38FromGitter<nixfreakz_twitter> @Willyboar kind of , more like a static generator
16:50:52dom96It's not always easy to provide the "best" implementation, it's not even always clear what the "best" implementation is.
16:50:56FromGitter<nixfreakz_twitter> @Willyboar but it has the potential to become a framework
16:51:36FromGitter<nixfreakz_twitter> Thats why speed doesn't matter unless the app or service is in "real-time"
16:51:40FromGitter<Willyboar> I think it is differerent than framework
16:52:02FromGitter<nixfreakz_twitter> @Willyboar it is I'm saying it has the potential to become a good framework
16:52:10disruptektime is money. it /does/ matter.
16:52:12planetis[m]onelivesleft: ^
16:52:17FromGitter<nixfreakz_twitter> It already has plugin capabilities
16:52:24FromGitter<Willyboar> I think is more than a framework
16:52:41clyybberdom96: 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:51disruptekpoor performance is heat, and heat is money.
16:52:52clyybberAnd I'm sure you'll agree on that :)
16:53:32dom96Sure, but that's a vague statement :)
16:55:58FromGitter<Willyboar> @alehander92 i must leave now. You can send me to talk about it if you want.
16:57:04disrupteknarimiran: porting nim.cfg fixes to 1.0?
16:57:24narimirandisruptek: which one(s)? link or something please
16:58:03disruptekon a cell, but its my only recent PRs.
16:58:06narimiranbtw, 1.0.4beta will be ready in a day or two, so if anybody wants to test it, let me know
16:59:10narimirandisruptek: this one? https://github.com/nim-lang/Nim/pull/12611
16:59:35*tane joined #nim
17:00:32shashlickHow about back porting --clearNimbleDir
17:00:37narimiranit wasn't marked with `[backport]`, so it'll be backported if Araq gives a green light
17:00:37disruptekthat one and #12609
17:00:38disbothttps://github.com/nim-lang/Nim/issues/12609
17:00:38disbot^ add --clearNimblePath; fixes #12601
17:01:16narimiranthe same applies: i need some approval for both of them
17:01:34narimiranbut if shashlick is for it, that already counts as a good candidate :)
17:05:16*Hideki_ quit (Ping timeout: 240 seconds)
17:15:00leorizenarimiran: then it's probably a bug
17:15:39leorizeI 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:53madpropshaving some weird problem https://play.nim-lang.org/#ix=22hs
18:24:06madpropsif i do this. `vars` is not available in the main file for some reason
18:24:14madpropsbut if i echo `vars` in `get_vars` it works fine
18:25:02clyybbercall get_vars
18:25:07clyybberand then echo
18:25:08madpropsi call get_vars
18:25:14clyybberHmm
18:25:33*GordonBGood joined #nim
18:25:47Zevvwhat is your file called? vars.nim?
18:25:52madpropsyea
18:25:55Zevv:(
18:25:59madpropsohhhhhhh
18:26:02clyybberthats why :)
18:26:12ZevvI hate that, it happens to me again and again
18:26:45*njoseph joined #nim
18:27:17clyybbersame
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:05FromDiscord<mratsim> it doesn't happen to me anymore but yeah +1
18:57:25FromDiscord<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:42lqdev[m]but, `vars` is not a reserved word is it?
19:27:04clyybberno
19:27:41clyybberbut 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:55lqdev[m]oh.
19:28:07lqdev[m]yeah, happened to me, too.
19:28:47*nsf quit (Quit: WeeChat 2.6)
19:29:03lqdev[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:17clyybberyeah
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:16madpropsis there a way to do what "cd" does?
20:50:22madpropsi want to change the user's path in the terminal
20:50:35madpropssetCurrentDir just does it internally it seems
20:51:06clyybbersetEnv ?
20:51:12clyybber$CWD
20:51:37clyybbernevermind
20:52:39clyybbermadprops: I think you may have to execute cd
20:52:58clyybberBecause usually cd is implemented by the shell itself
20:53:04madpropsah ok
20:55:27madpropsthis didn't work: execCmd(&"cd {path.path}")
20:55:37madpropsprobably changes it internally
20:55:56shashlickThat's just for the current cmd instance
20:56:05shashlickOnce that subprogram ends, it's done
20:56:24shashlickAre you in nimscript?
20:56:32madpropsit's a normal nim program
20:57:54madpropsmaybe there's no way..
20:58:45FromGitter<Vindaar> madprops: what are you trying to do exactly?
20:59:17madpropsim 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:46FromGitter<Vindaar> and what do you want to do once a path is selected by the user?
21:01:01madpropsjust change the termina (cd) to the path
21:01:17madpropskinda like 'z' does if you know what that is. but that's a bash script
21:01:30FromGitter<Vindaar> ah, so your program acts as a CLI and changes the path of the shell the user is in?
21:01:48madpropspretty much
21:02:15FromGitter<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:41shashlickyou are trying to change the current directory of a parent process
21:02:52shashlicki don't think that is possible
21:03:00madpropsi guess my only option is setting up some env variable and let the user use that
21:03:24shashlickeven env vars won't work once your process exits since they don't propagate to parents
21:04:00madpropscheck this https://www.geeksforgeeks.org/chdir-in-c-language-with-examples/
21:04:00shashlicki wrote a fzf wrapper for windows and in my case, i had to spawn a new process
21:04:10madpropssomehow that c function is able to do it
21:04:16*narimiran quit (Ping timeout: 240 seconds)
21:04:39shashlicknote how once the program exits, the shell is still in the same dir
21:04:47madpropsoh wait
21:04:49madpropsyeah
21:04:51madpropsi misread
21:05:45shashlickbash might allow this since you are in the same process in theory
21:05:59shashlickif you source scriptfile
21:06:06shashlickbut 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:14FromDiscord<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:13FromDiscord<itmuckel> Or is there a better library for my purposes I don't know about? 🤔
21:13:27clyybbershashlick, madprops: It must be possible somehow.
21:13:40clyybberBecause nnn succeeds in doing it
21:15:20FromGitter<dumjyl> they use shell functions. simplified: `foo() { cd my_nim_program }`. Look at how autojump works.
21:16:38*NimBot joined #nim
21:17:21FromDiscord<Generic> itmuckel: sdl image can also be used with opengl and it's not a bad choice
21:17:56FromDiscord<Generic> though if you want something more lightweight and you don't necessairly need for example jpeg
21:18:59FromDiscord<Generic> you can try stb_image(which now as I'm thinking about it does support jpeg)
21:19:00clyybberdumjyl, madprops, shashlick: Aah, nnn cheats. It just spawns a new shell
21:19:24madpropsoh lol
21:20:46clyybberbut what dumjyl said should work.
21:23:28*Simerax joined #nim
21:24:21FromDiscord<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:23clyybberAnd apparently you can use gdb to hack it somehow
21:24:46clyybbermadprops: 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:07madpropsim trying to just echo path. but can't seem to make it pipeable
21:30:13madpropstags 22 | cd
21:30:23madprops"SIGPIPE: Pipe closed."
21:30:35clyybberBecause cd doesnt read from pipe
21:30:41madpropsoh
21:30:53clyybberYou have to do command substitution
21:43:40*ITChap joined #nim
21:50:38FromGitter<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:55FromGitter<Willyboar> Do you live in Bulgary?
21:58:56FromGitter<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:59FromGitter<s0kil> Turns out nimsuggest is mining crypto in the background
22:01:49clyybbernimble install funding :p
22:02:58FromGitter<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:51FromDiscord<Solitude> who is in the wrong?
22:07:51FromDiscord<Solitude> https://cdn.discordapp.com/attachments/371759389889003532/646471720487878656/unknown.png
22:09:17FromGitter<Willyboar> @xmonander welcome back. I think you are describe a very complicated situation.
22:09:22FromDiscord<itmuckel> 😄
22:09:38FromDiscord<itmuckel> @Solitude 😄
22:13:09FromGitter<xmonader> @Willyboar thank you it's still some rough days at work :(
22:14:15FromGitter<xmonader> Yeah it's very complex indeed, not sure the correct way to react.
22:15:24FromGitter<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:00FromDiscord<Winton> https://www.youtube.com/watch?v=Iro4l0bMBb4&list=PLvxZJTnSXMLrCF9lXyg8D5kxTlXjwPsHE
22:19:12FromGitter<Willyboar> nice!
22:24:21*leorize quit (Remote host closed the connection)
22:24:58*leorize joined #nim
22:27:53FromGitter<alehander92> @Willyboar yes
22:28:04FromGitter<alehander92> i am indeed, how did you know
22:28:25FromGitter<Willyboar> From your profile here
22:28:35FromGitter<alehander92> ah it probably writes sofia
22:28:42FromGitter<alehander92> yea
22:28:43FromGitter<Willyboar> I am a little southern
22:28:56FromGitter<alehander92> no green hair tho, black hair and a beard
22:29:00FromGitter<alehander92> simpler time today
22:29:47FromGitter<Willyboar> I am from Greece
22:29:57FromGitter<alehander92> nice
22:30:10FromGitter<alehander92> i just ate greek food eariler
22:30:33FromGitter<Willyboar> gyro?
22:30:34FromGitter<alehander92> good memories from naxos as well
22:30:42FromGitter<alehander92> well .. gyro of course :P
22:30:47FromGitter<Willyboar> naxos is great
22:31:13FromGitter<Willyboar> but i lived 2 years in ikaria in the past
22:31:55FromGitter<Willyboar> Gyros is nice with a ton of tzatziki :)
22:32:19FromGitter<alehander92> looks great
22:32:30FromGitter<alehander92> amazing how many islands you ahve
22:32:50FromGitter<alehander92> yeah, i like the paprica ones
22:33:02FromGitter<alehander92> but honestly stills struggle to remember the different greek salad names
22:33:11FromGitter<alehander92> doners are simpler, they're like iphones
22:33:18FromGitter<alehander92> you get only one configuration with different sizes
22:33:28FromGitter<alehander92> (said oversimpified :P)
22:33:52clyybberdoener is my main source of nutrition :D
22:34:27Araqer ... we have a faster base64 module now in the stdlib... and my packedjson module could be faster too
22:34:37FromGitter<alehander92> clyybber gyro is kinda similar, but different, i'd say more interesting in taste
22:35:31clyybberyeah, here in germany doener is much more common though
22:35:32FromGitter<Willyboar> you must try club sandwich with gyro
22:35:50clyybberand there are some variations of doener here too
22:35:55FromGitter<alehander92> clyybber it was like that here before, but honestly greek fast food is making a comeback here imo
22:36:05Araqbut if you want to compare speeds, maybe compare languages not stdlibs... dude...
22:36:22FromGitter<alehander92> the doeners in germany seem a bit blander to me, but still tasty
22:36:35clyybberthey were invented here :p
22:36:44clyybberdunno, maybe youve been to the wrong ones
22:36:56FromGitter<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:31FromGitter<alehander92> clyybber also possible
22:37:32Araqthe tests obviously test the stdlib
22:37:51Araq"90% of people do crap" is not an argument for anything
22:38:00FromGitter<alehander92> i am still sad that bulgaria didnt manage to have its own breakthrough international fast food
22:38:09FromGitter<alehander92> maybe balkan banitsa is close
22:38:24FromGitter<alehander92> Araq well, no, it is
22:39:09Araq"blah blah blah in practice C code is full of malloc/free and so I cannot use it for embedded development"
22:39:25Araqsee the problem with this line of reasoning?
22:39:29Araqit's wrong.
22:40:39Araqyes 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:09Araqand yes when you have to do this different programming patterns emerge
22:41:38Araqand it might mean not to use glib's super slow two phase destruction logic with atomic refcounting
22:41:46FromGitter<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:24FromGitter<alehander92> of course, in nim you can theoretically write everything you can in C with enough tweaking
22:42:33FromGitter<alehander92> its about the default thing
22:43:08Araqmaybe it's time to educate ignorant programmers instead of bending over all the time for the average joe
22:43:09FromGitter<alehander92> not a big deal, i was just agreeing with the more general speed-is-subjective thing
22:43:44clyybberbut speed is not subjective?
22:43:51clyybberunless you are on a very fast ship :p
22:44:09FromGitter<alehander92> i mean that what people perceive as "language" speed is subjective
22:44:20Araqif you want to measure json parsing, say so. don't pretend that you're measure programming languages. ffs.
22:44:29FromGitter<alehander92> you cant expect people to profile everything they use
22:44:36FromGitter<alehander92> it already happened so many times before
22:44:41FromGitter<alehander92> with java and other langs
22:44:54FromGitter<alehander92> people see that some kind of software in them is slow in some situation
22:44:59FromGitter<alehander92> and bam, "java is heavy and slow"
22:45:00clyybberYou can expect someone writing an article to know his shit though. And this fellow didn't
22:45:02FromGitter<alehander92> nobody cares
22:45:05*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:45:10FromGitter<alehander92> about "but if you do this smar thing"
22:45:15AraqI can expect people to not be utter morons at their job.
22:45:20FromGitter<Willyboar> where did you read that?
22:45:48FromGitter<alehander92> but i cant understand what is "moronic" about it
22:46:05FromGitter<alehander92> this "lets all talk like linus about how very smart we are" is tiring sometimes
22:46:39Araqnot as tiresome as your gibberish
22:46:43FromGitter<alehander92> i dont expect from normal users to start analyzing my whole ecosystem to see what and why is fast
22:46:53FromGitter<alehander92> its about impressions
22:46:56Araq"Normal users"?
22:47:41Araqso ok, I get it, nowadays nobody understands what a library is and what a language implementation is. great.
22:47:52clyybberalehander92: But why? If people want performance they should analyze.
22:48:20clyybberThats like saying: "I don't want people to think about the problem they wish to solve"
22:48:21FromGitter<alehander92> average users
22:48:31clyybberBroad generalization
22:48:45FromGitter<alehander92> but i am talking about something completely different
22:48:50clyybberOur users are programmers
22:48:53FromGitter<alehander92> probably my english is not good enough
22:48:57FromGitter<alehander92> to express my point
22:49:15Araqno, it's clear what you mean but it's a futile race to the bottom
22:49:47FromGitter<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:59FromGitter<alehander92> but if you expect nim to has X new users
22:50:12clyybberNot everyone must use nim :)
22:50:46clyybberIn 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:04FromGitter<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:15Araqlook, if you *write* an article claiming to compare language implementations
22:51:19FromGitter<alehander92> this is valid for all langs not just nim
22:51:20Araqthen better do so.
22:51:44Araqand don't hide behind "oh I actually don't understand what I'm doing"
22:51:48FromGitter<alehander92> clyybber but languages which are just used by people who are smart and willing to think very hard of problems are
22:51:50FromGitter<alehander92> "haskell"
22:51:53FromGitter<alehander92> good luck with that
22:51:58FromGitter<alehander92> oh maybe f*
22:52:03AraqRust.
22:52:04FromGitter<alehander92> (like `F*`)
22:52:16clyybberalehander92: The point being?
22:52:17FromGitter<alehander92> rust is used by many "average" programmers as well
22:52:28FromGitter<alehander92> well my point is that you cant expect that
22:53:01clyybberYes, of course we can't "expect" anything
22:53:02FromGitter<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:07FromGitter<alehander92> instead of e.g. the lib they used
22:53:11clyybberYou can never "expect" anything from a stranger on the internet
22:53:24clyybberBut we can critizice his assessment
22:53:41Araqnot the point. if you write about something, anything really, there must be a minimum on knowledge involved.
22:53:48Araq*of
22:54:11FromGitter<alehander92> my point is that it might be a useful assesment because it probably describes better what a random newcomer might thing
22:54:19FromGitter<alehander92> it doesnt matter if its an artcile or not
22:54:38FromGitter<alehander92> we're not a journalism exam reviewers
22:54:40clyybbersure
22:54:47clyybberBut it does matter if its an article or not
22:54:59clyybberBecause if that user bothered to ask on IRC why his code is slow
22:55:03FromGitter<alehander92> i didnt even know its an article
22:55:06clyybber(which is not hard to do)
22:55:17clyybber(ok its a blog post I think)
22:55:19FromGitter<alehander92> so many people dont use irc
22:55:25clyybberdiscord
22:55:26FromGitter<alehander92> i didnt really use irc before starting with nim
22:55:27clyybbergitter
22:55:35FromGitter<alehander92> i didnt use any chats
22:55:41FromGitter<alehander92> i just searched google / stack overflow
22:55:52FromGitter<alehander92> and i still know *many* people who are just not used to the idea
22:56:00FromGitter<alehander92> they can just chat directly with lang communities
22:56:14Araqthis is all besides the point
22:56:15clyybbermy point is: write a blog post/open your mouth about stuff you know your shit about
22:56:40FromGitter<alehander92> but ok, if this was a github issue, not a blog post
22:56:54FromGitter<alehander92> ok
22:57:27clyybbera github issue is asking for help, thats a different thing then writing a blog post/article
22:58:03Araqeven writing the article is fine if you say clearly what you are doing. you benchmark base64 and json handling
22:58:10FromGitter<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:11clyybberyeah
22:58:22FromGitter<alehander92> i dont care about that particular example
22:58:46clyybberalehander92: A discussion will never end well if one party argues non-concretely :)
22:59:08FromGitter<alehander92> and i also really want people to just convert their json to typed objects
22:59:18clyybberheh
22:59:25FromGitter<alehander92> and people just use json nodes
22:59:29FromGitter<alehander92> and thats very dynamic
22:59:34FromGitter<alehander92> are you in ruby-land people
22:59:41FromGitter<alehander92> ok silly rant over :P
22:59:46Araqas I said, arguing about the "average code out there" is problematic because the average is a race to the bottom
23:01:43FromGitter<alehander92> well, the nim web frameworks i know just import the stdlib json, so its a good argument
23:02:05FromGitter<Willyboar> Well i am a bad hobbyist programmer but i found nim wonderfull
23:02:30FromGitter<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:39FromDiscord<itmuckel> Hey, why can `addr()` not take addresses of let and const values?
23:02:39Araqalehander92: how is it a good argument?
23:02:40FromGitter<alehander92> and i dont say its bad i also use often `json`
23:03:01clyybberitmuckel: Because you could change their values that way
23:03:13clyybberAnd let and const are immutable
23:03:15FromGitter<alehander92> well it proves that even very experienced nim programmers sometime use not the fastest possible impl
23:03:16FromDiscord<itmuckel> Oh, yeah, makes sense!
23:03:21FromGitter<alehander92> which can make other nim libs slower
23:03:35FromDiscord<itmuckel> thx. 👽
23:03:41FromGitter<alehander92> and make other newcomers think thats a nim property not a lib one
23:03:55FromGitter<alehander92> very far fetched, but in very small cases possible
23:04:27Araqand 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:37FromGitter<alehander92> i never said its just a nim problem
23:04:54FromGitter<alehander92> its an useful observation for any language ecosystem imo
23:05:03clyybberpeople are dumb, im westen nix neues
23:05:21FromDiscord<exelotl> @itmuckel const only exists at compile time (the value is substituted in during compilation)
23:05:21FromDiscord<exelotl> let variables technically do have an address. If you know what you're doing, you can get it with `unsafeAddr`
23:06:16clyybberEven const could theoretically have an address, with some section_ stuff in C afaik
23:06:19clyybberBut it doesn't currently in Nim
23:06:33FromDiscord<exelotl> yeah I really need that actually clyybber
23:06:40FromGitter<alehander92> clyybber i am dumb as well, we're all dumb in slightly different ratios
23:06:53FromDiscord<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:04FromDiscord<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:20clyybberalehander92: Yeah, and thats why its fine to critizise each other :)
23:08:09FromGitter<alehander92> we're not even rocket surgeons man
23:08:17FromGitter<alehander92> what are we talking about at all
23:08:25FromDiscord<itmuckel> I love the internet
23:08:26FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/646486967625973800/unknown.png
23:15:35*filcuc quit (Quit: Konversation terminated!)
23:18:37AraqNim 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:41Araqbut not everything is a web app with business logic pumping json around until it ends up in a database.
23:20:49madpropsgotta love the fact that nim is compiled. thought about doing some python script .. the dependencies would be over 100mb
23:21:09AraqNim was created to replace the common Python/C combo with a single language because mixed language programming is a pita
23:22:14madpropsi wish nim makes it. get better and widely relevant. it's a great language
23:23:14FromDiscord<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:14FromDiscord<itmuckel>
23:23:14FromDiscord<itmuckel> let shaderSource = allocCStringArray(vertexSource)
23:23:15FromDiscord<itmuckel> glShaderSource(vertexShader, 1, shaderSource, nil)
23:23:15FromDiscord<itmuckel> deallocCStringArray(shaderSource)
23:24:42Araqnowadays you can do this with a custom cstringArray that has an attached destructor.
23:26:50clyybberWhich is more than one line :P, so no itmuckel
23:27:11FromDiscord<itmuckel> 🤪
23:27:33clyybberBut you can indeed do it without the extra variable
23:27:43clyybberTHough behind the scenes it will still exist :p
23:28:42FromDiscord<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:44FromDiscord<itmuckel> 😄
23:29:41clyybberjust learn by doing :)
23:31:50FromDiscord<itmuckel> Well without some theory behind it, it's just trial and error. At some point I have to read some concepts.
23:34:27FromDiscord<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:44clyybberoh
23:37:38clyybberDid you ever hear the tragedy of the stupid amount of boilercode required with vulkan?
23:39:07FromDiscord<itmuckel> No, is it possible to learn this power?
23:40:09clyybberNot from a jedi
23:40:19clyybberunfortunately I am not a jedi
23:40:23clyybberso yes
23:42:13FromDiscord<itmuckel> Writing shaders is low level enough for my purposes. 😉
23:43:00Araqcheck out fancygl please
23:43:17FromDiscord<itmuckel>
23:43:17FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/646495731187843073/hF057D1BD.jpg
23:43:46Araqit compiles Nim code to shaders
23:46:13*abm joined #nim
23:46:32FromDiscord<itmuckel> I put it on my watchlist, thanks for the tip!
23:49:00FromDiscord<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)