<< 24-07-2019 >>

00:06:26*stefanos82 quit (Quit: Quitting for now...)
00:10:28*theelous3 quit (Ping timeout: 245 seconds)
00:26:23*natrys quit (Quit: natrys)
00:31:09*fvs quit (Remote host closed the connection)
00:32:46FromGitter<deech> Does the body of a `macro` execute at compile time? So, for example, given `macro m (b: untyped): untyped = ...`, can I assume that `...` must be interpretable by the VM?
00:33:54FromGitter<deech> ... excluding the body of a `quote:`.
00:34:24*lmariscal quit (Quit: Ping timeout (120 seconds))
00:34:52*lmariscal joined #nim
00:39:06FromGitter<deech> At compile time is a little fuzzy, what I mean more precisely is where `PContext`.`inStaticContext > 0`?
00:40:47*zedeuss joined #nim
00:40:56sealmovemacros are calculated by the VM in compile time, yes
00:42:01FromGitter<deech> This does not currently seem to happen explicitly.
01:00:31*leorize quit (Remote host closed the connection)
01:01:14*leorize joined #nim
01:11:41*abm quit (Quit: Leaving)
01:13:02*dgreen quit (Remote host closed the connection)
01:50:10*snuffdtek quit (Remote host closed the connection)
01:51:49*snuffdtek joined #nim
01:52:27*couven92 quit (Read error: Connection reset by peer)
02:18:59*ryukophone joined #nim
02:27:40*ryukophone quit (Ping timeout: 264 seconds)
02:29:17*ryukophone joined #nim
02:37:13*ryukophone quit (Read error: Connection reset by peer)
02:37:25*ryukophone joined #nim
02:45:31*ryukophone quit (Ping timeout: 276 seconds)
03:13:19*ryukophone joined #nim
03:22:09FromGitter<Varriount> Aditya: The fact that it's a macro means that the body will be executed at compile time
03:22:19FromGitter<Varriount> @deech
03:31:50*ryukophone quit (Read error: Connection reset by peer)
03:38:13*carkh quit (Remote host closed the connection)
03:44:15*ryukophone joined #nim
03:49:35*ryukophone quit (Ping timeout: 268 seconds)
03:53:45*ryukophone joined #nim
04:04:49*ryukophone quit (Ping timeout: 276 seconds)
04:05:10*ryukophone joined #nim
04:09:37*ryukophone quit (Ping timeout: 245 seconds)
04:09:47*ryukophone joined #nim
04:14:20*laaron joined #nim
04:30:08*alexander92 quit (Remote host closed the connection)
04:31:22*alexander92 joined #nim
04:32:43*laaron quit (Remote host closed the connection)
04:33:00*laaron joined #nim
04:37:34*nsf joined #nim
04:38:59*sealmove quit (Quit: WeeChat 2.5)
04:43:35*cyraxjoe quit (Read error: Connection reset by peer)
04:44:44*cyraxjoe joined #nim
04:48:19*ryukophone quit (Remote host closed the connection)
04:48:34*ryukophone joined #nim
04:52:57*ryukophone quit (Read error: Connection reset by peer)
04:53:03*ryukophone joined #nim
05:12:14Zevvbwah I spent hours getting this to work and the solution is just so obvious: https://forum.nim-lang.org/t/5043
05:14:36disrupteki think i need that approach for my api codegen.
05:15:06Zevvwell, now you know how to do it :)
05:15:26disruptekthanks for smacking your head on it for me. :-P
05:15:36Zevvdon't static[] your typedesc or genAst your Nimnode, neiher NimNode your type or typedesc[] your macro generics
05:15:58Zevvbecause of "getAst takes a call, but got getAst" and "cannot instantiate T", you know
05:16:08Zevvyou're welcome :)
05:16:35disrupteki'm afraid to learn what that means.
05:17:09ZevvI have no clue either
05:17:12disrupteki have to figure out how to build this in a way where the user can add a compiled type based upon runtime data. :-/
05:18:07ZevvI never designed this to be the way it is, it evolved like this. And knowing now what I did not know then, it probably still is the right way to do it - I just happen to touch some of the more cryptic parts of the language.
05:18:29Zevvcompiled type based on runtime data - elaborate?
05:20:43disrupteki'm going to supply some type translations, but i want to be able to let the user define their own. however, those definitions rely upon arbitrary data, so while i started off wanting to do this with simple generics, i couldn't figure out where the line gets drawn.
05:21:27Zevvdown the rabbit hole you go
05:21:38disrupteki was trying to make generics with a static type, so probably the wrong route. i think i need to use a macro to define everything and then the user can compose their own ad hoc.
05:22:37*narimiran joined #nim
05:24:29Zevvsounds a bit like what I'm trying to do here yes
05:25:09disruptekhey, is there a way for me to compose an npeg pattern with a full string acting as an atom?
05:25:20disruptekie. one i supply?
05:25:24disruptekdynamically.
05:32:26*solitudesf joined #nim
05:33:51disruptekthe problem with watching the jai dev stream is you really have no freakin' clue what is going on in the code, you have no access to the source, and it's written in a language only one person knows.
05:38:55FromGitter<Varriount> disruptek: Regarding npeg, could you explain?
05:39:58FromGitter<Varriount> Do you mean this? https://github.com/zevv/npeg/issues/7
05:40:59*absolutejam joined #nim
05:41:34disrupteki parse a simple pattern at one point, to perform variable substitution in path patterns/{like}/this where `{like}` represents a variable named `like`.
05:42:09disruptekthen i get a path like patterns/something/this and i want to validate it against the original source pattern.
05:42:42disrupteki'm doing this with a just a few lines of handwritten nim at the moment, but i'd rather trust npeg.
05:44:05disruptekthis just seems like a trivial problem that i've made more complex: https://github.com/disruptek/openapi/blob/master/paths.nim#L51
05:44:44FromGitter<Varriount> disruptek: That sounds
05:45:05FromGitter<Varriount> Gah, stupid mobile client
05:45:26FromGitter<Varriount> disruptek: Can you give an example of the text to match?
05:46:45disrupteksource pattern: "/pattern/{foo}/example"
05:47:04disrupteksample input to match: "/pattern/hello-world/example"
05:47:36FromGitter<alehander42> wow i used to do something like that
05:47:41FromGitter<alehander42> for my web lib
05:47:48FromGitter<alehander42> but i do it in a very naive way currently
05:48:19disruptekmy naive code works on thousands of existing apis, so it's not as though it needs replacing. i just find it kinda ugly. and it's mostly asserts. :-P
05:48:22FromGitter<alehander42> i still think validation is not enough: you want to capture right
05:49:06disrupteki don't need to capture it, i don't think, but i already caught the variables (and the constants, because they may composition easier). so, solved problem there.
05:49:39disrupteks/may/make/
05:52:34FromGitter<alehander42> but you capture foo="hello-world"
05:54:47disruptekno, i capture "/pattern/"->const[1], "foo"->vars[0], "/example"->const[1] and then i validate that "/pattern/hello-world/example" matches the capture.
05:56:01disruptekthere's an api for the api, you see, and i'm trying to validate it (the api as input) before i run off and spew a nim api for an api that doesn't match the api api.
05:56:49disruptekanyway, it's boring. it was just an idle question i had since zevv appeared to be active at the time. 😁
06:12:00Zevvzevv was walking the dog :)
06:13:11Zevvmake that "making an early morning hike", sounds more adventurous
06:14:30*kuon joined #nim
06:14:58*kuon__ quit (Ping timeout: 248 seconds)
06:37:57*absolutejam quit (Ping timeout: 245 seconds)
06:52:37FromGitter<awr1> stack overflow recommended me a question in the sidebar: "Can't understand how static works exactly"
06:52:54FromGitter<awr1> i don't think anyone using c++ understands just what on earth static is supposed to do /s
06:56:09*absolutejam joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:05:02*gmpreussner joined #nim
07:10:36FromGitter<mratsim> I only know about static inline
07:17:29*floppydh joined #nim
07:18:10FromGitter<alehander42> sounds pretty interesting disruptek
07:18:18FromGitter<alehander42> zevv what kind of dog do you have
07:20:56*salewski joined #nim
07:22:22Zevvvizsla!
07:22:28salewskiI have no idea what a shallowCopy for a char in a string may be, as in system.insert():
07:22:37salewskihttps://github.com/nim-lang/Nim/blob/master/lib/system.nim#L4009
07:22:52FromGitter<arnetheduck> what's the issue with static? it's kind of trivial, makes symbols not be exported from the translation unit / makes stuff declared inside a class not be a method (no this)
07:28:53*PMunch joined #nim
07:32:23*salewski quit (Quit: WeeChat 2.4)
07:36:12*kuon quit (Remote host closed the connection)
07:56:45FromGitter<alehander42> it's an overloaded term at the very least
07:56:51FromGitter<alehander42> which is not great
07:59:48FromGitter<alehander42> also, the global lifetime is a pretty important meaning too
08:05:20FromGitter<arnetheduck> lol, we had that discussion about nim t he other day, how var is overloaded.. sometimes it means reference, sometimes it means variable, sometimes it's magic-return-value-reference-for-a-while
08:05:53FromGitter<arnetheduck> @zah was defending it on grounds of keyword scarcity
08:10:21*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:17:13FromGitter<mratsim> var just means mutable
08:17:25FromGitter<mratsim> the pass by reference is an implementation detail
08:17:34FromGitter<alehander42> not sure if the same
08:17:44FromGitter<alehander42> but yeah, if they can be reasonably similar its ok
08:17:53FromGitter<alehander42> if they are very different no
08:17:54FromGitter<awr1> `var`'s usage as the equivalent to c++ pass-by-ref is fine
08:18:13FromGitter<mratsim> people shouldn't use var to pass by ref an immutable object
08:18:30FromGitter<mratsim> Nim already does the right thing with big objects even if you don't use var
08:18:51*hoijui joined #nim
08:18:59FromGitter<awr1> well yes
08:19:58FromGitter<awr1> which is why i suppose {.nimcall.} is not strictly defined
08:22:01FromGitter<arnetheduck> no, var in a parameter means pass-by-reference, unlike `var x = y`.. var in return means return-by-referece-until-lexical-scope-end
08:22:51FromGitter<mratsim> but the goal is mutation
08:23:14FromGitter<mratsim> both in parameter passing or as a return value
08:23:40FromGitter<mratsim> obviously to mutate you need a memory location but that's implementation detail
08:24:12FromGitter<arnetheduck> nonetheless, `var x=y` makes a copy, the other does a reference.. and `var x = f()` for `proc f(): var int` does a copy too :)
08:25:09FromGitter<awr1> how does the compiler determine what to internally pass by ref? is it like `{.byRef.}`and maybe some `sizeof` heuristic
08:25:24FromGitter<arnetheduck> sizeof essentially
08:27:11FromGitter<awr1> i'm trying to wonder why C++ never at least tried to do something similar for non-exportable functions
08:27:25FromGitter<awr1> but i guess it's because C++ is a mess plus the spec is too rigid
08:29:38FromGitter<arnetheduck> try to do what - pass by ref? c++ is pretty flexible about that, specially because it allows copy and move elision which means that it can do tricks like this
08:30:30FromGitter<awr1> wait yeah i'm dumb
08:30:37FromGitter<awr1> i forgot about move semantics
08:31:32FromGitter<arnetheduck> well, pass-by-ref is different - move has a cost that usually is higher than copying a pointer
08:32:09FromGitter<arnetheduck> in this case it's the elision semantics that make it work - it worked in pre-move c++ as well
08:33:11*krux02 joined #nim
08:34:04FromGitter<mratsim> The heuristics is, if the value type is bigger than 3 pointer sizes (so 12 bytes on 32-bit or 24 bytes on 64-bit) it's passed by pointer
08:34:13FromGitter<awr1> elision i mean
08:34:23FromGitter<mratsim> you can fix the behaviour with byref, bycopy pragmas attached to the type
08:35:27FromGitter<awr1> plus the whole return value elimination or w/e it's called
08:35:32FromGitter<mratsim> RVO
08:35:35FromGitter<awr1> yeah
08:35:45FromGitter<mratsim> if you construct in the result directly you have RVO
08:36:36FromGitter<mratsim> "result.foo = 1" gives you RVO ⏎ "result = Foo(foo: 1)" probably doesn't (unless C compiler help)
08:39:58FromGitter<awr1> i wish C/C++ compilers could do optimizations on struct layout if asked for (via a pragma or attrib or something). obviously "they can't by default" b/c that would betray the spec
08:40:05FromGitter<arnetheduck> just use `f(x): X = X(...)` - gives you RVO and none of that result sillyness
08:40:14FromGitter<awr1> although that sort of thing might require profile guidance
08:40:42FromGitter<arnetheduck> `rust` on purpose doesn't specify struct ABI by default, for that reason btw
08:40:55FromGitter<awr1> oh interesting
08:41:11FromGitter<mratsim> @arnetheduck I actually think it doesn't give you RVO, but last time I checked that was on 0.17.2
08:41:38FromGitter<mratsim> I had a memset on the result and on the X() object
08:41:42*absolutejam quit (Ping timeout: 245 seconds)
08:41:55FromGitter<mratsim> very annoying when it involves seq
08:42:15FromGitter<arnetheduck> the memset is there regardless - as soon as nim passes by ref it adds an extra memset - it's a bug actually, there's one memset too many
08:42:18FromGitter<mratsim> which was why I had noinit all over the place
08:43:28FromGitter<arnetheduck> would probably have to check again, I noted it when doing the equivalent `nlvm` code.. in fact, the codegen there would do well to add restricts and stuff - then there's the question of who does the reset - caller or callee etc
08:44:01FromGitter<awr1> how usable is nlvm right now?
08:45:57FromGitter<mratsim> Araq said that he will add restrict at one point. He also said that it was a silly workaround ¯\_(ツ)_/¯
08:46:33FromGitter<arnetheduck> the important thing to remember though is that `result` was made to implement RVO, but it's not actually needed, one can do both NRVO and RVO without. so the reason now is basically... @Araq likes to have an extra implicit variable in there to encorage the writing shitty code that risks partial initialization bugs, and thinks it's hard for programmers to write `var result: T` in their proc body because it will make
08:46:33FromGitter... their already bad code a bit worse :)
08:47:31FromGitter<awr1> result is useful syntactic sugar
08:48:37*shomodj joined #nim
08:48:55FromGitter<awr1> it's one of those things that are "cute" and it's easy to live without them, but it's nice to have them anyway
08:49:15FromGitter<arnetheduck> yeah it's great. you get a reserved variable name which gives you a total of 3 ways to return a value so that you have plenty to choose from.. of those, using result and partially initializing (`result.x = a; result.y = b`) is the only one that the compiler has a hard time analyzing, ensuring that you've fully constructed your object. great.
08:50:13FromGitter<mratsim> don't edit with a IRC/discord/matrix bridge
08:52:54FromGitter<awr1> i mean i know where you're coming from but that doesn't seem like that big of a deal to me so as long as you deal with return values within the context of a single proc consistently
08:54:50FromGitter<awr1> there are a million and a half ways to shoot yourself in the foot with every language, which i suppose leaves "which 'useful features' are actually a net loss" a matter of...something you have to "feel for," i guess?
09:02:58*aexoxea joined #nim
09:08:31*rokups joined #nim
09:08:46FromGitter<arnetheduck> > how usable is nlvm right now? ⏎ ⏎ works on linux for most things, unless you use c++ / emit / don't specify correct abi.. ie can compile itself
09:09:09FromGitter<arnetheduck> right, no editing. bridges.. sigh
09:09:12*Lord_Nightmare quit (Ping timeout: 245 seconds)
09:09:52*Lord_Nightmare joined #nim
09:14:32*kamranation[m] joined #nim
09:15:27*kamranation[m] left #nim (#nim)
09:17:11*sammich quit (Read error: Connection reset by peer)
09:17:43*sammich joined #nim
09:17:43*sammich quit (Changing host)
09:17:43*sammich joined #nim
09:31:28*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:41:52lqdev[m]is it safe to create a thread as a variable right before an infinite loop, or does the thread have to be a global variable?
09:42:39lqdev[m]iirc all threads should be global, which I definitely do not like
09:43:08*Vladar joined #nim
09:46:26*theelous3 joined #nim
09:48:29lqdev[m]all I need the thread to do is call a proc in a while true loop, so that the main thread remains free to do OpenGL stuff
09:57:17*shomodj joined #nim
10:04:34*MrAxilus[m] quit (Write error: Connection reset by peer)
10:04:35*zielmicha[m]1 quit (Remote host closed the connection)
10:04:39*mattisme quit (Write error: Connection reset by peer)
10:04:40*TheManiac[m] quit (Read error: Connection reset by peer)
10:08:00*spymasterd[m] quit (Ping timeout: 252 seconds)
10:08:03*gh0st[m] quit (Ping timeout: 252 seconds)
10:08:04*Connor[m] quit (Ping timeout: 252 seconds)
10:08:07*meff[m] quit (Ping timeout: 250 seconds)
10:08:07*BaldEagleX02[m] quit (Ping timeout: 250 seconds)
10:08:09*johnjane[m] quit (Ping timeout: 248 seconds)
10:08:21*yglukhov[m] quit (Ping timeout: 252 seconds)
10:08:21*k0mpjut0r quit (Ping timeout: 252 seconds)
10:08:27*skrylar[m] quit (Ping timeout: 250 seconds)
10:08:28*planetis[m] quit (Ping timeout: 250 seconds)
10:08:33*narimiran[m] quit (Ping timeout: 265 seconds)
10:08:37*leorize[m] quit (Ping timeout: 265 seconds)
10:08:42*nergal[m]1 quit (Ping timeout: 252 seconds)
10:08:50*macsek1911[m] quit (Ping timeout: 276 seconds)
10:08:50*xomachine[m] quit (Ping timeout: 276 seconds)
10:08:50*Miguelngel[m] quit (Ping timeout: 276 seconds)
10:08:50*isaac[m] quit (Ping timeout: 276 seconds)
10:08:50*Demos[m] quit (Ping timeout: 276 seconds)
10:09:04*GitterIntegratio quit (Ping timeout: 264 seconds)
10:09:08*lqdev[m] quit (Ping timeout: 248 seconds)
10:09:28*BitPuffin quit (Ping timeout: 276 seconds)
10:09:28*Swednec8 quit (Ping timeout: 276 seconds)
10:09:41FromGitter<mratsim> shouldn't the GPU do OpenGL stuff?
10:09:47*gangstacat joined #nim
10:14:52*sealmove joined #nim
10:14:54*shomodj_ joined #nim
10:15:53sealmoveAraq, dom96: I have a complication with forum account. I couldn't activate it so I deleted it and tried to re-create it, and not I get an error "Invalid ident hash".
10:18:22*shomodj quit (Ping timeout: 245 seconds)
10:28:06*dddddd joined #nim
10:31:39FromGitter<mratsim> activation is a bit flaky, I activate people's account manually when I notice
10:37:34*stefanos82 joined #nim
10:38:07sealmoveah, shouldn't have deleted account then :|
10:40:14*clyybber joined #nim
10:47:40*Connor[m] joined #nim
10:56:14*hoijui quit (Quit: Leaving)
11:09:02*BitPuffin joined #nim
11:09:02*TheManiac[m] joined #nim
11:09:03*Demos[m] joined #nim
11:09:03*k0mpjut0r joined #nim
11:09:03*isaac[m] joined #nim
11:09:03*GitterIntegratio joined #nim
11:09:03*leorize[m] joined #nim
11:09:03*mattisme joined #nim
11:09:03*gh0st[m] joined #nim
11:09:03*nergal[m] joined #nim
11:09:04*Swedneck2 joined #nim
11:09:04*MrAxilus[m] joined #nim
11:09:10*spymasterd[m] joined #nim
11:09:10*planetis[m] joined #nim
11:09:10*johnjane[m] joined #nim
11:09:10*meff[m] joined #nim
11:09:10*xomachine[m] joined #nim
11:09:10*zielmicha[m]1 joined #nim
11:09:10*yglukhov[m] joined #nim
11:09:11*narimiran[m] joined #nim
11:09:11*skrylar[m] joined #nim
11:09:13*Miguelngel[m] joined #nim
11:09:13*lqdev[m] joined #nim
11:09:47*macsek1911[m] joined #nim
11:09:47*BaldEagleX02[m] joined #nim
11:23:21clyybberAraq: I found a real issue in the current spec/design, which is easily fixable.
11:23:52clyybberJust ping me when you are here
11:30:51*lqdev[m] quit (*.net *.split)
11:30:52*skrylar[m] quit (*.net *.split)
11:30:52*planetis[m] quit (*.net *.split)
11:30:52*TheManiac[m] quit (*.net *.split)
11:30:52*GitterIntegratio quit (*.net *.split)
11:32:20*yglukhov[m] quit (*.net *.split)
11:36:34*ryukophone quit (Ping timeout: 276 seconds)
11:37:04*lqdev[m] joined #nim
11:37:04*skrylar[m] joined #nim
11:37:04*planetis[m] joined #nim
11:37:04*GitterIntegratio joined #nim
11:37:04*TheManiac[m] joined #nim
11:38:06*yglukhov[m] joined #nim
11:43:44*ryukophone joined #nim
11:49:52*ryukophone quit (Ping timeout: 264 seconds)
11:50:19*ryukophone joined #nim
12:04:16*dddddd quit (Remote host closed the connection)
12:05:32*dddddd joined #nim
12:13:55*aexoxea quit (Quit: Goodbye!)
12:19:59*fvs joined #nim
12:25:44fvshi, I'm having a problem with parameter substitution using db_postgres. floats added to ? as in ('POINT(? ?)' comes across as 'float' as in ...('POINT('-97.398444' '33.0365... Any ideas?
12:31:37fvshere code snippet and error: https://pastebin.com/xaQ0KkFd
12:39:47shashlickhttps://github.com/nim-lang/Nim/pull/11814 is now green
12:45:13narimiranhttps://github.com/nim-lang/Nim/pull/11814 is now merged
12:48:37shashlickThanks @narimiran
12:54:19*skelett joined #nim
12:57:00krux02sealmove, clyybber, hey it is pointless to adress Araq right now, he is on vacation
12:57:57krux02I will remind him that he should probably log out, or write a bot that automatically replies that he is on vacation.
12:58:03disrupteki wish our president worked as hard as araq does when he's "vacationing". the orange man spends most of his time at his golf clubs.
12:58:35krux02I am happy that he is not my president.
12:58:44PMunchkrux02, +1
12:58:53krux02I feel sorry for the united states
12:59:23PMunchLooking around other countries I'm sorry for quite a few of them
12:59:37krux02yea
12:59:51krux02Russia, Turkey, North Korea
12:59:53PMunchNorway has some nuts as well, but at least they don't seem to be getting a lot of power..
12:59:58PMunchUK?
13:00:01FromGitter<alehander42> looks at the balkans "guys.." :D
13:00:43*sagax quit (Ping timeout: 244 seconds)
13:00:50FromGitter<alehander42> western europe was always viewed as a shining example here
13:01:04krux02and mr Orange President really tries to be best friend with Putin and Kim, but he refuses to shake hand with Merkel.
13:01:08FromGitter<alehander42> (but this changed a bit in the last several years)
13:01:18Zevvdudes. politics, really?
13:01:28krux02yea
13:01:29Zevvweather if fine, dogs are ok, but please
13:01:33FromGitter<alehander42> netherlands doesnt have funny politics you jelly
13:01:46Zevvha
13:01:54FromGitter<alehander42> oh man, one of the biggest political scandals in our country was about dogs
13:01:56FromGitter<alehander42> last month
13:02:12FromGitter<alehander42> so dogs can be political!
13:02:12Zevvnot my dog. not my back yard.
13:02:16disrupteki mean, it was really a comment about "our" bdfl, but... https://www.trumpgolfcount.com/
13:02:18shashlickmove to offtopic?
13:02:50PMunchWell there isn't much going on here
13:03:04krux02why is it so expensive when he is golfing?
13:03:10disruptekanyway, i managed to break to naive validator.
13:03:21krux02I mean half a million for playing golf once?
13:03:23PMunchkrux02, secret service
13:03:29disruptekkrux02: opportunity cost, without respect to the obvious.
13:03:38PMunchCosts a lot to provide security for such a large open area
13:03:48*nsf quit (Quit: WeeChat 2.4)
13:04:06disruptekit might be cheaper if fewer people wanted to assassinate him.
13:04:13*disruptek 🤷
13:05:18shashlickany glaring nimble issue that needs fixing?
13:06:04krux02I think you should give mr president a virtual Golf environment in his Office and a fake Phone without internet that simulates controversy whenever he tweets something.
13:06:24*sagax joined #nim
13:06:42narimirana new channel is needed: #nim-politics
13:07:07disruptekso anyway, i'm back to trying to replace greedy regexp. ;-)
13:07:20krux02I think these off topic channels are really pointless.
13:07:26FromGitter<alehander42> nope
13:07:32FromGitter<alehander42> it's there, it's one command away
13:07:33krux02nobody goes there
13:07:42krux02you need channels for specific topics.
13:07:55disruptekcommunity cannot exist in a purely technical context.
13:07:56FromGitter<alehander42> i often talk with people in the offtopic channel
13:08:00FromGitter<alehander42> very often
13:08:10krux02I don't
13:08:13FromGitter<alehander42> maybe thats why nobody goes there
13:08:25disruptekthey are afraid to talk to you?
13:08:35disruptekthey only want to talk to krux02?
13:08:37Zevvhe only wants to talk dogs :)
13:08:38FromGitter<alehander42> i think specific channels are overkill: they would be even emptier
13:09:05FromGitter<alehander42> maybe slack-like threads would be better
13:09:12FromGitter<alehander42> btw gitter *are* adding those
13:09:17krux02Most of the time I only talk when people directly ask me a question That was different before I worked for Nim.
13:09:20FromGitter<alehander42> but iirc they are still in beta
13:09:38disruptekanyone used zulip? zulipchat.com
13:09:50FromGitter<alehander42> you can create krux_secret_04
13:10:07FromGitter<alehander42> i tried to assess it for use in my job
13:10:13FromGitter<alehander42> it seemed pretty good
13:10:24krux02disruptek, I just looked it up, and the claim "The world’s most productive team chat" really bothers me.
13:10:36FromGitter<alehander42> but havent moved to it yet (i basically bancrupt the slack free plan as i post too many short messages)
13:10:56krux02if you make such claims, then provide a like to the source of that information.
13:11:00FromGitter<alehander42> marketing speak is inevitable
13:11:18disruptekit's something nim could do with a little more, distasteful as it is.
13:11:43disruptekalehander42 alone doubled my irc bill when i started hanging out in #nim.
13:13:04narimirankrux02: you might be bothered, but for one krux02 there are 1000s of other people who don't feel that way. (hint: look at the vlang)
13:13:40krux02honestly I don't get the point of vlang.
13:14:09krux02Yea it is yet another programming language. But I don't understand what makes it structurally better than what we already have.
13:14:12narimiranvlang is currently sitting at 10k github stars. how many does "honest nim" have?
13:15:17FromGitter<alehander42> disruptek: haha
13:15:20krux02The point is, we don't need to lie about Nim features to make Nim more popular.
13:15:47narimiranthat's true and i agree that nim's features should speak for themselves
13:15:48FromGitter<zah> I think Nim's web-site can do much better job at telling what makes Nim unique though
13:15:49FromGitter<alehander42> i can send you post marks
13:15:50krux02Nim has great, even outstanding features, that no other language that I ever took a look at provides.
13:16:02krux02They are just not used to sell Nim. And that is really bothering me.
13:16:53narimiranhere's an example: we now have HCR, right? where are the flashy examples?
13:17:04shashlicki think # of users is going up slowly
13:17:06FromGitter<zah> Even the very old web-site created by Araq was telling the story better. If I stumble on Nim's web site today with fresh, I may even pass it as "oh, just anoter ooc"
13:17:20narimiranvlang has it and it has made a simple example where a color of a rectangle changes - people are impressed by it
13:17:26shashlickbut the recent article also summed up nim as not ready, it's kind of bogus
13:17:29narimiranpeople are not impressed by reading manual.rst
13:18:18krux02I think we should sell Nim as the typed macro programming language.
13:18:32FromGitter<alehander42> i think the most impressive thing at this stage would be 3rd party projects: various libs/tools written in nim getting reddit/HN readers to notice it
13:18:44livcdshashlick: what article?
13:19:01FromGitter<alehander42> at least i see so many of those for go/rust and people are like "oh i should try to write something like that/research this"
13:19:03krux02because that is what it can do very well, and that is also what sets it apart from any other programming language out there. Everything else is details.
13:19:19disruptekwell, i am looking to hire a couple people this year to write nim. i am not sure how to go about that, but i think i want to try streaming daily to try to attract like-minded devs.
13:19:24narimiranlivcd: https://www.infoq.com/articles/got-nim/
13:19:41disrupteki really didn't like that article.
13:19:58narimirankrux02: according to you, out of 1000 randomly chosen programmers, how many of them are interested in that topic?
13:20:16shashlickit was such a mixed article
13:20:26shashlickusual 1.0 will save the world nonsense
13:20:54krux02disruptek, don't try to hire people who can program Nim. Try to hire people who know C++ or are attracted to more exotic programming lanugages such as haskell or clojure. If you know programming Nim is not hard to learn at all.
13:20:58disruptekthing is, the whole promise of nim is its bare-metal metaprogramming. the power is there to blow everything else out of the water.
13:21:22krux02Nim doesn't invent programming, it just enables styles of programming that would not be possible in other languages.
13:21:31shashlickand he quotes @dom96 from a 2.5 year old reddit thread
13:21:47krux02Yea and certain styles of programming are just broken in Nim (combinining all features of Nim at the same time).
13:22:42disruptekclojure is my lisp of choice, so, yeah, but really i'm looking for people who are signed up on the goal of the project, and i want to advertise nim as a cool way to work.
13:23:08krux02well, Nim isn't popular enough to work that way.
13:23:30disruptekthat's what we're trying to change. ;-)
13:23:32FromGitter<zah> @disruptek, what kind of project do you have in mind?
13:23:53krux02I heared of a company trying to hire D programmers. They just hired C++ programmers and then afterwards they found out that it was about D.
13:24:18livcdthat's not a good strategy
13:25:20FromGitter<alehander42> krux02: other languages start to catch up a bit with macros: rust already have powerful macros as well e.g.: https://www.reddit.com/r/rust/comments/cguo6e/announcing_macro_that_makes_async_fn_in_traits/ (or the typed html macro)
13:25:44disrupteki'm building a product search that uses semantic data to suggest or ask the user pointed questions to help them find stuff.
13:26:01FromGitter<alehander42> i agree that most of those macro systems are not as easy to use / powerful as nim's , but its not an absolutely unique feature
13:26:38krux02alehander42: I don't understand reddit.
13:26:45disruptekit plugs into an existing product i built a few years ago and received a patent on last year, which is already monetized.
13:26:49FromGitter<zah> nevertheless, I agree with @krux02 that the meta-programming should be our primary selling point
13:27:02disruptekexactly.
13:27:05FromGitter<zah> and eventually safety when we close the gap with Rust
13:27:05krux02all I see is a bold claim again and then some people cheering, "WOW ... how awesome is that"
13:27:19krux02would be an episode of dragonball Z
13:27:46livcdEven large companies are willing to bet on a super niche language if it solves their problems
13:27:53FromGitter<alehander42> krux02 i had to link the article, sorry: but still, it makes sense: other language users find out macros are very useful and say "awesome"
13:28:01livcdby large i mean old enterprise companies
13:28:02disrupteksure, you can do similar stuff in lisp, but not at anywhere near the same speed or with anything like the same ffi.
13:28:11*shomodj joined #nim
13:28:25FromGitter<alehander42> disruptek oh so thats why you are building the openapi tools
13:28:34krux02before I started with Nim, I did try out Rust. The macros were, well, I would not call them macros.
13:28:46FromGitter<alehander42> krux02: but their macro system evolved a *lot* since then
13:28:52disruptekyeah, but openapi could be a bit of a gamechanger for nim if it's done really well.
13:28:56krux02what can Rust macros do by now?
13:29:16FromGitter<alehander42> they have procedural macros (which run CT code) working on token streams which in some cases are more powerful, in some senses less
13:29:39FromGitter<alehander42> e.g. this means you can even design your own syntax if it can be lexed by rust
13:29:57disruptekhow 2004.
13:29:57FromGitter<alehander42> but it has other limitations(and usually AST is much easier to write for)
13:30:06krux02well, that is neat, but still, they are not typed like in Nim.
13:31:07FromGitter<alehander42> the best example is html-like typed dsl : https://github.com/bodil/typed-html
13:31:22leorizelooking at nim-lang.org, there's only one example attempting to show off macros, but it doesn't show how you can make cool DSLs in Nim
13:31:30FromGitter<alehander42> well, i am not sure about `typed`, sorry, probably youre right
13:32:06disruptekthat looks like the nim source code filter. 😀
13:32:13FromGitter<zah> yes, the big difference is that Nim's macro interact fully with the type system (i.e. they participate in overloading)
13:32:20*shomodj_ quit (Ping timeout: 268 seconds)
13:32:24FromGitter<arnetheduck> I suspect if anything, nim has a future as a fast python - convenient to hack stuff together quickly, easy on the programmer, but still ok performance
13:32:34krux02zah: that is the selling point.
13:32:51leorizebut we don't sell it, at least not on the front page
13:33:10FromGitter<arnetheduck> systems programming, well, I'm not sure "very clever macros, let's hope you understand them" is a selling point there - safety tends to be however
13:33:13*HP-YC9 joined #nim
13:33:32disruptekthing is, if you code in dynamic languages for awhile, you get used to hacking that way. to be able to write the same sort of constructs and have it run at bare-metal speeds is huge.
13:33:35FromGitter<arnetheduck> same for cryptography. fancy macros? no. safe from memory corruption and overruns? yes. allocation-free? yes.
13:33:37FromGitter<alehander42> yeah, i suspect some other small languages also have similarly capable macro systems, as CT code is indeed popular for modern languages, but the mainstream ones do not afaik
13:34:25FromGitter<alehander42> i dont quite agree, macros are a selling point for rust and its main usage is system stuff
13:34:26FromGitter<arnetheduck> ctfe is nothing special these days
13:34:52FromGitter<alehander42> (talking about macro + type overloading ^)
13:34:52FromGitter<zah> @arnetheduck, meta-programming is everywhere. how about automatically lifting Merkle-proof verfiers from high-level code?
13:35:38FromGitter<arnetheduck> well, they'll be happier if the compiler formally verifies that their code is XXX-free for a large set of properties XXX
13:36:18FromGitter<zah> it's no coincidence that the languages used for proving things have a type system even more complicated than Nim's
13:37:12FromGitter<zah> I'm pretty sure I can prove more program properties in Nim than in Rust
13:37:31FromGitter<zah> albeit, still not the most important ones at the moment :)
13:38:00disruptekespecially as more dfa comes online.
13:38:30FromGitter<arnetheduck> convenience for the programmer however is what entire nim smells of.. the library and the compiler are not beautifully composed from a core set of axioms and theories - they've been mashed together with a hammer and there's bits and pieces sticking out here and there - every module looks different depending on which era of nim features it comes from - it smells of pragmatic craftsmanship, not theoretical beauty
13:39:28disruptekyou think this, the first stdlib impl, is turning people off from realizing the last stdlib impl?
13:40:37shashlickI think you are overestimating most programmers who just want to get things done and do glue code
13:41:00livcdmost businesses want to get things done
13:41:10shashlickthey want a library and call a few functions here and there
13:41:26shashlickwho needs macros for that?
13:41:29FromGitter<arnetheduck> well, and that's a strength for nim - it doesn't get in the way of that
13:41:29FromGitter<zah> anyway, in Marketing, the rule of the land is "differentiate or die". Nim's differentiation is its meta-programming capabilities. Perhaps you are just not the right buyer :) That' still helpful to us, as we get a fresh perspective from time to time though
13:41:39krux02shashlick, well yes those programmers exist. And then there those programmers who care about what they write. Those two types of people don't get along.
13:41:49shashlickso if you want mass adoption, you cannot highlight macros and performance and stuff like that
13:41:56disruptekrich, powerful, performant libs can come later. it's not like we have to carry weight in the stdlib.
13:42:14krux02shashlick: we don't want mass adoption.
13:42:44krux02We want adoption from people who count.
13:43:29krux02getting a foundation of projects that people rely upon. Then we can talk about mass adoption.
13:43:36shashlickthen it will be a small community cause most people who do python don't know much beyond a 2 week crash course and stack overflow
13:44:26krux02I am ok with a small community. As long as the community is healthy, stable and focussing on the right things.
13:44:29livcdThe tools (Nim) do not really matter that much only what you can do with them
13:44:53FromDiscord_<Avatarfighter> Quick question, I was trying out the jsffi module to wrap the jquery `$(#)` function but when I tried to compile my code for the js backend I get an error that says "invalid extern name: '$(#)'. (Forgot to escape '$'?)". I'm not sure what is incorrect about my code since I only have two lines, one that imports jsffi into the file and the other that show import the `$(#)` function which i got from https://nim-lang.org/docs/jsffi.html
13:45:01FromDiscord_<Avatarfighter> Also howdy everyone !
13:45:14krux02hello
13:45:58*sealmove quit (Quit: WeeChat 2.5)
13:46:40FromDiscord_<Avatarfighter> I also have to add on to my question that I tried making the pragma a raw literal via doing `{. importcpp: r"$(#)" .}` and I also tried making it a cstring due to me running out of options
13:48:25FromDiscord_<Avatarfighter> im a bit perplexed as to how to remedy this issue, any suggestions or ideas will bring me one step closer haha 😃
13:48:52leorize[m]# in importcpp means the first argument
13:49:21FromGitter<alehander42> usually you can wrap JQuery
13:49:28FromGitter<alehander42> jQuery *
13:49:29FromGitter<alehander42> its an alias for $ iirc
13:49:43dom96arnetheduck: I was discussing Nim with a few people that are trying out Rust in my office yesterday, and I realised that I have no idea why Status chose Nim. Can you shed some light?
13:49:46FromGitter<alehander42> but your question is still valid
13:52:00shashlick@krux02 sounds good to me - fact is that anyone who chooses Nim will become a better programmer but it is hard path since most folks are average
13:52:37shashlickSo things that are most appealing are performance, compile time checks and small binary
13:52:44FromGitter<alehander42> krux02: if this is about 3rd party libs with mass adoption, you will have projects with good and bad quality and people will be able to to depend on the stable one-s: thats how it works in all succesful language: ⏎ ⏎ a small community probably can't create a big/feature-full enough foundation imho
13:53:21krux02small binary really isn't important at all.
13:53:24FromGitter<arnetheduck> well, eth researchers are using python so there's syntactic convenience. there's also the opportunity to grow the language together with the project, and the simple fact that it wasn't "taken" by any other ethereum project - of the languages that are "good enough"
13:53:41FromGitter<alehander42> and @krux02 this attitude leads to stuff like the haskell ecosystem imo
13:53:42shashlick@dom96 while you are here - which nimble defect is your highest priority
13:53:49FromGitter<alehander42> which is not something you or me would use probably
13:53:54FromGitter<alehander42> so much
13:54:27shashlick@krux02 it is for any scripting language
13:54:42*hoijui joined #nim
13:55:02dom96shashlick high pri issues (if there are any left?)
13:55:05krux02I didn't program haskell beyond the university exercises, so what is the problem with the Haskell ecosystem?
13:55:17shashlickThere are many so wanted your opinion
13:55:24shashlickI was going thru one at a time
13:55:28FromGitter<arnetheduck> there's a certain boldness to status' decision as well - it's not a decision a rational company doing a product for money would necessarily take - given that we have to write practically *every single part* from scratch
13:55:55FromGitter<alehander42> well, i've heard a lot of opinions that a lot of the libs are kinda over-engineered / under-document / a bit hard to understand
13:55:56FromGitter<arnetheduck> upside of being funded the way we are though, with an explicit goal to stimulate public good
13:56:20FromGitter<alehander42> as experts are so good at writing such code, that its often hard for them to make it easy to use for everyone
13:56:36FromGitter<alehander42> at least in a language with a type system as extensible as haskells
13:57:54krux02I have a feeling that Haskell isn't really used outside of universities with theoretical problems to solve. The only real problem Haskell can do well is implement a compiler.
13:58:01FromGitter<alehander42> but thats very anecdotical, so i am probably wrong
13:58:05dom96I see. That's interesting.
13:58:16FromGitter<alehander42> eh, people use it for various business-es afaik
13:58:36krux02well maybe.
13:58:45krux02Haskell is not tho worst language to choose.
13:58:46dom96krux02: That's not the case, FB uses it for example for real problems.
13:58:56krux02But I have seen the trend towards overengeneering in Scala.
13:58:58FromGitter<alehander42> exactly
13:59:08FromGitter<alehander42> afaik ocaml is often used from the FP-s
13:59:13krux02FB?
13:59:16*fvs left #nim ("WeeChat 1.6")
13:59:53FromGitter<arnetheduck> haskell is used a lot in finance (thanks to that safety) and data processing (thanks to how functional apporach lends itself to it)
14:00:32krux02here this is what I know from the scala overengineering word: https://github.com/scalaz/scalaz
14:00:58FromGitter<alehander42> jane street is one of the most popular ocaml users/code contributors as well iirc
14:01:56krux02I haven't used ocaml, but I have a feeling it is a more grounded Haskell.
14:03:01narimiranocaml and F# are brother and sister
14:03:26FromGitter<alehander42> me as well
14:03:56FromGitter<alehander42> if i write a project in not nim one day, i'll probably try to stay with ocaml
14:04:53*PMunch quit (Remote host closed the connection)
14:06:39dom96krux02: Facebook
14:09:18krux02yea I thought so by now
14:10:27FromGitter<alehander42> btw any opinions : https://julialang.org/blog/2019/07/multithreading
14:11:20clyybberI feel like mass-adoption and a massive community is not a good thing most of the time
14:11:32clyybberRather a community composed of the "right" people
14:12:46FromGitter<mratsim> @alehander42 yeah I read that one, related to my multithreading research. It seems like normal work stealing
14:12:55FromGitter<alehander42> but if you have a big community, it will have more of the "right" people
14:12:57FromGitter<alehander42> than a small community
14:13:01clyybberIf you attract every person, you will eventually end up with packages like isOdd, and people will use them.
14:13:03FromGitter<alehander42> and more of all kinds of people
14:13:06FromGitter<mratsim> you also have more shackles
14:13:11FromGitter<alehander42> including people that you didnt expect are "right"
14:13:34FromGitter<alehander42> clyybber, well, all popular languages have big communities, and most dont have isOdd
14:13:47FromGitter<alehander42> and still javascript is much better now
14:13:52FromGitter<alehander42> than if it had a small community
14:14:31*ryukophone quit (Ping timeout: 276 seconds)
14:14:51*ryukophone joined #nim
14:14:53FromGitter<alehander42> many many good programmers would not see a need to invest time in writing nim libs/code
14:14:57FromGitter<alehander42> if it has a small community
14:15:54FromGitter<mratsim> yes of course
14:17:32FromGitter<alehander42> every additional person is a good thing for nim imo
14:18:33livcdalehander42: but what languages that are popular do not have a massive corporate backing?
14:19:03FromGitter<alehander42> python, ruby, perl, lisp, php all got massively popular
14:19:03krux02pleas don't compare anything with javascript.
14:19:07FromGitter<alehander42> without much backing imo
14:19:41livcdalehander42: i can only agree maybe with perl or php
14:19:51clyybberalehander42: But did that popularity really make these languages better?
14:19:52krux02well lisp certainly had a lot of backing
14:20:01FromGitter<alehander42> krux02 this is naive: javascript has a lot of bad stuff, but also a lot of good tech as well
14:20:18FromGitter<alehander42> it s just a tool which was the only frontend target until last years
14:20:29krux02it came from a time where programming without a shit ton of money wasn't even possible.
14:20:49FromGitter<alehander42> clybber : of course it did, because most of the good tech in those languages came from people that adopted them
14:20:50livcdalehander42: python's backing is massive, ruby's not so much but still it's pretty big
14:21:06FromGitter<mratsim> agree with Krux02, we should compare language from afteer the internet boom
14:21:08FromGitter<alehander42> but thats the point! python's backing is huge *because* it got so popular even without corporate abcking
14:21:18FromGitter<mratsim> now people are drowning with new languages information and sollicitations
14:21:52FromGitter<alehander42> ruby: if it didnt manage to get dhh/basecamp, nobody would write rails and make it massive in web
14:22:02krux02well, there are also these languages that are just like C but with problem X solved.
14:22:02*ryukophone quit (Read error: Connection reset by peer)
14:22:14livcdalehander42: I think it was always pretty huge when Google and alikes started using it
14:22:22*ryukophone joined #nim
14:22:27FromGitter<alehander42> livcd: well, exactly
14:23:01clyybberalehander42: In what way did js become better?
14:23:13krux02I think a lot of programming languages should be a good thing, but sadly we did not solve the cross language interface problem.
14:23:20clyybberIt is now easier to write a beautifully extremely bloated website
14:23:27FromGitter<alehander42> well, the last versions are way better than the previous, and typescript is actually a fine lang itself
14:23:51livcdclyybber: like the new gmail?
14:23:52krux02I want to live in a world where I can be happy when there is a new great rust library, because it will improve my live in Nim. But sadly that is not the case.
14:23:52FromGitter<alehander42> and people wrote a ton of useful libs in it
14:24:06FromGitter<alehander42> i am mostly talking about 3rd party libs here
14:24:10FromGitter<alehander42> in this discussion
14:24:51livcdkrux02: that sounds like what GraalVM is doing
14:25:05FromGitter<alehander42> @krux02 well you should be able to reuse a rust library in principle ? if it has a c api and one wraps it?
14:25:32FromGitter<mratsim> it has
14:25:47clyybberkrux02: Thats why C still being a low level standard is a good thing IMO
14:25:51FromGitter<mratsim> we are often on the fence on improving Rust/Nim interop
14:26:06livcdhttps://www.graalvm.org/docs/reference-manual/polyglot/
14:26:07FromGitter<mratsim> as the crypto world is going the Rust way
14:26:13krux02alehander42: that is exactly the point, the "if"
14:26:20shashlickwindows has started hiding my executables saying they are not secure
14:26:24clyybberalehander42: Sure, but there are too many libraries in js, just look at this guy: https://github.com/KhronosGroup/Vulkan-Headers/commits/master
14:26:29shashlickany idea how to avoid this
14:26:44clyybberwrong link: https://github.com/jonschlinkert
14:26:48FromGitter<alehander42> clybber but thats the point: its better to have choice between 10 good and 10 not so good libs, than having a 1-2 ok libs
14:26:53ldleworkat times a language is not worth using as it's ecosystem isn't as "rich as python's"
14:27:03ldleworkturn around and a language is not worthing because it has too many choices
14:27:04FromGitter<alehander42> yep^
14:27:15ldleworki conclude people just like to hear themselves say something
14:27:18clyybberHe has hundreds of useless packages, that get included in hundreds of a bit more useful packages that get included in hundreds of even more useful packages and so on
14:27:53FromGitter<alehander42> clyybber but thats a mostly javascript problem: so it is not a problem for each popular lang
14:27:57FromGitter<alehander42> its a good problem to have
14:28:01FromGitter<mratsim> ugh: https://github.com/jonschlinkert/is-number
14:28:06ldleworkwhen the price of adding a package approaches the limit of zero, then the justification for smaller, more universal modules goes up
14:28:22FromGitter<alehander42> thats like saying "oh we earn so much money for our product its hard to organize our new offices"
14:28:26ldlework"ugh" isn't an argument
14:28:34clyybberugh is an argument.
14:28:40clyybberWhy would one need this?
14:28:44ldleworknot one that convinces anyone who doesn't already agree with you
14:28:50FromGitter<mratsim> because they don't have a type system
14:28:54ldleworkif you're in the business of neurologically rewarding yourself with zero effort
14:29:00ldleworkthen "ugh" i guess is an argument
14:29:08FromGitter<alehander42> guys, chill
14:29:20FromGitter<alehander42> ok, all languages which are popular, but not JS dont have the is-number thing
14:29:24FromGitter<alehander42> nobody said "lets become js"
14:29:36FromGitter<alehander42> but "lets not become a fogotten language with no ecosystem/base"
14:29:47clyybberldlework: Well, im not sure anyone sane needs to be convinced of the fact that those packages are useless
14:29:52FromGitter<alehander42> the is-number thing is not relevant to this discussion
14:29:58ldleworkassuming everyone agrees with you
14:30:04ldleworkah classic source of neurological hits
14:30:31krux02I am actually happy that the Browser is not my business.
14:30:38clyybberalehander42: Ok, but less people means less people calling for features that wouldn't fit in a language.
14:30:45FromGitter<alehander42> idlework, self affirming trash talk is also just a source of "neurological hits" mate
14:31:00ldleworkself-affirming?
14:31:01krux02yea please chill
14:31:06FromGitter<alehander42> clyybber, well thats just a matter of governance
14:31:17FromGitter<alehander42> look at go: so popular and still barely changes
14:31:17krux02there is nothing worth to fight about.
14:31:30ldleworkpointing out that your arguments are bad isn't a personal attack
14:31:47krux02go is actually a pretty well designed language. I used it. I doesn't need to be constantly changed.
14:31:49ldleworknot sure how it is "self-reaffirming"
14:31:55clyybberalehander42: Yeah, you have a point there.
14:32:11krux02They just thought "no generics" is a good thing.
14:32:22FromGitter<alehander42> i dont like go as a language, but i agree their governance model is nice
14:32:43clyybberWe could make a long-bet wether or not go will eventually get generics or not.
14:32:59FromGitter<alehander42> honestly, looking at the way the new-error-handling thing is going
14:33:08krux02I used Go enough to say that a lot of things in go just work. They are not a mess like in other languages such as C or Nim
14:33:08FromGitter<alehander42> not sure if they'll add generics after all
14:33:12clyybberI'd argue it will, just for the sake of my argument, but I'm not so sure :p
14:33:48krux02The only thing that is a mess in go is the code generation mess caused by the "no-generics" constraint.
14:34:19clyybberkrux02: Araq sometimes answers, even if on holidays tho, right?
14:34:22FromGitter<alehander42> and of no-macros
14:34:26krux02And I honestly think that generic code is overused in many projects. So I totally understand why people want to create a language again where generics are not an option.
14:34:40ldleworkHow does one overuse generics?
14:34:43krux02clyybber, right, but don't bet on it.
14:34:48ldleworkIs an implementation either generic, or not?
14:35:02ldleworkWhen is an implementation superflously generic?
14:35:06krux02ldlework, Well when everything is a template
14:35:08ldleworkmakes no sense.
14:35:16clyybberkrux02: Yeah, I'm just patiently waiting for a lifesign :D Since it is his spec I found a problem with.
14:35:17ldleworktemplates are not a form of generics
14:35:27ldleworkthey're a form of meta-programming..
14:35:50krux02I can't explain an overused of generics/templates/meta-programming, you have to experience it.
14:36:03ldleworkgood thing we're speaking authoratatively on the quality of other langauge designs when we can't explain/justify our position
14:36:05FromGitter<alehander42> i still agree a stdlib should be very generic to be useful in all cases: (a stdlib is the definition of very general code)
14:36:12FromGitter<alehander42> but user code overuses it sometimes
14:36:33krux02It really hits your productivity, because all your code you are writing is template code. It is never type checked. You can't use any tool that give you code completion, because you are in templates.
14:36:45ldleworktemplates have nothing to do with generics
14:36:51ldleworkgenerics are type safe..
14:36:53ldleworksmh
14:37:08clyybberldlework: I'm sorry, but I think krux02 knows what hes talking about :)
14:37:08krux02And the reason why you are in templates is, because some idiot decided that "just in case you want to chage X you want it to be a template"
14:37:29ldleworkclyybber: great argument
14:38:02clyybberldlework: Ok, so I explain it to you: Generics get expanded at compiletime. Templates are expanded at compiletime.
14:38:04krux02and no, generics are not type safe.
14:38:07ldlework"go doesn't have generics because templates are not type-safe" lol
14:38:12krux02maybe in Scala
14:38:38ldleworkin what statically-typed language is the generic system no type-safe?
14:38:46ldleworkgenerics literally means open types
14:38:53clyybberldlework: Exactly.
14:38:53ldleworkwhat are you talking about
14:39:02FromGitter<alehander42> krux02: in the stdlib, you probably cant guess all the ways people need to use your code: i've seen it with os utils etc
14:39:14ldleworkclyybber: Just because two features are "expanded at compiletime" doesn't mean they are the same feature.
14:39:24FromGitter<alehander42> so thats why being more generic is a good thing(no need for always templates ofc)
14:39:29ldleworkCompile-time macros are "expanded at compiletime" and yet they are neither templates or generics.
14:39:37ldleworkTemplates are a form of meta-programming, and are not generics...
14:39:39FromGitter<alehander42> in normal code its sometimes overeng indeed
14:39:49FromGitter<alehander42> generics are a form of metaprogramming as well
14:39:53ldleworkyes
14:40:00ldleworkbut that doesn't make templates and generics synonymous
14:40:09*ryukophone quit (Ping timeout: 250 seconds)
14:40:18ldleworkit doesn't give generics, all the properties of templates, like not being type safe
14:40:20krux02alehander42: when you are writing application code (no library code), there is no excuse to use generics/templates everywhere
14:40:21*ryukophone joined #nim
14:40:30clyybberldlework: If you write a generic proc for a type T and that proc's body calls, let's say `+` on T, you want get an error, until you actually instantiate the generic with a type that doesn't have `+`
14:40:32FromGitter<alehander42> krux02: agree
14:40:54ldleworkclyybber: yes, that's how type safety works lol
14:41:21FromGitter<alehander42> he meant you won't get an error
14:41:32ldleworkyes, we all know what type safety means
14:41:33clyybberYeah s/want/wont
14:41:34FromGitter<alehander42> dont be so quick with conclusions Idlework : )
14:41:40ldleworkwhat conclusion am I quick with?
14:41:41FromGitter<alehander42> mate, you didnt get it
14:41:47ldleworkI knew what he meant just as you did
14:41:50FromGitter<alehander42> so, if a generic proc is not instantiated
14:41:51ldleworkget what?
14:41:54FromGitter<alehander42> its not really type checked
14:41:58krux02templates and generics are very much related. Both are instanced blocks of code.
14:42:02FromGitter<alehander42> thats not absolutely type safe
14:42:12ldleworkkrux02, yes but generics are type safe and templates are not.
14:42:27krux02generics are as type safe as templates
14:42:40ldleworkoh my god i'm so glad i'm not invested in this langauge/community anymore lol
14:42:41krux02maybe a little bit more type safe
14:42:44FromGitter<alehander42> e.g. if you write a generic function in your library
14:42:45ldleworklmao :D
14:42:50FromGitter<alehander42> its body is not typechecked
14:42:54FromGitter<alehander42> if its not instantiated
14:43:06clyybberldlework: Ok, then maybe get off this irc channel?
14:43:18ldleworkthat's not how the internet works
14:43:51FromGitter<alehander42> so, did you get the body-type-safety thing?
14:43:58clyybberldlework: Well, right now you are investing time into this community?
14:44:17ldleworkclyybber: lol yeah i'm super invested
14:44:21krux02ldlework, I am warning you, if you continue your destructive attitude, you might get a ban.
14:44:36ldleworkdestructive?
14:44:43FromGitter<alehander42> getting one technical thing wrong, doesnt answer about it, starts trolling about investment
14:44:46FromGitter<alehander42> ok
14:45:02ldleworkyeah, i'm wrong about generics here
14:45:08disrupteki mean, ldlework is right; templates aren't generics. :-)
14:45:15ldleworkdisruptek: CALM DOWN
14:45:15disruptekwhat's the big deal.
14:45:28ldleworkdisruptek: you don't get to be offensive, ok?
14:45:30krux02C++'s templates are Nim's generics
14:45:35ldleworkwrong
14:46:01FromGitter<alehander42> the deal is that he ridicules people like clybber, when they are techically right about a detail (the actual type safety) and he is not
14:46:26disruptek"generics are as safe as templates, maybe a little bit more type safe" -- hard to argue with this, too.
14:46:38*laaron quit (Remote host closed the connection)
14:46:42ldlework"as safe as templates"
14:46:50ldleworkwhen the discussion was that generics are safer than templates.
14:46:58disrupteki think he's ridiculing a non-argument, which is fair, imo.
14:47:09disruptekyou don't think generics are safer?
14:47:11ldleworkgenerics are type safe, your implementation might have problems with closures or whatever
14:47:16FromGitter<alehander42> no
14:47:26FromGitter<alehander42> we literally had this discussion 5 minutes ago
14:47:27FromGitter<alehander42> :D
14:47:33krux02ldlework, stop it
14:47:36ldleworkdisruptek: no i meant that their reply shows they were even missing the point
14:47:37clyybberldlework: What do you call typesafe? That you don't get a runtime error? Thats not typesafety :D
14:47:40ldleworkkrux02: stop what?
14:47:46krux02arguing
14:47:53ldleworkclyybber: that the compiler knows the types statically
14:47:57disruptekwhat's wrong with arguing?
14:48:01disruptekwe all might learn something.
14:48:03ldleworkkrux02: dude, people who disagree with you are not immoral agents
14:48:25FromGitter<alehander42> disruptek, the problem is the manner of arguing
14:48:40ldleworklook inwards.
14:48:47krux02I have no problem with people disagreeing with me, but we had this discussion about "right people"
14:48:48disrupteki think ldlework would respond best to data-driven arguments.
14:49:11ldleworkyou all have done a good deal of personally attacking me, when i haven't personally attacked anyone
14:49:16ldleworki have said "that argument is bad"
14:49:43ldleworkyou are hammering on me. people don't agree with you all the time. the feelings that come from disagreement don't mean the person is misbehaving.
14:49:48FromGitter<alehander42> well, i see it the opposite way: i feel you personally attacked many people and after that you got some attacks back
14:49:52clyybberldlework: Ok. I think what krux02 was getting at that you cannot guarantee a generic is typesafe for a specific type unless you instantiate it. At which point if you get an error, the generic is often already used elsewhere.
14:49:55ldleworkpoint to some community TOS violation and you wont see that.
14:49:55FromGitter<alehander42> after they tried to explain calmly
14:50:07FromGitter<alehander42> but as you see: its all very subjective, you felt one thing, me another
14:50:18ldleworkalehander and yet you take a position of authority
14:50:23ldleworkand want to moderate the space
14:50:35ldleworkhow about *you* chill out and realize not everyone who disagrees with you is misbehaving
14:50:45ldleworkshow me some TOS violation and you wont see that mistake again
14:50:49solitudesfhes just invested in the language/community
14:50:53ldleworkyou're allow to be told your arguments are not just wrong, but bad
14:50:54disruptekgenerics can be a little safer, because they provide more hint to the compiler than loosely-typed templates, which are basically C-style macros, right?
14:50:55krux02ldlework, I am the moderator here.
14:51:00ldleworkkrux02: so?
14:51:17FromGitter<alehander42> yeah, i just complain about everyone
14:51:18FromGitter<alehander42> :D
14:51:38krux02ldlework: so you are provoking me again?
14:51:45ldleworkhow am I doing that?
14:51:53ldleworkyou just highlighted me, I don't remember doing that to you.
14:52:01clyybberdisruptek: You *can* make generics safer, through constraints. But if you just do proc someproc[T](v: T) its not really safer.
14:52:27disruptekclyybber: right, but that's the whole point of the argument: generics can be a little safer than templates.
14:52:30ldleworkconstraints don't make generics *safer*
14:52:31disruptekwhat am i missing here?
14:52:42ldleworkthey simply restrict the potential types which fit
14:52:55FromGitter<alehander42> i am sorry idlework, probably youre right that i provoked stuff
14:52:57ldleworkif you dont' use a contraint it doesn't mean you can willy nilly use anytime that doesn't fit the use of the generic
14:52:59krux02pleas stop this discussion about generics. We are far beyond the technical details here.
14:53:09krux02Andthing said will just make it worse.
14:53:15clyybberdisruptek: Nothing, krux02 didn't argue that generics are somehow less safe than templates, he's just saying that they are overused
14:53:22FromGitter<alehander42> peace
14:53:23ldleworkkrux02: the unfounded moderation is what makes things worse
14:53:24FromGitter<alehander42> i will try to get to work a bit
14:53:45krux02alexander92, good point
14:53:58clyybberldlework: But in the end we agree that unconstrained generics are about as typesafe as a template right?
14:54:07ldleworkno....?
14:54:16disruptekno?
14:54:19clyybberBut in what way are they more safe?
14:54:31krux02clyybber, ldlework, disruptek: stop it right now
14:54:38ldleworkwhat -what-
14:54:41ldleworkstop*
14:55:16ldleworkclyybber: an unconstrained function can be implemented anyway
14:55:22ldleworkbut you can't pass any type to that function
14:55:32ldleworkonly types which fit the generic function's shape will work
14:55:36ldleworkthis is the whole point
14:55:44ldleworkgenerics are not about limiting what you can do in the implementation
14:55:49ldleworkthat's what generic constraints are for
14:56:00ldleworkgenerics are for limiting what types you can use with the function
14:56:06ldleworkwhich generics without constraints will do *perfectly*
14:56:06*ryukophone quit (Read error: Connection reset by peer)
14:56:18ldleworkthis is completely different than templates...
14:57:10disruptekhow so?
14:57:26ldleworkhow so what?
14:57:59disruptekwithout regard to generic constraints, it's not clear to me whether you're saying generics are equally unsafe to templates.
14:58:19ldleworki'm saying generics are perfectly compile-time safe, in the respect that generics are intended to be
14:58:27ldleworkin all languages
14:58:41ldleworkbecause that's the very intrinsic point/nature of generics is open-ended types
14:58:43krux02ldlework, disruptek: go to #nim-templates-vs-generics and continue your discussions there
14:59:10*absolutejam1 quit (Quit: WeeChat 2.5)
14:59:14ehmryyes please
14:59:22clyybberldlework: So in essence we all agree on the same points, just framed differently.
14:59:37ldleworki have only taken one position the entire time
14:59:47ldleworkif you find yourself partially agreeing with me now, I cannot account for that, sorry
15:00:13krux02clyybber, ldlework: /join #nim-templates-vs-generics
15:00:33clyybberkrux02: Just one final sentence :P ?
15:00:39krux02no
15:00:45krux02do it in that channel
15:00:46krux02I am there
15:00:57clyybberOh, I thought it was more of a joke haha
15:01:19clyybberNah, its fine. In essence we agree, its just terminology that caused the discussion.
15:01:56leorizedoesn't freenode have a `##` channel type that's basically off topic channel?
15:02:02ldleworkalmost like you should try to communicate with your interlocutors instead of just shutting them down by trying to dress their disagreement up as malevolent misbehavior
15:02:04disrupteki joined that channel and then i got a virus.
15:02:10clyybberWe do have #nim-offtopic
15:02:23FromGitter<mratsim> we have nim-offtopic but a better channel would be nim-heated-debates
15:02:42disruptek## channels are for projects which don't fall under the freenode charter.
15:02:57clyybberldlework: He didn't shut us down, he instructed us to go to a different channel, which is an understandable request I guess.
15:03:14ldleworki was talking about you and alehander in the way you treated me disagreeing with you
15:03:36clyybberldlework: Sorry, I didn't want to come of as toxic.
15:03:37ldleworkmoderators power-tripping is standard course for IRC
15:03:43*jxy quit (Quit: leaving)
15:03:57FromGitter<alehander42> i didnt want to shut you down, but to make you use less personal remarks
15:03:58FromGitter<alehander42> which you did
15:04:01FromGitter<alehander42> so i am glad
15:04:12FromGitter<alehander42> dont twist my words
15:04:42ldleworkyou can point out any personal attack I made at any time
15:04:44ldleworkbut you can't
15:04:51ldleworkbut I can point out personal remarks you made about me
15:05:12ldlework"your argument is bad" is not a personal attack. if you're going to champion inter-personal dispute, you should probably get this right.
15:05:15Zevv /leave #nim
15:05:19*Zevv left #nim (#nim)
15:05:33clyybberOh no, now Zevv is gone :(
15:05:45ehmrycan't someone just kick them?
15:06:10FromDiscord_<Avatarfighter> ^
15:06:16solitudesfbrother, if `im glad im not invested in this community lemao xdd` is not being a smug asshole to you, the you have some selfawareness problems.
15:06:17leorizeor we can stop talking about the topic and let it die
15:06:48ldleworkbeing a smug asshole when everyone is being dismissive and mischaracterizing you seems totally fine and still not a personal attack
15:07:01solitudesfyeah, you attacked everybody
15:07:07ldleworkliterally no
15:07:11FromDiscord_<Avatarfighter> well on that note, anyone up to help me debug something ?
15:07:17clyybberSure
15:07:32*narimiran quit (Ping timeout: 245 seconds)
15:08:04FromGitter<alehander42> "> i conclude people just like to hear themselves say something ⏎ ⏎ > if you're in the business of neurologically rewarding yourself with zero effort ⏎ > assuming everyone agrees with you ah classic source of neurological hits" [https://gitter.im/nim-lang/Nim?at=5d3874540335e5553a0166ae]
15:08:21FromGitter<alehander42> again, one can argue its just a talking style, i overreacted
15:08:34FromGitter<alehander42> but i also didnt force you, just make a remark, which is totally fine
15:08:34leorizeuhmmm, this is going too off-topic now everyone...
15:08:43FromDiscord_<Avatarfighter> this is probably a bad question, but if i want to import straight js into my program would using straight `importcpp` then supplying js code work?
15:08:59leorize{.emit.} is the better route IMO
15:09:01FromGitter<alehander42> but sorry again, i shouldn't have tried to analyze this idlework + others
15:09:44leorize@Avatarfighter: so if it's a JS function, you can import via importcpp
15:09:46*alexande1 joined #nim
15:10:18FromDiscord_<Avatarfighter> leorize: ah ok, I'm just having some very slight issues since the
15:10:25FromDiscord_<Avatarfighter> JS funct is async and my nim code is not
15:10:25leorizebut if it's not I'd recommend making a function with `{.emit.}`
15:10:48leorizenot sure if asyncdispatch works with JS async
15:11:02*ryukophone joined #nim
15:11:32FromGitter<alehander42> you can await those functions
15:11:38FromGitter<alehander42> but you have to also add a return type
15:11:42*sknebel quit (Ping timeout: 245 seconds)
15:11:42FromGitter<alehander42> which is Future[stuff]
15:12:05FromGitter<alehander42> and add `{.async.}`
15:12:24FromGitter<alehander42> actually maybe no async if importcpp
15:12:33FromDiscord_<Avatarfighter> alehander42: I got that far my current issue is that I have no idea what "function sleep(ms){return new Promise( resolve => setTimeout(resolve, ms));}" would return other than a promise
15:12:33FromGitter<alehander42> i have `var fsReadFile* {.importcpp: "helpers.fsReadFile(#)".}: proc(f: cstring): Future[cstring]` in my code
15:13:09FromGitter<alehander42> yes i do this all the time
15:13:15FromGitter<alehander42> i even have it in nim
15:13:28FromGitter<alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d38759854d123414cd848a0]
15:13:57FromDiscord_<Avatarfighter> that's exciting! thanks for the link, I'll try to reserve asking questions to more interesting ones sorry about this one haha
15:14:15FromGitter<alehander42> newPromise comes from the jsffi
15:14:28FromGitter<alehander42> no from asyncjs from stdlib
15:14:45FromGitter<alehander42> and the other is ⏎ var windowSetTimeout* {.importcpp: "setTimeout(#, #)".}: proc (f: (proc: void), i: int): int
15:15:05FromGitter<alehander42> oh no, its a good question, i think i spent a lot of time until getting to here
15:15:54*jxy joined #nim
15:16:03FromDiscord_<Avatarfighter> I stumbled upon karax about 2 hours ago and i've been converting my homemade password/totp manager to it so I'm still getting the hang of this
15:16:30clyybberBetter to ask than to spend hours searching for the in hindsight obvious/simple solution
15:16:53FromGitter<alehander42> afaik async also works with promises, so its like their Future
15:17:00FromGitter<alehander42> async in js
15:17:17FromGitter<alehander42> but i often use this pattern
15:17:24FromDiscord_<Avatarfighter> clyybber: I guess so, I just feel that my questions aren't as interesting as some of the other folks who truly ask indepth and challenging questions
15:17:30FromGitter<alehander42> to turn callback-based code to awaitable
15:17:40FromDiscord_<Avatarfighter> alehander42: you're a lifesaver \:) thank you!!
15:17:43FromGitter<alehander42> its a question that can go deep
15:18:12FromGitter<alehander42> feel free to ask about karax/the js backend, i use it often
15:18:17FromGitter<alehander42> and others
15:18:25leorize@Avatarfighter: no worries, this channel is for all sort of questions
15:19:00FromDiscord_<Avatarfighter> I'm loving karax right now, no questions there its so simple and smooth this is honestly one of the best modules I've found other than my own of course \:P
15:21:57leorizeyou have to escape the `:` on discord?
15:22:35clyybberI think so, its for emojis there
15:22:40FromDiscord_<Avatarfighter> yeah, to make the ascii face look like a face haha
15:22:51FromDiscord_<Avatarfighter> example 😛 vs \;P
15:23:01FromDiscord_<Avatarfighter> https://dsh.re/ca9b60
15:23:15FromGitter<alehander42> AvatarFighter what are your modules :P
15:23:32FromGitter<alehander42> ooh
15:23:53disruptekbut emoji are characters that need not be escaped.
15:24:00clyybbermy emoji font is apparently 3 times bigger than my usual font: https://imgur.com/a/wB9cALu
15:24:20FromDiscord_<Avatarfighter> currently my pride and enjoy is binio, AMF3 based packed binary messages, https://github.com/Riderfighter/binio/blob/master/src/binio.nim
15:24:32FromDiscord_<Avatarfighter> note that i am not the man in my github picture
15:24:46FromGitter<alehander42> oh nice
15:25:06FromDiscord_<Avatarfighter> I've been working on a simple chat server/client using this lib as an example for it so I'll hopefully have that pushed to the repo soon
15:25:19FromGitter<alehander42> ah i see you are an avatar fighter
15:25:30FromGitter<alehander42> you fight against avatars
15:25:39FromDiscord_<Avatarfighter> haha yes destroy all the avatars!
15:26:21FromDiscord_<Avatarfighter> I really enjoyed the movie avatar and I made it a part of my everyday life haha
15:27:03leorizedisruptek: on discord they auto convert ascii emoji -> unicode one I think
15:27:11clyybberYeah
15:27:44FromDiscord_<Avatarfighter> yep that is why i was trying to escape it, wasn't sure if the bot was sending "😃" or the ascii emoji
15:27:54FromDiscord_<Avatarfighter> \😃
15:27:56*HP-YC9 quit (Remote host closed the connection)
15:27:57disrupteki guess what i'm saying is, why isn't this a function of the client and not the platform?
15:27:57FromDiscord_<Avatarfighter> frick
15:28:04*HP-YC9 joined #nim
15:28:11FromGitter<alehander42> which reminds me await in do (): is not catched as a mistake in js backend
15:28:15FromGitter<alehander42> have to fix it
15:28:45FromDiscord_<Avatarfighter> Guys i'm not going to lie I'm in love with nim, its honestly so nice coming from python
15:29:06clyybberNice to hear :D
15:29:26FromDiscord_<Avatarfighter> I'm just converting my projects from Python to Nim in the hopes of learning the language more rapidly, the next thing i'm converting is https://github.com/Riderfighter/PyRelay
15:29:34FromGitter<alehander42> praise God, moved to a helper now it works
15:29:40FromGitter<alehander42> probably
15:30:08FromGitter<alehander42> what do you find
15:30:21FromGitter<alehander42> best in nim
15:31:37FromDiscord_<Avatarfighter> Well, the best thing I love about nim is the community, its not everyday you can interact with a core dev and other talented programmers just to talk about the language itself!
15:32:36FromDiscord_<Avatarfighter> the next thing i love are types, I love Go structs and types are right up my alley
15:32:39clyybberalehander42: Haha, I guess this is an argument for a small and nice community
15:33:04FromDiscord_<Avatarfighter> and lets not get me started on importc, importccp, importobjc thats n u t s
15:33:24*clyybber n u t s
15:34:07FromGitter<alehander42> clyybber well, i think i talked to Guido Van Rossum once in gitter, he hanged in the (mypy) typing channel a lot
15:34:17FromDiscord_<Avatarfighter> im really curious to see if I can work on an IOS tweak with nim since in theory it would compile to objc
15:34:47FromDiscord_<Avatarfighter> and you could importobjc tweak code/system headers and such
15:35:34FromGitter<alehander42> oh yeah, he basically cited a PEP to me: that's why we need more NEP-s :P
15:35:46*ryukophone quit (Ping timeout: 272 seconds)
15:35:54*ryukophone joined #nim
15:35:54FromDiscord_<Avatarfighter> haha
15:35:58FromDiscord_<Avatarfighter> love that
15:36:50FromDiscord_<Avatarfighter> one thing I'm never sure about since i've started Python is i'm unsure what is the correct way of coding in nim, the "PEP-8" of nim is basically what I need in my life lol
15:36:54FromGitter<alehander42> hm, i think importc/cpp should work for objc
15:37:04FromGitter<alehander42> the cpp thing is not really "c++"
15:37:15FromGitter<alehander42> but more "import with pattern"
15:37:40FromDiscord_<Avatarfighter> importcpp = "import CPatternPlease"
15:38:21clyybberAvatarfighter: There is NEP-1: https://nim-lang.org/docs/nep1.html. But I like that I *don't* have to follow it.
15:38:32clyybberAlso you can do --styleChecks:on
15:38:44clyybberat least in #devel
15:39:08clyybberAnd nimpretty
15:39:10FromGitter<kaushalmodi> it's `--styleChecks:hint` or `--styleChecks:error`
15:39:40FromGitter<kaushalmodi> `--styleChecks:off` is the default
15:40:21leorizeit's --styleCheck
15:40:23*Zevv joined #nim
15:40:29Zevvis it safe again?
15:40:43leorizeyes :P
15:42:22Zevvgood
15:43:34clyybberZevv: All is fine :)
15:43:37clyybberbbl
15:43:38FromGitter<kaushalmodi> I was thrilled to make a little Nim CLI app work as `echo foo | app` or `app foo`
15:43:41*clyybber quit (Quit: WeeChat 2.5)
15:44:50FromDiscord_<Avatarfighter> i found out about `nim secret` today that was a nice surprise !
15:45:18leorizebeware, it's nim secret for a reason
15:45:27FromDiscord_<Avatarfighter> you right
15:45:32FromDiscord_<Avatarfighter> 😅
15:46:14alexande1a better hcr-based repl might eventually happend
15:46:16FromDiscord_<treeform> wow yeah `nim secret`
15:46:22alexande1but nimrtl bugs
15:46:35FromDiscord_<Avatarfighter> @treeform did you know about it?
15:46:40FromDiscord_<treeform> no
15:46:55FromDiscord_<Avatarfighter> cool right? Only downside is that you can't import modules other than stdlib
15:46:58FromDiscord_<treeform> echo is broken 😦
15:46:59FromDiscord_<Avatarfighter> I think
15:47:39FromDiscord_<treeform> displaying strings is broken, maybe due the last 0 byte?
15:48:25FromDiscord_<Avatarfighter> alrighty no need to critique the DIY console that hard smh
15:48:27FromDiscord_<Avatarfighter> 😛
15:51:02FromDiscord_<Avatarfighter> My pw manager is looking pretty fly after the karax rewrite :D
15:51:02FromDiscord_<Avatarfighter>
15:51:02FromDiscord_<Avatarfighter> https://dsh.re/e407ae
15:52:58*alexande1 quit (Ping timeout: 245 seconds)
15:53:59leorizewhen can native ui development be that simple?
15:55:42FromDiscord_<Avatarfighter> idk but i'm loving it
15:56:21FromDiscord_<Avatarfighter> I just need to figure out a way of fixing my margins in css, the middle margin is bigger than everything else and its really annoying for me haha
15:59:33leorizeyou need more divs
16:00:26FromDiscord_<Avatarfighter> 😓
16:01:37leorizethat's how most of the problem are solved :P
16:01:58leorizeadd div until your page displays correctly
16:03:04FromDiscord_<Avatarfighter> I'll do that thanks 😃
16:03:18FromDiscord_<Avatarfighter> *200* divs later...
16:05:11FromGitter<awr1> @mratsim w/r/t the GPU doing openGL stuff: openGL is silly, you are forced to do everything on the same thread (unless you want to do multiple windows and are a masochist)
16:06:26*kungtotte quit (Ping timeout: 248 seconds)
16:07:30FromGitter<awr1> vulkan made things much less silly with VkSwapchainKHR and VkFramebuffer et al
16:08:45*kungtotte joined #nim
16:10:02FromGitter<mratsim> I see
16:17:10FromGitter<brentp> a `set[uint16]` is backed by array[8192, uint8] ?
16:19:50leorizehttps://github.com/nim-lang/Nim/blob/devel/compiler/bitsets.nim
16:27:40*hoijui quit (Ping timeout: 264 seconds)
16:32:03*dgreen joined #nim
16:34:11FromGitter<brentp> seems slow. set[uint16] subtraction is slow for sparse :(
16:34:51*nsf joined #nim
16:43:56*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:44:07*ryukophone quit (Ping timeout: 268 seconds)
16:45:27*floppydh quit (Quit: WeeChat 2.5)
16:48:14*Trustable joined #nim
17:02:56*leorize quit (Ping timeout: 260 seconds)
17:03:18*ng0 joined #nim
17:09:26*sknebel_ joined #nim
17:10:20*hoijui joined #nim
17:11:39*hoijui quit (Remote host closed the connection)
17:14:39*sknebel_ is now known as sknebel
17:17:25*leorize joined #nim
17:22:45*solitudesf quit (Read error: Connection reset by peer)
17:22:46*solitudesf- joined #nim
17:25:20*shomodj joined #nim
17:31:17FromGitter<mratsim> Avoid set operations for large range, especially in a loop
17:35:02*solitudesf- quit (Quit: Leaving)
17:35:20*solitudesf joined #nim
17:40:56dgreenmratsim: what would you say are the things that need the most work in arraymancer? I'd like to make myself useful if possible
17:42:16FromGitter<zah> try to replicate some start of the art result and see what you
17:42:23FromGitter<zah> ... you
17:42:29FromGitter<zah> you'll miss along the way
17:42:36FromGitter<zah> sorry, typing with my legs
17:44:14dgreenNot a bad idea zah, that's how I ended up writing up SGD with Momentum
17:44:37dgreenAnd also how I'm probably gonna end up writing adadelta as well
18:04:28*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:10:03*absolutejam joined #nim
18:10:40disruptekzah: pics of this "leg typing" or it didn't happen.
18:10:49disruptekshashlick: couple questions for you when you got a minute.
18:12:12disruptekok, first, i think i get how shampoo works, but how about conditioner? you rub it on your head and then just rinse it right off. what am i missing?
18:14:26*solitudesf quit (Ping timeout: 248 seconds)
18:16:44leorizewat?
18:16:44*solitudesf joined #nim
18:16:48shashlickI'm here
18:17:17disrupteki'm new to this whole "hygeine" thing.
18:17:19shashlickJust eyes glazed over that ridiculous discussion few hours ago
18:17:27disruptekyeah?
18:18:04disruptekshashlick: whaddya do for a living?
18:18:26shashlickHumility is a rare commodity
18:18:44disruptekyou're a commodities trader?
18:19:08*solitudesf quit (Remote host closed the connection)
18:19:32shashlickNah just a sw guy in a large company
18:19:36*solitudesf joined #nim
18:19:38disruptekif i wanna see good examples of nim ast composition and rendering, you think nimterop is the best place to look?
18:20:17shashlickNo not at all - I'm lazy and just use parseStmt
18:20:44disruptekwell, i'm pretty lazy.
18:20:46shashlickYou want to talk to @PMunch or @krux02
18:21:03disruptekkrux02 is on vacation from stupid questions. ;-)
18:21:11shashlickAnd one other person who made some cool ast matchers and what not
18:21:33leorizetry Zevv's npeg?
18:21:44shashlick^^ this guy too
18:21:46krux02well if you write to me directly I wake up
18:21:52disruptekack!
18:22:12disrupteki mean, if i have what sounds like an intelligent question, i will ask. 😉
18:22:45disrupteknpeg doesn't actually render nim, right? i need to print it on the page.
18:23:20leorizerender is basically: echo NimNode.repr
18:23:45disruptekoh, i thought repr rendered ast tree in human-readable form.
18:23:45krux02leorize, not basically. That is what it is.
18:23:55krux02repr uses the compiler internal renderer.
18:24:02leorizeyea, wrong terms
18:24:11leorizedisruptek: that's treeRepr
18:24:26disruptekaha, thanks.
18:24:28krux02repr prints an an in human-readable form.
18:24:35leorizeI always use repr by accident when writing macros
18:25:02krux02but it is not stable. parseExpr(repr(node)) != node
18:25:11disruptekoh, treeRepr is right there in the tutorial. duh.
18:25:44disruptekyeah, stability isn't important to me.
18:25:46krux02if you print repr, you loose symbol identity
18:26:20krux02In my opinion you should only use it for error messages and for debugging macros.
18:26:35krux02tree repr and lisp repre are more precise but also more verbose.
18:26:36disruptekonce i output it, i believe my program is finished.
18:26:47Zevvoi, my lines are yellow, someone said 'npeg'?
18:26:59krux02Zevv yes
18:27:19disrupteki'm trawling for examples of ast wizardry.
18:28:07krux02hmm today I stubled upon https://nimble.directory/ didn't know it existed.
18:28:19Zevvhm no wizardry here, learned the stuff while building it.
18:28:35leorizethe ast is surprisingly simple once you got into it
18:28:58Zevvthere are probably some interesting corners about npeg, but I guess things like async macros in the stdlib are worth looking at?
18:29:15krux02disruptek, what kind of wizardry are you looking for?
18:29:50disruptekany best-practices examples beyond the single one in the tutorial.
18:30:10krux02well those don't exist as far as I know.
18:30:26krux02but I have some experience with them, so I can tell you right now about some best practices
18:30:35disrupteki think i'll do okay just winging it, but it's always useful to get a sense for what you don't know before you run off assuming you've groked it all.
18:30:41krux02but it all depends on what you want to know
18:30:58Araqdon't check for 'nnkIdent', it's almost always a bug
18:31:25leorizedamn, now I've to rewrite my macros
18:31:33disruptekokay, that's something. 😉
18:31:59disrupteki'll go hack at and then i can ask a more useful question.
18:31:59FromGitter<brentp> wrote my own set subtraction that uses bitops. removes the bottleneck I was seeing: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d38a41fb2db751dabc13e71]
18:32:05krux02If I may recommend my own package ast-pattern-matching
18:32:31disruptekyeah, i was just looking at that yesterday.
18:32:56leorizegara could also be interesting to look at
18:33:24krux02it is not just useful to write macros, the way I implemented it is a good example of macro usage as well.
18:33:58*absolutejam quit (Ping timeout: 244 seconds)
18:34:51disruptekyeah, it looked like a domain-specific graph equality routine to me.
18:35:02shashlickAlso check out renderer.nim in the compiler
18:35:09shashlickThat's what c2nim uses
18:35:26leorizewhat should I change? https://github.com/alaviss/kmod/blob/923879e15b087e09e21d23a4f42673ea6cf66260/src/kmod.nim#L118-L147
18:35:51krux02disruptek, well it is more a tree equality, graph equality is a bit more complex.
18:36:03disruptekright.
18:36:49krux02To be precise, "The Graph Equality Problem" was a lecture at my university that you could attend to do one semester graph equality.
18:36:51disruptekmaybe it can replace some of the similar sameTree impls in the compiler.
18:37:36krux02disruptek, the problem with sameTree that I had was, what level of same-tree-ness do you want?
18:37:45krux02does symbol equal identifier?
18:38:06disrupteki thought that's what your macro enables -- you mix-in whatever constraints you wish in your sameness test.
18:38:22krux02yes
18:39:04disrupteki'm just thinking that having one source of logic underneath those different calls could make debugging easier.
18:40:39krux02what do you mean?
18:40:42disruptekshashlick: renderer.nim is awesome, thanks.
18:41:20krux02I tried to be as consistent as possible in ast pattern matching.
18:41:30krux02no surprises
18:41:33Araqleorize: instead of n.ident use $n (I know, I know)
18:42:03disrupteki mean maybe the various sameTrees should all issue calls to your matcher instead, so performance and accuracy can be concentrated there. it might be academic, but how many sameTree()s do you want to debug?
18:42:18disrupteki am all about writing the simplest, smallest amount of code that i can.
18:44:57*nif quit (Quit: ...)
18:45:06*nif joined #nim
18:46:43krux02disruptek, that is why I wrote the ast matcher.
18:46:56krux02because I had a lot of ast to match against.
18:47:13AlexMaxw16
18:47:36krux02AlexMax, is that a code for something?
18:50:05*absolutejam joined #nim
18:50:24disruptekit's code for `am i in the right window? ... nope`
18:51:06krux02lol
18:56:48FromDiscord_<Avatarfighter> what’s up party people!
18:57:18disruptekcrickey, every time avatarfight speaks, i hear the sound of swords leaving scabbards.
18:57:28disruptekscared the hell outta me.
18:58:13*rokups quit (Quit: Connection closed for inactivity)
18:59:34FromDiscord_<Avatarfighter> lmao that would be sick if it happened in real life 😦
19:00:00disruptekthat's the sound i hear when i try to talk to my ex-wife.
19:02:20FromDiscord_<Avatarfighter> oof
19:25:11*solitudesf- joined #nim
19:26:17*solitudesf quit (Ping timeout: 245 seconds)
19:28:12*shomodj joined #nim
19:29:51*shomodj quit (Client Quit)
19:30:08FromGitter<Obround> Is there someway you can convert a sequence to an open-array and echo it on the same line? Something like this: ⏎ ⏎ ```var my_seq = @[5, 6, 7] ⏎ echo seqToArray(my_seq)``` [https://gitter.im/nim-lang/Nim?at=5d38b1c0b2db751dabc1a955]
19:30:24*NimBot joined #nim
19:31:13*nif quit (Quit: ...)
19:31:22*nif joined #nim
19:54:10*absolutejam quit (Ping timeout: 248 seconds)
19:55:51*absolutejam joined #nim
20:02:08*nsf quit (Quit: WeeChat 2.4)
20:04:06shashlickYou can already echo a seq, why convert?
20:07:31FromGitter<kaushalmodi> @Obround openArray is a special type for proc args only I believe
20:08:34FromGitter<kaushalmodi> From the manual: ⏎ ⏎ > Often fixed size arrays turn out to be too inflexible; procedures should be able to deal with arrays of different sizes. The openarray type allows this; it can only be used for parameters.
20:09:39*narimiran joined #nim
20:14:30FromGitter<mratsim> Sorry was away @dgreen, more examples would be nice like @zah said, it also depends on your preferences, like for NLP there are tokenizers to implement, for vision instanceNorm2d would be nice to be able to do style transfer
20:15:32FromGitter<mratsim> Deconvolution to be able to implement U-net for medical segmentation
20:16:28FromGitter<mratsim> Also grunt work like wrapping Nvidia cudnn RNNs (don't do that actually it's soul draining)
20:17:34FromGitter<mratsim> Otherwise, helping @vindaar or @brentp on their visualization library would probably be even more beneficial to the Nim ecosystem as a whole
20:18:17dgreenAlright so basically anything and everything depending how much of my soul I'm willing to sell?
20:18:22dgreenDo you have a link to that library on you?
20:18:47FromGitter<mratsim> For data viz I have an experiment to use Vega here for example: https://github.com/numforge/monocle
20:18:57FromGitter<brentp> 👍 or implement truncatedSVD/randmoizedPCA for arraymancer. ;)
20:19:09FromGitter<mratsim> https://github.com/brentp/nim-plotly
20:19:35FromGitter<mratsim> https://github.com/Vindaar/ggplotnim
20:19:54FromGitter<mratsim> Truncated SVD + TF IDF yeah for nlp
20:20:53FromGitter<mratsim> An XGBoost wrapper as well if you want something from scratch
20:22:07*HP-YC9 quit (Remote host closed the connection)
20:22:07FromGitter<mratsim> Have a look at this Meta issue: https://github.com/nim-lang/needed-libraries/issues/77
20:22:07dgreenOh awesome I didn't know about these libraries. Starred those for future reference
20:22:15*HP-YC9 joined #nim
20:22:37FromGitter<mratsim> My Vega experiment you can start it from scratch no need to contribute to my repo
20:23:17FromGitter<mratsim> I mainly wanted to see if webview could be enough for dataviz as we don't have yet a stable jupyter kernel
20:24:00FromGitter<mratsim> Maybe ask @bluenote10 on his plan for nimdata and kadro (dataframes library)
20:24:25FromGitter<mratsim> https://github.com/bluenote10/NimData
20:24:55FromGitter<brentp> a jupyter kernel would be very useful !
20:25:38dgreenA jupyter kernel would be wicked actually.
20:25:47dgreenAll of these are fascinating thanks mratsim I'm taking a look through them
20:36:55*shomodj joined #nim
20:42:04dgreenI think I'll just look for what needs to be done wherever and see what I can do. I'll make myself available for any of the above authors if they have anything specific in mind :)
20:42:58FromGitter<mratsim> for the jupyter kernel you might be able to ask @zah for the hot code reloading part
20:43:22FromGitter<mratsim> see: https://github.com/nim-lang/Nim/issues/8927
20:44:41*HP-YC9 quit (Remote host closed the connection)
20:44:46FromGitter<mratsim> and the changes that @awr1 has pending as well: https://github.com/nim-lang/Nim/pull/11742
20:44:50*HP-YC9 joined #nim
20:45:16FromGitter<mratsim> I think it might be a complex piece of work though so be prepared to support it for a while :p
20:45:43*rockcavera quit (Remote host closed the connection)
20:46:02FromGitter<mratsim> you can see @stisa implementation before hot code reloading was available: https://github.com/stisa/jupyternim
20:46:25federico3https://github.com/ionelmc/pytest-benchmark this is quite nice
20:50:13dgreena jupyter kernel seems to be largely in flux wrt hot code reloading, might be too bleeding edge for me to contribute to :P (and also potentially over my head)
20:50:36ZevvHow do I get the integer representation of an enum passed to a macro, which ends up as an nnkIdent?
20:50:42ZevvintVal() does not like that
20:51:37*Trustable quit (Remote host closed the connection)
20:52:00dom96dgreen, don't be afraid to dive into things like this, challenge yourself :)
20:52:49disruptekif only everything we had to jump into was as entertaining.
20:53:21*disruptek is trying to get wayland screen recording to also capture audio. 🙄
20:54:20dgreenThat's fair, you never learn if you never try
20:54:34*absolutejam1 joined #nim
20:54:51FromGitter<mratsim> that's how I started Arraymancer to be honest
20:55:20FromGitter<mratsim> I was greenhorn in Nim and a nknew how to do a scalar neural network, I wanted to generalize it to vectors and matrices
20:55:30FromGitter<mratsim> I just knew*
20:57:06*absolutejam quit (Ping timeout: 248 seconds)
20:59:49dgreenAnd now look at you!
21:00:33dom96and I just wanted to write an IRC bot in Nim :)
21:02:51*clyybber joined #nim
21:07:37FromGitter<mratsim> the scalar NN, I started it in Nim by just ranslating this javascript code: http://karpathy.github.io/neuralnets/
21:07:56clyybberAraq: Hey, are you there?
21:08:51Zevvhm is there a way to runtime check if a certain field of an object variant is accessible before actually accessing it?
21:09:42FromGitter<mratsim> compile-time only
21:09:48FromGitter<mratsim> it's broken in generic methods
21:10:04Zevvbwah
21:10:04FromGitter<mratsim> because generics are only checked when instantiated
21:10:10FromGitter<mratsim> and methods are runtime only :p
21:10:13Zevvyeah fair enough
21:10:17*ertp07 joined #nim
21:10:23disruptekuh, check to see which discriminator you have?
21:11:06FromGitter<mratsim> actually I think the compiler introduces the runtime check against discriminator as well
21:11:14ZevvI need an extra if with six cases to see if I should store something in my object
21:11:25ZevvI get a runtime exception if I'm not allowed to
21:11:25disruptekyes. :-)
21:11:28Zevvbut I can't try: i
21:14:45Zevveither I'm getting deeper into nim and hitting dark corners, or more things in Nim are broken then a year ago
21:15:14*narimiran quit (Ping timeout: 248 seconds)
21:15:22disruptekvariant objects are a little tighter than they should be at the moment.
21:15:30disrupteki think jasper has plans to fix that.
21:15:44Zevvworkaround has been made :)
21:15:45dom96clyybber, he's on holidays. Also, don't ask to ask, just ask your question, someone else might be able to answer
21:16:06lqdev[m]for some reason I'm not getting a proper backtrace in gdb under windows, no matter if I compile with --debugger:native or not
21:16:06dom96bah, is it just me or are concepts still incredibly broken?
21:17:07*rockcavera joined #nim
21:18:13lqdev[m]I'm getting a segfault, supposedly at glfwPollEvents, but I'm unable to debug it since backtrace doesn't work in gdb
21:18:35Zevvnot at all, or not at your crash?
21:18:42Zevvcan you breakpoint and then bt?
21:19:38lqdev[m]not at my crash, there's a sigsegv and when I type `backtrace` it only has some garbage (and suggests the stack is corrupt)
21:19:46clyybberdom96: I know, thats why I asked, since he is occasionally online. Also its about the newruntime spec, and he has the say in that, so its no use asking anyone else (maybe cooldome). But generally I agree with you.
21:20:28dom96clyybber, he might also answer you later after reading the IRC logs
21:20:54Zevvlqdev[m]: yeah, but if you do a breakpoint first, does it work then?
21:21:09Zevvso do a 'clean' backtrace somewhere, on main for example
21:21:18Zevvif that works, your debug info is ok and it is really stack corruption
21:21:40Zevvstack corrupt, can't unwind
21:21:58lqdev[m]give me a sec, I'm having some windows troubles atm (I'm running on an HDD and compiling is slow as hell)
21:22:51ZevvI've had windows problems over the last 20 years
21:26:03disruptekit stopped bothering me so much once i refused to run it or support it.
21:26:12lqdev[m]the backtrace works here
21:26:25lqdev[m]I set a breakpoint at the problematic line
21:26:53Zevvsomeone borkes your stack and you're gone
21:27:10Zevvvalgrind :/
21:27:24lqdev[m]shit
21:27:26FromGitter<awr1> the PR w/r/t nimrtl/nimhcr https://github.com/nim-lang/Nim/pull/11742 is probably okay, i think the appveyor thing is unrelated
21:27:39lqdev[m]then how am I supposed to fix this windows-only issue if I can't even get a backtrace?
21:27:58Zevvis it broken after an FFI call?
21:28:18lqdev[m]yes
21:28:55Zevvjust void glfwPollEvents(void) ?
21:29:20lqdev[m]yes
21:29:37Zevvbut that will call all kind of callbacks if there are events, right?
21:29:49*Vladar quit (Remote host closed the connection)
21:30:06Zevvare these eventhandlers cdecl?
21:30:24Zevvand not using closures, and all that?
21:30:50Zevvif you're going nim -> C -> nim without telling nim, stuff will break
21:32:04lqdev[m]pretty certain they're not closures, but let me double-check
21:32:12Zevvthey are cdecl?
21:35:59Zevvreasking, can't find the answer: I pass an enum to a macro, how can I get the integer value? Documentation says intVal "Returns an integer value from any integer literal or enum field symbol", but that doesn't work for me. It's an nnkIdent
21:36:20FromGitter<mratsim> the enum needs to be static
21:36:31Zevvoh, can they be non-static?!
21:37:01FromGitter<mratsim> and you use ord() on the value
21:37:22ZevvWhat is a static enum and how do I make that?
21:37:23FromGitter<awr1> @disruptek typically shampoo first to wash and clean the hair (which removes certain oils from your hair), then conditioner (which tries restores those oils). sometimes i co-wash (some shampoos are overly aggressive in the amount of oils that they strip and so sometimes you can get away with just using conditioner, starting with a bit on the scalp and then working the rest of your hair)
21:37:44FromGitter<mratsim> macro foo(x: static MyEnum): untyped =
21:38:00disruptekwhy don't i just skip the shampoo and keep the oils in the first place? seems more efficient.
21:38:08Zevvah sorry, my answer was not clear: the enum is used in a code block that i'm transforming
21:38:17Zevvmy *question* was not clear
21:38:46Zevvso I'm not passing the enum explicitly, it is just part of the AST
21:38:54Zevvit's only an identifier to the macro
21:40:10lqdev[m]Zevv: they were closures, seems like I accidentally set them to that when I was looking for a way to pass variables to a cdecl proc. (it turned out I was blind and GLFWWindow simply had a userdata pointer I didn't see the first time around and forgot to change those procs back to cdecl)
21:40:36Zevv\o/
21:41:15*gangstacat quit (Quit: Ĝis!)
21:43:28*solitudesf- quit (Ping timeout: 246 seconds)
21:44:14Zevvhttp://ix.io/1Pnr for anyone who is bored. I want by black bear to be passed as 1.int
21:45:47*absolutejam2 joined #nim
21:47:46*absolutejam1 quit (Ping timeout: 248 seconds)
21:48:06FromGitter<awr1> can you not emit a cast?
21:48:17FromGitter<awr1> or do you need it at compile time ro something
21:48:38Zevvyeah, basically
21:48:40disrupteki thought you have to `n` because it's a literal.
21:49:08Zevv`n`?
21:49:19FromGitter<awr1> also @disruptek you need shampoo to clean the hair
21:49:28disruptekecho "ident: ", `n`
21:49:59FromGitter<awr1> unless you want your hair to be greasy. also if it's `nnkIdent`i think (correct me if i'm wrong) `untyped` may not be appropiate
21:50:06disrupteki threw out my shampoo in disgust. now i'm using REAL POO.
21:50:43Zevvdisruptek: `n` is still a nimnode, right?
21:51:26disruptekn is. maybe if your code did something more useful, we could talk about ways that it fails.
21:51:40Zevvok, I'll make it a bit bigger
21:51:49disruptekbut, enums and bools have to be quoted, afaik.
21:52:39disruptekokay, my streamer streams my voice now. what a pita.
21:53:20FromGitter<awr1> yea when you dump ast gen you get
21:53:31FromGitter<awr1> `nnkStmtListExpr.newTree(newSymNode("bPolar"))`
21:54:30disruptekif you want to echo the enum, that's the value i'd expect.
21:55:01Zevvhttp://ix.io/1Pnt
21:55:05Zevvlike that - one step higher
21:55:52disruptekoh, you want it to add int(1) in any event?
21:55:59Zevvright
21:56:08Zevvunless I pass pBlack, then it should be 2 :)
21:56:31disruptekyou're blowin' my mind right now.
21:56:36disruptek🤯
21:57:55Zevvsounds trivial, right
21:58:11disrupteksounds like it *should* be. ;-)
21:58:24Zevvmanual suggests it should be
21:59:25disrupteki guess you could compare it and count up as if you were parsing an enum value from a string.
21:59:33disruptekseems nuts.
22:00:01Zevvhmyeah. ok, I'll figure out some workaround
22:00:21Zevvthanks for blowing your mind
22:03:24*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:04:16*clyybber quit (Quit: WeeChat 2.5)
22:06:06*stefanos82 quit (Quit: Quitting for now...)
22:14:43*ertp07 quit (Ping timeout: 250 seconds)
22:23:37*HP-YC9 quit (Remote host closed the connection)
22:23:45*HP-YC9 joined #nim
22:25:50disruptekmaybe you can compose the ast to cast it but you cannot actually cast it in the macro.
22:26:37disruptekit is the same problem with booleans, as i mentioned.
22:41:25Zevvvarriount: NPeg has basic AST captures now. I've been fighting to get the whole parser and all related types genericized to support custom data types to be passed, but it's not worth the hassle. I now predefined a basic AST node which can be used to parse a tree, if the user wants different objects they can do a postprocess over that tree.
22:41:30Zevvhttps://github.com/zevv/npeg#ast-abstract-syntax-tree-captures
22:41:58*abm joined #nim
22:43:09disruptekwow, that's neat. :-)
22:46:30disruptekwrt your earlier issue, bools have a `boolVal`, so i guess they don't have the same issue.
22:56:31*Kaivo quit (Quit: WeeChat 2.5)
22:56:54*shomodj joined #nim
23:03:01*Kaivo joined #nim
23:08:18*absolutejam2 quit (Ping timeout: 268 seconds)
23:13:24*absolutejam2 joined #nim
23:13:41*krux02_ joined #nim
23:13:55*HP-YC9 quit (Remote host closed the connection)
23:14:05*HP-YC9 joined #nim
23:16:51*krux02 quit (Ping timeout: 264 seconds)
23:17:57*absolutejam2 quit (Ping timeout: 245 seconds)
23:22:37*theelous3 quit (Remote host closed the connection)
23:23:01*theelous3 joined #nim
23:35:12*theelous3 quit (Ping timeout: 258 seconds)
23:37:31*abm quit (Quit: Leaving)
23:43:49*theelous3 joined #nim
23:48:46*theelous3 quit (Ping timeout: 246 seconds)
23:58:10*ng0 quit (Quit: Alexa, when is the end of world?)
23:59:09*ertp07 joined #nim