<< 02-09-2019 >>

00:02:07*ng0 quit (Quit: Alexa, when is the end of world?)
00:02:20*laaron quit (Remote host closed the connection)
00:22:17*laaron joined #nim
00:29:04*Hideki joined #nim
00:33:50*laaron quit (Remote host closed the connection)
00:35:43*laaron joined #nim
00:37:33*Hideki quit (Ping timeout: 258 seconds)
01:45:56*owl_000 joined #nim
01:46:00*owl_000 quit (Client Quit)
02:01:58*endragor joined #nim
02:03:28*theelous3 quit (Ping timeout: 246 seconds)
02:15:47*Hideki joined #nim
02:18:13*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
02:18:46*laaron joined #nim
03:19:09*Hideki quit (Ping timeout: 252 seconds)
03:32:36*owl_000 joined #nim
03:34:20owl_000what is the use of `do` , the context is `panel.wEvent_Size do ():`
03:40:03*chemist69 quit (Ping timeout: 252 seconds)
03:42:07*chemist69 joined #nim
03:50:43FromGitter<Obround> How do you make multi-typed tables?
04:01:50*gangstacat quit (Quit: Ĝis!)
04:46:17*narimiran joined #nim
04:50:06*nsf joined #nim
04:58:51*enthus1ast quit (Ping timeout: 264 seconds)
05:01:23*gangstacat joined #nim
05:05:39*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
05:07:57*laaron joined #nim
05:09:50lqdev[m]Obround: what do you mean by that?
05:12:30*solitudesf joined #nim
05:15:22*enthus1ast joined #nim
05:15:25*drewr quit (Ping timeout: 276 seconds)
05:28:02FromGitter<awr1> @owl_000: `do` is an alternative syntax for procedure literals
05:28:34*drewr joined #nim
05:29:45FromGitter<awr1> it's possible that it could be deprecated in the future
05:29:57FromGitter<awr1> (although if you ask me i don't have a problem w/ it)
05:32:42owl_000as you said it is an alternative, can you please show me an example contrasting this two.
05:45:46FromGitter<awr1> certainly: https://play.nim-lang.org/#ix=1U2a
05:46:38FromGitter<awr1> `do` is a little bit weirder, you use `-> ReturnType` and not `: ReturnType`
05:46:45*dddddd quit (Remote host closed the connection)
06:09:47*PMunch joined #nim
06:14:52owl_000thanks that is great help, do this **WEIRD**
06:15:02owl_000*is
06:19:26lqdev[m]I still prefer `do` instead of passing closures directly as params.
06:19:36lqdev[m]it just looks nicer imo.
06:20:21lqdev[m]and I can see the reasoning behind using ->, if that wasn't done we'd have an ambiguity in the syntax
06:25:48*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
06:28:15*laaron joined #nim
06:56:43Zevvwhere is do documented?
06:56:51ZevvI only see references to the quote-do combi
06:59:30*krux02 joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:17*gmpreussner joined #nim
07:06:27PMunchZevv, can't find any documentation for it, but essentially do passes a block of code to a macro. It can be used to pass two blocks of code to a single macro http://ix.io/1U2h/Nim
07:06:43PMunchNot entirely sure why it's used so much with "quote" though..
07:07:47Zevvbecause the docs say so. I quote without do every now and then
07:08:07Zevvwhat two blocks to a macro!
07:08:31PMunchYeah I've done that as well, I wonder if there actually is a difference between "do" and a simple ":"
07:08:36Zevvi have uses for that!
07:09:20PMunchYes, two blocks :) Quite helpful if you want to emit something like an if/else statement and want to be able to pass two chunks of code
07:10:06FromGitter<arnetheduck> well you can use `do` without `quote` and `quote` without `do`.. ergo `do` is just one more way of doing the same thing, with different syntax giving you choice that you can argue about in style guides
07:11:03PMunchWell do has a use case when passing multiple blocks
07:11:28PMunchI just don't see if `do` does anything different in a call
07:11:54*ng0 joined #nim
07:14:11FromGitter<arnetheduck> you can pass multiple procs without do too: https://play.nim-lang.org/#ix=1U2j
07:14:51PMunchOh, I've never seen do used for passing procs before :S
07:16:15*drewr quit (Ping timeout: 264 seconds)
07:16:36FromGitter<arnetheduck> it's just an alternate and limited syntax for `proc`
07:16:51*Hideki joined #nim
07:17:33PMunchhttps://play.nim-lang.org/#ix=1U2l I've only seen it used like this, to pass two blocks of statements to a template/macro
07:18:50FromGitter<arnetheduck> you can go nuts with that too: https://play.nim-lang.org/#ix=1U2m
07:18:58PMunchUnfortunately the do keyword isn't always obvious when you create your own macro. Take for example the case where you want to wrap a try/catch with some extra logic. You might want to have a "do this if everything went well" block and a "do this in case it failed". When you call this you will just pass two "do" blocks, and it isn't obvious what happens with which block.
07:19:34PMunchOh yeah, you can pass as many as you like
07:20:50FromGitter<arnetheduck> anyway, there are some special extra rules with do, true
07:21:20*Hideki quit (Ping timeout: 244 seconds)
07:21:47PMunchWhat are they?
07:21:47FromGitter<arnetheduck> another way: https://play.nim-lang.org/#ix=1U2n
07:22:06PMunchOh yeah, but that doesn't work for longer blocks
07:24:07FromGitter<arnetheduck> https://play.nim-lang.org/#ix=1U2p
07:25:11PMunchWell that just looks ugly :P
07:25:59PMunchAnd basides that is no longer the same ast
07:26:11FromGitter<arnetheduck> yeah so that's the magic of the do keyword
07:26:33PMunchIf you look at the compile output of this you can see the block statement: https://play.nim-lang.org/#ix=1U2s
07:26:48PMunchNot that it would usually make a lot of difference, but it might in some special cases
07:27:41PMunchYeah but I was thinking there might be some difference between "quote:" and "quote do:" for example, or if that was purely a stylistic choice by whoever wrote the documentation for quote
07:28:53FromGitter<arnetheduck> lol, right, that's beyond my intuition for `do`
07:31:11owl_000total unintuitive
07:31:37*drewr joined #nim
07:34:38FromGitter<arnetheduck> well, that and macros in general allow you to construct ast's that are outside the "normal" rules of the parsed language.. this is quite annoying when doing a backend because nodes appear randomly in the tree where they don't belong - the c backend is pretty liberal about this and doesn't care for example that unreachable code is being generated, but in llvm, one has to explicitly deal with it
07:36:29PMunchOh really? How strict is it with its definition of unreachable?
07:50:14FromGitter<arnetheduck> well.. you have to end each block with a particular terminator that says what to do after the block - one such terminator is `unreachable` meaning that you have to admit you won't be going there.. most often, this is after `noreturn` procs like `quit` - but it also happens with weird ast:s - for example, you might have something which looks like an expression on the right-hand side but the last ast entry doesn't
07:50:14FromGitter... have a type - the language would prevent you from doing it, but when you're editing the ast manually in a macro, anything goes
07:50:24livcdhmm how come i get the warn in the same line like inf with chronicles ? https://glot.io/snippets/fflmgwghrv
07:50:35FromGitter<arnetheduck> often happens with template expansions
07:51:21FromGitter<arnetheduck> livcd - threads or unix line endings on windows?
07:53:46livcdhmm no threads that I am spawning
07:54:03livcdThis is on windows i am not sure where would the unix line endigs come from
07:54:21PMuncharnetheduck, but wouldn't those things be caught by the Nim compiler step before codegen?
07:54:30PMunchOr are those interleaved?
07:59:28FromGitter<arnetheduck> @PMunch well, a lot of them are arguably bugs that would be prevented if ast node construction was checked correctly, but it's not - there are no rules for what goes into an ast node really - does an `nkAssign` have to have an rhs with a value? logically yes, but in the nim ast, not really - anything goes as long as the c codegen swallows it
08:00:50PMunchWell a value or something that resolves to a value, which might be hard to check..
08:12:39*drewr quit (Ping timeout: 264 seconds)
08:26:17*alexander92 joined #nim
08:26:33lqdev[m]Zevv: it's in the experimental manual
08:27:35*drewr joined #nim
08:27:51Zevvah right, thanks
08:29:39FromGitter<arnetheduck> @PMunch and sometimes for example the backend receives somethingl like a `nkStmtList` instead, where the actual rhs expression is one of the elements in the statement list - this doesn't make logical sense in the ast but the C backend swallows it because of how it's structured..
08:35:04livcdarnetheduck: any other idea you can think of ?
08:36:33FromGitter<arnetheduck> @livcd not really - and we use chronicles extensively and I've never seen that so..
08:38:11livcdYou are probably running it only on linux right ?
08:38:22FromGitter<arnetheduck> nope
08:39:24livcduhm
08:39:54alexander92i also dont have chronicles issues
08:41:39FromGitter<arnetheduck> we run/test on win/linux/mac 32+64bit
08:43:41FromGitter<arnetheduck> but like mentioned, it's quite possible that we use unix line endings all over - I meaneven `notepad` has learned to deal with that (in 2018!)
08:46:23livcdI think i see it.
08:46:56livcdI have been doing: info "foo", exceptionMsg = scm.OpenService(foo)
08:53:55FromGitter<arnetheduck> uh, you don't want to do side effects inside the log statement, in general - log statements are removed from binary depending on compile flag
08:54:26FromGitter<arnetheduck> so if you compile that with logging disabled, `OpenService` will not be called
08:57:27*NimBot joined #nim
09:14:54PMunchHmm, threadpool documentation links to the channel module, but the channel module has a note at the top reading: "Note: Channels are designed for the Thread type. They are unstable when used with spawn"
09:15:22PMunchWhat is this instability? It's still being run on a separate thread, no?
09:15:40*drewr quit (Ping timeout: 264 seconds)
09:15:49*alexander92 quit (Ping timeout: 258 seconds)
09:17:23*Hideki joined #nim
09:18:42AraqPMunch, people don't understand 'spawn'
09:18:51Araqor channels for that matter
09:19:27PMunchThat's why I'm trying to understand them, so I can write my article series on the topic and help others understand it as well :)
09:20:46PMunchI would guess that spawn adds it as a task to a queue with a blacklisted thread (since it's not supposed to run on the calling thread), and then threads pick tasks from this queue and runs them?
09:20:58PMunchBut I don't quite see why that wouldn't work with a channel..
09:21:48*Hideki quit (Ping timeout: 252 seconds)
09:27:15*Vladar joined #nim
09:30:13*drewr joined #nim
09:54:13*actuallybatman quit (Ping timeout: 245 seconds)
09:55:47livcdarnetheduck: i know i was just thinking i would always do at least info :D
09:57:11FromGitter<arnetheduck> livcd: sure - "good luck" - just please never make that code public :)
10:13:22PMunchAraq, do you know why channels are unstable with spawn?
10:15:53AraqI don't really remember, but somebody found a way to write stupid code with it
10:16:21PMunchWell if it's stupid code it's not channels fault..
10:16:47Araqok, now I remember
10:17:08PMunchI only ask since a guy at work told me he had tried to do some stuff with spawn and had some questions about the GC and global memory. I mentioned channels and he said that they apparently didn't work with spawn
10:17:20Araq'spawn' doesn't guarantee execution on a separate thread
10:17:48Araqthe idea is that you can ignore the 'spawn's and still end up with a correct serial variant of the code
10:17:54Araqlike "Cilk" does it.
10:18:02PMunchOh, I thought that was the difference between spawn and spawnX
10:18:14Araqchannels are fundamentally at odds with this idea
10:18:22PMunchYeah, obviously
10:18:33Araqbut yeah that's also about spawn and spawnX
10:18:51PMunchI mean the documentation for spawn says "Always spawns a new task, so that the call is never executed on the calling thread."
10:19:02PMunchSo is that wrong? Or has something changed?
10:19:22Araqit's tricky
10:19:51Araqremember that we use a thread *pool* and so spawn can block if no thread of the pool is ready
10:20:17PMunchYeah that makes sense
10:20:42AraqI think this blocking is enough to break people's assumptions about channels
10:20:45PMunchBut it should still be executed on a separate thread once one becomes available, no?
10:20:49PMunchOoh
10:21:44PMunchWell again, that's more about improper use of channels than an actual issue with them
10:21:49Araqin the past we had some deadlocks due to this
10:22:01Araqbut since then 'spawn' has seen bugfixes, so I dunno
10:22:16PMunchSomething that was waiting for data from a channel that was waiting to be spawn-ed
10:22:30PMunchClassic scenario
10:24:22Zevvaraq: i understand untyped and overloading cant work if the candidates have the same number of argumens, but if i have two choices that differ in that, what is the reason that the compiler can not deduce which one to pick?
10:24:58Araqin theory it can work, the compiler is still not prepared to do this
10:25:07Zevvand it works ok with untypeds, but ntot with typedesc
10:25:08Araqit requires to undo some changes internally
10:26:14AraqZevv, replace 'typedesc' by 'bool' and your snippet still fails
10:26:52Zevvah ok. Well, I solved my initial problem diferently, so its not man issue anynyoanoymomore. thanskks
10:32:15PMunchHaha, Zevv why is your IRC client inserting backspace characters instead of removing a character?
10:33:31*laaron quit (Remote host closed the connection)
10:33:38ZevvOh thats mosh messing up I think. My mobile was absurdly flakey
10:35:48*laaron joined #nim
10:36:51*laaron quit (Remote host closed the connection)
10:41:28*laaron joined #nim
10:42:24*laaron quit (Remote host closed the connection)
10:44:48PMunchfederico3, I see that you're the one who added the line about channels being unstable with threadpool, do you remember why
10:45:17federico3PMunch: where?
10:46:26*laaron joined #nim
10:46:34livcdarnetheduck: heh definitely
10:47:38PMunchfederico3, github.com/nim-lang/Nim/blame/88a0edba4b1a3d535b54336fd589746add54e937/lib/system/channels.nim#L15
10:49:46federico3https://github.com/nim-lang/Nim/pull/10627 based on a conversation with Araq. I don't have an example handy but there are a lot of crashes around channels :-/
10:51:48PMunchHmm, I can't seem to find any examples..
10:58:04*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
10:59:24*laaron joined #nim
10:59:51*laaron quit (Client Quit)
11:01:22*laaron joined #nim
11:04:23*laaron quit (Client Quit)
11:06:39*laaron joined #nim
11:07:47*Miguelngel[m] quit (Remote host closed the connection)
11:07:56*Demos[m] quit (Write error: Broken pipe)
11:07:56*LEdoian[m] quit (Write error: Connection reset by peer)
11:08:00*isaac[m] quit (Read error: Connection reset by peer)
11:08:05*yglukhov[m] quit (Write error: Connection reset by peer)
11:08:09*skrylar[m] quit (Remote host closed the connection)
11:08:11*GitterIntegratio quit (Write error: Connection reset by peer)
11:08:12*zielmicha[m]1 quit (Remote host closed the connection)
11:08:12*macsek1911[m] quit (Remote host closed the connection)
11:08:12*Connor[m] quit (Remote host closed the connection)
11:08:13*spymasterd[m] quit (Remote host closed the connection)
11:08:13*narimiran[m] quit (Write error: Connection reset by peer)
11:08:13*jaens[m] quit (Remote host closed the connection)
11:08:14*nergal[m] quit (Remote host closed the connection)
11:08:15*k0mpjut0r quit (Write error: Connection reset by peer)
11:08:15*planetis[m] quit (Remote host closed the connection)
11:08:16*encryptize[m] quit (Remote host closed the connection)
11:08:18*xomachine[m]1 quit (Read error: Connection reset by peer)
11:08:18*meff[m]1 quit (Write error: Connection reset by peer)
11:08:19*gh0st[m] quit (Write error: Connection reset by peer)
11:08:22*pigmej[m] quit (Remote host closed the connection)
11:08:22*TheManiac[m] quit (Write error: Connection reset by peer)
11:08:23*BitPuffin quit (Write error: Connection reset by peer)
11:08:23*lqdev[m] quit (Read error: Connection reset by peer)
11:08:24*leorize[m] quit (Read error: Connection reset by peer)
11:08:38*laaron quit (Client Quit)
11:13:57*lqdev[m] joined #nim
11:14:41*laaron joined #nim
11:17:03*nif quit (Quit: ...)
11:17:12*nif joined #nim
11:37:21*Demos[m] joined #nim
11:37:21*planetis[m] joined #nim
11:37:21*Connor[m] joined #nim
11:37:21*LEdoian[m] joined #nim
11:37:21*BitPuffin joined #nim
11:37:21*pigmej[m] joined #nim
11:37:21*GitterIntegratio joined #nim
11:37:21*k0mpjut0r joined #nim
11:37:22*gh0st[m] joined #nim
11:37:22*jaens[m] joined #nim
11:37:22*isaac[m]1 joined #nim
11:37:22*nergal[m] joined #nim
11:37:22*leorize[m] joined #nim
11:37:28*xomachine[m] joined #nim
11:37:28*narimiran[m] joined #nim
11:37:28*spymasterd[m] joined #nim
11:37:28*Miguelngel[m] joined #nim
11:37:29*encryptize[m] joined #nim
11:37:29*meff[m] joined #nim
11:37:30*skrylar[m] joined #nim
11:37:30*macsek1911[m] joined #nim
11:37:30*zielmicha[m]1 joined #nim
11:37:31*yglukhov[m] joined #nim
11:37:33*TheManiac[m] joined #nim
11:38:39livcdDo I need to keep something in mind when compiling for Windows 2008 R2 ?
11:39:27PMunchProbably
11:47:24*alexander92 joined #nim
11:53:37Zevvhehe
12:06:43*drewr quit (Ping timeout: 250 seconds)
12:39:20disrupteklol
12:53:41*nsf quit (Quit: WeeChat 2.5)
13:12:07*jfoutaise quit (Ping timeout: 245 seconds)
13:13:41*actuallybatman joined #nim
13:13:57*jfoutaise joined #nim
13:16:48*endragor quit (Remote host closed the connection)
13:18:06*actuallybatman quit (Ping timeout: 258 seconds)
13:19:21*Hideki_ joined #nim
13:23:23*Hideki_ quit (Ping timeout: 245 seconds)
13:24:17*dddddd joined #nim
13:35:40*floppydh joined #nim
13:37:57*theelous3 joined #nim
14:04:41*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:05:53*laaron joined #nim
14:09:25*PMunch quit (Remote host closed the connection)
14:10:14*theelous3 quit (Read error: Connection reset by peer)
14:24:16*arecaceae quit (Remote host closed the connection)
14:24:18*Hideki_ joined #nim
14:24:40*arecaceae joined #nim
14:28:06*endragor joined #nim
14:32:28*endragor quit (Ping timeout: 246 seconds)
14:37:39*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:38:29*laaron joined #nim
14:43:39*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:44:11*laaron joined #nim
15:03:57*owl_000 quit (Ping timeout: 250 seconds)
15:04:17*Trustable joined #nim
15:12:39*clyybber joined #nim
15:13:04*clyybber quit (Client Quit)
15:13:11*clyybber joined #nim
15:15:54clyybberAraq: Why should mitems(someSinkParam) be allowed/required?
15:17:31*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
15:18:25*laaron joined #nim
15:18:54*laaron quit (Client Quit)
15:19:47clyybberNevermind, ofc we need to reset the original loc
15:19:55*laaron joined #nim
15:20:18clyybberBur this doesnt require mitems..
15:20:47clyybberHmm, treating sink like var when it isn't is not a good idea IMO
15:21:10clyybberIMO we should rather special case `move`
15:21:30clyybberAs in change its signature
15:21:56*laaron quit (Remote host closed the connection)
15:22:18*laaron joined #nim
15:23:39narimirandom96: are you here maybe?
15:26:20*Hideki_ quit (Remote host closed the connection)
15:28:39clyybberNevermind all the above.. got confused
15:28:41Araqclyybber: I considered it but thought it would be worse
15:28:56disruptekc'mon ... https://github.com/nim-lang/Nim/pull/12100
15:29:01Araqif 'sink T' means "I become the owner" then mutability makes sense
15:29:28clyybberAraq: Yeah, but we still dont pass sink by ref so it doesnt
15:29:46*Hideki_ joined #nim
15:30:53Araqwe do pass a copy
15:31:00Araqwhich the callee then owns
15:31:04Araqit makes sense
15:32:02Araqdisruptek: I don't see the harm in typeof(nil), system.nim needed it too
15:33:08disruptekthe harm is that now we have procs that can return a type that is valid for any ref type. so much for type-checking.
15:33:24disruptek"needed" it?
15:33:49clyybberAraq: Ah, right. I was confused by my own =move work. The proc taking a sink paramter is responsible for its destruction right?
15:34:07Araqright
15:34:07disruptekcan we have a special sigil "nilref" type, then? just for nil refs?
15:34:12*Hideki_ quit (Ping timeout: 245 seconds)
15:36:17disrupteks/nilref/noref/ maybe
15:39:04clyybberIMO it should be 'nil literal'
15:39:20clyybberJust like 'int literal'
15:39:37disruptekmaybe it should be `null`.
15:39:49Araqthe type of 'nil' is 'typeof(nil)'.
15:40:19Araqwhat are we discussing again? that you dislike the language extension or that you dislike how it's spelt?
15:40:57clyybberAraq: I think people are confused why typeof(nil) exists
15:41:20disrupteki hate the extension. i don't care how you spell it.
15:41:24clyybberSo naming it nil literal could make it a bit more obvipus
15:41:43Araq proc `==`*(x: string; y: type(nil) | type(nil)): bool {.
15:41:43Araq error: "'nil' is now invalid for 'string'; compile with --nilseqs:on for a migration period".} =
15:41:43Araq discard
15:41:58clyybberdisruptek: How else would you make nil a valid value for pointer and ref?
15:42:03clyybberAnd ptr
15:42:06disrupteka proc that returns nil returns a valid type for any ref.
15:42:12Araqdon't ask why we needed the | here, but that's what system.nim uses
15:42:13disrupteknim worked fine a week ago.
15:42:31Araqdisruptek: actually I agree that as a return type it's silly, gonna revert it
15:42:41disruptekthank you.
15:42:43Araqbut the PR didn't introduce this feature
15:43:16clyybberWhat is 'a valid type for any ref'
15:43:23disrupteknil
15:43:38clyybberYeah, but nil is also the value itself
15:43:58clyybberSo it makes sense to call the type typeof(nil) or 'nil literal'
15:43:59disruptekwe used to be able to rely upon typechecking to catch this, but now we cannot.
15:44:39Araqwell I replied
15:44:53clyybberAre procs that return 'int literal' currently allowed
15:44:55clyybber?
15:45:16disrupteknot as such.
15:45:55FromDiscord_<DeltaPHC> Hm. Unrelated, but how does newruntime and the destructors GC option relate to each other? Does one imply the other?
15:45:55FromGitter<mratsim> if they are compile-time procs
15:46:04disruptekthat | in system is breaking my brain.
15:46:19FromGitter<mratsim> newruntime implies destructors but destructors does not imply newruntime
15:46:20Araqdisruptek: it's a hack we can remove now
15:46:45AraqDeltaPHC: I'm writing the RFC as we speak but in a nutshell
15:46:56FromDiscord_<DeltaPHC> Ah, alright
15:47:16Araq--gc:destructors # use what works best from 'newruntime' but don't introduced the 'owned ref T' business
15:48:58Araqin other words, use the new better strings and seqs
15:49:34FromDiscord_<DeltaPHC> I see. I'm just trying to wrap my head around the new stuff and how everything works together
15:49:54Zevvbreaks this though: http://ix.io/1U43
15:50:14Araqwhat? huh?
15:50:32Zevvcan't seem to pass a string as openArray[char]
15:50:58Araqwith --newruntime or --gc:destructors?
15:51:03Zevv--gc:destructors
15:51:36Araqdoes it work with --newruntime?
15:51:39Zevvyes
15:52:49Araqinteresting
16:02:26*Hideki_ joined #nim
16:03:53AraqZevv: compiles for me
16:03:59Zevvwut?
16:04:00clyybberdisruptek: Ok then I agree typeof(nil) should not be a valid return type either
16:04:24Zevvlet me pull my nim, but I did that yesterday i believe
16:04:37clyybberdisruptek: AFAICT there also isn't any usecase for returning typeof(nil)
16:04:50ZevvAraq: you're right, compiles now!
16:11:22*clyybber quit (Ping timeout: 258 seconds)
16:12:37*clyybber joined #nim
16:14:53disruptekthe rational behind https://github.com/nim-lang/Nim/pull/12075 is that i'm generating code in which parameter arguments may clash with keywords.
16:15:01*sagax quit (Ping timeout: 246 seconds)
16:15:36disruptekto put this another way, i believe it's a bug that valid ast generates invalid syntax.
16:20:53*clyybber quit (Ping timeout: 245 seconds)
16:22:06*Hideki_ quit (Ping timeout: 258 seconds)
16:23:03*solitudesf- joined #nim
16:24:05*clyybber joined #nim
16:25:28*solitudesf quit (Ping timeout: 245 seconds)
16:33:58*lmariscal joined #nim
16:45:36*actuallybatman joined #nim
16:45:52Araqdisruptek: ok but the tests are red so ... :P
16:46:31disruptekworked for me locally except for ic, but i will look.
16:50:43*Hideki_ joined #nim
16:52:30*Trustable quit (Remote host closed the connection)
16:54:50*Hideki_ quit (Ping timeout: 244 seconds)
17:00:53*alexander92 quit (Ping timeout: 245 seconds)
17:06:16disrupteki guess this exposes a problem with parsing at least one keyword (`is`) as used in runnableExamples.
17:08:45FromGitter<deech> I just pulled from `dev` and get the following when I do `./koch boot -d:release -d:nimDebugDlOpen`: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d6d4c9d375cc34fde02061d]
17:09:08FromGitter<deech> Why does the compiler have a runtime dependency on SQLite?
17:18:11*sagax joined #nim
17:20:39Zevvincremental compilation
17:23:18FromGitter<deech> Thanks!
17:28:55FromGitter<deech> I got it working but it doesn't show up as a dependency with `ldd` probably because it is hot-loaded. This will make reasoning about runtime dependencies quite difficult: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d6d5156b596011df4ee8d47]
17:29:48Zevvnim always handles libraries runtime instead of linking
17:31:23FromGitter<deech> I understand. I'm just saying I use `ldd` to figure out exactly what libraries a binary is using at runtime and `libsqlite.so` isn't showing up here. Maybe I'
17:31:36FromGitter<deech> 'm misunderstanding how `ldd` and Nim's hot loading works.
17:33:55FromGitter<mratsim> dlopen is not linked
17:40:45*mattmurr quit (Read error: Connection reset by peer)
17:41:13*mattmurr joined #nim
17:45:06Araq`ldd` doesn't work with anything anyway, Python, Ruby, ... they all use dlopen in their FFIs
17:54:42shashlick@Araq what do you think about compiling in sqlite
17:55:25Araqworking on it
17:55:47shashlickhttps://github.com/nim-lang/Nim/issues/12097
17:56:09shashlickmy only question was whether it would have to be compiled in for nimfind, nimsuggest and other tools as well
17:56:31shashlickbut doesn't seem like those tools will depend on that portion of the code
18:02:27*wildtrees joined #nim
18:06:17Araqit affects all of these tools
18:18:01*nsf joined #nim
18:18:44shashlickOk then maybe compile it as a shared library
18:21:42*narimiran quit (Ping timeout: 245 seconds)
18:21:55*narimiran joined #nim
18:25:15*floppydh quit (Quit: WeeChat 2.5)
18:33:52FromDiscord_<Shield> 0++........00000000000000000000000002
18:34:01FromGitter<mratsim> C and C++ uses linking though
18:34:10FromGitter<mratsim> it's a pretty big "anything"
18:37:19Araqwell if dlopen exists and is widely used, guess what, it means ldd is fundamentally broken
18:37:29Araqinstead use strace or whatever
18:38:31FromGitter<mratsim> "Well if C and C++ exist and are widely used, guess what, it means Nim is fundamentally brokend" ;)
18:39:04Araqyeah, well, switching words like that doesn't work out
18:40:10FromGitter<deech> Haha! Seems like SQLite is pretty safe to statically link in. That project will be around and kicking long for much longer than niche languages. :)
18:41:33Araqfirstly, dlopen can be used from C and C++ too. secondly, the statement is "ldd claims to report the dependencies but doesn't" and when you switch the terms it becomes "Nim claims to compile to C(++) and it doesn't" (huh? to what else does it compile then?)
18:43:30AraqI could run 'ldd' on firefox's binary. would it report all the dependencies. We can't know, ergo broken tool.
18:44:03disruptekthe tool works fine, it just might not be right for the purpose.
18:45:23AraqI don't know its purpose, but "list dependencies" can't be among these then
18:45:41disruptek`list static dependencies` might be accurate.
18:47:48disruptekhow can i get access to ast/lexer stuff from the compiler for use in a macro?
18:48:22disruptekie. i'm trying to easily determine if an identifier is a keyword.
18:53:59*solitudesf- quit (Quit: Leaving)
18:54:17*solitudesf joined #nim
19:00:17FromGitter<awr1> @disruptek `dumpTree()`
19:01:08FromGitter<awr1> or `quote do:`
19:01:41disruptekgiven a string "foo", i need to determine if it needs stropping.
19:03:10FromGitter<awr1> wait do you want to do this at runtime?
19:03:17disrupteknah.
19:03:44Zevvdid `compiles()` not work for you?
19:03:59FromGitter<awr1> try `parseStmt()`
19:04:04FromGitter<awr1> or `parseExpr()`
19:04:18disrupteki don't need to parse an identifier. i need to render one.
19:04:38FromGitter<awr1> and then traverse the AST
19:04:40FromGitter<awr1> hmmm
19:04:46disruptekthe easiest solution is to include `keywords.txt`, but that just feels like such a hack.
19:05:15disruptekthe problem is that i need to generate ast that escapes symbol names that match keywords.
19:05:42disruptekand i cannot do this until i can determine that, say, "from" is a keyword.
19:06:03FromGitter<awr1> i'm still confused. the language you're trying to determine whether or not stropping is needed is still nim, right?
19:06:09*rockcavera quit (Remote host closed the connection)
19:06:11disruptekyes.
19:07:31FromGitter<awr1> and like, you want to intake a string, like `"proc"` or `"foo"`, of which one might be a keyword
19:07:41FromGitter<awr1> and you want to detect that.
19:08:10disruptekthat's right.
19:08:41FromGitter<awr1> because if that is so, then `parseStmt()/Expr()` should potentially work for you, but the burden falls on you to investigate the following AST
19:09:06*rockcavera joined #nim
19:09:25disruptekhow do you see that working?
19:09:49*Trustable joined #nim
19:09:53disrupteki cannot parse "var proc = 3", so i simply look for a parse failure?
19:10:48FromGitter<awr1> that is one way
19:16:56Zevvbut seriously, why not just hardcode the list, what are you afraid of?
19:17:21Zevvnim is not adding keywords every three weeks?
19:17:51disruptekthat's what i'm gonna do. i just prefer single-source-of-truth.
19:18:23disruptekthere's some useful stuff in the compiler that i wish i could just import.
19:33:29shashlickI always felt the compiler should be accessible from the existing install instead of a separate package
19:45:14*skelett1 joined #nim
19:46:18*zedeus quit (Ping timeout: 245 seconds)
19:46:18*ehmry quit (Ping timeout: 245 seconds)
19:46:55*chemist69 quit (Ping timeout: 265 seconds)
19:47:28*skelett quit (Ping timeout: 264 seconds)
19:47:39*chemist69 joined #nim
19:47:48*zedeus joined #nim
19:48:51*ehmry joined #nim
19:52:49FromGitter<Obround> Is there a way to disable Nim's partial casing?
19:53:25clyybberNo, unless you patch the compiler
19:53:31clyybberWhy though?
19:54:58FromGitter<Obround> I'm writing a compiler that transpiles to Nim; I don't want it to be partially case sensitive.
19:55:27*vlad1777d quit (Ping timeout: 245 seconds)
19:56:16Araqso learn about compilers and come up with a simple name mangling
19:56:24disruptekor just gensym.
19:57:24FromGitter<Obround> Yeah, I'm am doing that, just wanted to see if there is another way to do it :)
19:57:42FromGitter<arnetheduck> it's only nims `{.dynlib.}` that uses the weird `dlopen` way.. you can link to libraries normally also, even if its a bit of a bother..
20:15:34*clyybber quit (Quit: Quit)
20:16:17*ehmry quit (Ping timeout: 245 seconds)
20:17:15*Miguelngel[m] quit (*.net *.split)
20:19:56*Miguelngel[m] joined #nim
20:26:33*nsf quit (Quit: WeeChat 2.5)
20:27:22*narimiran quit (Ping timeout: 246 seconds)
20:37:52*alexander92 joined #nim
20:52:24*Hideki_ joined #nim
20:56:46*Hideki_ quit (Ping timeout: 246 seconds)
21:04:15*wildtrees quit (Quit: Leaving)
21:09:02*luis_ joined #nim
21:33:22*actuallybatman quit (Ping timeout: 258 seconds)
21:36:25*solitudesf quit (Ping timeout: 244 seconds)
21:37:01*Trustable quit (Remote host closed the connection)
21:40:04*actuallybatman joined #nim
21:40:26*Vladar quit (Remote host closed the connection)
21:43:18*krux02 quit (Remote host closed the connection)
21:45:04*actuallybatman quit (Ping timeout: 246 seconds)
21:46:08shashlick@dom96 - https://github.com/nim-lang/nimble/pull/686
21:51:54*actuallybatman joined #nim
21:52:43FromGitter<mratsim> does that mean we can do nimble -d:my_define test?
21:56:57FromGitter<mratsim> btw @Araq or @krux02, for me that PR is ready for merging: https://github.com/nim-lang/Nim/pull/11816
22:07:51*luis_ quit (Ping timeout: 264 seconds)
22:17:00*ng0 quit (Quit: Alexa, when is the end of world?)
22:17:58*actuallybatman quit (Ping timeout: 246 seconds)
22:25:09*actuallybatman joined #nim
22:30:55*actuallybatman quit (Ping timeout: 246 seconds)
23:00:46*owl_000 joined #nim
23:28:04*actuallybatman joined #nim
23:29:20*Hideki_ joined #nim
23:33:43*Hideki_ quit (Ping timeout: 258 seconds)