<< 22-03-2018 >>

00:03:58*user1101 quit (Read error: Connection reset by peer)
00:04:08*user1101 joined #nim
00:11:43*rbrt quit (Quit: Oíche mhaith)
00:15:05*vlad1777d joined #nim
00:23:05*leorize joined #nim
00:32:00FromGitter<krux02> how do I make a type pass by pointer by default?
00:32:37leorizekrux02: {.byref.}?
00:34:01FromGitter<krux02> leorize, I will try it, thanks
00:34:16FromGitter<krux02> I think that was what I was looking for
00:34:27FromGitter<krux02> I just had it in my back of my brain, but forgot the name
00:34:33FromGitter<krux02> and did not know how to search for it
00:37:15*find0x90 joined #nim
00:37:23FromGitter<Varriount> @zacharycarter So, were you snowed in today?
00:42:42FromGitter<zacharycarter> @Varriount I did work from home - but I went out this evening after I finished shoveling - you?
00:42:56FromGitter<zacharycarter> @krux02 I've been playing with scopes - it's pretty sweet
00:50:24*find0x90 quit (Quit: find0x90)
00:52:30FromGitter<Varriount> @zacharycarter Stayed in my room all day, working and playing a new videogame.
00:52:37FromGitter<zacharycarter> :) which game?
00:52:51FromGitter<Varriount> Kirby Star Allies
00:53:09FromGitter<zacharycarter> nice :D
00:53:16FromGitter<zacharycarter> @Varriount - did you check out scopes?
00:53:40FromGitter<Varriount> No, what are/is scopes?
00:53:53FromGitter<zacharycarter> https://bitbucket.org/duangle/scopes/wiki/Home
00:54:28FromGitter<Varriount> @zacharycarter You might be interested in this: http://augeas.net/docs/index.html
00:55:29FromGitter<zacharycarter> ah cool - I'd never heard of that lib / tool - thanks!
00:56:02FromGitter<krux02> I try to do a bit of SIMD in Nim
00:56:09FromGitter<zacharycarter> how's that going?
00:56:18FromGitter<krux02> SIGILL: Illegal operation.
00:56:27FromGitter<Varriount> @zacharycarter No more long, complex pipelines with sed, awk and friends to manage configs.
00:56:54FromGitter<zacharycarter> @krux02 have you seen - https://github.com/jcosborn/qex/tree/master/src/simd ?
00:56:58FromGitter<krux02> well gcc has SIMD instrinsics that I can just use
00:57:03FromGitter<zacharycarter> @Varriount - yeah - this sounds heavenly
00:57:06FromGitter<zacharycarter> oh
00:58:05FromGitter<krux02> thanks, I was using a different wrapper.
00:58:21FromGitter<zacharycarter> np
00:58:30FromGitter<krux02> I am not sure if the wrapper is just broken, or if I am using it wrong, but currently I just have no results
00:58:43FromGitter<zacharycarter> :/
00:58:55FromGitter<krux02> passing the m128 type already created the illegal instruction
00:59:03FromGitter<zacharycarter> yeah - I'd try that wrapper
00:59:28FromGitter<zacharycarter> here's the forum post related to it : https://forum.nim-lang.org/t/212
00:59:56FromGitter<zacharycarter> that was the most up-to-date SIMD stuff I found related to Nim when searching last year
01:06:24FromGitter<krux02> @zacharycarter thanks a lot I only know this one here: https://github.com/bsegovia/x86_simd.nim
01:06:53FromGitter<krux02> nice thing was it is a repository just for SIMD. I don't need to download a framework that I just don't need for anything
01:07:16FromGitter<krux02> "Quantum EXpressions lattice field theory framework" I have no idea what that even is
01:08:29FromGitter<zacharycarter> me either
01:08:33FromGitter<krux02> @zacharycarter have you realized that most useful tools out there in the marked were created as a byproduct to produce something bigger?
01:08:50FromGitter<krux02> at least that is my impression
01:09:58FromGitter<zacharycarter> well large software problems generally involve multiple components / solutions working together
01:10:25FromGitter<krux02> when someone wants to make a tool as the main project, that tool often falls flat, because it was never tested on real projects, does some false assumptions about how it should be used and ends up totally useless, if not even harmful for productivity.
01:10:26FromGitter<zacharycarter> so I think it's fairly natural for a certain component to become useful enough that it gains adoption for whatever purpose, outside of the original solution it was intended for
01:11:01FromGitter<krux02> yes
01:12:33*athenot quit (Remote host closed the connection)
01:12:56*athenot joined #nim
01:17:09*gokr quit (Ping timeout: 264 seconds)
01:17:21FromGitter<zacharycarter> krux02: perfect example of this I found the other day - https://localstack.cloud/ - was a project by Atlassian for testing software against AWS, without AWS being available - so basically a giant service mock for AWS services.
01:17:30FromGitter<zacharycarter> now it seems to be its own company / product
01:17:36FromGitter<krux02> OK I created an issue asking nicely to put the SIMD stuff into a separate package. I hope we will get it eventually.
01:18:03FromGitter<zacharycarter> not sure they're active anymore but I agree - it'd be sweet!
01:18:50FromGitter<krux02> well asking nicely doesn't hurt.
01:19:15FromGitter<krux02> and this guy worked pretty long on the project, so meybe he is interested to not let everything die.
01:19:32FromGitter<zacharycarter> true
01:19:40FromGitter<krux02> the original author of nim-glm abandoned that project, but he was so nice to let me take that project ovor
01:24:58*MJCaley quit (Quit: MJCaley)
01:28:22*arecaceae quit (Remote host closed the connection)
01:29:05*arecaceae joined #nim
01:35:52FromGitter<Varriount> @zacharycarter I wonder if I can convince management to spring for the pro edition when it comes out.
01:41:17*mr_yogurt joined #nim
01:43:25FromGitter<krux02> @zacharycarter yay no illegal instruction anymore, thanks a lot
01:44:01FromGitter<krux02> I have honestly no idea about simd instructions yet. I never used those functions before. But I think they are quite useful
01:44:26FromGitter<krux02> I found mm_set_ps to set an sse type, but how do I load an sse type?
01:44:53FromGitter<zacharycarter> no idea - but if you find any useful use cases I'd love if you'd share them with me :D
01:45:41FromGitter<krux02> well at the moment I just cast the see type to an array
01:45:43FromGitter<krux02> it works
01:46:14FromGitter<krux02> pretty nice, gdb knows about the sse types and prints them nice by default
01:46:21FromGitter<krux02> nothing to configure
01:49:51FromGitter<zacharycarter> https://github.com/g-truc/glm/tree/master/glm/simd ¯\_(ツ)_/¯
01:55:30shashlick@zacharycarter, referring to your aws lib discussion from earlier. Will be cool to make a rest wrapper to generate APIs for web services quickly
01:55:32shashlickWill that work for aws as well
02:01:01FromGitter<zacharycarter> hrm
02:01:26FromGitter<zacharycarter> well - AWS has a lot of specifics that make calling the API a rather specific tsk
02:02:02FromGitter<zacharycarter> I think the problem you'll run into there - is lots of APIs handling things like authentication / authorization in different ways - there's no real standard
02:03:34FromGitter<zacharycarter> the code Varriount worked on for AWS that I'm now working with - is very specific and I don't think you'd be able to use it w/ anything other than boto
02:03:44shashlickDo they have any structured format they publish at least?
02:04:30FromGitter<zacharycarter> not that I've been able to find - I mean there is the boto implementation in Python which you can look at, and implementations in other languages - but there's no real spec saying this is what you'll find in a service definition file
02:04:39FromGitter<zacharycarter> not that I've been able to find anyway
02:05:07FromGitter<zacharycarter> and regardless - no one else besides AWS is publishing API specs in the same format as boto
02:05:10FromGitter<zacharycarter> to my knowledge anyway
02:06:44FromGitter<zacharycarter> shashlick: are you looking for a lib to work on?
02:07:00FromGitter<zacharycarter> because I think there are a lot of opportunities for libs that will make Nim more attractive
02:07:21FromGitter<zacharycarter> I think generating RESTful APIs from a spec would be cool - but i'm not sure of any standard spec you could rely on
02:07:45FromGitter<zacharycarter> I think an even cooler project - would be providing GraphQL support for Nim ;)
02:09:13shashlick😀
02:09:41FromGitter<zacharycarter> that's not trivial at all either
02:10:02FromGitter<zacharycarter> something like - https://github.com/vektah/gqlgen - but written in Nim - would be amazing
02:10:15FromGitter<Varriount> @zacharycarter The most publically documented thing they have are the authentication procedures (the signing process) and the S3 API
02:10:51FromGitter<zacharycarter> @Varriount I really dislike AWS
02:10:57FromGitter<Varriount> :3
02:11:26FromGitter<zacharycarter> @Varriount kubernetes will save us all
02:12:37FromGitter<zacharycarter> spent like 2-3 hours last night searching for a service definition spec
02:13:20FromGitter<zacharycarter> because I tried the dynamo service def out with your code and it blew up
02:13:40FromGitter<zacharycarter> so then I looked at rusoto and found fields in their parsing code that specified what fields were optional
02:13:51FromGitter<zacharycarter> but they didn't even consider all the fields in the JSON object
02:14:07FromGitter<zacharycarter> so it's just like one giant cluster F of a guessing game to figure out what you actually need to parse
02:14:31FromGitter<Varriount> Hm.
02:14:55FromGitter<Varriount> @zacharycarter You might try looking at the Java library. I think that one works off of XML. There might be a spec there.
02:15:11FromGitter<zacharycarter> ahhh okay good idea - thanks for the protip :)
02:15:31FromGitter<zacharycarter> @Varriount are you done with studies this year?
02:15:52FromGitter<Varriount> Nope. Spring 2019 is the anticipated date. :/
02:15:59FromGitter<zacharycarter> ah okay
02:16:08FromGitter<zacharycarter> well, either way - it's getting close
02:16:19FromGitter<zacharycarter> once you graduate - we're starting some kind of company and we're going to write everything in Nim
02:16:27FromGitter<Varriount> :3
02:16:36FromGitter<Varriount> We need product ideas first.
02:17:22FromGitter<zacharycarter> details...
02:29:45FromGitter<krux02> @zacharycarter I know about the original glm to have sse support, but no matter how I put it, I kind of don't like how it works
02:30:05FromGitter<krux02> a lot of implementations are nice to copy paste, but the branching really kills it.
02:30:27FromGitter<zacharycarter> gotcha
02:30:48FromGitter<krux02> either glm compiles to sse instructions that don't work on older hardware
02:31:45FromGitter<krux02> or there are a lot of low level braches that kill the performance
02:33:20FromGitter<krux02> I really see now the advantage of dynamic compiling on the target machine
02:34:02FromGitter<krux02> because then I could decide on the target hardware if I would generate sse instructions or not, depending on if they are there or not
02:34:51*dddddd quit (Remote host closed the connection)
02:38:42shashlickSorry dinner time, ya I'm going to spend some time working on nimscript stuff
02:38:53shashlickHave a bunch of other ideas in the pipeline
02:39:00FromGitter<krux02> hmm a functions that uses a lot of glm functions should be generic over it's simd supportiveness. this supportiveness is then also forwarded to the glm functions wich then are eithe simd functions or not
02:39:41FromGitter<krux02> because generic functions are instanciated multiple times I can then branch on a very high level on the actual version
02:39:55FromGitter<krux02> but that really is a mess to use
02:41:58shashlickNeed to pull out code from some of my apps and make them libs - mini ncurses alternative, acoustid lib and one other minor one
02:44:27shashlickOh and make it easy to build with pcre static, and some nimgen enhancements
02:52:53*rockcavera joined #nim
02:59:06*S1tiSchu joined #nim
03:03:07*S1t1Schu quit (Ping timeout: 268 seconds)
03:03:29*adeohluwa quit (Quit: Connection closed for inactivity)
03:26:35*find0x90 joined #nim
03:35:18*endragor joined #nim
03:36:31FromGitter<Varriount> @zacharycarter I'm looking into freeing up some time to develop the AWS library with you. Perhaps we could meet up and do a mini-sprint
03:39:50*find0x90_ joined #nim
03:41:09*find0x90 quit (Ping timeout: 265 seconds)
03:53:40*find0x90_ quit (Quit: find0x90_)
04:00:23*leorize quit (Remote host closed the connection)
04:03:15*jjido quit (Read error: No route to host)
04:06:44*leorize joined #nim
04:27:05*NimBot joined #nim
04:55:40*leorize quit (Remote host closed the connection)
05:14:00FromGitter<krux02> supporting simd in a general form like in glm is much harder than I thought
05:14:34*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:14:49FromGitter<krux02> the simd instructions are awesome, no question, but they also have weird restrictions that makes it pretty hard to use them
05:17:30FromGitter<krux02> for example the float simd type needs 16 byte alignment. Meaning iterating a seq[Vec3f] and doing operations on it would crash the program.
05:41:50*nsf joined #nim
06:08:24*kinkinkijkin joined #nim
06:09:36kinkinkijkinhow would I receive messages from other processes?
06:16:47*arnetheduck joined #nim
06:33:42*leorize joined #nim
06:37:04FromGitter<survivorm> Oh, people. Pair of last pages look like 3 different dialogues, 2 of which are in fact, monologues. Looks really funny :)
06:51:21*arnetheduck quit (Ping timeout: 264 seconds)
07:25:59*athenot quit (*.net *.split)
07:25:59*user1101 quit (*.net *.split)
07:26:00*cspar quit (*.net *.split)
07:26:00*enthus1ast quit (*.net *.split)
07:26:01*derlafff quit (*.net *.split)
07:26:11*enthus1ast joined #nim
07:26:13*user1101 joined #nim
07:26:21*cspar joined #nim
07:27:01*athenot joined #nim
07:27:36*derlafff joined #nim
07:28:44*craigger quit (Ping timeout: 260 seconds)
07:30:51*craigger joined #nim
07:32:41*rokups joined #nim
07:52:25*gokr joined #nim
07:53:42*Yardanico quit (Ping timeout: 260 seconds)
07:55:52*skelett quit (Read error: Connection reset by peer)
07:56:18*skelett joined #nim
07:57:51*Yardanico joined #nim
07:58:10*derlafff quit (Quit: No Ping reply in 180 seconds.)
07:59:58*survivorm[m] quit (Ping timeout: 276 seconds)
07:59:58*macsek1911[m] quit (Ping timeout: 276 seconds)
07:59:58*shashlick quit (Ping timeout: 276 seconds)
08:00:17*derlafff joined #nim
08:01:40*survivorm[m] joined #nim
08:08:49*shashlick joined #nim
08:09:05*macsek1911[m] joined #nim
08:17:09*leorize quit (Remote host closed the connection)
08:28:12*leorize joined #nim
08:36:57*littleli quit (Ping timeout: 264 seconds)
08:37:14*littleli joined #nim
08:44:47*floppydh_ joined #nim
08:53:35*PMunch joined #nim
10:01:18*leorize quit (Quit: WeeChat 2.1)
10:03:10*user1101 quit (Remote host closed the connection)
10:03:54*user1101 joined #nim
10:12:19FromGitter<mratsim> @krux02 please vote: https://github.com/nim-lang/Nim/issues/1930 and https://github.com/nim-lang/Nim/issues/6696 I also need 64-bit alignment to entice GCC to produce AVX2 vector code ...
10:13:39FromGitter<mratsim> Rust made a lot of noise last year with their upcoming SIMD support as part of the core language: https://github.com/AdamNiederer/faster
10:13:52FromGitter<mratsim> and: https://github.com/rust-lang-nursery/simd
10:14:21FromGitter<Araq> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ab381fd27c509a7748f5acf]
10:14:45FromGitter<mratsim> doesn’t work in an object
10:14:54FromGitter<mratsim> or for a seq
10:16:17FromGitter<mratsim> forgot about this too: https://github.com/nim-lang/Nim/issues/5315
10:16:43FromGitter<mratsim> @Araq ;) https://github.com/mratsim/Arraymancer/blob/9d1f799f31145da8a1bff778366874df4f1b1dfd/src/tensor/backend/memory_optimization_hints.nim#L22-L28
10:17:40FromGitter<Araq> dunno then. alignment is stupid. "here have this CPU, the worst thing you can do is access memory. Now lose some bytes for alignment because we love exposing low level archaic bullshit to you"
10:18:39FromGitter<mratsim> I think this boat has sailed before we were even born, though AVX significantly improved unaligned loads
10:21:05FromGitter<Araq> yeah, use AVX. it's a tradeoff "more logic on the chip" vs "use more memory". and "more logic" always wins.
10:21:48FromGitter<mratsim> The thing is AVX2 introduced new optimisations, which requires 64-bit alignment ...
10:22:19FromGitter<Araq> wait for AVX3 then or maybe AVX4 if they skip the 3 because it's not aligned...
10:22:20FromGitter<mratsim> so I’m eagerly waiting for your `newSeq` which supports alignment ;)
10:27:32*yglukhov quit (Remote host closed the connection)
10:28:05*yglukhov joined #nim
10:28:22Araqyeah, with the new allocator we should have got an alloc that supports alignment
11:02:45*Snircle joined #nim
11:10:24*Senketsu quit (Ping timeout: 260 seconds)
11:15:18*Snircle quit (Read error: Connection reset by peer)
11:15:22*floppydh_ quit (Ping timeout: 264 seconds)
11:15:55*Snircle joined #nim
11:16:11*xet7 quit (Ping timeout: 256 seconds)
11:18:09dom96Araq: I like your idea, but with a slight twist: https://github.com/nim-lang/Nim/issues/7250#issuecomment-375268313
11:18:41dom96If you're going to implement it though, please do it in a new branch
11:18:43dom96I want to see it
11:18:59Araqok
11:20:17Araqwhat do you mean by "local modules"?
11:20:26*dddddd joined #nim
11:20:35Araqimport pkg / foo would not match ./foo either
11:21:10dom96I thought it would
11:21:14dom96You just excluded stdlib
11:21:26dom96So what remains is --path and then local modules
11:21:39dom96As far as I understood what you meant at least
11:21:53Araqlocal modules are always considered first
11:22:10Araqbut you shouldn't have a directory 'pkg' in your project
11:22:23Araqand so it wouldn't match.
11:23:04dom96No point in even trying to attempt it
11:23:10Araqok
11:23:17dom96Just look through --path
11:23:25dom96Then there is no problem
11:23:44dom96We can also improve the error message to explain what's going on when 'pkg' is used.
11:23:51dom96(and a module is not found)
11:25:29*xet7 joined #nim
11:28:02dom96Also, it should be possible to write `import ./pkg/foobar`
11:42:14Araqwell it's not "look through --path", the stdlib itself is added via --path
11:42:36Araqbut I might change that or make it work somehow
11:44:01Araqand I still think my "dollar thing" is superior but whatever, it's ok to not have that
11:44:27PMunchDid we ever get a Nim formatting tool? For formatting code?
11:45:52federico3PMunch: there's been few attempt at it including https://github.com/FedericoCeratto/nimfmt
11:47:29Araqwhat? few attempts at including it? never seen it before :-)
11:47:39Araqhow do you do it? based on the AST or token stream?
11:47:41dom96Araq: Yes, stdlib should be added via some other flag
11:48:13dom96bbl
11:48:32federico3Araq: I mean: there's been few attempts at linting (including something from def- and dom96 IIRC)
11:49:25Araqoh it uses my broken renderer.nim :-(
11:49:27Araqpity.
11:50:26federico3Araq: that was from 1y ago - if there's a better way to do so...
11:53:51FromGitter<alehander42> yeah, I think a formatter at least would be very useful (a linter would be perfect, but I guess a formatter should be easier? just a smarter and maybe configurable renderer.nim ?)
11:55:12FromGitter<alehander42> I can help with improving renderer.nim if that's what it takes (I've played a lot with it while working on py2nim)
11:55:41Araqit's tough, we lose non-doc comments in the AST
11:56:15federico3indeed - I tried few hacks to get inject the non-doc comments back. It's ugly
11:56:46Araqbiggest problem with it. other problem is "expressions as statements" came later and the logic in the renderer never really cared about it
11:57:46FromGitter<mratsim> is there a way to copy directories in a nimscript?
11:58:06FromGitter<mratsim> without recursively calling copyFile of course
11:58:27*floppydh_ joined #nim
12:00:05FromGitter<alehander42> well, we can just add the non-doc comments to the AST if a formatting flag is defined?
12:01:02FromGitter<alehander42> can you give an example where this expr vs stmt thing confuses renderer ?
12:01:24Araqlet x = case foo
12:01:28Araq of bar: 4
12:01:31Araq else: 4
12:01:42Araqmaybe it works by accident :P
12:03:32FromGitter<alehander42> so why is that confusing? :D at least from the dumpTree AST it seems unambigious
12:05:02FromGitter<dom96> Maybe it's time for an independent Nim parser implementation? :P
12:05:32FromGitter<dom96> I wonder how other linters/formatters work
12:05:33FromGitter<alehander42> I guess it visits the let group, if there is just one child, it renders `let <first> = <second>`, `<first>` is ok, `<second>` is gonna be `case ..:..` independently of the context, so it would be again x = case ..
12:06:38FromGitter<alehander42> I've worked on a ruby linter, and it had some checks that worked on token sequences and some which worked on the AST
12:06:46*leorize joined #nim
12:07:01*nsf quit (Quit: WeeChat 2.0.1)
12:07:35*SenasOzys_ quit (Ping timeout: 240 seconds)
12:10:12FromGitter<ChristianWitts> Go has a nice set of linters, which can be managed by a metalinter ⏎ https://github.com/alecthomas/gometalinter
12:10:12*Senketsu joined #nim
12:10:19*noonien joined #nim
12:10:21FromGitter<alehander42> most of the linters I've seen just use a standard lib to get a parse/lex function or a visitor subclass and build checks on top of that (e.g. rubocop with parser gem, go with go/ast etc)
12:26:14*user1101 quit (Quit: user1101)
12:28:02*user1101 joined #nim
12:31:00*user1101 quit (Client Quit)
12:32:18*smt quit (Ping timeout: 268 seconds)
12:33:21*user1101 joined #nim
12:34:08*vlad1777d quit (Ping timeout: 276 seconds)
12:35:59*blablabla joined #nim
12:36:02*user1101 quit (Read error: Connection reset by peer)
12:36:16*blablabla quit (Client Quit)
12:48:03*user1101 joined #nim
12:50:57*DarkArctic quit (Read error: Connection reset by peer)
12:52:38*user1101 quit (Read error: Connection reset by peer)
12:56:58FromGitter<mratsim> For those using vscode, if you create .nims file there is a potential of data loss due to nimsuggest or nim -check: https://github.com/pragmagic/vscode-nim/issues/84
13:07:43PMunchOuch, that's not good
13:09:33*nsf joined #nim
13:16:37*SenasOzys_ joined #nim
13:22:46FromGitter<zacharycarter> @Varriount working on the AWS sdk together sounds like an awesome idea and I am game - maybe we can discuss further this evening and figure out when a good time for us to meet up would be.
13:30:59*riidom quit (Ping timeout: 260 seconds)
13:44:43*floppydh quit (Remote host closed the connection)
13:45:54*floppydh joined #nim
13:48:09*jaco60 joined #nim
13:48:24dom96hmmm, seems to me that nimsuggest shouldn't be executing code like that...
13:52:56Araqwhy not? it needs to do that in order to know the search paths etc
13:55:33*leorize quit (Remote host closed the connection)
13:55:54dom96I thought the issue was about running nimsuggest on a .nims file
13:56:12dom96If Nimsuggest executes these .nims files anyway, then how does what mratsim suggests solve the problem?
13:56:57dom96What is a bigger question is why you'd even execute things in your .nims files that can change your data?
14:01:23Araqyou can use
14:01:32Araqwhen not defined(nimsuggest) in your .nims file
14:01:40Araqto prevent bad stuff from happening
14:01:51Araqbut that shouldn't be necessary :-)
14:04:22*noonien quit (Ping timeout: 256 seconds)
14:06:06*noonien joined #nim
14:09:47*DarkArctic joined #nim
14:10:01*leorize joined #nim
14:10:59*DarkArctic quit (Client Quit)
14:11:17*DarkArctic joined #nim
14:12:05*DarkArctic_ joined #nim
14:12:11*DarkArctic quit (Client Quit)
14:12:12*DarkArctic_ quit (Client Quit)
14:12:30*DarkArctic joined #nim
14:14:27FromGitter<mratsim> @dom96 I need to be able to move files, create temp file, concatenate files, remove temp files. Currently if on windows I need powershell or the windows shell, if on UNIX I need bash/zsh/ksh ...
14:15:10dom96Why do you need to do that in .nims?
14:15:23dom96And I assume at the "top-level"?
14:15:28Araq@mratsim certainly but don't do that in the .nims file at the top level. but maybe in a task
14:15:36dom96If it's in a 'task' then there is no reason nimsuggest should evaluate it
14:15:40Araqor in the .nimble file
14:15:51Araqdom96, agreed
14:16:29FromGitter<mratsim> I’m trying to wrap a C library, I needed to run a ./configure and I noticed that when I tried to copy stuff I always had new file popping (due to a copy command).
14:18:50*xet7 quit (Quit: Leaving)
14:18:50FromGitter<mratsim> Still, this is completely unexpected and due to the potential of data loss, and either putting executable commands at top level should be disallowed in .nims (people will try to use nimsuggest as a replacement for bash if you promote it like that) or nimsuggest should just ignore the IOEffect command or not run at all for .nims files
14:20:42Araqnimsuggest does not cause the data loss
14:20:49Araqthat's all done by your code
14:21:02Araqas far as I understood your problem.
14:21:14dom96I still don't understand why you're putting executable commands at the top level
14:21:21*yglukhov quit (Ping timeout: 264 seconds)
14:22:09*arnetheduck joined #nim
14:22:38Araqme neither. it's like saying "I ran the Nim compiler and it executed my nimScript"
14:22:43Araqwell yes.
14:22:48Araqthat's what it does.
14:23:10FromGitter<mratsim> When using bash, people put executable commands at top level. "NimScript can also be used directly as a portable replacement for Bash and Batch files.” —> People will expect to put executable command at top level.
14:24:14Araqexactly.
14:24:39Araqand like Bash, it really runs your commands.
14:25:21Araqfoo.nim # main file
14:25:27Araqfoo.nims # config file for foo.nim
14:25:34Araqnim c foo.nim # nim runs foo.nims
14:25:46Araqnimsuggest foo.nim # nimsuggest runs foo.nims
14:26:28Araqwhy are some commands fine for 'nim c' but not for 'nimsuggest' ?
14:26:41Araqshould I be careful with 'nim c' too in your setup?
14:26:54Araqor do we blame only nimsuggest here, and if so, why?
14:27:35FromGitter<mratsim> Because vscode plugins, vim plugins and other (atom, etc …) will probably all make this mistake
14:27:45Araqwhich mistake?
14:27:50federico3huh? Why is nimsuggest executing stuff?
14:27:52FromGitter<mratsim> Also I raised the issue on vscode-nim tracker
14:27:57AraqI still don't understand the problem.
14:28:06FromGitter<mratsim> the mistake of executing nimsuggest on .nims file
14:28:17FromGitter<mratsim> the problem is data loss
14:28:46FromGitter<mratsim> nimsuggest is called silently on .nim and .nims file
14:29:02Araqok, so we're not talking about 'nimsuggest foo.nim' but about 'nimsuggest foo.nims'
14:29:11FromGitter<mratsim> yes
14:29:21Araqnow we're getting somewhere
14:29:29Araqok, I can make nimsuggest ignore such requests
14:29:44Araqbut then people don't have auto-completion for their nims files :P
14:29:55FromGitter<mratsim> I thought I was clear that I was talking about nimscript and .nims file
14:30:00Araqfederico3, because foo.nims has --path options?
14:31:14federico3path options?
14:31:39Araqthe point of a foo.nims file is configuration. nimsuggest needs to know about the configuration
14:31:51Araqotherwise it cannot check your semantics etc etc
14:32:21FromGitter<mratsim> I though we had nim.cfg for config and foo.nims for scripting?
14:32:26FromGitter<mratsim> thought*
14:32:26federico3looks like there's some confusion on the purpose of nims
14:32:45Araqyou can write any crap in the .nims file though just like you can do 'rm -rf /' in a makefile
14:33:23FromGitter<mratsim> but VScode doesn’t silently execute make when doing highlighting or suggestions
14:33:36federico3+1 mratsim
14:33:43Araqright, you need to run ./configure first
14:34:05AraqI can write a VSCode plugin that runs the makefile
14:34:11Araqsilly remarks.
14:35:02Araqespecially considering that the typical configure script is 4K loc of generated unreadable code
14:35:29federico3no: you don't write tools that quietly run all targets in makefiles behind the user's back
14:35:48shashlickhold - if nims is a script and nimsuggest is for code completion, nimsuggest shouldn't be executing the nims
14:36:03shashlickit should be examining the file and making suggestions - why is it executing the code?
14:36:45*athenot quit (Read error: Connection reset by peer)
14:37:00*athenot joined #nim
14:37:54Araqnot sure :-)
14:38:30AraqI still don't understand the problem completely.
14:38:33federico3https://nim-lang.org/docs/nims.html the manual describes nimscript as configuration files and a build tool using "task <foo>"
14:39:09FromGitter<coffeepots> Is this just a simple mistake in the VSCode plugin? Doesn't sound like it should be doing that
14:39:43FromGitter<survivorm> For me it's certanly a dark point, if not a bug. Why should the file be executed for completion and stuff?
14:40:01AraqI'm not sure that's the case
14:40:02FromGitter<survivorm> It's not something expected
14:40:40federico3it is the case: create foo.nim with echo "hi" in it and run "nimsuggest foo.nims"
14:40:57FromGitter<survivorm> That's more of "don't do it in any case" stuff, than anything else
14:41:52FromGitter<survivorm> Anything program does shouldn't bother the suggest. It is executed then it's run, why should it be at any other time?
14:42:03federico3this is clearly unexpected and surprising to the user
14:42:05shashlickcalling a nims file a configuration file flies in the face of all Nim can do in the VM and our efforts to expand that - it's much more than that
14:42:12FromGitter<survivorm> It's hardly the expected behaviour
14:42:24Araqok, here is the code
14:42:26Araq if fileExists(scriptFile):
14:42:26Araq runNimScript(cache, scriptFile, freshDefines=false, config)
14:42:27Araq # 'nim foo.nims' means to just run the NimScript file and do nothing more:
14:42:29Araq if scriptFile == gProjectFull: return
14:43:22FromGitter<survivorm> And what is your point?
14:43:28Araqit was done on purpose so that 'nimsuggest' behaves like 'nim'. but it's bullshit indeed, let me fix it.
14:43:44FromGitter<mratsim> Assuming .cfg are for configuration, .nims are for configuration, what is the extension for “bash script” ?
14:44:07FromGitter<survivorm> Good question
14:44:35Araq.cfg are deprecated, .nims is the new config system.
14:44:53Araqthat can also replace your bash scripts
14:44:58Araqbut then
14:45:07Araqyou should really have the stuff in a 'task'
14:45:12FromGitter<mratsim> Also nimscript documentation needs a big warning saying “This is a replacement for bash, but don’t put your commands at the top level, create a proc instead. Warning, they will be executed when Nim is doing autocompletion"
14:45:15shashlickfrom the nimscript site: "...you can use a myproject.nims file that simply contains Nim code controlling the compilation process" - this means it is a script and not a configuration file
14:45:21Araqand probably should do it in a Nimble task instead
14:45:28federico3besides, "nimsuggest foo.nims" executed the nims file and then exited without entering the nimsuggest shell
14:46:21Araqwell 'nimsuggest foo.nims' is ... strange
14:46:34federico3how so?
14:46:35Araqmratsim: we don't need to fix the docs, I'm fixing nimsuggest instead
14:46:38FromGitter<mratsim> Regarding extensions, maybe .nimsh and .nimcfg would be better to communicate the intent?
14:46:50Araqno, just no.
14:46:56Araqwe don't need more file extensions
14:49:52dom96okay, so I thought you had foo.nim and a foo.nims (intended to configure the compilation of foo.nim) and for some reason you were executing commands in this configuration nims file
14:50:14dom96Offtopic: I still use .nim.cfg and I don't think it should be deprecated
14:50:36dom96It's a nice and easy way to put flags into a file and call it a day
14:50:41dom96why can't we have both?
14:51:42shashlickI agree, unless you can put nim flags into app.nims and it does the same thing
14:51:58dom96you can, but it doesn't always work
14:52:36Araqit does work. once you understand it.
14:52:49dom96It works if you change the syntax
14:53:01dom96what doesn't work is "being able to place flags from the command line as-is"
14:53:21Araqno, it uses Nim syntax.
14:53:57dom96yes, which isn't compatible with command line syntax
14:54:21Araqok, I won't deprecate .cfg files then *shrugs*
14:55:23dom96great
14:55:35Araqbut one day I'll throw the config system away
14:55:46Araqfor Nim v3.
14:56:00Araq:P
14:59:37shashlickso what's the equivalent syntax for --path:".." in .cfg? Using switch("path, "..")?
14:59:55dom96you mean in .nims?
15:00:03dom96that will work fine in .cfg
15:00:55shashlickya i mean in nims
15:01:23Araqthe syntax in nims is --path:".."
15:06:22dom96There are cases where you need to use `switch(...)` though
15:07:03shashlickso just renaming a .cfg to .nims is good enough?
15:08:29*r3d9u11 joined #nim
15:08:52*crem quit (Ping timeout: 265 seconds)
15:09:27*leorize quit (Ping timeout: 260 seconds)
15:10:28*xet7 joined #nim
15:11:35*crem joined #nim
15:17:08*nsf quit (Quit: WeeChat 2.0.1)
15:19:36*endragor quit (Remote host closed the connection)
15:20:04*endragor joined #nim
15:25:05*endragor quit (Ping timeout: 276 seconds)
15:27:16*krux02 joined #nim
15:38:11*athenot quit (Ping timeout: 276 seconds)
15:40:07*athenot joined #nim
15:49:09*kuzyn joined #nim
15:50:20*kuzyn left #nim ("WeeChat 2.1")
15:53:53*rbrt joined #nim
16:03:32*crem quit (Remote host closed the connection)
16:03:54*crem joined #nim
16:06:38*miran joined #nim
16:11:10*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:17:10*rbrt quit (Quit: Slán agat)
16:17:25*jrbrt joined #nim
16:17:58*yglukhov joined #nim
16:24:31*jrbrt is now known as jrbrt_
16:25:11*jrbrt_ is now known as jrbrt
16:27:57*gokr quit (Ping timeout: 240 seconds)
16:29:33*Trustable joined #nim
16:30:04*xet7 quit (Ping timeout: 260 seconds)
16:44:51*xet7 joined #nim
16:50:30shashlickAdeohluwa: looks like twilio does have a swagger/openapi spec we could leverage: https://github.com/APIs-guru/openapi-directory/blob/master/APIs/twilio.com/2010-04-01/swagger.yaml
16:51:13shashlicklikewise for AWS @Varriount @zacharycarter: https://github.com/APIs-guru/openapi-directory/tree/master/APIs/amazonaws.com
16:55:56*PMunch quit (Quit: Leaving)
17:00:31*Vladar joined #nim
17:06:10*athenot joined #nim
17:07:11shashlickwe basically need nim codegen templates: https://swagger.io/swagger-codegen/
17:08:07shashlickhttps://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources
17:10:27*athenot quit (Ping timeout: 252 seconds)
17:16:03*athenot joined #nim
17:27:51FromGitter<AjBreidenbach> is there any reason a proc declared in a template should require an explicit return
17:31:57*floppydh_ quit (Ping timeout: 240 seconds)
17:38:17*tiorock joined #nim
17:38:17*tiorock quit (Changing host)
17:38:17*tiorock joined #nim
17:38:17*rockcavera quit (Killed (wilhelm.freenode.net (Nickname regained by services)))
17:38:17*tiorock is now known as rockcavera
17:39:20mirani'm trying to have a proc which would accept any number of seqs. i have declared it with `proc foo[T](xs: varargs[seq[T]]) ...`
17:39:55miranwhen i try to call it with `foo(@[1, 2, 3, 4], @[5, 4, 3])`, i get " Error: illegal capture 'xs' "
17:40:40miranwhat am i doing wrong?
17:45:01shashlickworks for me miran
17:45:28miranshashlick: are you on 0.18.0, or develop?
17:46:01shashlickdevelop, last synced few days ago
17:46:15mirani'm on 0.18.0, that might be it
17:47:14shashlicki'm installing 0.18.0, let's see
17:48:32*jrbrt quit (Quit: Slán agat)
17:51:40*r3d9u11 quit (Remote host closed the connection)
17:52:42*r3d9u11 joined #nim
17:53:48*nsf joined #nim
17:56:35*xet7 quit (Quit: Leaving)
17:56:48*smt joined #nim
17:58:09shashlickworked on 0.18.0 too
17:58:26shashlickproc foo[T](xs: varargs[seq[T]]) =
17:58:27shashlickdiscard
17:58:28shashlickfoo(@[1,2], @[3,4])
18:00:58dom96maybe try using 'xs'?
18:03:58miranshashlick: can you add to your proc something like `for x in xs: for i in x: echo i` and test it?
18:04:40shashlicktrying
18:05:14mirani have just updated devel and i get " Error: illegal capture 'xs' of type <varargs[seq[int]]> "
18:05:31miranso, a bit more verbose message, but error is still the same
18:06:13shashlickproc foo[T](xs: varargs[seq[T]]) =
18:06:14shashlickfor i in xs: echo i
18:06:14shashlickfoo(@[1, 2], @[3, 4])
18:06:15shashlickthat worked too
18:07:17*shashlick sent a long message: shashlick_2018-03-22_18:07:17.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/hRHXRkjaiVuvslgQycMrENLa>
18:07:18shashlickthat worked too
18:08:13FromGitter<Vindaar> Works fine here, too. I run this on devel from about a week ago: http://ix.io/110Q
18:09:09miranhmmm, now i did it like i said in last message (just echoing it) and it works
18:09:40mirani guess the error might be something else, as i'm calling an iterator from that proc....
18:11:13mirani'll post a gist shortly
18:12:11miran(is nim playground down again?)
18:12:47*rockcavera is now known as Guest2783
18:12:47*tiorock joined #nim
18:12:47*Guest2783 quit (Killed (adams.freenode.net (Nickname regained by services)))
18:12:47*tiorock is now known as rockcavera
18:13:05miranhttps://gist.github.com/narimiran/1af51ba1cecab11b8f3a27fdcc9d0eed (cc @dom96)
18:13:44dom96!eval echo("hello")
18:13:47NimBothello
18:14:31dom96yeah, in that case the error seems correct.
18:14:51dom96You can probably create a seq in the body of the proc and capture that
18:16:13mirani don't understand what you mean, sorry
18:22:33*DarkArctic quit (Ping timeout: 264 seconds)
18:25:32*xet7 joined #nim
18:27:35dom96var foo = xs
18:27:38*r3d9u11 quit (Remote host closed the connection)
18:27:55dom96well, var foo: seq[seq[T]] = @[]
18:28:08dom96for x in xs: foo.add(x)
18:28:12dom96then use 'foo' in your iterator?
18:28:47miranoh! i'll try that, thanks
18:29:41*byte512 quit (Ping timeout: 256 seconds)
18:29:55FromGitter<abijahm> when using asyncnet how do i know that the client is still listening ⏎ example if i close my browser window this will continue until the whole file is read ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ab3f623c3c5f8b90da18362]
18:30:41*mrwonko joined #nim
18:31:00miranit works!!
18:32:39dom96abijahm: I assume there is a good reason you're not using the httpclient module.
18:33:19mrwonkoIs it possible to have a single compilation step that compiles one module as JS and embeds the resulting script as a string in another module that is compiled natively? (i.e. automatically embed the frontend in a server with a single build step)
18:33:35dom96or I should say asynchttpserver heh
18:34:09dom96The only way to know is to recv from the client and check the length
18:34:22dom96You may also get an OSError from 'send'
18:35:08dom96(but this is suppressed by the SafeDisconn flag which is passed to 'send' by default
18:35:09dom96)
18:35:31FromGitter<abijahm> @dom96 am using it am using this to serve huge files
18:36:06dom96asynchttpserver should work, no?
18:37:26*byte512 joined #nim
18:39:15*krux02 quit (Ping timeout: 246 seconds)
18:41:37FromGitter<abijahm> no,the code above am using asynchttpserver
18:42:02FromGitter<bluenote10> Somehow I can't `koch boot -d:release` on devel anymore. It fails with `nimblecmd.nim(104, 38) Error: attempting to call undeclared routine: 'walkPattern'`. Any ideas what could be the cause?
18:42:22FromGitter<abijahm> what flag should i use for send proc
18:42:51dom96abijahm: oh, I see. You can try ...send(read, flags={})
18:43:06dom96But there is absolutely no guarantee you will get a notification
18:43:13dom96sometimes a client times out without the other side knowing
18:45:05*byte512 quit (Ping timeout: 240 seconds)
18:46:25*DarkArctic joined #nim
18:48:32kinkinkijkinhow do I do cross-process messaging, and specifically how do I do it in nim? I want to run a process as a daemon and make helpers to make the daemon actually do things
18:49:17*byte512 joined #nim
18:50:03FromGitter<mratsim> What is the best way to test 32/64 bit at compile-time? There are information here: https://github.com/nim-lang/Nim/wiki/Consts-defined-by-the-compiler, and in system: https://nim-lang.org/docs/system.html#hostCPU, but `define(x86)` and `define(x86_64)` also exist. (I need to test for 32/64 bit ARM)
18:50:38FromGitter<abijahm> @dom96 another example am using asynchttpserver for byte serving a video ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ if the user makes multiple seeks and closes the browser the app will still read the whole file the multiple times he seeked ... [https://gitter.im/nim-lang/Nim?at=5ab3fafdbb1018b37a14451c]
18:51:33*xet7 quit (Quit: Leaving)
18:53:07dom96abijahm: does setting the flags not help?
18:53:57dom96kinkinkijkin: Same way you'd do it other languages, via one of many available IPC approaches.
18:53:59dom96*it in
18:54:19kinkinkijkinthing is, I don't quite know how to do that, and googling has found me nothing on this
18:54:35kinkinkijkinit just seems to be something people to expect you to dig out of a manual
18:55:06dom96I think daemons in particular are usually controlled via signals
18:55:27dom96Wikipedia has a nice list of approaches: https://en.wikipedia.org/wiki/Inter-process_communication
18:55:39kinkinkijkinthank you
19:03:39FromGitter<abijahm> @dom96 even withthout the flag no exception is raised, shouldnt the asyncnet send() return bytes written ?
19:04:19dom96no, it always writes everything you give it
19:04:40dom96are you sure the browser closes the connection?
19:07:01mrwonkoI have a repo containing three nimble packages, a frontend, a backend, and a shared library. Is there some way I can link them together besides doing `nimble develop` in the shared library?
19:07:38mrwonkoand what does `nimble develop` do in the first place, and how can I undo it?
19:09:22mrwonkookay, the latter I can answer myself, apparently it creates a link in ~/.nimble/pkgs/
19:09:49dom96The Nimble readme explains almost everything: https://github.com/nim-lang/nimble#nimble-develop
19:10:35miranif only other nim projects had this kind of readme....
19:11:19dom96mrwonko: If they're all in the same repo then you can probably just import them as normal Nim modules
19:27:12*natrys joined #nim
19:27:22*byte512 quit (Ping timeout: 264 seconds)
19:28:55mrwonkoThe nimble readme describes using a nim.cfg to adjust the path for tests but nimble init creates a test1.nims file instead. Is the latter module-specific but otherwise identical?
19:30:47dom96yes
19:30:57dom96test1.nim.cfg works too though
19:31:03dom96.nims is a new configuration format
19:36:08*byte512 joined #nim
19:42:40*athenot quit (Remote host closed the connection)
19:43:22mrwonkoOkay, thanks, I got it to build. Does this look like a sensible project setup to you? https://github.com/mrwonko/assistant
19:43:38*athenot joined #nim
19:45:29dom96hrm, that depends on what your plan is
19:45:56dom96I assume this won't really be installed by people via Nimble
19:46:14dom96so I would just have assistant/{backend, frontend, shared}
19:47:01mrwonkoright, I don't currently plan to publish this using nimble, but it's convenient to be able to build it using nimble build and test it with nimble test
19:47:26mrwonkoand as far as I can tell I can only have one .nimble file per directory and need one .nimble file per backend (c/js)
19:47:28dom96Right, I'd say you don't even need three separate Nimble packages for this
19:48:24mrwonkohmm right, I'll play around some more
19:48:28dom96Keep it simple
19:48:40dom96You can always fall back on 'nimble c file.nim'
19:48:47dom96and 'nimble js file.nim' should work as well
19:49:01dom96You can override the default 'test' task to do whatever you want
19:49:33dom96Here is a simple example: https://github.com/nim-lang/nimble/blob/master/nimble.nimble#L32
19:54:21*kunev quit (Ping timeout: 264 seconds)
19:54:43*kunev joined #nim
19:54:53miransemi-related question about nimble packages - last couple of projects/packages i've seen are using apache license - is there any recommendation which licenses should (not) be used for nim(ble) packages?
19:55:13*xet7 joined #nim
19:55:48dom96nope, up to you
19:56:21*icebattl1 quit (Quit: leaving)
19:56:29miranok
19:58:12*arecaceae quit (Remote host closed the connection)
19:58:31*arecaceae joined #nim
20:19:58*Vladar quit (Quit: Leaving)
20:20:43*endragor joined #nim
20:25:33*endragor quit (Ping timeout: 264 seconds)
20:30:12mrwonkoI want to execute a shell command at compile time, but it looks like I can't use `os.execShell` and `osproc.execProcess` in static blocks and I can't overwrite the build task in my nimble file… how can I embed the result of running a different process in my source code at compile time?
20:31:27*littleli quit (Ping timeout: 240 seconds)
20:32:11dom96staticExec
20:32:24*littleli joined #nim
20:44:30FromGitter<abijahm> @dom96 the browser send a finalize tcp packet node js uses it to end connections, how do i listen for this packets in nim?
20:45:09dom96no idea, how does node listen for it?
20:53:28mrwonkothanks, staticExec works beautifully
20:53:53mrwonkocan I indent a string directly inside a `&` format expression?
20:53:58mrwonko(it contains newlines)
20:54:06FromGitter<abijahm> dont know how saw it on their documentation ⏎ node js (https://nodejs.org/api/net.html#net_event_end)
20:56:54*nsf quit (Quit: WeeChat 2.0.1)
20:57:05*rokups quit (Quit: Connection closed for inactivity)
20:58:47dom96abijahm: I tracked it down to here: https://github.com/indutny/node/blob/master/lib/net.js#L546
20:59:14dom96i.e. you will probably need to read from the socket
21:01:43Yardaniconew case statements are awesome - https://github.com/Yardanico/nim-mathexpr/commit/86d9ea314096edb9ee6f56850a82f085d0d7cf9d
21:02:41mrwonkohow can I control where the result of `nim js` goes? currently it ends up in a nimcache directory, but I'm not sure if I can or should rely on that
21:07:58FromGitter<BontaVlad> `-o:FILE, --out:FILE set the output filename` filename can also be a path
21:09:12YardanicoBontaVlad: does that work for js?
21:09:30Yardanicooh, yes, it does
21:11:57mrwonkoOkay, Nim has thoroughly impressed me. When my backend is compiled, I can recursively execute the compiler to compile my frontend and store the resulting JS code in a constant so that I don't need any file reads at runtime. This made my project structure a good deal simpler, too, although I need some nim.cfg files to properly resolve module paths. https://github.com/mrwonko/assistant
21:13:10*miran quit (Quit: Konversation terminated!)
21:19:28kinkinkijkinwhat is the difference between reading and peeking from a stream?
21:20:56FromGitter<BontaVlad> by reading you "move" the position, by peeking you don't
21:21:04kinkinkijkinah oki
21:21:05kinkinkijkinthanks
21:22:01*mrwonko quit (Quit: mrwonko)
21:26:47*Trustable quit (Remote host closed the connection)
21:51:19FromGitter<zacharycarter> shashlick: I think it'd be better to use boto for AWS
21:53:05*xet7 quit (Ping timeout: 248 seconds)
21:54:00*xet7 joined #nim
21:54:05shashlickfrom initial searches, boto is python right?
21:55:28*xet7 quit (Remote host closed the connection)
21:55:54*xet7 joined #nim
21:56:31FromGitter<zacharycarter> botocore is the core python library
21:56:41FromGitter<zacharycarter> https://github.com/boto/botocore
21:57:03FromGitter<zacharycarter> but it has all these different specs - https://github.com/boto/botocore/tree/develop/botocore/data
21:57:26FromGitter<zacharycarter> which is what SDKs that are using codgen use, to generate their clients
21:58:35FromGitter<zacharycarter> mrwonko: are you doing server side rendering? or are you just rendering HTML when an endpoint is hit on your webserver?
22:00:49FromGitter<zacharycarter> nevermind - I just checked out the project
22:02:48FromGitter<zacharycarter> Yardanico - can you explain what changed w/ case statements?
22:02:55FromGitter<zacharycarter> I'm interested
22:03:05FromGitter<zacharycarter> certain limitations have annoyed me
22:03:46*athenot quit (Remote host closed the connection)
22:04:04*athenot joined #nim
22:05:29*find0x90 joined #nim
22:07:55*athenot quit (Remote host closed the connection)
22:13:26FromGitter<zacharycarter> also: I work with some very confused people - I already knew that, but today made it so much more apparent
22:29:03*jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:30:53shashlick@zacharycarter - I see the json, interesting - how are you planning to use it? do you already have some functional code?
22:33:07*enthus1a1t joined #nim
22:34:56*enthus1ast quit (Ping timeout: 256 seconds)
22:35:40*vlad1777d_ joined #nim
22:38:12FromGitter<zacharycarter> shashlick: @Varriount wrote a bunch of code I'm using now
22:38:23FromGitter<zacharycarter> I think the plan is for us to work together on the SDK since we're co-located
22:38:58FromGitter<zacharycarter> so there's probably going to be starbucks or dunkin donuts Nim programming date in our futures
22:39:17FromGitter<zacharycarter> depending on what kind of coffee Varriount likes - if he even drinks coffee :P
22:48:09shashlick🙂 where you guys located?
22:48:37FromGitter<zacharycarter> Northern Virginia area, outside of Washington DC
22:49:27FromGitter<zacharycarter> I'm getting ready to put my house on the market and at the same time I'm looking for new work - so I may not be around here much longer
22:51:02dom96ooh nice
22:51:21dom96Take some selfies if you're not camera shy ;)
22:53:43FromGitter<zacharycarter> ahahaha will do:)
22:58:04FromGitter<zacharycarter> dom96: the discussion we were having a few nights ago about the cloud solution(s) my company wants us to move towards, and the tech they're pushing us to use to do it, made me think quite a bit about the situation.
22:58:44brainproxyin the final example code in manual section: https://nim-lang.org/docs/manual.html#statements-and-expressions-var-statement
22:58:53brainproxyshould `use x` be a comment?
22:59:01brainproxyor... what does `use` mean?
22:59:12FromGitter<zacharycarter> I definitely think it's a case of over engineering - not because the solutions that are being proposed and settled on are too complex for the problem domain, but because we don't fully understand problem domain, and are reaching for the most complex solution based on assumption
22:59:45FromGitter<zacharycarter> I don't think use is anything brainproxy
22:59:59dom96brainproxy: good question, haven't seen it in code though.
23:00:29dom96zacharycarter: interesting, so my intuition is at least partially right
23:01:35dom96brainproxy: Do report it on GitHub please
23:03:18kinkinkijkinI'm a little fuzzy on this, does variable assignments (not initiations) work with commas as well to set multiple variables to the same value?
23:03:46kinkinkijkinI need to set a large number of states at once and would like to reduce line count and source size
23:05:09FromGitter<zacharycarter> dom96: yes - I think it would make sense to first use a simpler solution rather than being like - okay we need kubernetes, and AWS and all these services - but I mean, things in the corporate world don't necessarily translate to sane logic
23:05:25FromGitter<zacharycarter> buzz words are powerful and so are blanket statements like - if we use x we can accomplish y
23:05:36dom96kinkinkijkin: no, that's only for tuple deconstructing
23:05:50FromGitter<zacharycarter> I've probably heard the word spinnaker thrown around at least ten times in the past week - and no one has set up any kind of spinnaker instance on any of our infrastructure yet
23:06:13FromGitter<zacharycarter> kinkinkijkin - you can do this
23:06:36FromGitter<zacharycarter> ```var ⏎ foo = "bar" ⏎ bar = "foo" ⏎ ...``` [https://gitter.im/nim-lang/Nim?at=5ab436fcc574b1aa3e213075]
23:06:55dom96This is the first time I hear of spinnaker
23:07:09FromGitter<zacharycarter> I really hate netflix at this point tbh
23:07:30kinkinkijkinthat's initialization
23:07:43FromGitter<zacharycarter> oh assignments you said
23:07:44FromGitter<zacharycarter> sorry
23:07:52brainproxydom96: will do
23:07:58kinkinkijkinI was wanting like
23:08:03FromGitter<zacharycarter> yeah I know
23:08:07kinkinkijkinisd, commandpart = true
23:08:09FromGitter<zacharycarter> var foo, bar = "blah"
23:08:28kinkinkijkinnot initial assignments
23:08:29FromGitter<zacharycarter> you can probably accomplish this with a macro
23:08:41FromGitter<zacharycarter> but I don't think multiple assignments work with Nim currently
23:08:49FromGitter<zacharycarter> as dom96 said
23:08:56FromGitter<zacharycarter> sorry - I misunderstood your question / read it too quickly
23:09:20kinkinkijkinconsidering the size of this program that won't be necessary, I'll just put the state assignments in sequence
23:09:31kinkinkijkinif it were a bigger program I would consider it
23:11:22*natrys quit (Quit: natrys)
23:19:14*WhiskeyNick joined #nim
23:19:34*MJCaley joined #nim
23:23:54kinkinkijkinif I'm using an FIFO as a filestream, will flushing flush the FIFO or just flush the internal buffer?
23:36:27*athenot joined #nim
23:41:21*WhiskeyNick quit (Ping timeout: 248 seconds)
23:47:23FromGitter<zacharycarter> kinkinkijkin: according to the docs - https://nim-lang.org/docs/streams.html#flush,Stream (flushes the buffers that the stream s might use) but it's hard to say w/o more specifics
23:47:51FromGitter<zacharycarter> you can always refer to the source too - https://github.com/nim-lang/Nim/blob/master/lib/pure/streams.nim#L62
23:48:53FromGitter<mratsim> That should be in the wiki somewhere: https://stackoverflow.com/questions/31367313/typed-vs-untyped-vs-expr-vs-stmt-in-templates-and-macros
23:49:46FromGitter<zacharycarter> yup
23:51:41kinkinkijkinhow do you reference a position in a seq?
23:51:51FromGitter<zacharycarter> https://blog.heroku.com/open-cli-framework - looks very similar to that one framework... oh yeah - http://yeoman.io/
23:52:00FromGitter<zacharycarter> just for CLI apps
23:52:05kinkinkijkinmyseq(x) or myseq[x] etc ?
23:52:07FromGitter<mratsim> yourseq[yourposition] unless I misunderstood
23:56:51*leorize joined #nim
23:59:29kinkinkijkinis openFileStream new since nim 0.16? I'm making a demon on my openbsd laptop and it's saying it didn't know what "openFileStream" means