<< 19-05-2019 >>

00:26:31*ng0 quit (Quit: Alexa, when is the end of world?)
00:27:01*Vladar quit (Remote host closed the connection)
00:29:00*Kaivo quit (Remote host closed the connection)
00:29:22*xet7 quit (Quit: Leaving)
00:32:11smitopIs it possible to install an outdated version of a package?
00:32:40smitopI want to install a package that broke support for v0.19.6 recently (ws)
00:34:44smitopFigured it out
00:34:53smitopJust had to reference a specific commit hash
00:47:23*rnrwashere quit (Remote host closed the connection)
00:59:44*rnrwashere joined #nim
01:28:45*vlad1777d joined #nim
01:30:53*Snircle joined #nim
01:56:54*cyberjpn joined #nim
01:57:28*rnrwashere quit (Read error: Connection reset by peer)
01:58:04*rnrwashere joined #nim
02:01:36*banc quit (Quit: Bye)
02:05:20FromDiscord<treeform> sorry current head works on devel bc of getSocket
02:23:41*banc joined #nim
02:46:43*cyberjpn quit (Ping timeout: 245 seconds)
02:57:04*cyberjpn joined #nim
03:14:19*smitop quit (Quit: Connection closed for inactivity)
03:43:48*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:54:22*NimBot joined #nim
03:57:09*rnrwashere quit (Remote host closed the connection)
04:07:20*cyberjpn quit (Ping timeout: 246 seconds)
04:14:20*theelous3 quit (Ping timeout: 246 seconds)
04:24:53*dddddd quit (Remote host closed the connection)
04:40:48*laaron joined #nim
05:32:25*kapilp joined #nim
05:33:02*nsf joined #nim
05:40:30skrylar[m]managed the be docs in to some headers.. fiddling with a script to parse those in to something easier to look at. then have to see whats missing. layout stuff and some common controls seem to be mostly it
05:40:48*solitudesf joined #nim
05:41:20skrylar[m]bit of thinking to be had whether layout should be treated as absolute and then have a "layout kit" that tries to manage things separately, or to do something like the vcl/cocoa's system where you anchor edges to other widgets + padding
06:03:32*rnrwashere joined #nim
06:07:55*rnrwashere quit (Ping timeout: 248 seconds)
06:24:35*solitudesf quit (Ping timeout: 258 seconds)
06:25:07*Perkol joined #nim
06:51:44*Perkol quit (Quit: Leaving)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:39*gmpreussner joined #nim
07:50:49*rnrwashere joined #nim
07:55:07*rnrwashere quit (Ping timeout: 248 seconds)
07:58:37*JustASlacker joined #nim
08:01:09*kapilp quit (Quit: Connection closed for inactivity)
08:04:57*narimiran joined #nim
08:19:14*kapilp joined #nim
08:27:15*jjido joined #nim
09:32:19*Vladar joined #nim
09:39:33*nsf quit (Quit: WeeChat 2.4)
10:11:03*zahary joined #nim
10:29:23*arecaceae quit (Remote host closed the connection)
10:29:42*arecaceae joined #nim
11:09:01*smitop joined #nim
11:11:25smitopHow do I install Nim from Windows, on the Git Bash shell? I'm using travis CI
11:12:12narimiransmitop: follow the instructions here https://nim-lang.org/install_windows.html
11:13:20FromGitter<mratsim> I don't think anyone is using Travis for CI on Windows but Appveyor instructions can help you: https://github.com/nim-lang/Nim/wiki/BuildServices#appveyor
11:15:25*laaron quit (Remote host closed the connection)
11:19:32*nsf joined #nim
11:21:18*narimiran quit (Ping timeout: 245 seconds)
11:27:52*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:33:43*poopBot joined #nim
12:12:33poopBothmm can somone explain why if i use enmus, exm north=1, south=2, east=3, west=4 i can compere them if obj1.north > obj2.south but i cant do var z = obj1.north - obj2.south
12:13:10poopBotit gives me type mistmantch, do i need to cast them to int so operator knows or what
12:16:22enthus1asttry obj1.north.int - obj2.south.int
12:17:33poopBotty that worked and casting dident
12:21:01poopBotand how do i cast enum to string
12:21:12poopBoti can do echo enum and it will give its name
12:21:15enthus1ast$value
12:21:22poopBotok
12:22:29enthus1astbut this is technically not a "cast"
12:25:56poopBothmm i tryed $value infront and behind and it dident owrk
12:26:10enthus1ast$obj2.south
12:26:17poopBotoh
12:26:19poopBotlol
12:26:36poopBot:)
12:30:06enthus1astdoes one know how to change the height/width of ui MultilineEntry?
12:44:07enthus1astor better: let one MultilineEntry use all the space
12:51:42*laaron joined #nim
13:01:09*kapilp quit (Quit: Connection closed for inactivity)
13:09:22skrylar[m]alright. got a python/lark script to read the derpy c++ i copied out of the be book
13:10:04skrylar[m]still have to fiddle with getting it in to a usable format from there to nim-ize and then start making comment pages
13:13:56*theelous3 joined #nim
13:14:09*laaron quit (Remote host closed the connection)
13:14:31*jjido joined #nim
13:17:00*nsf quit (Quit: WeeChat 2.4)
13:17:33*laaron joined #nim
13:18:19*abm joined #nim
13:25:14*vlad1777d quit (Ping timeout: 246 seconds)
13:30:04*vlad1777d joined #nim
13:35:18FromDiscord<SirHaswell> const map = newSeq[string]()
13:35:18FromDiscord<SirHaswell>
13:35:18FromDiscord<SirHaswell> I need to map.destroy() ?
13:35:24FromDiscord<SirHaswell> or it's optionnal ?
13:35:31*solitudesf joined #nim
13:42:08*vlad1777d quit (Ping timeout: 245 seconds)
13:44:22*vlad1777d joined #nim
13:44:43*narimiran joined #nim
13:57:05*rnrwashere joined #nim
14:01:30*rnrwashere quit (Ping timeout: 252 seconds)
14:09:06FromGitter<mratsim> no
14:09:38FromGitter<mratsim> seq and strings cannot be destroyed.
14:10:49*vivus joined #nim
14:11:03*dddddd joined #nim
14:12:46vivushello all. I have defined my table like so: `var mytable = newTable[string, seq[string]]()` . How do I 1) add a key-value pair that contains an empty sequence (meaning just adding a key and the only value I want to add is a string, leaving the sequence empty for later use) 2) add a sequence to an existing key-value pair?
14:13:22shashlick@smitop: nightlies, nimterop and feud all use windows on Travis
14:13:37narimiranvivus: 1. `mytable[key] = @[]`, 2. `mytable[key].add(value)`
14:14:44narimiran2., alternatively: for x in existingSeq: mytable[key].add(x)
14:15:09shashlickOk maybe not nimterop
14:15:09vivusnarimiran: but in my table, I have a string and a sequence. for 1) I want to add the string but not the sequence. the equivalent Python code looks like this: `targetObj[row[0]] = (row[2], [])`
14:15:13shashlickhttps://github.com/genotrance/feud/blob/master/.travis.yml
14:15:36narimiranvivus: didn't we discuss the same thing yesterday?
14:15:52vivusnarimiran: yeah, but we didn't discuss this part of it (how to add stuff)
14:15:57shashlickhttps://github.com/nim-lang/nightlies/blob/master/.travis.yml
14:16:14narimiran``targetObj[row[0]] = (row[2], [])` this is NOT `Table[string, seq[string]]()`
14:17:19vivusnarimiran: but in Python it shows that as: dictionary which has a string and a list
14:17:35narimirandictionary whose VALUE is a TUPLE of string and a list
14:18:00narimiranthat would be Table[string, (string, seq[string)]
14:18:35narimirancan you share the python snippet you're trying to translate?
14:18:49vivussure
14:20:12vivusnarimiran: https://dpaste.de/uUMm
14:20:27vivusyou are right, it is a Tuple, my bad
14:21:33*Tyresc joined #nim
14:21:38*zahary quit (Quit: Connection closed for inactivity)
14:22:32narimiranvivus: so, you need to redefine your `mytable` (targetSents) as i mentioned above, then you add to seq similarly to the line 24 in your snippet (just use `add`, not `append`)
14:23:51narimiranyou *probably* don't add a seq to seq (what you asked in question 2), but just a string which is at `transSents[row[1]]`
14:25:40vivusnarimiran: does most of the rest of the code remain the same? how would: `targetSents[row[0]] = (row[2], [])` look in Nim?
14:26:06narimiran`targetSents[row[0]] = (row[2], @[])` (notice the `@`)
14:26:35vivusyep, I saw that yday for sequences on your link and on /tut1 page of nim-lang
14:33:53shashlickhttp://pyfound.blogspot.com/2019/05/amber-brown-batteries-included-but.html?m=1
14:34:19shashlickSimilar to our discussion on stdlib vs nimble packages
14:34:58shashlickAt least Araq and dom96 are open to deprecating packages and moving stuff to nimble
14:35:48shashlickBut also Araq's point on trusting Nim vs some random nimble package
14:36:04FromGitter<mratsim> The difference is that: ⏎ ⏎ > Brown went further adding that because few Python core developers are also major library maintainers, library authors’ complaints are devalued or ignored.
14:37:47FromGitter<mratsim> One thing that we can do in Nim stdlib is providing an ideal interface for key stuff (crypto, bigint, serialization)
14:37:57shashlickI think Nim needs to start advertising tier 1 nimble packages
14:38:08FromGitter<mratsim> that will allowconsumers of that interface to switch backends
14:38:34shashlickWe have already started testing some of them, might add well publicize
14:38:39vivusnarimiran: wow, it worked
14:38:42vivusty <3
14:38:45narimiran:)
14:38:58vivusthe script should run much faster than Python
14:39:46FromDiscord<treeform> I would like zlib and asyncttools to be part of standard library.
14:41:12FromDiscord<treeform> I think httpclint needs to handle gziped bodies.
14:41:31FromDiscord<DeltaPHC> Does Nim have any policies in regards to adding more wrappers versus pure libraries?
14:41:51FromGitter<mratsim> I don't think so
14:44:25shashlickI think we are at a point where adding to stdlib is only warranted if an existing stdlib module requires it and core devs are willing to maintain
14:44:45shashlickOtherwise a nimble packages is faster and sensible
14:44:58shashlickBut hard to get visibility as a nimble package
14:45:20shashlickThere's many good ones that don't get much attention at all and that's unfortunate
14:48:03FromDiscord<DeltaPHC> Very common deps where the API is very stable seem like good candidates
14:58:29*al_ joined #nim
15:22:47*lritter joined #nim
15:25:55*Kaivo joined #nim
15:27:15Zevvthere's a collection of "important" nimble packages that get tested with nim CI, but i'm not sure if these are advertize somewhere, and if the nim team somehow holds those in higher esteem then others
15:29:21Zevvthere are indeed some things you'd consider "essential" these days, but these are not in the stdlib. Compression, crypto. But I guess keeping it out of the stdlib makes sense. Just like http://pyfound.blogspot.com/2019/05/amber-brown-batteries-included-but.html
15:34:40*laaron quit (Remote host closed the connection)
15:40:17*Trustable joined #nim
15:40:32*laaron joined #nim
15:53:34*a_b_m joined #nim
15:55:33*abm quit (Ping timeout: 244 seconds)
16:03:26poopBotif my of form case statment, for 1 i dont need to do anything but if i remove it it syas not all cases cowerd, so should i put then else: or what, i tryed brake or pass but that gived error
16:03:49*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:04:11narimiranpoopBot: http://nim-lang.github.io/Nim/tut1.html#control-flow-statements-case-statement
16:05:02poopBotoh discard is waht i need
16:10:57*vivus quit (Remote host closed the connection)
16:17:04*rnrwashere joined #nim
16:17:14*nsf joined #nim
16:29:36*coopernurse quit (Quit: Konversation terminated!)
16:36:16*al_ quit (Quit: al_)
16:48:01FromDiscord<treeform> any one know why I can't have iterator inside an iterator? https://gist.github.com/treeform/98be9388064b15753d0f12644c2d2348
16:48:17*smitop quit (Quit: Connection closed for inactivity)
16:53:56*rnrwashere quit (Read error: Connection reset by peer)
16:54:24*rnrwashere joined #nim
17:02:33*stefanos82 joined #nim
17:18:30*Minimisthupper joined #nim
17:25:41poopBothmm https://pasteboard.co/IfrY6vw.png index 0 not in 0..-1 wtf
17:26:06narimiranpoopBot: that means that your collection is empty / not initialized
17:26:41Zevvtreeform: iterators do not support recursion
17:26:52narimiranpoopBot: your line 68 is wrong
17:27:18narimiran...and lines 70 and 72 too ;)
17:27:59narimiranmake line 67 `newSeq[TypeOfElement](3)`
17:28:39narimiranlines 69, 71, 73 could be just `inc pt.atm_card`
17:30:02narimiranand the whole proc could be `pt.on_t = pt.deck[pt.atm_card .. pt.atm_card+2]; inc(pt.atm_card, 3)`
17:30:02*natrys joined #nim
17:30:04poopBothmm duno i saw there was inc but pt.atm_card.inc() looked too ulgy for me but switching that inc infront is ok i guess but for now will just leave it like this
17:31:43poopBotpt.atm_card is deafrent eatch time
17:32:08poopBoti could meybe just foor looped it but anyway can alwies clearit up leater
17:33:52*a_b_m quit (Ping timeout: 255 seconds)
17:48:44*Vladar quit (Remote host closed the connection)
17:49:42*jjido joined #nim
17:52:02*Minimisthupper quit (Remote host closed the connection)
18:02:08poopBotvar poker_table = PokerTable(blinds:(20,40),buyins:(200,4000), player_slots:newSeq[PlayerSlot](9))
18:02:23*rnrwashere quit (Remote host closed the connection)
18:03:33poopBotso hmm when i try to set player_slots[1].status = "zzzz" it complins cant assing to null so my guess is thats cuz PlayerSlot is ref object and i need to first instalitize it
18:04:57*rnrwashere joined #nim
18:10:29*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:11:39*nsf quit (Quit: WeeChat 2.4)
18:16:26FromGitter<stvnfx> I am am going to ask a dumb question but what would be the equivalent to a strcpy for a paramater? for an external callback
18:17:09poopBotfor me that smart question cuz i dont know answer xD
18:17:31FromGitter<stvnfx> It works when I directly use it with proc c_strcpy(a: cstring, b: cstring): cstring {. ⏎ ⏎ ```importc: "strcpy", header: "<string.h>", noSideEffect.}``` [https://gitter.im/nim-lang/Nim?at=5ce19dbbef853135c8eac1c9]
18:17:35*JustASlacker quit (Ping timeout: 258 seconds)
18:18:03FromGitter<stvnfx> I am busy making some additions to the openssl wrapper and net libs for password pem files
18:20:51FromGitter<stvnfx> I did notice that c_strlen was added in os by Araq and Andreas but I am sure there is a reason strcpy was not added or needed
18:22:31FromGitter<stvnfx> anyway, if anyone knows better than me, I am going to upload my code in a min and make a ticket if one does not exist for SSL_CTX_set_default_passwd_cb
18:22:53FromGitter<stvnfx> :)
18:29:31*natrys quit (Ping timeout: 244 seconds)
18:34:28*madpat joined #nim
18:34:40*natrys joined #nim
18:49:49madpatI'm trying to learn how to use channels via a simple 1 producer 1 consumer program (https://pastebin.com/6zc1m0CX), but the execution often blocks entirely (sample output included). Can anybody teach me if (and what) I'm doing wrong?
18:57:52poopBoti cant i too much newb, fast question i know i can use del to delete at index of seq but can i delete like range so insted for loping del 5 times like tard can i like myseq.del[0..4] or soemthing
19:00:28*jjido_ joined #nim
19:01:49Zevvmadpat: you close the channel before the receiving side has the chance to read the data
19:01:57poopBothmm or meybe i create list form same so myseq = myseq[4..myseq.len-1]
19:02:19FromGitter<JasperJenkins> poopBot: these is delete in sequtils.
19:02:22Zevvmove the channel.close() call like http://p.zevv.nl/?fea4
19:03:17FromGitter<JasperJenkins> though that is like seq.delete not seq.del, if that matters.
19:03:46narimirandelete is what he wants, not del ;)
19:04:30poopBot@JasperJenkis ty
19:04:49poopBotdoes @ work form pepoel form GIter and discord/
19:05:12FromGitter<liquid600pgm> it works for gitter
19:05:16madpatZevv: Thank you!
19:05:19FromGitter<liquid600pgm> on discord, you have to include the discriminator afaik
19:09:06FromGitter<stvnfx> So uh not perfect but works in my case for password pem files using the SSL_CTX_set_default_passwd_cb ⏎ https://gist.github.com/stvnfx/6606b51235e6b4b52c0b1bba503e5c89https://github.com/stvnfx/Nim
19:10:28narimiranstvnfx: pro tip: when working on some feature of a forked repo, don't do it in devel/master branch - create a separate branch, it will save you both time and nerves :)
19:11:44FromGitter<stvnfx> you are 100% correct here I should have branched, I am not intending on commiting any of that. I just needed a playground for someone to correct me :)
19:12:51FromGitter<stvnfx> I sort of based it on https://github.com/Andersbakken/openssl-examples/blob/master/common.c
19:13:19FromGitter<stvnfx> as I needed it for the ssl pinning we are doing at work for a small service
19:13:44FromGitter<stvnfx> but yeah, its the first time looking at the nim stdlib sources :D
19:15:33*JustASlacker joined #nim
19:22:16*nsf joined #nim
19:23:35poopBot Error: unhandled exception: index 4 not in 0 .. 3 [IndexError] , hmm what does this mean this is not out bounds error, am trying to figure out
19:23:49narimiranhow it is not?
19:23:55Zevvit looks like out of bounds
19:24:12narimiranyou are doing `something[4]` where `something.len == 4`
19:25:58poopBoti dont think so but will check , when i call thing like something[44] and i only have 20 elemntis in it i get Error: unhandled exception: index out of bounds [IndexError]
19:26:51poopBotnot that other error am gona check it again meybe i just crazy
19:26:51narimiranok, i guess you know more than us. sorry.
19:28:21*xet7 joined #nim
19:32:49poopBothmm guess i got difrent errors cuz online compiler version 18, ok so its out of bounds issue but need to logicly eat it in my brain cuz looking on paper i am like 99% it should not be out of bounds xD
19:34:33narimiranyep, probably nim compiler mis-counted number of elements
19:35:09Zevvyeah, compilers do that, off by one is a pretty nasty thing to get right
19:35:44narimiransince they use binary, they quite soon lose the count
19:36:00poopBothaving fun :)
19:36:01Zevv"one", "two", "i dunno, a lot?"
19:36:11Zevv:)
19:37:48*qwertfisch is now known as rantfisch
19:38:11narimiransth[40]? out of bounds! oh, you said sth[14], i guess i didn't hear the last N there, sorry -- the usual compiler
19:41:48poopBothttps://pasteboard.co/IfsRcro.png , Hmm it says error on line 142 but it prints "wtf" thats after it?
19:41:54poopBothmm wierd
19:42:38poopBothttps://ideone.com/KlGoa9
19:42:57poopBotso just did example to check logic count is right i should use 0..4
19:43:07narimiranno it is not, lol
19:43:16narimiranwhat's the last index of that seq?
19:43:31poopBotit has 7 elements so its 6
19:44:23poopBoti would love to be simple dumb wrong form my side
19:44:25narimiranoh, i miscounted number of 5's there, sorry.
19:45:14narimiranlook at line 150
19:45:30narimiranhow many triples do you have? ;)
19:45:56*a_b_m joined #nim
19:47:16narimiranbtw, `intToStr` is `$`
19:47:17*natrys quit (Quit: natrys)
19:48:22poopBotyep error is down, i just did like echo wtf1 echo wtf2 beatwin each lines to figure out wtf is heppening, duno why that error code lied me about line
19:48:40poopBotty i dident know i could do $ , this intToStr was so grrr
19:51:50narimiranthat filter and sort stuff is also grrr ;)
19:52:06narimiranand line 160 is also grrr
19:53:03poopBotyep 160 is for sure :) , about filter and sort duno hwo to it smother
19:53:17narimirantriples_le.filterIt(it notin triples)
19:54:15narimiranbtw, do you know the difference between `del` and `delete`? (line 170)
19:54:54narimiranand there is `deduplicate` proc you could use
19:55:49poopBotyes delete is for seq for range i somone spooend me today, deduplcate does for object and i dident know how to use deduplicate by propertis of obj in seq
19:56:07narimiranpoopBot: that's not the only difference, RTFM
19:58:11poopBotDeletes in s the items at position first .. last. This modifies s itself, it does not return a copy. :)
19:58:48poopBotgoogling rtfm
19:58:59*JustASlacker quit (Ping timeout: 246 seconds)
19:59:56poopBoti tend to reed manual when i get stuck i am more learn by doing
20:00:11narimiranok, i guess i have to find the link from the docs for you: https://nim-lang.github.io/Nim/system.html#del%2Cseq[T][T]%2CNatural
20:00:27*Tyresc quit (Ping timeout: 248 seconds)
20:01:22*ng0 joined #nim
20:04:55*lritter quit (Ping timeout: 258 seconds)
20:07:39poopBotnarimiran, thats del not delete, i saw that docs too like 5h ago
20:07:52poopBothttps://nim-lang.org/docs/sequtils.html#delete%2Cseq%5BT%5D%2CNatural%2CNatural
20:09:01poopBothmm or
20:09:05narimiranok, i failed to get my point across. nevermind, i'm off to sleep.
20:09:14narimirangood luck in your adventures :)
20:09:17poopBotgood night and sorry i tried :)
20:09:32poopBotgood night and sorry, i tried :)
20:10:03poopBotThis is an O(n) operation. <<< this meybe?
20:10:33poopBotmy other option was to do var myseq = myseq[4..myseq.len-1]
20:10:55poopBoti thinked this mose efficient but somone shooted me to use delete
20:11:13poopBotdont worry vill mark it #TODO harass nariman tomarrow :)
20:15:16*narimiran quit (Ping timeout: 258 seconds)
20:19:42*nsf quit (Quit: WeeChat 2.4)
20:39:47*krux02 joined #nim
20:48:06*jjido_ is now known as jjido
21:08:21*smitop joined #nim
21:09:51*solitudesf quit (Ping timeout: 268 seconds)
21:11:18FromDiscord<kiwi> repl.it has Nim as well: https://i.imgur.com/IfGcirL.png
21:18:57*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:24:50xacekiwi: that's nice :) has repl.it gotten any better? first time i tried it, it was very slow with running the code...
21:25:52poopBotduno i like more that jdoodle stlye just it sux it asks for geistration if want to share code
21:26:50*stefanos82 quit (Remote host closed the connection)
21:35:52*poopBot quit (Remote host closed the connection)
21:41:02*jjido joined #nim
21:42:17*xet7 quit (Quit: Leaving)
21:54:25*Trustable quit (Remote host closed the connection)
22:15:55*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:26:42*ng0 quit (Quit: Alexa, when is the end of world?)
22:54:00*cyberjpn joined #nim
22:57:13*rnrwashere quit (Remote host closed the connection)
23:21:16FromDiscord<j$> hey there a way to manage floating point inaccuracy?
23:30:29*krux02_ joined #nim
23:33:08*krux02 quit (Ping timeout: 252 seconds)
23:38:05*cyberjpn quit (Ping timeout: 246 seconds)
23:52:20*rnrwashere joined #nim
23:56:04*vlad1777d quit (Ping timeout: 258 seconds)