<< 24-08-2018 >>

00:03:44AlexMaxOH
00:03:54AlexMaxI think I traced it back to the for loop
00:04:45AlexMaxI can't take an address of the iterated value in a for loop unless I make it mutable
00:04:50AlexMaxthat's....smart as heck
00:05:04AlexMaxPreventing me from shooting my foot off
00:05:19AlexMax...I think?
00:05:43AlexMaxI guess the iterated value changes every loop, and holding the address to that memory location is dangerous?
00:16:26*ldlework quit (Remote host closed the connection)
00:17:28*ldlework joined #nim
00:37:29*a__b__m quit (Ping timeout: 255 seconds)
01:05:33*endragor joined #nim
01:07:09*pwntus quit (*.net *.split)
01:07:09*zacharycarter[m] quit (*.net *.split)
01:07:09*sg-james[m] quit (*.net *.split)
01:07:15*heinrich5991 quit (*.net *.split)
01:07:30*heinrich5991 joined #nim
01:07:44*pwntus joined #nim
01:07:44*zacharycarter[m] joined #nim
01:07:44*sg-james[m] joined #nim
01:10:18*endragor quit (Ping timeout: 268 seconds)
01:11:09*zachcarter quit (Read error: Connection reset by peer)
01:11:21*zachcarter joined #nim
01:11:33FromGitter<bung87> question:how to write a method that needs to be implemented by end developer?
01:15:25AlexMaxyou mean like an interface?
01:15:52AlexMaxi've wondered that too
01:16:27FromGitter<bung87> yes , like python's method that may raise not implement error
01:18:31AlexMaxyeah I don't know
01:19:03AlexMaxSince nim only has single inheritance I'm not sure you can emulate interface objects like in C++
01:33:24TangerAlexMax, bung87: You can declare types inheritable with the {.inheritable.} pragma. You can also create methods with the {.base.} pragma, to indicate that they're a base class.
01:34:07TangerIf you put an assert into the base methods, you can force it to be implemented
01:34:42FromGitter<bung87> how to check it
01:35:54TangerCheck what, sorry?
01:36:38FromGitter<bung87> check it implemented
01:37:37Tangerbung87: https://github.com/Tangdongle/nimobserver/blob/master/src/nimobserver.nim https://github.com/Tangdongle/nimobserver/blob/master/tests/nimobserver_tests.nim
01:38:01TangerThe test file implementes onNotify for a subclass of the BaseObserver defined in the first link
01:38:13TangerPorbably not the best example sorry, but the one that I can explain best ;)
01:44:13FromGitter<bung87> inheritable pragma included in nim 0.18.1?
01:46:17*Xe quit (*.net *.split)
01:46:33FromGitter<bung87> Error: attempting to call undeclared routine: 'inheritable'
01:46:41*syntonym[m] quit (*.net *.split)
01:46:43*stisa[m] quit (*.net *.split)
01:46:44*bitstoppa[m] quit (*.net *.split)
01:46:48*mr_yogurt quit (*.net *.split)
01:47:11*syntonym[m] joined #nim
01:47:21*bitstoppa[m] joined #nim
01:47:31*stisa[m] joined #nim
01:47:31*mr_yogurt joined #nim
01:49:57*vqrs quit (Ping timeout: 240 seconds)
01:51:43*vqrs joined #nim
01:54:19FromGitter<bung87> never mind, let read your code first.
01:58:11Tangerbung87: It should be fine with 0.18.0
02:00:34FromGitter<bung87> ah ,I see , just overwrites `onNotify ` yeah it's what I need thank you!
02:01:02*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
02:02:35*Lord_Nightmare joined #nim
02:03:29*Xe joined #nim
02:05:36Tangerbung87: https://nim-lang.org/docs/manual.html#multi-methods
02:05:46TangerFurther reading for reference
02:07:59FromGitter<bung87> thanks! helpful, ah it just `quit "to override!"` when not overrited
02:28:44*syntonym[m] quit (*.net *.split)
02:28:45*msmorgan_ quit (*.net *.split)
02:28:46*macsek1911[m] quit (*.net *.split)
02:28:47*Miguelngel[m] quit (*.net *.split)
02:28:48*hogeland quit (*.net *.split)
02:28:48*thor77 quit (*.net *.split)
02:28:49*mal`` quit (*.net *.split)
02:28:50*voiceftp quit (*.net *.split)
02:30:01*syntonym[m] joined #nim
02:30:01*msmorgan_ joined #nim
02:30:01*macsek1911[m] joined #nim
02:30:01*Miguelngel[m] joined #nim
02:30:01*hogeland joined #nim
02:30:01*thor77 joined #nim
02:30:01*mal`` joined #nim
02:30:01*voiceftp joined #nim
02:30:57*m712 quit (Ping timeout: 240 seconds)
02:31:56*Widdershins quit (*.net *.split)
02:31:58*couven92 quit (*.net *.split)
02:32:00*EastByte quit (*.net *.split)
02:32:00*oprypin quit (*.net *.split)
02:32:00*beatmox quit (*.net *.split)
02:32:00*GaveUp quit (*.net *.split)
02:32:00*Death916 quit (*.net *.split)
02:32:00*avsej quit (*.net *.split)
02:32:03*craigger quit (*.net *.split)
02:32:04*ven473 quit (*.net *.split)
02:32:05*awal quit (*.net *.split)
02:32:14*avsej joined #nim
02:32:19*EastByte joined #nim
02:32:20*craigger joined #nim
02:32:31*GaveUp joined #nim
02:32:31*beatmox joined #nim
02:32:34*Widdershins joined #nim
02:32:37*oprypin joined #nim
02:33:07*awal joined #nim
02:34:15*avsej is now known as Guest46449
02:41:44*awal is now known as Guest98929
02:42:21*Guest46449 quit (Changing host)
02:42:21*Guest46449 joined #nim
02:44:50*nathancahill joined #nim
02:49:18*Death916 joined #nim
02:49:34*nathancahill quit (Ping timeout: 272 seconds)
02:49:57*m712 joined #nim
02:50:04*couven92 joined #nim
02:50:21*m712 is now known as Guest78962
02:54:15FromGitter<gogolxdong> How can I open mysql database in multi Channel[TMsg] task?
02:54:50*yuken joined #nim
02:55:50yukenHas anyone - if it's possible - made an OS in Nim yet? Not a Windows competitor obviously, but something that boots, has file management and can run some built-in programs (such as cd/rm/mkdir equivalents)?
02:56:19FromGitter<gogolxdong> https://github.com/dom96/nimkernel
03:00:14yukenNice.
03:00:34*ldlework quit (Quit: co'o ro do)
03:00:39FromGitter<gogolxdong> build it up from ground.
03:05:12*dddddd quit (Remote host closed the connection)
03:05:50*bitstoppa[m] quit (*.net *.split)
03:05:50*arecaceae quit (*.net *.split)
03:05:52*thomasross quit (*.net *.split)
03:05:52*dom96 quit (*.net *.split)
03:05:52*Amun_Ra quit (*.net *.split)
03:05:53*shodan45 quit (*.net *.split)
03:05:53*leorize quit (*.net *.split)
03:05:53*shadowbane quit (*.net *.split)
03:05:53*qwertfisch quit (*.net *.split)
03:05:53*Rush quit (*.net *.split)
03:05:53*livcd_ quit (*.net *.split)
03:05:54*Connor[m]1 quit (*.net *.split)
03:05:55*JStoker quit (*.net *.split)
03:05:55*subsetpark quit (*.net *.split)
03:05:58*mr_yogurt quit (*.net *.split)
03:05:59*heinrich5991 quit (*.net *.split)
03:05:59*Jesin quit (*.net *.split)
03:05:59*captainkraft quit (*.net *.split)
03:05:59*odc quit (*.net *.split)
03:05:59*Entropic quit (*.net *.split)
03:06:01*shashlick quit (*.net *.split)
03:06:01*Araq quit (*.net *.split)
03:06:02*nathanj quit (*.net *.split)
03:06:03*Calinou quit (*.net *.split)
03:06:03*SunDwarf quit (*.net *.split)
03:06:04*zielmicha[m] quit (*.net *.split)
03:06:04*TheManiac[m] quit (*.net *.split)
03:06:36*bitstoppa[m] joined #nim
03:06:36*arecaceae joined #nim
03:06:36*thomasross joined #nim
03:06:36*dom96 joined #nim
03:06:36*Amun_Ra joined #nim
03:06:36*shodan45 joined #nim
03:06:36*leorize joined #nim
03:06:36*shadowbane joined #nim
03:06:36*qwertfisch joined #nim
03:06:36*Rush joined #nim
03:06:36*livcd_ joined #nim
03:06:36*Connor[m]1 joined #nim
03:06:36*JStoker joined #nim
03:06:36*subsetpark joined #nim
03:06:39*ldlework joined #nim
03:07:04*thomasross quit (Max SendQ exceeded)
03:07:31*thomasross joined #nim
03:07:57*mr_yogurt joined #nim
03:07:57*heinrich5991 joined #nim
03:07:57*Jesin joined #nim
03:07:57*captainkraft joined #nim
03:07:57*odc joined #nim
03:07:57*Entropic joined #nim
03:07:57*shashlick joined #nim
03:07:57*Araq joined #nim
03:07:57*nathanj joined #nim
03:07:57*SunDwarf joined #nim
03:07:57*Calinou joined #nim
03:07:57*zielmicha[m] joined #nim
03:07:57*TheManiac[m] joined #nim
03:08:01*shashlick quit (Excess Flood)
03:08:58*thomasross quit (Max SendQ exceeded)
03:09:26*thomasross joined #nim
03:09:58*Cthalupa quit (Ping timeout: 260 seconds)
03:10:44*Cthalupa joined #nim
03:10:56*thomasross quit (Max SendQ exceeded)
03:11:24*thomasross joined #nim
03:12:54*thomasross quit (Max SendQ exceeded)
03:13:22*thomasross joined #nim
03:14:26*kapil____ joined #nim
03:14:39*thomasross quit (Max SendQ exceeded)
03:15:11*thomasross joined #nim
03:21:57*yuken quit (Ping timeout: 240 seconds)
03:25:24*cornfeedhobo quit (Quit: ZNC - https://znc.in)
03:32:46FromGitter<gogolxdong> As I access mysql database from multi channel task , got ⏎ `[Warning] Aborted connection 39142 to db: 'cmp' user: 'root' host: 'localhost' (Got an error writing communication packets)`
03:39:25*NamPNQ joined #nim
03:40:44Tangergogolxdong: How are you storing your connection? Is it a global connection that's shared between threads?
03:41:32*cornfeedhobo joined #nim
03:42:49FromGitter<gogolxdong> ```type ⏎ TaskType = ref object ⏎ db : DbConn ⏎ cfg: JsonTree``` [https://gitter.im/nim-lang/Nim?at=5b7f7eb94be56c591889e32e]
03:43:11FromGitter<gogolxdong> pass task into thread handler.
03:44:28FromGitter<gogolxdong> but due to DbConn is ptr effectively, threads race one single connection.
03:45:02FromGitter<gogolxdong> probably we need a thread pool version of mysql.
03:45:47FromGitter<gogolxdong> any idea?
03:46:50*nathancahill joined #nim
03:47:10TangerYou could try and implement a lock/guard for it, so your threads have to block on the DB being ready?
03:48:05TangerOooh, or use multiple connections? Not sure how to implement that though gogolxdong: https://forum.nim-lang.org/t/3660
03:48:32TangerActually, even better, maybe take a look at this package? https://github.com/wiml/nim-asyncmysql
03:49:09FromGitter<gogolxdong> It doesn't work.
03:49:51FromGitter<gogolxdong> We tried half a year ago.
03:50:10TangerAh, right
03:50:11TangerLame
03:50:35FromGitter<gogolxdong> and seems undead.
03:53:31FromGitter<gogolxdong> spawn can access but was suggested not to use.
03:54:10*nathancahill quit (Ping timeout: 272 seconds)
03:56:01FromGitter<gogolxdong> problem is spawn doesn't work with --gc:regions which cause our production machines runs out of memory.
04:11:09*ven473 joined #nim
04:11:54*stefanos82 joined #nim
04:32:44*endragor joined #nim
05:04:34*nathancahill joined #nim
05:06:45*smidlers0 joined #nim
05:08:18*smidlers0 quit (Remote host closed the connection)
05:11:35*nathancahill quit (Quit: nathancahill)
05:17:36*nathancahill joined #nim
05:25:39*leorize quit (Ping timeout: 252 seconds)
05:29:04*nathancahill quit (Quit: nathancahill)
05:29:05*nsf joined #nim
05:31:15FromGitter<gogolxdong> Can secp256k1 be used for encryption and decryption?
05:40:14*nathancahill joined #nim
05:40:41*Guest98929 is now known as awal
05:47:27*zachcarter quit (Ping timeout: 240 seconds)
05:53:04*leorize joined #nim
05:56:21*zachcarter joined #nim
06:17:15*kapil____ quit (Quit: Connection closed for inactivity)
06:19:42*NamPNQ quit (Remote host closed the connection)
06:23:16*nathancahill quit (Quit: nathancahill)
06:38:31FromGitter<mratsim> @gogolxdong what do you mean?
06:40:25FromGitter<mratsim> You can use ECIES to encrypt/decrypt data with any elliptic curve
06:40:33FromGitter<gogolxdong> to encrypt message and decrypt.
06:41:16FromGitter<mratsim> doesn’t seem like the bitcoin-core libsecp256k1 expose ECIES though
06:42:55FromGitter<gogolxdong> I want to encrypt and decrypt message , how do I do?
06:43:39FromGitter<gogolxdong> have nim-secp2561k and nodejs secp2561k
06:44:21FromGitter<mratsim> nim-secp256k1 is based on bitcoin implementation which does not implement ECIES primitives, somthing like https://github.com/status-im/nim-milagro-crypto/blob/master/src/milagro_crypto/generated/ecdh_BLS381.h#L84-L116
06:46:07FromGitter<gogolxdong> Does this mean encryption and decryption with ECC is unavailable for now?
06:46:22FromGitter<gogolxdong> Then I have to find another way.
06:47:11FromGitter<mratsim> In nim, you will only have the nim-milagro-crypto lib I linked
06:47:50FromGitter<mratsim> for now there is only BLS12-381 supported but secp256k1 is also available in the original library I’m wrapping.
06:49:53FromGitter<mratsim> you might find this paper interesting btw: https://blog.coinfabrik.com/wp-content/uploads/2016/06/some_comments_on_the_security_of_ecies_with_secp256k1.pdf
06:50:51FromGitter<mratsim> @gogolxdong maybe try that for ECIES using secp256k1: https://github.com/bitchan/eccrypto
06:50:58FromGitter<mratsim> it’s Node though
06:51:52FromGitter<mratsim> and implemented manually, so I’m not sure the code is audited
06:55:07FromGitter<Bennyelg> So, does anyone can help me implement a Type which get a value of an undefined proc which will be later execute? I tried various of things but I couldnt get it
06:58:27FromGitter<gogolxdong> @mratsim thanks for guiding.
06:59:15FromGitter<mratsim> @Bennyelg https://github.com/mratsim/nim-rmad/blob/master/src/autograd.nim#L41-L53
07:00:42FromGitter<mratsim> Alternatively look here: https://github.com/status-im/nimbus/wiki/Interpreter-optimization-resources
07:01:11FromGitter<mratsim> For the full code for ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fad37c53ee54c1895ff5f]
07:01:20FromGitter<gogolxdong> Is it out of security aspect of secp256k1 when you said don't like secp256k1 expose to ECIES?
07:01:53FromGitter<mratsim> no, it’s because bitcoin only needs to sign messages, it doesn’t need to encrypt them
07:02:13FromGitter<mratsim> so unneeded —> not implemented :P
07:02:57TangerBennyelg: Something like this? https://pastebin.com/GNckt9c4
07:03:30TangerSo you define the proc signature as a property of the TestType object, then when you initialise the object, you set the proc to that instance
07:03:31FromGitter<gogolxdong> ok, misread .
07:03:32FromGitter<mratsim> @Bennyelg those 2 examples give you both the closure and the nimcall way, nimcall is faster (it’s a pointer), closure is more flexible because you can “save” data/environment that will be used in the future call
07:04:21FromGitter<Bennyelg> yes something like that but with an unkwon signature every time.
07:04:42FromGitter<mratsim> Nim is a static language, signature must be known.
07:04:57FromGitter<Bennyelg> yea i know
07:05:06FromGitter<mratsim> but if you use nimcklls, you can cheat by only storing proc () and casting to the signature you want later
07:05:15TangerBennyelg: You might be able to do it if you proc accepts a pointer
07:05:21FromGitter<mratsim> but it must be known at compile-time or at least dispatched via a case statement
07:06:08FromGitter<mratsim> at this point it might be easier to use methods instead of reimplementing dynamic dispatch
07:06:21FromGitter<mratsim> or use templates, because they accept untyped proc
07:06:26FromGitter<Bennyelg> yea
07:06:31FromGitter<Bennyelg> thanks
07:07:12FromGitter<mratsim> This is an example of template accepting untyped proc with different signatures: https://github.com/status-im/nim-ethash/blob/master/src/proof_of_work.nim#L147-L226
07:08:22FromGitter<mratsim> the file is self contained if you’re curious about: calc_data_set_item(cache, p)
07:08:40FromGitter<Bennyelg> yea
07:09:28*dadabidet joined #nim
07:09:38FromGitter<mratsim> the Python spec is here it’s a bit shorter because they cheat with dynamic dispatch: https://github.com/ethereum/wiki/wiki/Ethash#main-loop
07:10:32FromGitter<mratsim> it’s probably similar to what you are trying to do: ⏎ ⏎ hashimoto(header, nonce, full_size, lambda x: calc_dataset_item(cache, x)) ⏎ ⏎ and ... [https://gitter.im/nim-lang/Nim?at=5b7faf6894f8164c17914cea]
07:21:38FromGitter<Bennyelg> what does it means when I get the message: ⏎ "but expected one of: ⏎ proc (): Mirror{.closure.}"
07:23:42*PMunch joined #nim
07:24:02FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fb292e5b40332abef0c2c]
07:24:50FromGitter<mratsim> tag everything {.nimcall.} or {.closure.} both the type and the parameter passed
07:25:14FromGitter<mratsim> inference for procvar is not working properly
07:25:48FromGitter<mratsim> if you can use nimcall (meaning result depends only on arguments)
07:26:37FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fb32d4be56c59188b01ee]
07:30:10FromGitter<mratsim> You should report a bug >_> ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fb402fd3c641b0600e5f6]
07:30:51FromGitter<Bennyelg> :/
07:32:27FromGitter<Bennyelg> I must understand deeper the concept of all those pragmas and how & when to use
07:34:17FromGitter<mratsim> it should not be needed
07:34:26FromGitter<mratsim> but the semantic check is broken here
07:36:13FromGitter<mratsim> oh no
07:36:24FromGitter<mratsim> you name your template the same name as a field
07:36:35FromGitter<Bennyelg> :|
07:36:50FromGitter<mratsim> if you rename it works
07:38:14FromGitter<Bennyelg> what a rookie mistake
07:38:29FromGitter<Bennyelg> I also exclude all the {.nimcall.}
07:38:32FromGitter<Bennyelg> no need them
07:41:31FromGitter<Bennyelg> anyway to get the procname ?
07:41:49FromGitter<Bennyelg> if I want to print details of what is going to be run
07:42:31*floppydh joined #nim
07:45:59FromGitter<mratsim> you can use a macro at the moment, otherwise: https://github.com/nim-lang/Nim/issues/8212
07:46:46FromGitter<mratsim> `macro printProcName(x: untyped): untyped = echo x.astToStr` or maybe even `echo $x`
07:47:27FromGitter<mratsim> you can add x.expectKind(nnkProc) if you want
07:49:52FromGitter<Bennyelg> thanks, I'll play with that
07:51:36FromGitter<Bennyelg> when Im using the macro with x.astToStr ⏎ Im getting ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fb90860f9ee7aa4841c66]
07:54:28FromGitter<Bennyelg> macro printProcName(x: untyped): untyped = astToStr(x) ⏎ ⏎ will return x as the name of the proc
07:56:05FromGitter<mratsim> maybe you need to add `result = newStmtList().newTree(nnkDiscard)` so there is at least a “result”
07:58:11FromGitter<Bennyelg> why i cant do something like this ⏎ macro printProcName(x: untyped): string = ⏎ dumpTree: ⏎ ⏎ ```x``` [https://gitter.im/nim-lang/Nim?at=5b7fba92e5b40332abef3c90]
07:59:42FromGitter<mratsim> always use untyped as macro result, that will solve a lot of issue, and dump tree is similar to echo, you can’t do `let foo = echo “something”` that’s void.
08:04:41*gmpreussner joined #nim
08:04:59FromGitter<Bennyelg> how can I travel on the ast
08:05:09FromGitter<mratsim> take a rocket :P
08:05:12FromGitter<Bennyelg> StmtList ⏎ Ident "echoMax"
08:05:20*gmpreussner_ quit (Ping timeout: 256 seconds)
08:05:21FromGitter<Bennyelg> heheh
08:06:03FromGitter<mratsim> echo foo\[1\] # echoMax
08:06:15FromGitter<mratsim> with a $
08:06:25FromGitter<mratsim> you just use indexing like an array
08:06:57FromGitter<Bennyelg> apparently no. ⏎ I tired it.
08:07:11FromGitter<Bennyelg> index out of bounds
08:07:50FromGitter<mratsim> oh because those are not at the same level
08:08:02FromGitter<mratsim> there is no indent on your message
08:08:21FromGitter<Bennyelg> yea
08:08:25FromGitter<mratsim> so it’s \[0\]
08:08:53FromGitter<Bennyelg> no. the same error
08:09:07FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fbd23cff55e561753000f]
08:10:36*TheLemonMan joined #nim
08:10:49FromGitter<Araq> `echoMax` is an atom, it doesn't have a 0th element inside
08:11:19FromGitter<Bennyelg> just wanted to echo the procName :/
08:11:21FromGitter<mratsim> ```code paste, see link``` ⏎ ⏎ @Bennyelg, really use untyped return value for macros [https://gitter.im/nim-lang/Nim?at=5b7fbda9d8d36815e581ad23]
08:11:38*Guest78962 quit (Changing host)
08:11:38*Guest78962 joined #nim
08:11:47FromGitter<Bennyelg> lib/system.nim(2807, 7) Error: unhandled exception: false Invalid node kind nnkDotExpr for macros.`$`
08:12:30FromGitter<Bennyelg> usage ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fbdeef86b741b05b6b43a]
08:13:59*Guest78962 is now known as m712
08:17:55FromGitter<Bennyelg> the problem is its not showing the variable value which is proc
08:18:54FromGitter<mratsim> the snippet I posted showed how to implement getName
08:27:17FromGitter<Bennyelg> what snippet
08:27:50TheLemonManhmm, are custom pragmas on skVar supposed to be working?
08:32:35*abm joined #nim
08:49:00FromGitter<Araq> I'm not sure :-)
08:57:34TheLemonManI believe we're just throwing away the pragma AST in that case so I guess they aren't :)
08:57:54TheLemonManI'd just restrict custom pragmas to {skField,skProc,skFunc,skType} and call it a day
09:00:02*SenasOzys quit (Remote host closed the connection)
09:00:37*leorize quit (Ping timeout: 268 seconds)
09:04:42*SenasOzys joined #nim
09:05:38FromGitter<Araq> 1) skConverter, skMethod
09:06:16FromGitter<Araq> that's the problem with a big language, compiler dev's keep forgetting about existing features...
09:07:51FromGitter<timotheecour> this is a bug, correct? https://github.com/nim-lang/Nim/issues/8759 `a => counter+=1` parsed as `(a => counter) += 1`
09:08:11FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fcafa38a12915e4ec14c3]
09:10:08FromGitter<Araq> @timotheecour violations of the spec are bugs, yes.
09:12:31*byte512 joined #nim
09:13:18FromGitter<gogolxdong> How to write this regex to re ? ⏎ \\".*?
09:13:27FromGitter<gogolxdong> `\\".*?`
09:13:43FromGitter<Araq> #violates spec: `^` should have higher precedence than += (regardless of `^` being right-associative)
09:14:05FromGitter<Araq> ^ I don't think that's the case, all assignment-like operators have the same precedence
09:17:37FromGitter<mratsim> @Benny, this snippet: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fcd31c53ee54c1896c03e]
09:18:15FromGitter<mratsim> @Bennyelg ^, sorry mistyped your name
09:19:08FromGitter<Bennyelg> @mratsim the problem is when assigning it to special type ⏎ apparently the code above i published which assigning function to a type variable is crying because it has not initialize or something
09:20:16FromGitter<Bennyelg> ```code paste, see link``` ⏎ ⏎ is not assigning ⏎ ⏎ the function properly i guess [https://gitter.im/nim-lang/Nim?at=5b7fcdd094f8164c1791fa3f]
09:21:26FromGitter<mratsim> use untyped instead of typed for fun maybe?
09:23:57FromGitter<Bennyelg> nop.
09:24:07FromGitter<Bennyelg> something related to the Mirror intialization
09:24:31FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fcecef5402f32aa84ae97]
09:26:13FromGitter<Bennyelg> The question is Why I can't initialize variable of some Type after when it's proc
09:28:29*ftsf joined #nim
09:28:56*Vladar joined #nim
09:29:06FromGitter<Bennyelg> as I suspected. ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ not assign the fun to the actionBeforeMove variable [https://gitter.im/nim-lang/Nim?at=5b7fcfe2d8d36815e58216db]
09:30:31FromGitter<Bennyelg> change it to ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5b7fd0371d3a5711b68f7b6e]
09:31:22FromGitter<Bennyelg> ```proc beforeMove*(m: Mirror, fun: proc ()): Mirror = ⏎ m.actionBeforeMove = fun ⏎ m``` ⏎ ⏎ did the trick since the proc will always return void and wil always be without params [https://gitter.im/nim-lang/Nim?at=5b7fd069d8d36815e5821954]
09:38:34FromGitter<timotheecour> @araq, any chance we can merge https://github.com/nim-lang/Nim/pull/8682 ? it’s green
09:46:44*gibril_ quit (Remote host closed the connection)
09:48:14FromGitter<Bennyelg> how can I get the untyped name I passed and not the function name: ⏎ for example: ⏎ template(c: untyped) ⏎ ⏎ instead of getting c as the function name i want the actual function name [https://gitter.im/nim-lang/Nim?at=5b7fd45e4be56c59188bd0a2]
09:55:54FromGitter<mratsim> but the code I posted doesn’t work?
09:56:33FromGitter<mratsim> if fun is untyped, and you pass a proc $fun should give the the ident, i.e. the proc name
10:19:33*abm quit (Ping timeout: 268 seconds)
10:20:30FromGitter<gogolxdong> How to have httpserver.server on TLS?
10:23:24*seni joined #nim
10:23:31FromGitter<gogolxdong> backend cannot get requests after setting https.
10:24:31*krux02 joined #nim
10:30:22euantorPut it behind Nginx or something as a revers proxy and let it handle TLS
10:31:16*ftsf quit (Ping timeout: 268 seconds)
10:52:29FromGitter<gogolxdong> Does nim backend need to do anything?
10:58:45PMunchNope
10:58:53PMunchI set up a reverse proxy with Apache
10:59:29PMunchIt handles the whole SSL/TLS thing and httserver via Jester only serves it's content locally to Apache
10:59:30FromGitter<gogolxdong> we use Golang Echo framework, is it an issue?
11:00:21FromGitter<Bennyelg> @mratsim not it's not working. its working only if you pass directly the proc name.
11:00:37PMunchShouldn't be, you can try something like this to set it up: https://echo.labstack.com/cookbook/reverse-proxy
11:00:47FromGitter<mratsim> ah, you need it for the field
11:01:03FromGitter<mratsim> but after attached to the field it becomes an anonymous proc and it’s discarded
11:01:18FromGitter<Bennyelg> :/
11:01:23FromGitter<mratsim> the only thing you can print is the C name I think with emit
11:01:44FromGitter<mratsim> it’s in the RFC I linked at the beginning of the day by timotheecour
11:04:35FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b7fe64360f9ee7aa4851715]
11:05:21FromGitter<gogolxdong> It has a middleware to redirect http request to https, shouldn't this work?
11:16:55*SenasOzys quit (Ping timeout: 252 seconds)
11:21:25*SenasOzys joined #nim
11:22:08*narimiran joined #nim
11:24:26*narimiran left #nim (#nim)
11:24:59TheLemonManhmm, does -d:release imply -O3 ?
11:32:12dom96Araq: Can this be reverted? https://github.com/nim-lang/Nim/commit/effe2fd812b6f60f27c9c2396c8ec21ee65e19f1#comments
11:32:33dom96I did fix it in this PR https://github.com/nim-lang/Nim/pull/8750
11:37:31FromGitter<bung87> @gogolxdong you go program does which can be simply by using nginx.
11:40:00PMunchTheLemonMan, use --listCmd to see what Nim passes to your compiler
11:54:39FromGitter<gogolxdong> yes, I am aware of that, can trying, but still have reason to get it right.
11:57:00FromGitter<gogolxdong> don't want to introduce more tools, since we have introduced Golang stack.
12:01:58FromGitter<mratsim> @TheLemonMan, yes
12:02:07FromGitter<mratsim> it’s defined in the nim.cfg iirc
12:03:54*leorize joined #nim
12:10:37FromGitter<gogolxdong> want to clarify one question, is it necessary to use Nginx or Apach for https server? Is web framework enough for most occasion?
12:11:32PMunchgogolxdong, as it says in the documentation for httpserver, it is not properly securied and should always be run behind a reverse proxy in a production environment
12:11:53PMunchIt doesn't require Apache or Nginx, but you should always run it behind a reverse proxy, https or not
12:27:30FromGitter<gogolxdong> yes, read the comment, helpful.
12:34:55FromGitter<mratsim> is there a hidden reply? It’s a the top of the forum for some reason: https://forum.nim-lang.org/t/1207
12:35:43dom96yep
12:35:46dom96Moderated user replied
12:35:46dom96fixed
12:38:48dom96mratsim: Wanna become a mod? :)
12:39:50FromGitter<mratsim> if it’s just that yeah sure :P
12:49:59dom96mratsim: okay, you're now a mod.
12:50:16dom96Should be fairly self explanatory how to change people's status
12:55:42*captainkraft quit (Ping timeout: 264 seconds)
12:59:29*noonien joined #nim
13:01:22stefanos82dom96: how much traffic does the forum get? is it on a cloud service, like Google platform or a VPS on DigitalOcean or AWS?
13:06:30euantorIt's all on DigitalOcean I believe. They gave the project a bunch of credits not too long ago
13:15:42FromGitter<DanielSokil> @gogolxdong You can also use Caddy
13:17:41dom96Yep, Digital Ocean
13:20:00stefanos82dom96: I just registered and haven't received any email yet
13:20:06stefanos82is everything alright?
13:20:10FromGitter<DanielSokil> @gogolxdong https://github.com/caddyserver/examples/tree/master/httpsproxy
13:20:11dom96Check spam folder?
13:20:44stefanos82dom96: nothing, it's empty
13:21:17FromGitter<DanielSokil> @gogolxdong https://whatbox.ca/wiki/Caddy_Server_Reverse_Proxy
13:21:19dom96I can activate your account for you
13:21:26stefanos82cool
13:21:35dom96what's your nick?
13:21:37stefanos82PM me for further details dom96
13:29:26*kapil____ joined #nim
13:30:12stefanos82I wonder how much traffic the forum can handle, since it's implemented in Nim. Do we have any type of graphs or benchmarks somewhere?
13:35:51euantorI would imagine the only bottleneck would be SQLite really, and it's pretty fast
13:37:28*dddddd joined #nim
13:38:19FromGitter<Araq> dom96: huh? https://github.com/nim-lang/Nim/pull/8750 used to be red and that suggested to me the test is still flaky
13:38:50dom96Araq: I was still working on it
13:39:29TheLemonManmratsim, I've just finished implementing cycle counting (and colors!)
13:39:35*captainkraft joined #nim
13:40:05FromGitter<mratsim> cool!
13:40:58TheLemonManhere's the sample output https://github.com/LemonBoy/criterion.nim#example
13:42:28*ng0 quit (Read error: Connection reset by peer)
13:45:50stefanos82euantor: SQLite could be hardly a bottleneck if it gets configured and used properly.
13:45:59stefanos82especially with its latest features, it can work wonders
13:48:25FromGitter<DanielSokil> @dom96 Any Idea About? https://github.com/dom96/jester/issues/156
13:49:36dom96Should be a simple fix
13:49:59dom96Araq: In any case, it should be solid now.
13:50:17dom96Araq: I'll rebase and remove the disabled line you introduced
13:50:53FromGitter<Araq> k
13:51:07euantor@stefanos82: Unfortunately the db_sqlite module in the Nim stdlib doesn't expose too many options
13:51:25stefanos82euantor: eventually it will ;)
13:51:58euantorYep, I've been planning on making some PRs to improve it to use prepared statements and expose some more options
13:52:19euantorIdeally there should be a connection pool too, not a single connection - that's what I think would bottleneck the forum right now
13:52:31euantorhttps://github.com/nim-lang/Nim/blob/master/lib/impure/db_sqlite.nim#L305
13:53:12euantorAnd this is what I really want to fix: https://github.com/nim-lang/Nim/blob/master/lib/impure/db_sqlite.nim#L115
13:54:53stefanos82isn't WAL enabled?
13:56:00dom96the forum is running single-threaded and in debug mode
13:56:07dom96And I've never seen any speed problems :P
13:56:37stefanos82dom96: why gravatar though? why not a default image for all new users and let them upload their own image?
13:57:52dom96Isn't it obvious?
13:58:10TheLemonManto add some delay?
13:58:13stefanos82but I don't have a wordpress.com account nor I want to have one
14:02:13livcd_dom96: why not to try to run in multithreaded with something else than sqlite maybe that would also drive the improvement for those libs
14:02:24stefanos82dom96: I have resized an image of mine to 150x113 and it's only 12.7kb which could be easily uploaded as my profile image.
14:02:41stefanos82I don't think it would have been much of a fuss to have such standard behavior
14:02:42dom96stefanos82: PRs welcome :P
14:03:09stefanos82dom96: when I will figure out all the details from the documentation, I will PR lots of things, have no worries
14:03:25dom96FWIW gravatar is far more convenient
14:03:28dom96and much easier to implement
14:03:50dom96I'd rather every website used gravatar so that I don't have to update my avatar everywhere
14:05:02stefanos82so, in other words we are forced to use a service we don't want to use?
14:05:45euantor(and if you don't want to reveal you email publicly, don't use it on the forums)
14:06:06euantorI can't remember if signing up to the forum needs an email addres or not
14:07:41stefanos82my email is not visible
14:07:55stefanos82no one is by default I would say
14:08:06*ng0 joined #nim
14:09:31euantorIf you use Gravatar, it is. The email is passed as an MD5 hash in the URL for Gravatar images
14:09:43stefanos82ah you meant the gravatar?
14:09:44stefanos82I see
14:11:22euantoryeah
14:12:19*PMunch quit (Quit: Leaving)
14:14:32*endragor quit (Remote host closed the connection)
14:15:01*endragor joined #nim
14:16:29FromGitter<mratsim> @TheLemonMan, why emit then asm instead of asm directly? https://github.com/LemonBoy/criterion.nim/blob/master/src/criterion/cycles.nim#L6, for volatile?
14:16:54TheLemonManmratsim, yep
14:17:34TheLemonManI don't know if that's patch-worthy since asm is rarely used
14:18:05FromGitter<mratsim> probably not, people using asm are probably aware of emit.
14:19:23TheLemonManthe windows version is completely untested btw, if anybody is brave enough to try it out let me know if it works
14:19:42*endragor quit (Ping timeout: 264 seconds)
14:20:33FromGitter<mratsim> it should work with mingw but for vcc it probably won’t work because all ASM is basically forbidden :P
14:21:21FromGitter<mratsim> oh there is an intrinsics check that: https://helloacm.com/the-rdtsc-performance-timer-written-in-c/ __rdtsc()
14:21:26TheLemonManyep, I used the intrinsics there
14:23:46*stefanos82 quit (Quit: Quitting for now...)
14:28:57*endragor joined #nim
14:33:27*endragor quit (Ping timeout: 252 seconds)
14:35:41FromGitter<Araq> speaking of which ... can we remove the 'asm' keyword? shouldn't this have been a pragma like .emit?
14:36:22TheLemonManyeah, makes sense
14:36:42*nsf quit (Quit: WeeChat 2.2)
14:44:29*ftsf joined #nim
14:47:04FromGitter<mratsim> yeah I agree
14:48:44*abm joined #nim
14:50:32FromGitter<tim-st> is it expected: ```nim
14:50:45FromGitter<tim-st> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b801b44f5402f32aa869c33]
14:51:22TheLemonMantim-st, sadly it is
14:51:31FromGitter<mratsim> the VM doesn’t respect smaller types
14:51:46FromGitter<mratsim> pretty sure there is an issue open by Timothée on that
14:51:50FromGitter<tim-st> ok, thanks both
14:52:00TheLemonMan...and a PR that tries to fix that :)
14:52:32TheLemonManbut winlean relies on the vm conversion being too lenient
14:55:39*smt joined #nim
14:55:53*a_b_m joined #nim
14:56:35*Trustable joined #nim
14:57:29*skrylar joined #nim
14:59:31*abm quit (Ping timeout: 268 seconds)
15:03:09*dadabidet quit (Quit: Leaving)
15:20:43FromGitter<Araq> oh yeah thanks for reminding me...
15:20:49FromGitter<Araq> btw voting time: https://github.com/nim-lang/Nim/pull/8757
15:21:14FromGitter<Araq> dots vs colons. bikeshed ahead.
15:22:20*gpd_ joined #nim
15:23:03FromGitter<kaushalmodi> @Araq Can you install this Polls app in the Nim repo?: https://github.com/apps/polls
15:24:27FromGitter<kaushalmodi> You can then create polls in Github issue comments like this:
15:24:28FromGitter<kaushalmodi> (https://files.gitter.im/nim-lang/Nim/FUGc/image.png)
15:24:52FromGitter<Araq> we have thumbs up/down though on github without an app
15:25:22FromGitter<kaushalmodi> well, this app allows what exactly we are thumbing up in a clearer fashion
15:25:50FromGitter<Araq> and call me outdated but I don't see the value in turning 2 or 3 numbers into barcharts
15:26:33FromGitter<kaushalmodi> I don't have a strong opinion.. was just sharing what I liked seeing elsewhere
15:26:40FromGitter<DanielSokil> Charts = Big numbers
15:26:57*a_b_m quit (Ping timeout: 252 seconds)
15:34:42FromDiscord_<deech> Are there any benchmarks on Nim vs. Go specifically for asynchronous execution? eg. `goroutines` vs. `asyncdispatch`.
15:40:56FromGitter<Araq> check that techpower benchmark thing. you're rich before the speed differences become any real issue IMHO and there are more interesting criteria for choosing your programming environment
15:42:03FromGitter<Araq> `httpbeast` got superb benchmark results though.
15:43:04FromGitter<Varriount> You'll usually have other bottlenecks in your code before the underlying IO framework becomes an issue.
15:47:17dom96Yep, httpbeast is a beast :)
15:47:26dom96Sadly the techempower website is broken
15:47:37*ftsf quit (Ping timeout: 268 seconds)
15:51:23livcd_i thought mofuw got superb results
15:52:08FromGitter<ephja> was --foo:bar chosen for reasons of parsing simplicity?
15:55:28livcd_dom96: will you make httpbeast work with Windows as well ?
15:56:50dom96Maybe someday
15:57:14dom96Don't think there is much point though
15:57:15FromGitter<ephja> if so, will it work on Vista too? think of the 0.1% :p
15:57:31dom96Who actually hosts web apps on Windows nowadays?
15:58:07FromGitter<DanielSokil> Microsoft?
15:58:47livcd_dom96: uh many people :)
15:59:06leorizedoesn't Azure use Linux?
15:59:10dom96Who?
15:59:21dom96Microsoft doesn't count
16:00:15FromGitter<ephja> nvm. "This has been discussed before and non-ambiguous command line parsing is not NIH"
16:00:25FromGitter<ephja> yeah, I prefer the Nim syntax
16:00:57livcd_dom96: idk like everyone :|
16:01:02FromGitter<kaushalmodi> @Araq The example in https://forum.nim-lang.org/t/4154#25866 does not work for me. I thought there was an internal variable or function that returned the Nim library path.. what was that?
16:01:37dom96livcd_: You don't know but you think it's everyone?
16:02:21livcd_dom96: i do know that it is in fact many fortune500 companies
16:02:33*gpd_ quit (Quit: Page closed)
16:02:52*floppydh quit (Quit: WeeChat 2.2)
16:04:18*SenasOzys quit (Ping timeout: 244 seconds)
16:05:37FromGitter<kaushalmodi> I found this: https://github.com/nim-lang/Nim/blob/964f1ff7a77e0cc1c73f12d02969421c36d32e1c/compiler/nimeval.nim#L78-L90
16:05:53FromGitter<kaushalmodi> but how do I use the findNimStdLib directly in my code?
16:06:14FromGitter<DanielSokil> In fact most fortune500 comp us Linux (:
16:08:18FromGitter<Bennyelg> How can I do something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b802d71a491f4591795f878]
16:08:19livcd_sure but most if not all big companies run on myriad of things
16:14:53FromGitter<mratsim> dot and colon are overrated, I’m with team equal like @kaushalmodi. Plus, consistency is with me :D
16:15:53*iffy joined #nim
16:17:06*dorelix joined #nim
16:18:26dom96colon is in my muscle memory
16:18:33dom96Therefore too late to change it :P
16:18:54iffyI'm struggling to define the body of a posix.onSignal handler. Snippet: http://codepad.org/Jccckcki I'm getting the error: Error: illegal capture 'p' because ':anonymous' has the calling convention: <noconv>
16:19:37iffyalso what is that `onSignal(...):` syntax called?
16:28:13*SenasOzys joined #nim
16:29:50*Vladar quit (Remote host closed the connection)
16:31:29iffyoh, it's a template
16:31:37FromGitter<Bennyelg> why its so complicated to return a connection by selected one ? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8032e958a3797aa3af31b3]
16:32:28FromGitter<Araq> because there are 3 different DbConn types. and again, check how Ormin does it, you're reinventing it.
16:32:58FromGitter<Bennyelg> I'll check. ⏎ I know there are 3 different types
16:34:57FromGitter<ephja> runtime string checking? pfft :-P
16:45:16iffyso, templates are cool... but how do I do something useful inside posix.onSignal?
16:47:04*nathancahill joined #nim
16:47:18TheLemonManyou shouldn't capture any variable in the signal handler
16:48:55iffyTheLemonMan: the compiler agrees with you :) What alternatives do I have?
16:49:21*seni_ joined #nim
16:49:28TheLemonManglobals, trampolines, the sky's the limit!
16:51:33iffyhrm... searching "nim trampoline" only returns actual trampolines for sale. I'll look into globals
16:51:45*seni quit (Ping timeout: 268 seconds)
16:52:23TheLemonManintroduce a function that calls another function, that's a trampoline :)
16:53:54iffyTheLemonMan: like this? http://codepad.org/PAZAy59P That's not allowed either (for the same reason p isn't allowed in)
16:56:25TheLemonManworks fine here, can you post a compilable/runnable snippet?
16:58:19iffyK, let me make a sscce
16:59:58iffyahh... it works if that code is in the global scope, but I'm doing all this from within a proc, like this: http://codepad.org/DWBA3qmt
17:02:00*thomasross_ joined #nim
17:02:33TheLemonManyep, you can't pass a closure to a C procedure
17:03:12*thomasross quit (Ping timeout: 244 seconds)
17:03:29iffyTheLemonMan: so how do I change that code so that var p:Process is still declared inside main?
17:03:51iffyRight now I only have one p per program, but I'd like to handle multiple subprocesses eventually
17:05:37TheLemonManyou can "lift" the whole doKill closure to the global scope but it feels dirty
17:19:31*zachk joined #nim
17:20:15*zachk quit (Changing host)
17:20:15*zachk joined #nim
17:42:14*Jesin quit (Quit: Leaving)
17:47:19*Jesin joined #nim
18:00:18*nsf joined #nim
18:09:08*iffy left #nim (#nim)
18:16:17FromGitter<timotheecour> @araq we posted at the same time in https://github.com/nim-lang/Nim/pull/8757
18:17:29FromGitter<timotheecour> this is a bit of a flaw in nim cmd line, i’d much rather it be explicit : eg ⏎ `nim —confvar:gcc.exe`
18:18:03FromGitter<Araq> I don't consider it important enough to be solved
18:18:26FromGitter<Araq> and as I said elsewhere, I don't want a hierarchy of switches, I want fewer switches
18:18:39FromGitter<timotheecour> well then the way i did it in this PR is the only sane way
18:21:44FromGitter<timotheecour> > and as I said elsewhere, I don't want a hierarchy of switches, I want fewer switches ⏎ ⏎ that’s a separate discussion to this PR, but we already have a lot of switches, and a hierarchy would make it easier to find/guess/use these; eg, `git`, `docker` etc have a ton of flags, but it scales because they’re not all at top-level which would make it un-manageable
18:27:41*Jesin quit (Quit: Leaving)
18:38:31*nathancahill quit (Quit: nathancahill)
18:40:15*tzekid joined #nim
18:40:31tzekidHey :)
18:40:45tzekidCan Nim variables be nilable (like in Crystal) ?
18:41:23FromGitter<Araq> no but you can use Option[T]
18:42:39FromGitter<Araq> > git, docker etc have a ton of flags, but it scales because they’re not all at top-level which would make it un-manageable. ⏎ ⏎ dunno, if I have a problem with these I google for it and Google is superb because it lets me enter text without paying attention to any hierarchies it may use under the hood
18:42:49tzekidAraq: thanks :)
18:44:50FromGitter<Araq> hierarchies have never been proven to work effectively, it's just something programmers feed good about.
18:45:40*thomasross_ quit (Read error: Connection reset by peer)
18:46:01*thomasross_ joined #nim
18:47:15FromGitter<timotheecour> I use `git help log` `git help diff` to search `log` or `diff` related commands. Likewise with `brew help list` etc. It just makes everything easy. ⏎ ⏎ > hierarchies have never been proven to work effectively ⏎ ⏎ that’s the reason we have modules instead of 1 giant namespace. [https://gitter.im/nim-lang/Nim?at=5b8052b2ac25fd11b58c9e65]
18:49:53FromGitter<Araq> yeah, I disagree and as I said, it hasn't been proven
18:50:50FromGitter<Araq> `git help log` already assumes you know about `log` and that it's not called `hist` or `history`.
18:50:52FromGitter<timotheecour> Except that all new sufficiently complex software tools with a cmd line interface use a hierarchy: ⏎ brew, git, docker,
18:51:02FromGitter<Araq> and when I used GDB I just read *all* of its commands.
18:52:52FromGitter<Araq> and if you are interested in effective human-machine interactions you don't study "sufficiently complex cmd line interfaces", you should study computer games.
18:53:44FromGitter<timotheecour> > `git help log` already assumes you know about `log` and that it's not called `hist` or `history`. ⏎ ⏎ that’s because `git help`shows (by default) only top-level entries (not nested ones), and it shows: ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/nim-lang/Nim?at=5b80543860f9ee7aa487bebd]
18:54:38*nathancahill joined #nim
18:55:11FromGitter<Araq> don't lecture me, it's not been proven and it fails often enough to be highly critical of this whole idea
18:55:46FromGitter<Araq> and Google has more users than git anyway.
19:00:11FromGitter<timotheecour> if what you’re saying is “hierarchies” are not better than “tags” I agree; but that’s orthogonal issue to what I was suggesting (and not incompatible)
19:02:14FromGitter<Araq> it's about *design*. I know one thing about design, it's called "don't make me think"
19:03:03FromGitter<Araq> you want to cut Google's userbase down to a fraction of it current size? make them navigate through a hierarchy before they can enter the search query.
19:04:22*tzekid quit (Remote host closed the connection)
19:04:32FromGitter<kayabaNerve> search
19:04:34FromGitter<kayabaNerve> dogs
19:04:36FromGitter<kayabaNerve> cute dogs
19:04:42FromGitter<kayabaNerve> cute golden dogs
19:04:46FromGitter<kayabaNerve> cute golden retreivers
19:05:02FromGitter<kayabaNerve> I'd use it. 10/10 UI
19:05:04FromGitter<kayabaNerve> Very clear
19:05:16FromGitter<kayabaNerve> No one else would though :(
19:05:47FromGitter<timotheecour> noones arguing that search should go back to old altavista days, that’s completely unrelated to having a hierarchy of flags. `nim —fullhep | grep bar` is always there for that
19:07:07FromGitter<Araq> but since `nim —fullhep | grep bar` is superior, why waste time and effort on the hierarchy...
19:08:51FromGitter<kayabaNerve> `--fullhep`
19:08:59FromGitter<kayabaNerve> Is that the actually flag?
19:09:08FromGitter<kayabaNerve> Petition to make it the actual flag?
19:12:23FromGitter<timotheecour> ease of use / remembering and consistency etc without searching everytime. `—hint[foo]` and —warning[foo]` is a better design than the other flags (modulo what I’m fixing in https://github.com/nim-lang/Nim/pull/8757) , and a number of other flags could be handled in the same way (`—listCmd` should be a hint; `--nilChecks:on`(etc) should be `—checks[nil]:on` and so forth)
19:13:20FromGitter<timotheecour> @kayabaNerve it is; it’s called `—fullhelp` (was a typo)
19:13:21FromGitter<ephja> you would prefer to use something other than a hierarchical file system, right? are there examples of that? would filenames and tags be enough?
19:13:53FromGitter<Araq> I would use them and would never look back indeed.
19:14:11FromGitter<Araq> but I haven't ever used one, so take it with lots of salt
19:15:37FromGitter<ephja> @kayabaNerve probably meant full*help* :p
19:15:56FromGitter<timotheecour> in google, distributed file system we used was actually built on top of a flat set of files; the hierarchy was exposed by higher level API’s.
19:17:07FromGitter<ephja> all of you typed --full*hep*? :p
19:17:36*Trustable quit (Remote host closed the connection)
19:17:45FromGitter<Araq> autocorrection of command line options would be awesome btw :-)
19:17:59FromGitter<kayabaNerve> @timotheecour Won't be a typo after my petition
19:18:12FromGitter<kayabaNerve> @ephja Won't be a typo after my petition
19:18:12*Trustable joined #nim
19:18:28FromGitter<kayabaNerve> I think @timotheecour typed it and Araq typed or copy/pasted
19:18:31FromGitter<kayabaNerve> @Araq Fuck
19:18:52FromGitter<kayabaNerve> https://github.com/nvbn/thefuck/issues/519
19:19:09FromGitter<kayabaNerve> Sorry. "The Fuck"
19:19:35FromGitter<kayabaNerve> That's just the best issue ever created on GH/the one f*** link I had bookmarked.
19:21:36FromGitter<Araq> interesting, reminds me of my `cff` tool
19:22:06TheLemonManhey, no swearing, this is a Christian IRC server
19:22:20FromGitter<Araq> `cff tt tfoo.nim_` --> `tt tests/bar/tfoo.nim`
19:27:20*noonien quit (Quit: Connection closed for inactivity)
19:29:42FromGitter<kayabaNerve> TheLamonMan: It's the name of the program. I did star out my last mention as it was superfluous.
19:29:53FromGitter<kayabaNerve> @Araq That;s awesome
19:30:15FromGitter<kayabaNerve> TheLemonMan: I'll pay you a lot of crypto if you make a Nim-REPL in Brainfuck.
19:30:45FromGitter<kayabaNerve> Or Nim to Brainfuck Transpiler/Compiler backend/I'm not trying to enter this debate, I just don't know the best term
19:31:05TheLemonMantrancepiler
19:31:07FromGitter<kayabaNerve> I think, last time I saw it, it was stated Nim to C was compiled, Nim to JS was arguably transpiled...
19:33:09FromGitter<kayabaNerve> BTW. Get "The F***" on a production server and set`require_confirmation = True` to false. You should always bring your best tools with you to production, and production tools must be fast! Human confirmation is slow.
19:33:21FromGitter<kayabaNerve> *will stop the offtopic conversations :P *
19:41:22*dorelix quit (Remote host closed the connection)
19:49:46FromGitter<kayabaNerve> I have a Test that just compiles every code to make sure that any changes I make didn't break something else; I deleted an object days ago but left the definition in so this code has been broken for days and I didn't catch it...
19:55:43Calinouhi, is it possible to override the .nimble path using an environment variable?
19:56:00CalinouI'm working on creating a Scoop package for choosenim, so people with Scoop installed can just do `scoop install choosenim` to use it :)
19:56:22Calinouand it's better if it's self-contained (although it's not a strict requirement)
20:00:11dom96Only via config file
20:09:31Calinoudom96: thanks, I should be able to get it working without changing it anyway
20:10:51Calinouthe only issue is that installation fails if there's a 64-bit GCC in path (which is the case if you install the `gcc` package) though… It's possible to install 32-bit GCC using Scoop even if on 64-bit (by passing `-a 32bit`), but it's not possible to have both installed at the same time
20:15:52*shashlick joined #nim
20:17:57shashlicktest
20:19:00Calinounimble/nimgrep are missing some libraries though :(
20:19:07CalinouI can extract them manually as a workaround
20:22:57*nathancahill quit (Quit: nathancahill)
20:27:45FromGitter<timotheecour> @Araq can you please PTAL at https://github.com/nim-lang/Nim/pull/8555 (doAssert, assert now print full path of failing line on error) ; I’ve now completely removed the FAKEFILE feature
20:27:52*nathancahill joined #nim
20:30:58FromGitter<kayabaNerve> Is there no way to join a seq?
20:31:50FromGitter<kayabaNerve> mySeq.join(" ") #Calls $ on each element and joins them with the string. @[1, 2, 3, 4, 5] would return "1 2 3 4 5".
20:31:56FromGitter<kayabaNerve> Not in sequtils 0_o
20:33:24FromGitter<kayabaNerve> That's just how JS would do it. This is a seq[string]
20:33:24TheLemonManuhh, look in strutils
20:33:41FromGitter<kayabaNerve> OpenArray; thanks
20:34:10TheLemonManI was looking for a way to merge two seq[T] some time ago and found none (iirc)
20:37:02*rockcavera quit (Ping timeout: 268 seconds)
20:38:13FromGitter<kayabaNerve> I split a string into a seq among delimiters; I was then serializing the data back into a string; a simple substr wouldn't work. I could copy the seq, delete the unnecessary data, and rejoin though....
20:43:53*rockcavera joined #nim
20:43:54*rockcavera quit (Changing host)
20:43:54*rockcavera joined #nim
20:52:29FromDiscord_<exelotl> is there a way to to uniquely identify a type, e.g. if I wanted to use types as keys in a hash table?
20:53:13*yuken joined #nim
20:56:04*nsf quit (Quit: WeeChat 2.2)
20:56:21TheLemonManconvert it to string? :3
20:56:33TheLemonMans/3/P/g
21:03:37FromDiscord_<exelotl> I guess?
21:03:57FromDiscord_<exelotl> I'd have to include the module path
21:04:31FromDiscord_<exelotl> but surely there must be a 'correct' way to do this
21:04:38FromDiscord_<exelotl> that doesn't involve building strings
21:09:39FromDiscord_<exelotl> ideally I'd like something that works both at compile time and at runtime
21:11:12FromGitter<kaushalmodi> Unicode experts, anyone wants to look into this bug: https://github.com/nim-lang/Nim/issues/8768#issuecomment-415882765
21:12:18FromGitter<kayabaNerve> IDK why, but the past week or two, I've gotten more SIGSEGVs then ever before
21:12:50nathancahillmaybe a silly question, but is it possible to pass an openarray as parameters ala python's func(*[arg])?
21:13:30FromGitter<kayabaNerve> It's not a matter of updating. It's been the same version for a couple weeks.
21:14:14FromGitter<kayabaNerve> But I've never gotten destructors to work in a place I need them (Nim compiler has an issue with tables and says recompile with koch temp)
21:14:19FromGitter<kayabaNerve> *specific place
21:14:31FromGitter<kayabaNerve> And then other times I randomly get SIGSEGV and no output
21:17:26Calinoudom96: I got a decent implementation now, but it still conflicts with 64-bit GCC in PATH so I'll leave it in my fork for now
21:17:37Calinou(I could look at fixing this in choosenim)
21:18:25FromGitter<kayabaNerve> And the last line before the SIGSEV is `Hint: random [Processing]` lol
21:18:59Calinouthe installation itself is working at least :) I tested by compiling an hello world
21:20:37*jakeprem joined #nim
21:25:28nathancahillthe opposite of varargs basically
21:26:35TheLemonManis [arg] known at compile time?
21:26:56nathancahillyes
21:27:05FromGitter<Araq> macros.unpackVarargs
21:28:47*kapil____ quit (Quit: Connection closed for inactivity)
21:30:23nathancahillThanks Araq
21:30:55*dyslexicat joined #nim
21:31:03*dyslexicat left #nim (#nim)
21:32:00dom96I might be immature, but I just saw this in my C source code: `T12_ = pathInfo_jizz5V2XF9beBz2Bebd71lg((&(*colonenvP_).request2));`
21:32:12dom96Is Nim generating identifier names with `jizz` on purpose? :P
21:32:57nathancahillThat looks perfect for procs. But I didn't think my problem all the way through.. i'm actually using htmlgen macros and not procs, so that doesn't work..
21:33:20nathancahilli've got `tr(@[td(), td(), td()])` and I want tr(td(), td(), td())
21:35:35nathancahilli'm creating that array of td() beforehand in a for loop, want to stick it in a tr()
21:37:08*seni_ quit (Quit: Leaving)
21:38:14FromGitter<Araq> everything after the _ is not on purpose
21:39:09FromGitter<Araq> it's not for procs, it's a simple syntactic rewrite
21:40:57FromGitter<kayabaNerve> Should we have a list of naughty words Nim promises not to put in its generated code?
21:41:16FromGitter<kayabaNerve> Reminds me of https://github.com/danielmiessler/SecLists/pull/155
21:42:24FromGitter<Araq> alternatively, don't put generated code into your git repos
21:42:49FromGitter<ephja> nice list
21:42:52FromGitter<kayabaNerve> I don't. Could you decompile a release and find these symbols though?
21:46:39nathancahillmaybe i'm using it wrong: tr.unpackVarargs([td(), td()])
21:49:39Calinoudom96: https://github.com/Calinou/scoop/commit/216104f6b119d95c805cc768693defb4f0389303
21:49:59CalinouI did some extra work to handle edge cases (bundled MinGW, removing .choosenim when uninstalling, etc)
21:52:01FromGitter<Araq> "Helmholtz noted that when one is confronted with an orthographic stimulus (e.g., HOUSE), the ⏎ stimulus automatically triggers a conscious representation of the phonological form of the ⏎ word (i.e., /haus/). Seldom in everyday life is it appreciated that, in this situation, the ⏎ visual stimulus triggers a conscious content that is very different in nature from that of ⏎ the environmental stimulation that brought
21:52:02FromGitter... the content into existence: The conscious ... [https://gitter.im/nim-lang/Nim?at=5b807e01d8d36815e5862e8f]
21:52:37FromGitter<timotheecour> can anyone merge this or give feedback ? https://github.com/nim-lang/Nim/pull/8682 ; it enables users to use nims instead of nimcfg in their .config
22:01:18*nathancahill quit (Ping timeout: 252 seconds)
22:02:35*nathancahill joined #nim
22:04:08*Trustable quit (Remote host closed the connection)
22:05:29*nathancahill_ joined #nim
22:06:53dom96Calinou: Cool. Why disabling analytics?
22:07:00*nathancahill quit (Ping timeout: 244 seconds)
22:07:11Calinoudom96: installation should work unattended
22:07:17Calinouso I just opt-out of analytics (I also do that in CI)
22:08:30*nathancahill joined #nim
22:09:33dom96hrm, okay
22:09:42dom96So this is a weird bug https://github.com/nim-lang/Nim/issues/8773
22:10:06*nathancahill_ quit (Ping timeout: 264 seconds)
22:29:58*gb00s quit (Remote host closed the connection)
22:37:29*wildlander joined #nim
22:38:53*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
23:03:33*bung joined #nim
23:04:18*nathancahill quit (Ping timeout: 272 seconds)
23:08:48*nathancahill joined #nim
23:14:59*oprypin quit (Quit: Bye)
23:15:12*oprypin joined #nim
23:15:56*FromGitter quit (Remote host closed the connection)
23:15:56*oprypin quit (Client Quit)
23:16:25*FromGitter joined #nim
23:16:25*oprypin joined #nim
23:28:07*nathancahill quit (Ping timeout: 244 seconds)
23:51:44*yuken left #nim ("Leaving")
23:55:18*burnout_ joined #nim
23:58:20*burnout_ quit (Remote host closed the connection)