<< 23-05-2019 >>

00:02:39sealmoveis ref counting already implemented for newruntime?
00:08:09*jjido quit (Quit: Connection closed for inactivity)
00:17:33*vlad1777d quit (Ping timeout: 245 seconds)
00:22:14*btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:35:00*laaron quit (Remote host closed the connection)
00:35:30*laaron joined #nim
00:39:15*laaron quit (Remote host closed the connection)
00:39:47*laaron joined #nim
00:48:18*rnrwashere joined #nim
01:03:02*rnrwashere quit ()
01:18:46*btbytes joined #nim
01:26:37*sealmove quit (Quit: WeeChat 2.4)
01:40:33*leorize quit (Ping timeout: 256 seconds)
01:40:47*theelous3 quit (Ping timeout: 248 seconds)
01:41:47*btbytes quit (Remote host closed the connection)
01:42:50*leorize joined #nim
01:43:35*clyybber quit (Quit: WeeChat 2.4)
01:57:08*a_b_m quit (Ping timeout: 272 seconds)
02:01:37*banc quit (Quit: Bye)
02:22:33*banc joined #nim
02:32:26*rnrwashere joined #nim
02:35:10*rnrwashere quit (Remote host closed the connection)
02:39:15*dddddd quit (Remote host closed the connection)
03:04:34*rnrwashere joined #nim
04:22:03*leorize quit (Ping timeout: 256 seconds)
04:25:27*leorize joined #nim
04:36:20*rnrwashere quit (Remote host closed the connection)
04:44:00*vlad1777d joined #nim
04:46:19*nsf joined #nim
04:53:16*rnrwashere joined #nim
05:13:45*rnrwashe_ joined #nim
05:16:46*rnrwashere quit (Ping timeout: 252 seconds)
05:26:53*leorize quit (Quit: WeeChat 2.3)
05:33:44ZevvAlso spring cleaning at the python ecosystem: cleaning up stdlib https://www.python.org/dev/peps/pep-0594/
05:38:53*narimiran joined #nim
05:53:07*leorize joined #nim
05:59:12*leorize quit (Remote host closed the connection)
06:04:28*leorize joined #nim
06:16:11*rnrwashe_ quit (Remote host closed the connection)
06:18:55*solitudesf joined #nim
06:23:19*leorize quit (Ping timeout: 256 seconds)
06:25:29*hoijui joined #nim
06:27:03*leorize joined #nim
06:27:29*jjido joined #nim
06:31:13*PMunch joined #nim
06:48:35*kapilp joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:03:42*krux02 joined #nim
07:03:53FromGitter<mratsim> we have nim/graveyard already ;)
07:04:42*gmpreussner joined #nim
07:12:26*stefanos82 joined #nim
07:14:12PMunchBy the way, yesterday I needed to convert a password to UTF-16-LE and just hacked around it with this: password.mapIt(it & "\0").foldl(a & b)
07:14:29PMunchIs there a proper "toUtf16" method out there somewhere?
07:14:39PMunchCouldn't find anything in the unicode module
07:15:54leorizethe type Rune16 exists but isn't used by anything in the unicode module :p
07:16:30leorizePMunch: try the encodings module?
07:16:39*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:21:39PMunchHmm, appart from adding a BOM marker that seems to work well :)
07:23:02PMunchAh, by specifying UTF-16LE instead of just UTF-16 it works without the BOM
07:23:10*jjido joined #nim
07:24:33*euantor quit (Ping timeout: 250 seconds)
07:24:46*euantor joined #nim
07:26:05*jjido quit (Remote host closed the connection)
07:27:31TangerHey folks, is AndreiRegiani around on IRC these days?
07:28:11FromGitter<mratsim> I don't think so but pinging is the best way to know :)
07:31:43TangerThanks mratsim, I wasn't sure if he uses the same handle on IRC or not
07:37:24FromGitter<alehander42> oh man nimkernel building is hard
07:38:09PMunchalehander42, are you making a kernel in Nim?
07:43:47*leorize quit (Ping timeout: 256 seconds)
07:45:47*leorize joined #nim
07:46:29Zevvwhy not
07:47:11*solitudesf quit (Ping timeout: 248 seconds)
07:47:35poopBotnew kernel with runtime
07:47:54Zevvit's all fun and games, but does it have a scheduler yet?
07:48:23*rokups joined #nim
08:03:17FromGitter<alehander42> no, i am just trying to build nimkernel
08:03:19FromGitter<alehander42> :D
08:03:21FromGitter<alehander42> but i cant!
08:03:34FromGitter<alehander42> i managed to trim it down
08:03:41FromGitter<alehander42> but i still get a confusing `-fuse-linker-plugin, but liblto_plugin.so not found`
08:05:30FromGitter<alehander42> but if i pass the path to the .so, it still gets the error
08:05:35FromGitter<alehander42> is -Wl,rpath=<path>
08:05:43FromGitter<alehander42> the right way to do this on ubuntu?
08:07:48*smitop quit (Quit: Connection closed for inactivity)
08:16:07FromGitter<alehander42> ok i just pasted my crosscompile dir where strace shows me it looks for it
08:16:18*ShalokShalom quit (Remote host closed the connection)
08:20:23FromGitter<alehander42> praise the Lord, i did it
08:20:26FromGitter<alehander42> i had to also copy ld
08:20:30FromGitter<alehander42> from somewhere to somewhere
08:20:36FromGitter<alehander42> i really dont know how i messed up
08:20:42FromGitter<alehander42> the install of i686-gcc
08:21:45*leorize quit (Ping timeout: 256 seconds)
08:22:16*Vladar joined #nim
08:23:10*laaron quit (Remote host closed the connection)
08:23:37*laaron joined #nim
08:25:06*leorize joined #nim
08:37:58*neceve joined #nim
08:39:31FromGitter<alehander42> Araq, so very random things trigger appendString magic in my os:standalone build
08:39:48FromGitter<alehander42> proc writeChar*(vram: PVidMem, entry: TEntry, pos: TPos) = vram[0] = entry
08:39:50FromGitter<alehander42> works
08:39:50FromGitter<alehander42> but
08:40:07poopBotbut
08:40:22FromGitter<alehander42> proc writeChar*(vram: PVidMem, entry: TEntry, pos: TPos) = ⏎ let index = 0 ⏎ vram[index] = entry
08:40:24FromGitter<alehander42> fails
08:40:30FromGitter<alehander42> with appendString needed
08:41:06*ShalokShalom joined #nim
08:42:00poopBoti cant help i am newb, i just have 10min before i can go to shop buy some food ijust woke up like hafl hour ago
08:42:13FromGitter<alehander42> :P
08:44:00*a_b_m joined #nim
08:47:35PMunchHmm, interesting. Waiting for some stuff so decided to try and optimize some code for fun
08:48:25PMunchThe code in question in a function that takes a sequence of bytes with len mod 7 == 0 and for every 7th bit it adds a parity bit.
08:48:50PMunchThis is needed for DES encryption, since it treats every 8th bit in the key as parity and doesn't use it
08:49:12PMunchFirst thing that suprised me was that manually unrolling a loop actually helped
08:50:20PMunchSecond was that `newSeqOfCap` with `add` and `newSeq` with `[]=` had such a big performance difference
08:51:09PMunchDropped from an average of 0.78s to 0.31s on a run of 1_000_000 tries with the seq switch alone
08:54:00PMunchJust rolled my loop back and that didn't affect speed, at least not noticeably
08:57:09PMunchWith `add` in a loop: 0.100s, with `add` manually unrolled: 0.770s, with `[]=` in a loop: 0.310s, with `[]=` manually unrolled: 0.310s
08:59:57FromGitter<alehander42> hm i just cant get why this is happening
09:04:12Araqpatch the compiler so that it tells you where appendString is coming from
09:08:15FromGitter<alehander42> great idea: but where
09:08:22FromGitter<alehander42> i tried to find where mAppendStrStr
09:08:31FromGitter<alehander42> is registered, but i couldn't
09:08:51FromGitter<alehander42> like, where does the compiler add the magic for a expression
09:10:45*fredrik92 is now known as couven92
09:17:24*Snircle_ joined #nim
09:18:58*poopBot quit (Remote host closed the connection)
09:19:12*Snircle quit (Ping timeout: 272 seconds)
09:22:23*leorize quit (Ping timeout: 256 seconds)
09:24:23*leorize joined #nim
09:28:43Araqyou can literally grep for 'appendString' in compiler/
09:32:01PMunchIf anyone is up for a little code optimization challenge :) http://ix.io/1JNP/Nim
09:32:10PMunchThat's my fastest version thus far
09:33:52FromGitter<mratsim> I see the {.noInit.}
09:35:55FromGitter<mratsim> What is that supposed to do @PMunchn that looks like some De Bruijn trick can be applied
09:37:30FromGitter<mratsim> the let byte, seems fishy as well, first of all "byte" is a type, so reusing that name for a variable is so-so, second I'm pretty sure you are reallocating in the inner loop of a double for loop
09:37:39FromGitter<mratsim> you probably want to use ptr UncheckedArray instead
09:38:18FromGitter<mratsim> ah no it's sliced directly
09:41:36*leorize quit (Remote host closed the connection)
09:42:02*leorize joined #nim
09:53:04leorizeany travis-ci users around?
09:53:15leorizehow can you make travis build a branch other than master?
09:53:38*couven92 quit (Quit: Client disconnecting)
09:54:47FromGitter<mratsim> It's done automatically
09:55:22FromGitter<mratsim> I wrote the Travis CI config part in the BuildServices wiki and that's what I use in all my projects
09:56:18leorizedo I need a .travis.yml in master? I'm testing travis and only have the yml file in a branch
09:57:18*kapilp quit (Quit: Connection closed for inactivity)
09:57:34FromGitter<mratsim> I don't think so, when I'm updating the .travis.yml in a branch, master still uses the old config while the branch uses the new one
09:58:06leorizeam i doing anything wrong here? https://github.com/alaviss/nim.nvim/tree/tests
09:58:15leorizegot "No builds for this repository" in travis dashboard
09:58:53FromGitter<mratsim> just check that in your "webhook" on Github you have Travis enabled
09:59:48leorizegot the travis ci app installed on the repo
10:00:45FromGitter<mratsim> in arraymancer I have a webhook that goes to: https://notify.travis-ci.org
10:02:03FromGitter<mratsim> And I only need "Check runs, "Check pushes", "Pull Requests" and "Pushes" checkboxes for Travis
10:05:23leorizeI think I'd need to push an another commit to trigger CI
10:08:16leorizeyep, that worked
10:08:57leorizethanks @mratsim for the help
10:09:10FromGitter<mratsim> you're welcome
10:09:13*leorize quit (Quit: WeeChat 2.3)
10:27:30*kapilp joined #nim
10:29:39PMunchmratsim, the noInit was just a test since I immediately allocate the result to be a seq of the expected length. But it didn't impact performance
10:30:04PMunchbyte as a name and a type is a good point, I'm just bad at naming things :P
10:31:09FromGitter<kayabaNerve> Anyone know about this new ProveInit warning?
10:31:14*xet7 joined #nim
10:31:27FromGitter<kayabaNerve> I can't find the commit that adds it to devel, but I'm specifically looking for an override.
10:31:28PMunchAnd yeah that slicing isn't anything special. The cast is just there to make it a byte (string is compatible with a seq which inner type is a byte long)
10:33:29*laaron quit (Remote host closed the connection)
10:37:27*laaron joined #nim
10:39:45*lritter joined #nim
10:45:53*Amun_Ra quit (Ping timeout: 245 seconds)
10:46:48*Amun_Ra joined #nim
10:53:10ZevvPMunch: you have a test set for your parity proc?
10:54:14PMunchI could generate one, but you can easily do it yourself with the code I shared
10:54:23PMunchThat one is checked to wor
10:54:27PMunchwork*
10:54:49Zevvok
10:55:48PMunchIn my testing I just passed it the same string over and over and discarded the result
10:56:26Zevvhow will this typically be used? One huge blob spanning a lot of memory, or will it get passed small blocks which are reused?
10:56:43Zevvbecause cache
10:57:53PMunchAh, it takes a password, which is then MD4-hashed and zero padded to 21 characters, then parity is added (which is this part), and it's passed off to DES
10:58:31Zevvok.
10:58:56Zevvand - just curious - why not https://github.com/LucaWolf/des.nim?
10:59:15PMunchI use that for the actual DES encryption
10:59:18Zevvah ok
11:00:18PMunchThe keys are 8 bytes long, but every least significant bit is a parity bit
11:00:31Zevvyeah
11:01:20PMunchThese encryption procedures there takes 8 byte keys, and I have 7 byte data (or rather I have 21 bytes, which becomes 24 bytes and is then split into three keys)
11:03:16*hoijui quit (Ping timeout: 252 seconds)
11:04:27Zevvthe compiler probably fixed this for you, but you have the `i div 7` inside the inner loop
11:06:40ZevvI'll keep my mouth shut. If I take it out, it becomes slower :)
11:07:20*clyybber joined #nim
11:18:15PMunchYeah the time to fetch that from memory if it fell out of cache is probably longer than it would take to do a div operation
11:23:41Zevvit kind of feels vectorizable, but I don't see that happening
11:24:03Zevvtable lookups
11:30:36PMunchWell that's basically what it does now. It splits it into 7-bit entities and looks them up in a table
11:34:05Zevvyeah, i ment that a a good thing, sorry :)
11:37:05*nsf quit (Quit: WeeChat 2.4)
11:38:35*poopBot joined #nim
11:42:07dom96Zero fees: https://github.com/sponsors :O
11:42:14dom96Araq ^
11:46:21PMunchZero fees "for now"
11:46:21*noonien joined #nim
11:46:33PMunchStill though, cool move
11:46:46PMunchAnd the matching all contributions the first year is cool as well
11:46:54noonienhello folks
11:47:14noonienis there any function in the stdlib that spllits a `host:port` string into its components?
11:47:16poopBotso beh hastbin down
11:47:42PMunchnoonien, split in strutils?
11:48:08noonienthat wouldn't work with ipv6 ip addresses
11:48:13poopBothttps://zerobin.net/?51adc7c8b0333212#1iJZ5kevVWKBWD3M1gifwlbxkB+VB8I6AhUVXpuRp7c=
11:48:41*dddddd joined #nim
11:49:07FromGitter<alehander42> @dom96 however it's only for a single person
11:49:29FromGitter<alehander42> but actually i saw there is an option to write them an email for team/orgs
11:49:32poopBotso i wanted to store players with thair connections in a list so i can kick or whatewer if wanted, so using this threadvar i can not right?
11:49:47narimirannoonien: there is maxsplit parameter, if that's the problem
11:50:05FromGitter<alehander42> also in the "take part in waitlist" form one can add other contributors that he'd recommend, so i added 2-3 nim people
11:50:06*theelous3 joined #nim
11:50:16FromGitter<alehander42> but no idea if this makes any effect
11:50:34PMunchnoonien, rsplit?
11:50:38nooniennarimiran: that's not the issue, an ipv6 address looks like so: 2001:db8:85a3::8a2e:370:7334
11:50:50noonienan ipv6 address + host combo, looks like this: [2001:db8:85a3::8a2e:370:7334]:1234
11:51:02noonienthat's why it's not a simple string spllit
11:51:09dom96alehander42: holding one person responsible with their funds is much easier than an org
11:51:16narimirannoonien: ok, it is split + strip :)
11:51:19dom96It makes sense, at least for their first version
11:51:33nooniennarimiran: not really, there are a few edge cases which i'd rather not implement
11:51:45noonienit's why i asked if there's a function in the stdlib
11:53:23narimiranpoopBot: perfect time to start using ix.io ;)
11:53:31noonienthis https://github.com/nim-lang/Nim/blob/master/lib/pure/uri.nim#L107 seems to do what i'm looking for
11:53:45noonienseems like i'd have to prepend a schema to wrap it as an url
11:53:50noonienkinda of an ugly hack
11:55:27PMunchnarimiran, ix.io really is the best paste-site
11:55:41PMunchSo simple, yet so powerful
11:55:59noonieni like vpaste.net
11:56:38PMunchI love that the URL itself turns on/off options, makes it so much easier to Nim highlight stuff when I use my custom keyboard shortcut to grab a paste from my current selection
11:59:50poopBot curl -F 'f:1=<-' ix.io do yu type this part evry time or you have some shorcut
12:00:41poopBoti guess can mix in some bash script and call it
12:03:46poopBotlol should read 1 line up before ask question xD, anyway will anyone aswer my pasted thingy
12:05:44PMunchpoopBot: xclip -o -selection -primary | curl -F 'f:1=<-' ix.io | head -c-1 | echo "$(< /dev/stdin)/" | xclip -i -selection clipboard
12:06:11PMunchI have that stored in a bash script, which I have set up a keyboard shortcut for
12:06:18narimiranpoopBot: no, i have `ix` package in my distro's repository, so i just do `ix filename.nim`
12:07:38*ShalokShalom quit (Ping timeout: 258 seconds)
12:08:35PMunchThat's what I like about ix, it's so simple, so you can integrate it in your workflow really easily
12:09:08PMunchAnd as I mentioned all options to display a paste with line numbers/highlighting/etc is just done by changing the URL slightly
12:10:47*nsf joined #nim
12:10:51*Senketsu quit (Ping timeout: 264 seconds)
12:11:31*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
12:12:04*Snircle joined #nim
12:12:53*Snircle quit (Client Quit)
12:15:54*Senketsu joined #nim
12:18:12poopBotgot that part am asking aboout https://zerobin.net/?51adc7c8b0333212#1iJZ5kevVWKBWD3M1gifwlbxkB+VB8I6AhUVXpuRp7c=
12:19:01FromGitter<kaushalmodi> @Vindaar Looking forward to your `ggplotnim` package
12:23:11narimiranpoopBot: "index 2 not in 0 .. 1" you're doing something[2], where len(something) == 2
12:23:21narimirandidn't we already discussed the same error the other day?
12:23:57narimiranyep, we did, Zevv will remember that 99% chance that the compiler is wrong :D
12:24:14poopBot:)
12:24:45narimiranand stack trace might even tell you where ;)
12:25:24Zevvit's usually the compiler
12:25:31poopBotyep my bad, i tryed to send empty "" in ws and it crashed and i thinked it was cuz i tyrd to pass ws connection ot list
12:25:50ZevvI never understood why compilers don't just fix my code when they know something's not right
12:26:00poopBot:)
12:26:38narimiranZevv: that's why i like python - no compiler, no complaints!
12:27:38*Snircle joined #nim
12:30:18Zevvso true
12:31:02Zevvthe patience with newbies of this channel is really quite something
12:31:55poopBotYep i should start baking cookies :)
12:31:56ZevvI've seen people getting shoo'ed away or insulted for much less in a lot of other places
12:32:09Zevvno dude, you're doing just fine
12:32:11Zevvkeep up the good work
12:32:28Zevvand that's not ironic
12:34:03narimiranZevv: we've all been newbies at some point ;)
12:37:14ZevvpoopBot: we're gossiping about you and wondering - where are you from and how old are you?
12:38:08poopBotYe i see, 28 soon 29 from Serbia
12:38:59ZevvCool
12:39:05ZevvVery european centric here
12:39:31Zevvyou can also tell from how silent it is here at european night time
12:40:33poopBotduno i try to wake up eary i feel better when i sleep at night
12:41:10PMunchYeah the Nim community is really nice to noobs, which I think is great
12:41:12Zevvno, I ment that when it's night in europe there's not much going on here - most #nim visitors are all from the european continent
12:41:34PMunchIt's a hard model to grow though, when the number of noobs become too great..
12:41:53Zevvredirect to #nim-noobs
12:42:00PMunchI wonder why that is actually, why are there so few american Nim users?
12:42:03PMunchHaha
12:42:26Zevvgood question
12:43:10FromGitter<kaushalmodi> American here
12:43:31narimiranrayman22201 is also american
12:43:42FromGitter<kaushalmodi> I agree about the awesome Nim community; I'm getting so much awesome help with C stuff and of course Nim stuff
12:44:02*Vladar quit (Remote host closed the connection)
12:44:30*Vladar joined #nim
12:51:29PMunchDamn it, my site is down after an upgrade and won't come back..
12:55:43*hoijui joined #nim
12:56:43FromGitter<mratsim> rollback!
12:57:21PMunchNot that easy when I can't ssh into it..
12:57:55poopBotwhile we are in noob role, dumb question but how can i read input form terminal, i tryed searching for terminal console readline(found only readlines for txt file), hmm meybe i should search in NimInAction cuz i think i am blind in that online manual
12:58:19narimiranpoopBot: stdin.readline ?
12:58:31poopBotthats what i need
13:03:20*hoijui quit (Remote host closed the connection)
13:07:50FromGitter<kaushalmodi> PMunch: you have a static site, right?
13:08:02narimiranhe doesn't anymore :P :D
13:08:08FromGitter<kaushalmodi> :)
13:08:20PMunchnarimiran, when did I have a static site?
13:08:33PMunchkaushalmody, it uses CouchCMS
13:08:48FromGitter<kaushalmodi> Ok
13:08:52narimiranPMunch: it was (unsuccessful) joke about your site being down currently
13:08:52PMunchBut I'm seriously considering to write my own
13:08:58PMunchnarimiran, haha :P
13:09:11FromGitter<kaushalmodi> Otherwise I was going to suggest Netlify
13:09:21FromGitter<kaushalmodi> But that's just for static sites
13:09:25PMunchIt's back up now, turns out it was some trouble with the virtual network card when it was moved between physical hosts
13:10:11PMunchI actually really like the premise of CouchCMS
13:11:53PMunchYou build a mock site with HTML/CSS/JS like you would normally do, or grab a template from somewhere. Then you just throw in some PHP tags to signal things like "this is a section that should be repeated for every post", and "this is the title from the post". Then it automatically creates an interface where you can log on, see your different kinds of content, and author new content from the site.
13:12:41PMunchGreat if you want to create a web-site for someone with little to no technical background, as the only thing you end up seeing in the user interface is the stuff you need.
13:13:09PMunchBut personally I think I would prefer to have it ingest posts from something like a git repository
13:16:52FromGitter<kaushalmodi> I come from zero webdev background, so I always stayed away from site generators that remotely mentioned php, react (and even Ruby as I've heard of enough pain stories about gems) .. until I heard about Hugo
13:17:15FromGitter<kaushalmodi> I'm quite passionate about git, so that fit my bill perfectly
13:17:46FromGitter<kaushalmodi> Just write (generate from Org) Markdown, commit and Netlify takes the care of rest
13:18:29FromGitter<kaushalmodi> It's interesting how so many solutions exist for folks of different "no technical background" :)
13:19:52PMunchWoo, my site is back up :)
13:20:05PMunchTurns out the upgrade had uninstalled PHP..
13:20:30PMunchkaushalmodi, well a lot of people want/need a web presence, and they can't all be web-devs
13:21:58PMunchThe number of times friends and family that have been put in charge of a web-site calls me and asks me to help them fix something on a horrible WordPress instance...
13:22:03FromGitter<kaushalmodi> Yep, I'm one of them
13:22:43PMunchWell you have some techincal knowledge :P
13:22:52PMunchJust not specifically to do with webdev
13:23:56FromGitter<kaushalmodi> Got it :)
13:26:29FromGitter<alehander42> Poopbot oh serbia nice
13:26:52FromGitter<alehander42> We have several bulgarians in nim as well (including me)
13:27:42poopBot:)
13:28:03FromGitter<alehander42> I love beograd trying to go there sometime again for weekend
13:30:01poopBotduno i was only 1 time with school in sofia we went on some mountain i think, i dident trawell a lot but i can say best about my country is good loocking woman :)
13:31:11PMunchHmm, maybe I should move to Serbia
13:31:27PMunchNot that the Scandinavian ladies are looked too shabby :P
13:32:14poopBotif you can keep your paycheck and work remote its an easy win win, life in Serbia is cheap as ****
13:34:13FromGitter<alehander42> The food is amazing
13:34:17FromGitter<alehander42> Ima
13:34:18PMunchHaha, good point
13:34:26poopBotyou can rent a city center 300e
13:34:30PMunchHmm, haven't tried much Serbian food (I think)
13:34:39PMunchA whole city center?!
13:34:43FromGitter<alehander42> Basically Bulgaria is similar
13:34:53poopBotbulgaria hes better internet i think
13:35:12poopBotabout women i duno but i think they probbaly good too :)
13:35:25PMunchHere rent will run about €500 for a room with other people
13:35:25FromGitter<qqtop> sorry to interupt this ... but is there a way to import a nim file which lives in a github repo ⏎ when using nim-playground ?
13:35:40FromGitter<alehander42> And better public transportation, people are very proud of women as well indeed
13:35:44PMunchqqtop, unfortunately not
13:35:54FromGitter<alehander42> But yeah they're similar countries overallu
13:36:04PMunchThe code executed in the playground doesn't have any internet access
13:36:24FromGitter<qqtop> ok , thanks .. would be nice to have ..
13:36:33PMunchYeah, I've been thinking about it
13:36:37PMunchWas there anything in particular?
13:36:51PMunchI've been thinking about just pre-installing every nimble package
13:38:09FromGitter<qqtop> wanted to let someone to compile a demo without having to install nim first
13:39:23*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:39:36PMunchkaushalmodi, did you push anything to parsetoml?
13:39:43PMunchqqtop, that would indeed be neat
13:39:52*Snircle joined #nim
13:40:04FromGitter<kaushalmodi> PMunch: No, I haven't. Why?
13:40:23PMunch"kaushalmodi pushed to NimParsers/parsetoml 6 days ago" - according to GitHub
13:40:37PMunchIt's a commit by traviscibot
13:40:44FromGitter<kaushalmodi> huh, oh ok
13:40:48PMunchIn a new gh-pages branch
13:40:55FromGitter<kaushalmodi> that would be auto-update of parsetoml docs
13:41:07PMunchYeah I assumed
13:41:17PMunchBut the github pages link 404s
13:41:22FromGitter<kaushalmodi> the travis-ci cron builds parsetoml every week to catch any regression with Nim devel
13:41:40PMunchAaah, nice
13:41:51FromGitter<kaushalmodi> well, not so nice given that we see 404
13:41:53PMunchI should really set something like that up for all my projects
13:41:58FromGitter<kaushalmodi> today seems to be the day of downed sites
13:42:43PMunchqqtop, would having all nimble packages pulled be a good solution for you?
13:43:42FromGitter<kaushalmodi> PMunch: will need to investigate.. as per travis ci, the deployment went all fine: https://travis-ci.org/NimParsers/parsetoml/builds/534005219#L1719
13:43:43FromGitter<qqtop> Hmm, yes in this case it would help , but there also are nim repos which may not be on nimble (yet)
13:43:48PMunchThe problem with allowing arbitrary GitHub package installs is that it would be easy to make one that just takes a lot of time to install. And then the instance would just be left spinning, eating resources
13:44:27FromGitter<kaushalmodi> ok, https://nimparsers.github.io/parsetoml/theindex is working .. need to see why index.html went missing ..
13:45:08FromGitter<kaushalmodi> ok, this is working too.. https://nimparsers.github.io/parsetoml/parsetoml
13:45:20PMunchqqtop, one possibility is of course to spin up your own playground instance which has the code installed
13:45:30FromGitter<kaushalmodi> so need to copy parsetoml.html to index.html ( but why wasn't this an issue before . .hmm)
13:45:55PMunchkaushalmodi, I don't check this very often, so it might've been broken for a long time
13:47:12FromGitter<qqtop> Well , just looked at this https://play.golang.org/p/eqEo7mqdS9l ⏎ go playground with third party support ..
13:48:19PMunchI think the go language actually supports importing packages like that by default
13:48:55PMunchTo do it in the Nim playground it would probably require a separate list of packages to install, then your code with the normal imports
13:49:12PMunchAnd it would mean adding network to the container running the code..
13:50:01PMunchI think the best solution might be to a) install every nmble package on the official playground, and b) write an article and some easy to use scripts explaining how to set up a project specific playground
13:51:13FromGitter<kaushalmodi> it's a regression in devel!
13:51:24FromGitter<kaushalmodi> this doesn't work: ⏎ ⏎ ```nim doc --index:on -o:index.html src/parsetoml.nim ``` [https://gitter.im/nim-lang/Nim?at=5ce6a55cef853135c80d4407]
13:51:30FromGitter<kaushalmodi> it still creates parsetoml.html
13:51:42PMunchAha, so not your fault then :)
13:51:58FromGitter<kaushalmodi> this feels like dejavu .. digging Nim open issues ..
13:52:53PMunchOh well, I'm off to hike a mountain.
13:53:09*PMunch quit (Remote host closed the connection)
13:53:11FromGitter<kaushalmodi> alright. enjoy the hike!
13:58:09FromGitter<kaushalmodi> Issue created at https://github.com/nim-lang/Nim/issues/11312
14:06:38livcdalehander42: bulgaria is a hidden gem alongside with ukraine. I dont understand how come they have so many talented programmers and scientists :O
14:06:59WilhelmVonWeinerIs modulo broken, or is my understanding of modulo broken?
14:07:20narimiranWilhelmVonWeiner: you probably expect pyhton's modulo behaviour
14:07:21FromGitter<jrfondren> probably both
14:07:26Zevvdoing unsigned or negative modulos?
14:08:05WilhelmVonWeinersigned, with a negative {first number} and a positive divisor
14:08:26WilhelmVonWeinernarimiran: It's just the modulo behaviour I know in general
14:09:10FromGitter<kaushalmodi> PMunch: I thought I fixed the parsetoml webpage issue with a temp workaround
14:09:16narimiranhttps://nim-lang.github.io/Nim/system.html#mod%2Cint%2Cint see the examples
14:09:19FromGitter<kaushalmodi> but looks like it's a webdev problem now
14:09:26narimiranif it works like in the examples it isn't broken ;)
14:09:30*Trustable joined #nim
14:09:31FromGitter<kaushalmodi> https://nimparsers.github.io/parsetoml/index.html works, but https://nimparsers.github.io/parsetoml/ doesn't .. why?
14:09:37*leorize joined #nim
14:10:16ZevvWilhelmVonWeiner: what do you see and what would you expect?
14:10:38WilhelmVonWeinernarimiran: that is fair enough
14:10:40narimiranWilhelmVonWeiner: see if this is what you want: https://nim-lang.github.io/Nim/math.html#floorMod,T,T
14:11:10FromGitter<alehander42> livcd: well i hope this is true hehe, but i think maybe STEM is relatively popular in eastern europe, i know romania also has many programmers/companies
14:12:51WilhelmVonWeinerZevv: I was expecting the mod behaviour I knew from school, Python and Forth
14:12:51FromGitter<alehander42> bulgaria had a computer industry in the 80s, as it was delegated to it by the communist economic block iirc
14:13:04WilhelmVonWeinerI guess it's a floored vs symmetric division thing
14:13:06FromGitter<alehander42> but i am not sure if this affected the it field in any way
14:17:43livcdalehander42: i see a lot of bulgarians hacking compilers for big US tech companies
14:20:39FromGitter<kaushalmodi> PMunch: Nevermind https://nimparsers.github.io/parsetoml/ now works! (with the workaround applied for the nim doc regression)
14:21:15FromGitter<alehander42> livcd: awesome! compilers for what?(or are those mostly commercial ?)
14:21:54FromGitter<alehander42> are you also working on similar stuff?
14:22:02*rnrwashere joined #nim
14:25:53leorizeiirc parsetoml uses its own buffering scheme instead of lexbase
14:26:01leorizedon't know if it's efficient
14:37:49Araqonly lexbase can be efficient :P
14:38:40Zevvpff lexbase is soooo lame
14:39:41Araqhey. why?
14:39:49Zevv:)
14:41:40FromGitter<kayabaNerve> So, I think I am screwed over here, but I'd love some assistance.
14:42:02FromGitter<kayabaNerve> I need to define a symbol in my generated C++ BEFORE Nim imports my specified header.
14:42:48FromGitter<jrfondren> so something like {.emit: "#define *GNU*SOURCE\n#include <evil.h>".}
14:43:08FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce6b17c8f019114aea31bac]
14:43:25FromGitter<kayabaNerve> That may work if I remove my header pragmas
14:43:35FromGitter<jrfondren> aye.
14:43:41FromGitter<kayabaNerve> But a flat out emit is what's I'm trying and that's failing
14:44:08FromGitter<jrfondren> presumably Nim is lifting the import above the define.
14:44:20FromGitter<jrfondren> check the cache
14:46:20FromGitter<kayabaNerve> Good news: That worked
14:46:57FromGitter<kayabaNerve> Bad news: Nim is making me put this emit block in every single file.
14:47:19FromGitter<kayabaNerve> I mean, lib's fault, ngl. It expects the project to be compiled as a single unit or to have this define in a header.
14:47:41FromGitter<jrfondren> surely, it's every single file that imports from the lib
14:47:43FromGitter<kayabaNerve> Can I have an imported module add an include statement wherever it's imported?
14:48:02FromGitter<kayabaNerve> For some reason, you're supposed to define this single value in your code
14:48:03Zevvcan't you do --passC:-D_GNU_SOURCE
14:48:03FromGitter<jrfondren> if I have `echo "hello world"` in a file and include your lib, I deny that I need any special defines.
14:48:20FromGitter<kayabaNerve> Zevv: Good thinking
14:48:28Zevvor add a header to your file which defines the symbol and then includes the evil lib header
14:48:34Zevvto your project, I mean
14:48:37FromGitter<jrfondren> yeah that should also mean not having to remover your header:
14:48:41FromGitter<kayabaNerve> That's what I was asking
14:49:02FromGitter<kayabaNerve> But I'd need every file to include it, so I was asking if I can cause my imported nim file to include that file wherever its imported
14:49:10FromGitter<kayabaNerve> But I think the -D is the way to go
14:50:07ZevvI'd go for a trampline header file
14:56:01Araqno need for that
14:56:08Araquse a multiline .header pragma
14:56:19Araqheader: """#define CRAP
14:56:28Araq#include mess.h
14:56:29Araq"""
14:56:43Araqit works, .header understands an introducing #
14:56:49FromGitter<kayabaNerve> That's the same as the emit, but doesn't solve the other issue.
14:56:57FromGitter<jrfondren> you're wrong about the other issue though
14:57:42FromGitter<kayabaNerve> Which is solved by defining that in every single file which imports this wrapper because Nim compiles the generated code individually OR using a GCC flag to set it in every file.
14:58:15FromGitter<kayabaNerve> I'm not blaming Nim here. I'm just saying this is an awkward problem exemplified by proper practice I can't cleanly get around.
14:58:28FromGitter<jrfondren> it's something you don't need to do at all
14:58:33FromGitter<kayabaNerve> How so?
14:59:00FromGitter<kayabaNerve> I removed the header pragma for the define/include emit. Lib.nim no longer threw an errors. Lib/LibPart.nim
14:59:06FromGitter<jrfondren> because C Preprocessor definitions obviously don't participate in compilation after you get an object file
14:59:17FromGitter<kayabaNerve> The source was throwing an error
14:59:18FromGitter<jrfondren> your library cannot detect and cannot care whether other objects had that #define or not
14:59:39FromGitter<kayabaNerve> It refused to compile because the C++ lib dev used an error dev if the symbol wasn't defined
14:59:41FromGitter<jrfondren> your code that directly uses that library and includes its header will care -- nothing else will
14:59:46FromGitter<jrfondren> you are mistaken.
15:00:04FromGitter<kayabaNerve> Are you literally telling me what I see on my terminal isn't what I see?
15:00:38FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce6b596d22ba766a2e84dd9]
15:00:42FromGitter<jrfondren> I am literally telling you that you got some kind of error and that you have failed to interpret it correctly because you don't understand compilation well enough.
15:01:06FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce6b5b263dea422b4d1277a]
15:01:11FromGitter<jrfondren> for example, how do you think `#error` works?
15:01:22FromGitter<jrfondren> how is that directive going to sneak into code that uses your library?
15:01:55FromGitter<kayabaNerve> I corrected the define/include order in my wrapper. Then the file which imported my wrapper had the same error.
15:02:19FromGitter<kayabaNerve> #error throws an error if present in source code. It's a preprocessor directive.
15:02:39FromGitter<kayabaNerve> It's being used in tandem which a check to confirm the symbol is defined with a valid value.
15:03:15FromGitter<kayabaNerve> When one file supplied a valid value, #error no longer threw. That said, it triggered in another file which didn't define it because these files are being compiled individually and then linked.
15:03:16FromGitter<jrfondren> alright, then I'm totally wrong and in Nim `import blah` can mean that you're also including some headers used by blah. in generic code, I guess?
15:03:41FromGitter<jrfondren> still, Araq's workaround with the multi-line `#header` should still be enough for that
15:03:46FromGitter<kayabaNerve> I know how compiling works and the errors in front of me.
15:04:04FromGitter<kayabaNerve> I honestly don't care when the name of the value is unique enough I can define it project wide :P
15:04:27FromGitter<kayabaNerve> I don't get why this is such a big deal, but I'm chalking it up to the lib expecting a very specific compilation method.
15:04:36FromGitter<kayabaNerve> *big deal as in extended problem
15:05:11FromGitter<kayabaNerve> The state of every library for BLS has pissed me off. I already have a functioning BLS wrapper. It's just also unmaintained, a memory leak, and not constant time.
15:05:30Araqfwiw I cannot imagine either how .header with multiline doesn't solve the problem completely
15:05:37FromGitter<kayabaNerve> So I'm trying to wrap this one, yet now converters of all things hate me.
15:05:44FromGitter<kayabaNerve> Araq: I'll test it right now just for you
15:07:13FromGitter<kayabaNerve> `../mc_bls.nim(2, 9) Error: cannot attach a custom pragma to 'mc_bls'`
15:07:21FromGitter<kayabaNerve> ```{.header: """ ⏎ #define MCBLN_FP_UNIT_SIZE=6 ⏎ #include "bls.hpp" ⏎ """.}``` [https://gitter.im/nim-lang/Nim?at=5ce6b729ecdf942b4c319784]
15:07:50FromGitter<kayabaNerve> Doesn't even make it out of Nim. Line 1 is just a blank line that slipped in. This isn't indented at all or in a block.
15:08:10Araqyou misunderstand me
15:08:14FromGitter<kayabaNerve> Oh, sorry.
15:08:34Araqproc foo(params) {.cdecl, header: """...""".}
15:08:35FromGitter<jrfondren> that's a .header at the toplevel? that's where you'd put an emit
15:08:40FromGitter<kayabaNerve> Oh, I think I got it
15:08:46FromGitter<kayabaNerve> Yeah, yeah. Updating now Araq
15:08:50Araqok ok
15:09:04FromGitter<jrfondren> so this is a... Bureau of Labor Statistics library?
15:10:55FromGitter<jrfondren> ah https://crypto.stanford.edu/~dabo/pubs/papers/BLSmultisig.html
15:11:09FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce6b80d879f4478c7cbed11]
15:11:19FromGitter<kayabaNerve> Every file that imports my wrapper claims it's not defined
15:11:31FromGitter<kayabaNerve> @jrfondren Boneh Lynn Shacham
15:11:36FromGitter<kayabaNerve> Probably typo'd that
15:11:54FromGitter<kayabaNerve> Nope. :D It's correct
15:12:00FromGitter<mratsim> btw, the team that were using Herumi's BLS implementation for Ethereum 2 switched to Milagro (they announced it 30 min ago) @kayabaNerve
15:12:13FromGitter<mratsim> team that was*
15:13:03FromGitter<kayabaNerve> You know, I considered Milagro, except I was worried about the stability of your lib to changes
15:13:39FromGitter<kayabaNerve> And then Milagro itself doesn't support multi-message signature verification, although the Ethereum docs have a very nice writeup on how to perform it
15:14:14FromGitter<mratsim> For now it's stable, it will change depending on the cross blockchain standardization that is ongoing (with CHia, Dfinity, Zcash, Ethereum 2, Filecoin)
15:14:35FromGitter<kayabaNerve> So I could write it up myself and just implement the few elliptic curve ops needed; shouldn't be a challenge.
15:14:43FromGitter<kayabaNerve> I'll move out of Nim and PM you.
15:25:16*banc quit (Ping timeout: 272 seconds)
15:27:17*laaron quit (Remote host closed the connection)
15:29:56*laaron joined #nim
15:31:39*laaron quit (Remote host closed the connection)
15:37:08*laaron joined #nim
15:53:36*Jesin quit (Quit: Leaving)
15:58:27*clyybber quit (Quit: WeeChat 2.4)
16:01:10poopBotwho is https://github.com/yglukhov/nim-jwt, am getting error https://hastebin.com/ebixuyowab.makefile
16:01:27*rnrwashere quit (Remote host closed the connection)
16:02:04poopBot"This library requires a recent version of libcrypto. Specifically the one that has EVP_DigestSign* functions." what version has EVP_DigestSign, i am on void linux so i think i use LibreSSL
16:02:15*Jesin joined #nim
16:02:28poopBottought duno if this has anything to do with SSL or some other crypto
16:02:31FromGitter<jrfondren> he's on Telegram, if he isn't here.
16:03:48FromGitter<jrfondren> you might be better off talking to Void Linux people about the error though
16:04:20*rnrwashere joined #nim
16:04:55FromGitter<jrfondren> https://man.openbsd.org/crypto.3 's the manpage for libreSSL's libcrypto and it doesn't mention those functions, so you might need OpenSSL
16:05:57*Jesin quit (Remote host closed the connection)
16:06:05*rockcavera quit (Remote host closed the connection)
16:06:37*rnrwashere quit (Remote host closed the connection)
16:07:48poopBothmm, i go check with void dudes, worst case will boot some debian on rpizero or something
16:10:23*rnrwashere joined #nim
16:10:56*Jesin joined #nim
16:11:37poopBoti posted a question on #voidlinux and #libressl my other pc is atm ocupied so need to w8 to confirm on shubuntu
16:13:24*a_b_m quit (Ping timeout: 272 seconds)
16:14:44poopBotlibressl irc dude told me he belives i have some other issue :)
16:22:08*rnrwashere quit (Remote host closed the connection)
16:32:32FromGitter<alehander42> Araq thanks
16:32:34FromGitter<alehander42> ill try
16:35:47FromGitter<Vindaar> @poopBot: I'm running Void too. What are you doing exactly so that I can check if I get the same error?
16:37:36FromGitter<alehander42> wow @krux02 did yoyu make debug color
16:37:37FromGitter<alehander42> wow
16:38:07krux02you mean color for the debug proc in the compiler?
16:38:10krux02yes I did that
16:38:11FromGitter<alehander42> yes
16:38:18FromGitter<alehander42> cool great
16:38:19FromGitter<alehander42> work
16:38:22krux02so you like it?
16:38:25FromGitter<alehander42> yes
16:38:34krux02thanks, nice to hear that people appreciate it.
16:38:36FromGitter<alehander42> and overally the compacted look
16:38:47krux02Araq wasn't a fan of it
16:39:28krux02well, I frustrated a lot by the existing look of debug
16:39:42krux02so I went and fixed it in a way I liked it.
16:39:43poopBot@Vindaar: am trying to test jwt https://hastebin.com/awuzutusey.bash
16:39:52poopBothttps://github.com/yglukhov/nim-jwt
16:40:25krux02major points were: consistency, completeness, no redundancy (cycle detection)
16:40:31FromGitter<alehander42> yes, makes sense
16:40:49krux02and as a bonus I added colors, because it was easy and would help me.
16:41:13FromGitter<alehander42> maybe at least a location option
16:41:15FromGitter<alehander42> might make sense
16:41:18FromGitter<alehander42> but thats easy manually
16:41:24krux02the old `debug` was inconsistent, redundant for types, and incomplete for many information.
16:41:43krux02there is a location opiton
16:42:02krux02the location is printed when you pass in the context object
16:43:18krux02sorry, I mean the config object
16:43:26*solitudesf joined #nim
16:43:31FromGitter<alehander42> so
16:43:32FromGitter<alehander42> ok
16:43:54krux02if you don't pass in the config object I assume you don't care about line information, because that config is required to resolve the line info into actual file names with line numbers
16:43:54poopBothmm just tested on ubuntu got same error
16:43:57FromGitter<alehander42> hm in ccgexprs i dont think i have it
16:44:05FromGitter<alehander42> yes makes sense
16:45:47FromGitter<alehander42> ok i can print the index and then print all filenames
16:46:35FromGitter<Vindaar> @poopBot: for me it compiles fine, but I simply get linker errors, because the `EVP_*` can't be found in the library. Although seemingly they should be there: https://github.com/libressl/libressl/blob/master/src/crypto/evp/digest.c
16:46:56FromGitter<alehander42> yessss
16:47:00FromGitter<alehander42> i found it, thanks
16:47:02FromGitter<alehander42> template formatErrorIndexBound*T (i, a, b: T): string = ⏎ "index " & $i & " not in " & $a & " .. " & $b
16:47:09FromGitter<alehander42> so this is somehow included in standalone mode
16:47:13FromGitter<alehander42> when i have e.g. a[b]
16:47:18FromGitter<alehander42> which shouldn't happen
16:47:28FromGitter<alehander42> i guess we either need a when hostOs ..
16:47:31FromGitter<alehander42> or something else
16:49:04FromGitter<alehander42> okk
16:49:33FromGitter<alehander42> we can have a simple error
16:50:53FromGitter<alehander42> only for standalone mode
16:53:25FromGitter<alehander42> ok, i can kinda boot finally nimkernel, i'll ask some question later i guess
16:54:37poopBot@Vindaar: for me it toocopiles but i get tose linekr errors
16:54:52poopBoti tryed on shubuntu got same error
16:57:57poopBotanyone else up for test, somone with rolling distro
17:00:19*al1 joined #nim
17:00:32al1test
17:01:33FromGitter<Vindaar> @poopBot just checked on another machine with ubuntu 16.04. Same error. Guess it's the libraries fault :)
17:02:13poopBotit says that we need newer crypto just duno how much nower meybe he is building against devel of OpenSSL
17:02:50poopBot"This library requires a recent version of libcrypto. Specifically the one that has EVP_DigestSign* functions."
17:04:51*al1 left #nim (#nim)
17:07:15FromGitter<Vindaar> nah, pretty sure he just means something like CentOS 5 or whatever won't be supported. looking at the OpenSSL changelog `EVP_DigestSign`, verify, update tc. are mentioned in the release from 2010 (and these can't be found by the linker even)
17:10:22*sentreen quit (Quit: sentreen)
17:10:39*sentreen joined #nim
17:14:03*rnrwashere joined #nim
17:18:23*rnrwashere quit (Ping timeout: 248 seconds)
17:22:25*nsf quit (Quit: WeeChat 2.4)
17:24:47poopBotthn duno, i just copy pasted form his example and just called those 3 functions so guess there is some other issue
17:26:32*rnrwashere joined #nim
17:30:22*Trustable quit (Remote host closed the connection)
17:31:10*rnrwashere quit (Ping timeout: 258 seconds)
17:33:16*couven92 joined #nim
17:40:16federico3I have a callback converted from C e.g. proc callback(resp: ptr ptr somestruct) and I need to assign to resp but the compiler refuses that. Any hint?
17:40:49Araqensure that you didn't use some .closure calling convention in between accidentically
17:42:17*rnrwashere joined #nim
17:45:00*rnrwashe_ joined #nim
17:46:39*rnrwashere quit (Ping timeout: 248 seconds)
17:49:03*rnrwashe_ quit (Remote host closed the connection)
17:49:09*rnrwashere joined #nim
17:51:10*neceve quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
17:55:22Zevvha. I just found a workaround my closure to properly keeping track of my loop variable by putting the body in a proc. Then I found the docs pointing to closureScope. Nice surprise to see how that is implemented :)
17:57:11FromGitter<jrfondren> ahh man, it took me like an hour to realize that I was passing a type instead of a value to a proc
17:57:49Zevvyou cant just do that you know. I'll call the type police
17:58:26*rnrwashere quit (Remote host closed the connection)
17:59:21FromGitter<jrfondren> nim: "required type: T" "but expression 'IP' is of type: type IP". me, repeatedly: but that's the right type! it's a seq[IP]! What's wrong with you!
17:59:54FromGitter<jrfondren> that "type: type" should be a bigger hint
18:06:56*NimBot joined #nim
18:07:32*coffeeturtle1 joined #nim
18:08:11*rnrwashere joined #nim
18:15:29*rnrwashere quit (Remote host closed the connection)
18:15:43*rnrwashere joined #nim
18:18:46*rnrwashere quit (Remote host closed the connection)
18:21:14*rnrwashere joined #nim
18:23:37*rnrwashere quit (Remote host closed the connection)
18:24:29*rnrwashere joined #nim
18:25:29Zevvcan `once:` be trusted thread-wise?
18:27:01*rnrwashere quit (Remote host closed the connection)
18:29:52*rnrwashere joined #nim
18:36:10*rnrwashere quit (Remote host closed the connection)
18:36:19*rnrwashere joined #nim
18:39:32*Pwntus_ joined #nim
18:45:45FromGitter<Varriount> AZevv https://github.com/nim-lang/Nim/blob/devel/lib/system.nim#L4357
18:45:51FromGitter<Varriount> Zevv: ^
18:45:57*Pwntus_ quit (Quit: Leaving)
18:49:17ZevvYeah, I saw the implementation, thus my question. I guess it should be "no"
18:51:33leorizejrfondren: it should've been typedesc[IP] :p
18:51:46*coffeeturtle1 quit (Remote host closed the connection)
18:54:36*rnrwashere quit (Remote host closed the connection)
18:54:59*rnrwashere joined #nim
18:55:13poopBothmm so can somone block people from making issues on github
18:55:14poopBothttps://github.com/yglukhov/nim-jwt/
18:55:32poopBotfrom what i see i can only make a PR
18:56:34FromGitter<jrfondren> might be because it's a fork. my fork of Nim doesn't have its own issues either
18:56:57poopBotguess i cna just email him
18:57:15FromGitter<jrfondren> he's also on Telegram
18:57:34narimiranpoopBot: yes, there are repos which don't allow issues
18:58:02*rokups quit (Quit: Connection closed for inactivity)
18:59:33*rnrwashere quit (Remote host closed the connection)
19:06:43*laaron quit (Remote host closed the connection)
19:07:45*Trustable joined #nim
19:08:22*rnrwashere joined #nim
19:09:47*rnrwashere quit (Remote host closed the connection)
19:10:24*rnrwashere joined #nim
19:10:28*laaron joined #nim
19:13:13poopBotlol what an idiot i am, i copyed his email dident even read it https://yglukhov.github.io/about/
19:13:33*rnrwashere quit (Remote host closed the connection)
19:13:48narimiranpoopBot: " dident even read it" is your middle name
19:13:57*nsf joined #nim
19:13:58Zevvhaha
19:13:59*rnrwashere joined #nim
19:14:38poopBoti woudent even notice if mail server dident return "Mail delivery failed" xD
19:14:38Zevvthat was a literal laughing-out-loud for me, even scared the dog off my lap
19:15:13narimiransay your dog i (and my dog) said hi :)
19:15:34Zevv:)
19:18:22FromGitter<alehander42> so guys how do you configure gdb with vscode
19:18:29poopBotbeh i dont have twiter to contact him , need to go backchanels
19:18:36FromGitter<alehander42> @krux02 ? does it just pickup your gdb stuff from gdbinit?
19:18:41poopBotyglukhov[m], hi
19:18:58*rnrwashere quit (Ping timeout: 272 seconds)
19:22:23poopBotyglukhov[m], you here?
19:23:25*rnrwashere joined #nim
19:23:32narimiranpoopBot: be patient, he is usually around here. on gitter, IIRC
19:24:05poopBotnp am wathcing for some wierd reson magnet fishing on youtube xD
19:24:50*rnrwashere quit (Remote host closed the connection)
19:25:30FromGitter<jrfondren> does anyone have an example use of asynctools?
19:25:54krux02alehander42: I tried to use gdb from vscode, but it seems like the integration of gdb in vscode is too bad to be usable.
19:26:20krux02My scripts didn't work. And that was not the fault of my scripts, they were correct, I tried them in other editors as well.
19:26:42krux02Most editors just didn't use the gdb API properly and therefore custom printers just don't work
19:26:56krux02but in eclipse I was successful
19:27:22krux02eclipse was also the only IDE that provided proper feedback on how to implement the gdb scripts correctly
19:27:48krux02In Eclipse it is even possible to inspect collections item by item in the UI
19:28:14krux02but you don't really want to use Eclipse for debugging, it is just too much of a hassle to start
19:29:02FromGitter<alehander42> i dont yeah
19:29:05FromGitter<alehander42> but a friend is using vscode
19:29:09FromGitter<alehander42> so i wanted to help him
19:29:16FromGitter<alehander42> strange, i am sure it was possible
19:29:28FromGitter<alehander42> to somehow make vscode use different info
19:29:35FromGitter<alehander42> but maybe with some of their formats
19:29:43FromGitter<jrfondren> bah, this is all bitrotten, and I don't even know why my getaddrinfo_a wrapper doesn't work.
19:32:17*Vladar quit (Remote host closed the connection)
19:32:39*Vladar joined #nim
19:35:08Zevvjrfondren: share
19:35:43ZevvI'd love to get https://github.com/nim-lang/Nim/issues/7422 fixed
19:36:39*a_b_m joined #nim
19:39:05*hoijui joined #nim
19:39:41FromGitter<jrfondren> aye. I've got to get some other stuff done, but I'll come back to this over the weekend.
19:40:13FromGitter<kaushalmodi> narimiran: A new warning about addInt pops up for `cint` type after the recent update on devel
19:40:20FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce6f723b313d7231418444d]
19:40:36FromGitter<alehander42> @krux02 https://github.com/Microsoft/vscode-cpptools/issues/1414#issuecomment-409343151
19:40:40FromGitter<alehander42> kinda did it for me!
19:40:42FromGitter<alehander42> in vscode
19:40:43FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ce6f73a75d9a575a631f9a9]
19:40:49FromGitter<alehander42> basically one command that does source .....py
19:40:55FromGitter<alehander42> and one that does the enable thing
19:41:04FromGitter<alehander42> and it seems to work for the guy(he did it*)
19:41:10FromGitter<alehander42> so
19:41:15FromGitter<alehander42> your script works with vscode
19:43:47FromGitter<bobeff> This is extract from my launch config for vscode which is already working: https://paste.ofcode.org/35UfUuDnmB5uDak7dzTHSEJ
19:43:58FromGitter<bobeff> 10x to @alehander42
19:44:15FromGitter<alehander42> 1) welcome to gitter
19:52:41*rnrwashere joined #nim
19:57:51*rnrwashere quit (Remote host closed the connection)
20:00:08*rnrwashere joined #nim
20:04:28*rnrwashere quit (Remote host closed the connection)
20:07:37*nsf quit (Quit: WeeChat 2.4)
20:13:00krux02@bobeff, good to hear it works
20:13:15*Trustable quit (Remote host closed the connection)
20:13:31krux02wasn't easy to get it correct, especially since the documentation is a bit sparse
20:20:22*rnrwashere joined #nim
20:24:32*rnrwashere quit (Ping timeout: 244 seconds)
20:27:37*narimiran_ joined #nim
20:27:53FromGitter<alehander42> Yeah he did a lot of trial and error
20:29:52*narimiran quit (Ping timeout: 246 seconds)
20:29:56federico3I have a callback converted from C e.g. proc callback(resp: ptr ptr somestruct) and I need to assign to resp but the compiler refuses that. Any hint?
20:31:49Zevvwhat's this "new nimble" going on?
20:32:25Zevvfederico3: be more specific, I doubt your error message is "I refuse that"
20:32:51*narimiran_ is now known as narimiran
20:33:01dom96new nimble?
20:33:52Zevv14:21 #nim: <@Araq> 0.20 should come with the new Nimble
20:34:17dom96Guessing he means the upcoming release of Nimble
20:34:26Zevvah that makes sense - I thought I missed something
20:38:07FromGitter<kaushalmodi> how do you copy cstring by value from a `char *` returning C function?
20:38:14FromGitter<kaushalmodi> that function is imported into Nim
20:38:46Zevv.string?
20:39:11FromGitter<kaushalmodi> I need to copy to a cstring var
20:39:24FromGitter<kaushalmodi> I cannot do `foo = cstringReturningFn()`
20:39:35Zevvgood question
20:39:35FromGitter<kaushalmodi> that somehow copies the pointer to the string in C
20:39:49Zevvstrdup :)
20:40:09FromGitter<kaushalmodi> this works but doesn't look "right": `foo = cstring($cstringReturningFn())`
20:40:42ZevvI guess it'll do an extra alloc/copy/throwaway as well
20:40:51Zevvof the intermediate Nim string
20:41:35*narimiran quit (Ping timeout: 248 seconds)
20:42:19Zevvwell, and deepCopy doesn't
20:42:30FromGitter<kaushalmodi> strdup works! (I'm surprised I wrote its importc correct the first time :D)
20:42:46FromGitter<kaushalmodi> for ref: `proc strdup(strOrig: cstring): cstring {.importc, header: "<string.h>".}`
20:42:57Zevvyeah but remember who manages the memory - not Nim
20:43:23ZevvThe smiley behind the suggestion ment it is a *bad* idea
20:43:47FromGitter<kaushalmodi> oh, ok :P
20:44:46FromGitter<kaushalmodi> TIL about `deepCopy`: https://nim-lang.github.io/Nim/system.html#deepCopy%2CT%2CT
20:45:03Zevvyeah but it does not propery handle cstring it seems
20:45:16leorizeinstead of strdup, use `$cstring`
20:45:37FromGitter<kaushalmodi> deepCopy just copies the C string pointer too
20:45:49leorizedeepCopy only works for ref-based pointers
20:45:53Zevvleorize: that's a bit of a waste, right?
20:46:13Zevvor will the resulting cstring just point to the Nim string?
20:46:19leorizeyea
20:46:24leorizeso keep that Nim string around
20:46:58ZevvAh, I just tried and indeed
20:47:11ZevvI never realized cstring just reuses the Nim string buffer
20:47:18*kapilp quit (Quit: Connection closed for inactivity)
20:47:19leorizeit's in the manual iirc
20:47:29FromGitter<kaushalmodi> leorize: yeah `cstring($<cstringVar>)` works; that's what I tried first, but felt hacky
20:47:44leorizetip: for interfacing with C stuff that returns string in a buffer
20:47:50leorizevar buf = newString(size)
20:47:55leorizethen pass that buf to C
20:48:17Zevv"Even though the conversion is implicit, it is not safe: The garbage collector does not consider a cstring to be a root and may collect the underlying memory. However in practice this almost never happens as the GC considers stack roots conservatively. One can use the builtin procs GC_ref and GC_unref to keep the string data alive for the rare cases where it does not work"
20:48:30leorizebuf.setLen len cstring buf
20:48:57FromGitter<kaushalmodi> for reference, I was converting this C++ code to Nim: https://github.com/kaushalmodi/nim-systemverilog-dpic/blob/2414f7e710c7ae7570f793940eb8bb9b7848edbe/svSetScope_amvrao/libdpi.cpp
20:49:06FromGitter<kaushalmodi> focus just on the `scopes` char 2-d array
20:49:45FromGitter<kaushalmodi> using `cstring` in my Nim translation gave me problem .. but using `string` fixed it: https://github.com/kaushalmodi/nim-systemverilog-dpic/commit/da14c2dfd7cb0f5f6f22a8a3086d38014a19fef7
20:50:24FromGitter<kaushalmodi> then I just overhauled the C-style coding with Nim style :D: https://github.com/kaushalmodi/nim-systemverilog-dpic/commit/0529630251751b57c950a225780046e513b06a11
20:58:30*rnrwashere joined #nim
21:02:46*rnrwashere quit (Ping timeout: 246 seconds)
21:08:43*rnrwashere joined #nim
21:31:35*rnrwashere quit (Remote host closed the connection)
21:31:49*lritter quit (Ping timeout: 246 seconds)
21:41:37*Vladar quit (Remote host closed the connection)
21:48:15*solitudesf quit (Ping timeout: 248 seconds)
21:49:06*hoijui quit (Quit: Leaving)
21:49:24*solitudesf joined #nim
22:05:49FromDiscord_<nothing to no one> is there a way to pop the first element in a sequence? something similar to `pop(0)` in python
22:06:18*laaron quit (Remote host closed the connection)
22:07:47shashlickUse deque
22:07:49*laaron joined #nim
22:08:21FromGitter<jrfondren> https://nim-lang.github.io/Nim/system.html#delete%2Cseq%5BT%5D%5BT%5D%2CNatural . it's O(N)
22:09:08FromDiscord_<nothing to no one> ty
22:09:12*rnrwashere joined #nim
22:17:34*solitudesf quit (Ping timeout: 272 seconds)
22:22:37*rnrwashere quit (Remote host closed the connection)
22:29:59FromGitter<kayabaNerve> Looks like the latest devel broke how config files are chosen?
22:30:46FromGitter<kayabaNerve> Checking the commit history now, but I have a `config.nims` under dir/ and am compiling a file under dir. Stable selects that config. Devel does not.
22:33:15FromGitter<kaushalmodi> @kayabaNerve I heavily rely on config.nims and it has been working fine
22:33:52FromGitter<kaushalmodi> https://github.com/kaushalmodi/elnim/blob/master/.travis.yml#L49 <-- I do weekly crons that pulls in my default `config.nims` to build my packages using Nim devel
22:34:33FromGitter<kayabaNerve> Mind trying the latest devel?
22:34:46FromGitter<kayabaNerve> I think I compiled 6 hours ago
22:37:40FromGitter<kaushalmodi> works: http://ix.io/1JTx
22:37:44FromGitter<kayabaNerve> I mean, I've confirmed different behavior between stable and the commit I grabbed hours ago. I'm getting the latest latest devel now to check.
22:37:53FromGitter<kaushalmodi> I think that the issue is that it's not printing that the config.nims is being used
22:37:57FromGitter<kaushalmodi> but it's actually using it
22:38:06FromGitter<kayabaNerve> ... no, my assertions weren't triggering
22:38:24FromGitter<kayabaNerve> I explicitly enable them in my config and my tests were saying invalid data was good
22:38:31FromGitter<kayabaNerve> I had to pass a CLI arg to fix it
22:38:38FromGitter<kaushalmodi> the linked snippet just shows that the `foo` task present only in the config.nims in current dir is being used
22:39:09FromGitter<kaushalmodi> may be if you can share a minimal reproducible config.nims
22:41:39FromGitter<kayabaNerve> Uno momento
22:45:31*rnrwashere joined #nim
22:45:41FromGitter<kaushalmodi> I need to leave, but see if you can create an issue with a minimal reproducible example
22:45:49FromGitter<kaushalmodi> you can copy me in that issue
22:45:49FromGitter<kayabaNerve> I found the problem
22:46:04FromGitter<kayabaNerve> At some point in devel, the checks flag was expanded to disable assertions
22:46:43FromGitter<kayabaNerve> As I disable OverflowChecks and so on, due to how drastically they change program execution, that screwed me over
22:46:51FromGitter<kayabaNerve> So there appears to be a graphical bug and a behavior change
23:12:58*vlad1777d quit (Ping timeout: 246 seconds)
23:14:49*leorize quit (Ping timeout: 256 seconds)
23:16:36*leorize joined #nim
23:25:53*krux02_ joined #nim
23:28:17*krux02 quit (Ping timeout: 250 seconds)
23:29:07FromDiscord_<nothing to no one> Does anyone know why this gives me a runtime error? I can't figure out where the index is going out of bounds https://hastebin.com/oyusoteyaq.bash
23:30:25FromDiscord_<nothing to no one> It looks like the line that's causing the error is `process = startProcess(command, config.path, config.build_cmds[i])` but I'm just not sure why
23:33:11*stefanos82 quit (Remote host closed the connection)
23:34:26FromDiscord_<exelotl> never a good idea to delete from an array while looping over it, unless you handle it carefully
23:35:25FromDiscord_<nothing to no one> i'm not. i'm looping over `build_cmds` and deleting from the array contained within `build_cmds[i]`. it's 2-dimensional
23:36:23FromDiscord_<exelotl> oh yeah
23:36:29FromDiscord_<exelotl> soz
23:36:59FromDiscord_<nothing to no one> it's fine, took me a bit to wrap my head around what I was doing too, lol
23:37:31FromDiscord_<nothing to no one> I even tried not deleting from the sequence at all, but I still get the out of bounds. maybe it's a bug in osproc?
23:38:22*krux02_ quit (Remote host closed the connection)
23:40:17FromDiscord_<exelotl> is build_cmds[i][0] always guaranteed to exist?
23:40:32FromDiscord_<exelotl> try echoing $config.build_cmds[i]
23:40:42FromDiscord_<exelotl> try echoing config.build_cmds[i]
23:41:28FromDiscord_<nothing to no one> yes, it errors on the very first loop
23:43:18FromDiscord_<nothing to no one> alright! new error! must've been a bug in osproc, because the error changed when i updated devel
23:43:31FromDiscord_<exelotl> oooh
23:47:39FromDiscord_<nothing to no one> alright, new question. how do i get a proper path variable for `startProcess`? I'd like to be able to start `bash` instead of `/usr/bin/bash`
23:48:51*jasper joined #nim
23:54:55FromGitter<jrfondren> that's one of the options you can pass, something like poUsePath
23:55:39FromGitter<jrfondren> https://nim-lang.github.io/Nim/osproc.html#ProcessOption