<< 19-03-2018 >>

00:04:18*onionhammer1 joined #nim
00:06:21*onionhammer quit (Ping timeout: 264 seconds)
00:14:06*zarthur joined #nim
00:15:59zarthur@mratsim loopfusion looks sassy :-) Thanks!
00:16:52*arthurz quit (Ping timeout: 240 seconds)
00:21:23*MJCaley joined #nim
00:25:46FromGitter<mratsim> :)
00:31:46*yuicatpq joined #nim
00:31:49*yuicatpq quit (Client Quit)
01:03:11*leorize joined #nim
01:15:15*arecaceae quit (Remote host closed the connection)
01:15:39*arecaceae joined #nim
01:20:33*noonien quit (Quit: Connection closed for inactivity)
01:54:01*rauss joined #nim
02:15:58*rockcavera joined #nim
02:26:57*dddddd quit (Read error: Connection reset by peer)
02:51:29*MJCaley quit (Quit: MJCaley)
02:53:09*S1tiSchu joined #nim
02:56:33*SitiSchu quit (Ping timeout: 240 seconds)
03:13:01*SenasOzys_ joined #nim
03:13:05*SenasOzys quit (Read error: Connection reset by peer)
03:42:24*zarthur quit (Quit: Leaving)
03:52:49*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:14:41*endragor joined #nim
04:44:23*leorize quit (Quit: WeeChat 2.0.1)
04:51:50*smt` joined #nim
04:54:22*smt_ joined #nim
04:55:41*smt quit (Ping timeout: 256 seconds)
04:57:57*smt` quit (Ping timeout: 256 seconds)
05:00:35*smt` joined #nim
05:04:33*smt_ quit (Ping timeout: 264 seconds)
05:06:21*smt_ joined #nim
05:09:51*smt` quit (Ping timeout: 256 seconds)
05:16:23*SenasOzys_ quit (Remote host closed the connection)
05:23:01*smt` joined #nim
05:26:17*smt_ quit (Ping timeout: 256 seconds)
05:28:44*endragor quit (Remote host closed the connection)
05:28:56*endragor joined #nim
05:47:29*nsf joined #nim
06:04:37*r3d9u11 joined #nim
06:15:29*sklv1lq joined #nim
06:17:31*sklv1lq quit (Remote host closed the connection)
06:20:28*def- quit (Quit: -)
06:23:14*def- joined #nim
06:38:48*r3d9u11 quit (Remote host closed the connection)
06:53:48*rockcavera is now known as Guest62729
06:53:48*tiorock joined #nim
06:53:48*Guest62729 quit (Killed (livingstone.freenode.net (Nickname regained by services)))
06:53:48*tiorock is now known as rockcavera
07:01:01*smt_ joined #nim
07:01:26*smt_ quit (Max SendQ exceeded)
07:01:55*smt_ joined #nim
07:05:09*smt` quit (Ping timeout: 264 seconds)
07:06:25*smt` joined #nim
07:09:59*smt_ quit (Ping timeout: 256 seconds)
07:15:48*BitPuffin joined #nim
07:22:44*yglukhov joined #nim
07:33:03*smt_ joined #nim
07:37:05*smt` quit (Ping timeout: 248 seconds)
07:41:23*jaco60 joined #nim
07:42:00*rokups joined #nim
07:43:13*Arrrr joined #nim
07:51:59*smt` joined #nim
07:56:41*smt_ quit (Ping timeout: 276 seconds)
07:57:30*Vladar joined #nim
08:01:35*smt_ joined #nim
08:05:21*smt` quit (Ping timeout: 248 seconds)
08:07:39*smt` joined #nim
08:09:34FromGitter<alehander42> it looks great @mratsim
08:10:00*leorize joined #nim
08:11:46*smt_ quit (Ping timeout: 264 seconds)
08:32:15FromGitter<alehander42> can anybody take a look at https://github.com/alehander42/area42/blob/master/parser.nim and say if the dsl looks too magical/too confusing
08:32:50FromGitter<alehander42> @PMunch did you use special operators for `*`, `+` etc in your parser libs, or you had more obvious operation names defined
08:36:36*biatagar quit (Client Quit)
08:41:17FromGitter<survivorm> @alehander42 <- doesn't look intuitive
08:41:27*floppydh_ joined #nim
08:41:41FromGitter<survivorm> Also, no terminals in the example, only regexp
08:42:25FromGitter<survivorm> Why do you need left_paren and right_paren as builtins? They are just ordinal terminals AFAIK
08:43:13FromGitter<survivorm> Ah, my bad
08:43:24FromGitter<survivorm> You do have terminals in the example
08:43:42FromGitter<survivorm> but what's the meaning of :?
08:44:25FromGitter<survivorm> parsing rules vs grammar rules?
08:45:45FromGitter<survivorm> Also, why reinvent the wheel? I think PEG DSL is pretty simple as it is
08:46:25FromGitter<survivorm> And not magical :)
08:53:28*sendell joined #nim
08:54:20Araqalehander42: IMHO grammar"""custom syntax here""" is the way to go for a parser generator
08:54:52FromGitter<mratsim> btw Araq, was something sstarted on `for expression`?
08:55:11Araqotherwise it always gets messy; see 'scanp' the better 'scanf' nobody can document
08:56:14Araqmratsim: I had the syntax working in a branch but the sem'check and how to design it is rather hard
08:57:56FromGitter<alehander42> @survivorm thanks, great points
08:58:39FromGitter<alehander42> I use left_paren etc as constants, as I just don't find constants generally as more robust (I can type the cyrillic ( for example and I wouldnt see it), maybe they're too verbose for a grammar
08:58:46FromGitter<alehander42> I just find*
08:59:39FromGitter<alehander42> so, the meaning of : is that `field:<rule>` assigns the subnode of rule to field in the resulting node
09:00:18FromGitter<alehander42> e.g.
09:00:55FromGitter<alehander42> in `typeDefinition => leftParen "type" ws types:join(typ, ws) rightParen` you'll get in the resulting tree a variant object of kind `Node.TypeDefinition' with field `types` which is itself a seq of nodes
09:02:11FromGitter<alehander42> that way you can specify how exactly you want the resulting tree for a rule to look which was always hard for me with other parsers (I had to manually write another converter pass)
09:05:15*smt_ joined #nim
09:06:00FromGitter<alehander42> I can see the thing with scanp , but I think my dsl looks a lot as a normal grammar definition, with only prefix `*` `+` instead of postfix and the field `:` `<-` builders
09:07:01*dddddd joined #nim
09:08:21FromGitter<alehander42> so basically the only thing I would change in a custom syntax would be to put `*` `+` as postfix
09:09:06Araqhow do you get concatenation? that's the crucial syntactic element
09:09:09*smt joined #nim
09:09:21*smt` quit (Ping timeout: 264 seconds)
09:09:24Araqa b # a followed by b
09:09:36Araqa b | c d # what is the precedence?
09:09:51Araqa b
09:10:06Araq| c d # different precedence with a newline?
09:10:37Araqpostfix + and * are not important IMO.
09:12:44*smt_ quit (Ping timeout: 276 seconds)
09:15:59*PMunch joined #nim
09:17:09FromGitter<alehander42> I can completely side step the issue by requiring inline `or` to be always in `()`: 90% of the time you'd want to label it to include it in the result, so you'd need it anyway (`field:(A | B)`) or to just put it in another rule, and in the edge cases, you can still `(nl|indent)`
09:18:06FromGitter<survivorm> @alehander42 good point on precedence
09:18:23FromGitter<survivorm> but the issue with <- stands
09:18:37FromGitter<survivorm> is it eq to `/` in PEG?
09:19:16FromGitter<alehander42> no, `<-` is like my `:` but it's equivalent to `field.add(<node>)` in a loop
09:19:28FromGitter<survivorm> hm
09:19:32FromGitter<alehander42> I can just use `:` again, I thought it might be more clear with `<-`
09:19:38FromGitter<alehander42> example:
09:19:40FromGitter<survivorm> not good
09:20:13FromGitter<alehander42> `*(types <- Type ' ' args <- Arg)`
09:20:20FromGitter<survivorm> i'd better go as field:[(grammar rule)*]
09:20:31FromGitter<alehander42> yes, exactly, that was my first plan
09:20:43FromGitter<alehander42> but you can have more than one node sequences for one `*`
09:21:08FromGitter<alehander42> in this case I want to collect both types and args in two different sequences
09:21:13FromGitter<survivorm> Didn't understood your point
09:21:31FromGitter<survivorm> make an example, please
09:21:33FromGitter<alehander42> how would I express with your syntax
09:21:35FromGitter<alehander42> `*(types <- Type ':' args <- Arg)`
09:22:49FromGitter<survivorm> `smt:[types: Type ':' args: Arg]`?
09:23:07FromGitter<survivorm> cause you still need a root id for it
09:23:23FromGitter<survivorm> like rule.smt[0].types
09:23:42FromGitter<survivorm> Or i didn't understood the example
09:24:06FromGitter<alehander42> not always, If I need a root id, I'd move it to a new rule, but in this case I'd want to directly fill the main node fields
09:24:21FromGitter<alehander42> so I get `rule.types[0]` and `rule.args[0]`
09:24:41FromGitter<survivorm> it's either `rule.types[array], rule.args[array]`
09:25:12FromGitter<survivorm> Ah, i see
09:25:20FromGitter<alehander42> still I agree I can use `types: Type` etc as in your example
09:25:56FromGitter<alehander42> I just thought it might be more obvious with `<-` that one is adding each singular Type to a group of types and not *assigning* it
09:26:06FromGitter<alehander42> but it's not so obvious hahaha
09:26:26FromGitter<survivorm> but still. it would be better as `*(types:[Type] ':' args: [Arg])` i think
09:27:01FromGitter<survivorm> like default the array with [], and then go on
09:27:57FromGitter<survivorm> from there you may go into {} structures too
09:28:07FromGitter<survivorm> then time comes :)
09:28:17FromGitter<alehander42> actually I think `*([types]: Type ':' [args]: ..)`
09:28:46FromGitter<alehander42> might be better, as otherwise `[]` will look like it's a grammar rule, and it's a constsruction rule
09:30:25FromGitter<survivorm> Good point
09:31:35FromGitter<survivorm> But you may think of nested hash-structures, if you'll need any. And nested arrays too
09:31:53FromGitter<survivorm> but still, [] are more convenient
09:32:31FromGitter<survivorm> or else, is shoud look like types.append: Type
09:32:58*xkapastel quit (Quit: Connection closed for inactivity)
09:33:04FromGitter<survivorm> which may actually look even better
09:36:26*SenasOzys joined #nim
09:39:34FromGitter<mratsim> @Araq, is there a way to get if a symbol is `var` / mutable. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5aaf85567685a046389cc5da]
09:42:51*smt` joined #nim
09:43:14*huonw_ quit (K-Lined)
09:44:05*huonw joined #nim
09:46:23*smt quit (Ping timeout: 256 seconds)
09:46:43*Trustable joined #nim
09:48:10FromGitter<alehander42> @Araq @survivorm maybe a custom syntax is cleaner indeed, still I might do a first version with a macro
09:48:29*leorize quit (Remote host closed the connection)
09:50:52PMunchmratsim, I tried with a "when compiles(a=<something>)" but that always fails. Appears a isn't visible within the compiles check..
09:52:08FromGitter<mratsim> I guess we need a new magic then
10:08:29dom96alehander42: what macro are you working on?
10:10:07FromGitter<mratsim> @PMunch, vote for me: https://github.com/nim-lang/Nim/issues/7366 :P
10:10:25FromGitter<mratsim> I think he is trying to translate Russian to Nim
10:21:23FromGitter<alehander42> @dom96 a parsing/ast construction macro, but I'll probably turn it into a custom format after whole
10:23:39FromGitter<alehander42> @mratsim well I certainly wouldn't translate French to Nim, I am saving that for my middle age crisis :D
10:24:40FromGitter<alehander42> midlife ? I accidentally sent myself to the holy roman empire I think
10:27:56FromGitter<survivorm> I doubt. :) I think that's medieval, or, maybe, i'm wrong
10:29:44FromGitter<alehander42> but seriously, french seems so hard. ⏎ yeah, I still confuse middle age with midlife, because in bulgarian midlife is literally middle age and middle ages is "middle centuries" :D
10:30:22PMunchWell you would say a middle aged man
10:30:35PMunchSo it kinda makes sense in English as well
10:31:51PMunchAnd French isn't that bad once you know it
10:32:05PMunchBut it is a lot different from English and other germanic languages
10:34:13FromGitter<alehander42> I guess so, but it just seems harder to get into (and full of so many weird rules, e.g. the numbers, the pronuncuation)
10:34:38FromGitter<alehander42> do you know French?
10:35:18FromGitter<alehander42> e.g. Italian basics seem way more obvious to me
10:37:54PMunchYeah, I spent a year in Belgium. Plus I have some family in France so I actually get to use it from time to time
10:38:47PMunchThe numbers are a bit strange yeah. But they kinda fixed that in Belgium with some new words instead of the whole "4 times 20 plus 10" thing
10:39:25PMunchThe pronounciation as also super strange until you start to understand it. Can't really describe it but it makes sense once you know it
10:39:30PMunchMore or less at least :P
10:43:05PMunchBut yeah, I've heard that Italian is supposed to be easier to learn
10:45:36FromGitter<alehander42> :D I guess pronunciation is not more complicated than English, but I am just more used to it
10:46:18FromGitter<alehander42> interesting, glad that they're evolving the language in Belgium
10:50:22PMunchFrance is actually one of the few countries that has a prescriptive language counsel and not a descriptive one. Meaning that instead of seeing how the language is used and formalizing rules based on that, they set the formal rules and people are intended to follow them.
10:50:45PMunchSo I don't think they will be switching to the new words for the numbers any time soon :P
10:53:54FromGitter<alehander42> oh no, design by commitee
10:53:55FromGitter<alehander42> :D
10:54:17*smt joined #nim
10:56:22FromGitter<alehander42> that seems not optimal, I've always loved how natural languages constantly change bit by bit, and even updating the official "rules" & vocabulary often
10:56:30FromGitter<alehander42> even defended updating*
10:57:37*smt` quit (Ping timeout: 248 seconds)
11:02:01PMunchI'm a bit of a mix tbh
11:02:53*dddddd quit (Ping timeout: 256 seconds)
11:03:29*dddddd joined #nim
11:05:45*Snircle joined #nim
11:29:04zahary_guys, can I have some upvotes on this old question here:
11:29:04zahary_https://stackoverflow.com/questions/116654/non-c-languages-for-generative-programming/31678589#31678589
11:29:04zahary_Nim deserves to be on the top :)
11:30:51*smt quit (Ping timeout: 252 seconds)
11:37:35PMunchzahary_, the metaprogramming in Nim really is one of the best
11:37:46PMunchA least for a procedural language
12:03:05*leorize joined #nim
12:16:37*craigger quit (Quit: bye)
12:18:33*athenot joined #nim
12:19:08*craigger joined #nim
12:32:30*allan0 left #nim ("WeeChat 2.1")
12:34:52FromGitter<dandevelo> I am looking at the htmlgen sourcecode ( https://github.com/nim-lang/Nim/blob/master/lib/pure/htmlgen.nim#L98 ) and I am not sure I understand what e refers to. On one hand, e is used for the varagrs parameters and on the other hand the first line specifies: let e = callsite() How does that work?
12:41:47Araqit doesn't. the 'let e' shadows the varargs parameter
12:41:49*vlad1777d quit (Ping timeout: 260 seconds)
12:42:46Araqthis is just a hacky way of doing things. originally htmlgen used .immediate macros everywhere and 'callsite' is a workaround
12:44:14PMunchSo the varargs passed in is just ignored?
12:45:14Araqyup
12:48:00FromGitter<mratsim> @PMunch @alehander42 the 4x20 word for 80 was due to merchants, like we have dozens in English. The Swiss also have their own word (different from the Belgians …)
12:48:59PMunchAah, that makes sense
12:49:00FromGitter<dandevelo> @Araq It is interesting to me how the code actually works. I mean if I import htmlgen and do: echo h1(a(href="http://nim-lang.org", nim)) then it will output the proper thing
12:51:22PMunchWell Belgians use quatre-vingt for 80, but they have septante and ninante for 70 and 90 instead of soixante-dix and quatre-vingt-dix
12:51:39PMunchThey had a huitante as well, but no-one really uses that any more
12:51:50PMunchWhat do the Swiss use?
12:52:20PMunchdandevelo, Araq, yeah how on earth does that work?
12:52:21FromGitter<mratsim> They use “octante” ;)
12:53:26PMunchHuh, that also makes sense I guess
12:53:36PMunchBut do they still use septante and ninante?
12:55:56Araqlet e = callsite() # hack because the indexing starts from 1 and we were lazy in porting this code
12:56:25Araqwithout it, the indexing would start from 0. that's all there is to it, maybe check callsite's documentation
12:59:01PMunchOh right, callsite gives the AST. I've only used it with lineInfo to get the position of a call :P
13:11:54*Arrrr quit (Read error: Connection reset by peer)
13:22:51federico3https://luxeengine.com/ interesting?
13:23:57*SenasOzys quit (Ping timeout: 265 seconds)
13:25:03PMunchNever heard of it before but looks interesting
13:31:28*SenasOzys joined #nim
13:34:23FromGitter<survivorm> For now it looks like great words, but what's under the hood?
13:35:11Yardanicoc++
13:35:15FromGitter<survivorm> Even the screenshots on the main page are obsure
13:35:22Yardanicoand some unknown Wren language
13:35:30FromGitter<survivorm> Yeah
13:36:13FromGitter<survivorm> https://notes.underscorediscovery.com/game-engines-using-all-the-languages/
13:36:32FromGitter<survivorm> Oh. My. Eyes.
13:36:41FromGitter<survivorm> The link style is awful
13:36:53Yardanicowell it's more for #nim-offtopic :P
13:37:05FromGitter<alehander42> ah I hoped callsite can somehow show the ast around actual callsite , not only the invocation :D
13:37:07Yardanicobut yeah, it would be cool to see someone make nim bindings to this engine :P
13:37:26FromGitter<alehander42> but that wouldn't make sense anyway, there are many callsites
13:40:44FromGitter<survivorm> @Yardanico Let's see the engine itself in beta. At least. That may well be a dead child project. Let's wait and see if it's worth a candles.
13:40:59Yardanicoyeah, I'll sub to mail news
13:41:36Yardanicothey have alpha src - https://github.com/underscorediscovery/luxe
13:41:39FromGitter<survivorm> We may hope you'll play with it then it gets a beta release?
13:42:01FromGitter<survivorm> May be it would be a killer-engine :)
13:42:29YardanicoNot really, I'm not into game development :)
13:44:01FromGitter<survivorm> 4 years and still in alpha... not very promising
13:44:19FromGitter<survivorm> and only one active contributor
13:44:43Yardanicowell, you know, not all projects have a lot of main contributors :D
13:45:04*DarkArctic_ joined #nim
13:45:35FromGitter<survivorm> That's true
13:45:53FromGitter<survivorm> But i'm more about 4 years to alpha
13:46:11FromGitter<survivorm> It may not mean anything, but still
13:46:21FromGitter<survivorm> It's a little concerning
13:47:14dom96You could say something similar about Nim... :)
13:47:17*fvs joined #nim
13:47:31Yardanicoyeah, 1.0 could be released years ago
13:47:34*DarkArctic quit (Read error: Connection reset by peer)
13:47:59*DarkArctic__ joined #nim
13:48:03Yardanicobut I mean it's good that it wasn't released in 2015
13:49:20FromGitter<survivorm> You know, Nim situation is pre-prod for years, in my opinion
13:50:01FromGitter<survivorm> It's more about the perfection which Araq is trying to acheive
13:50:42FromGitter<survivorm> But i've got your point. Alpha may be even production ready
13:50:56Yardanicoyeah, we can have 18.0 instead of 0.18.0 :D
13:51:08FromGitter<survivorm> It's more about self-esteem
13:51:15YardanicoA lot of projects use semver now, for example browsers
13:51:28federico3it's like TeX version number converging to π
13:51:45*DarkArctic_ quit (Ping timeout: 256 seconds)
13:51:50FromGitter<survivorm> Personally, i preferred FF than it was 3.5
13:52:07FromGitter<survivorm> and not 60.x
13:52:15fvshow does nim know where lib files are? Is this hard coded in compiler: ../lib
13:52:33Yardanicofvs, you mean .dll or .so or .dylib?
13:53:05fvsno, all the *.nim in /lib
13:53:30Araqfvs: it's --lib and --path in your config
13:54:11dom96https://github.com/nim-lang/Nim/blob/devel/compiler/options.nim#L236
13:54:29dom96That's the code that finds the stdlib
13:54:38*leorize quit (Quit: WeeChat 2.0.1)
13:55:22Yardanicoyeah, if you want you can write your own stdlib for niw :D
13:55:28fvsahh, good t know - thanks
13:55:36Yardanico*nim
13:56:55FromGitter<ChristianWitts> That’s a really old alpha of Luxe, written in Haxe. The new version coming out soon is in C++, with Wren as the scripting language (basically Lua) although I would have been tempted to use terra-lang instead of Wren if it were my project
13:58:32Yardanicoaccording to main contributor we will be able to easily add new languages
14:00:01Araqterra-lang, is that usable? :-)
14:00:24Araqhas a most interesting design but it felt like "hmm I doubt this works out" :)
14:02:20fvsfound an issue when compiling terminal.nim for android i.e. reference ctermid not found - this was for android 4.4, not sure if this is still an issue for 8.0. Howto issue pull request: when defined(android4)?
14:03:19Araqfork Nim, push to your fork, use the github UI to create a PR from your fork
14:06:15*qleda joined #nim
14:08:57Yardanicofvs, did you compile it to plain android?
14:09:03YardanicoI mean without terminal environments like termux?
14:12:30*SenasOzys quit (Remote host closed the connection)
14:14:13*SenasOzys joined #nim
14:14:56*smt joined #nim
14:15:50*ycavirp521 joined #nim
14:16:29*ycavirp521 quit (Client Quit)
14:17:05fvsYardanico: nim c --cpu:arm -os:android
14:17:12Yardanicofvs, ah, like this
14:24:09*endragor quit (Remote host closed the connection)
15:01:07*DarkArctic__ is now known as DarkArctic
15:04:08*jddgzry quit (Client Quit)
15:04:35*jxy quit (Quit: leaving)
15:07:27*jxy joined #nim
15:13:57*dddddd quit (Ping timeout: 240 seconds)
15:14:46*dddddd joined #nim
15:30:54*hoijui joined #nim
15:32:04*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:38:24hoijuii just read about nim, looks cool! :-)
15:38:56hoijuii installed nim, and tried to install aporia through nimble, but both stable and #head failed
15:39:03hoijuiis that known?
15:40:47PMunchI think so. Aporia isn't being developed that actively any longer
15:41:08PMunchMost people seem to use VSCode, but you can use pretty much anything
15:41:14PMunchI for one use Vim :)
15:41:39FromGitter<alehander42> yeah, I use sublime and it also works fine for Nim
15:43:13hoijuiook :-)
15:43:43hoijuiwould be good to ... somehow reflect that online
15:44:01PMunchThat Aporia doesn't build, or that you can use pretty much any editor
15:44:02hoijuias of now, newbs lik me will probably mostly end up with aporia
15:44:24hoijuii mean.. it shoudl not like.. be on top of the list
15:44:32hoijuiof Nim IDEs
15:44:41PMunchdom96 ^
15:44:42hoijuii think i saw it in two places
15:45:14dom96where is it on the top of the list?
15:47:24hoijui.. am searching.. cant find that tab anymore...
15:50:31*nsf quit (Quit: WeeChat 2.0.1)
16:04:36*rbrt joined #nim
16:25:00*miran joined #nim
16:26:56*rbrt quit (Quit: Oíche mhaith)
16:33:15*qleda quit (Ping timeout: 256 seconds)
16:34:17FromGitter<alehander42> argh I had a frustrating bug with
16:34:27FromGitter<alehander42> `proc (.. view=proc(value: T): VNode .. )`
16:34:32FromGitter<alehander42> instead of `view: proc(..)`
16:35:01FromGitter<alehander42> it would be great to somehow have a better error msg for that (as it doesn't make sense to have arg=proc type anyway)
16:35:27FromGitter<alehander42> now one just gets type mismatch which looks impossible if you don't see `=`
16:36:17FromGitter<alehander42> where should I look for that? I might do a PR
16:37:18*athenot joined #nim
16:40:36FromGitter<narimiran> @mratsim are you here maybe?
16:44:27dom96alehander42: use --verbosity:3 to get a stack trace in the compiler
16:44:35dom96it will show you where the current error message is generated
16:44:38Araqoh thanks for reminding me
16:44:40dom96and should allow you to improve it
16:45:24FromGitter<alehander42> @dom96 good idea, thanks
16:46:02FromGitter<alehander42> @Araq btw have you used generic VNode creating procs with karax until now? I always get expected nnkIdent error
16:49:20FromGitter<alehander42> it seems if I add nnkSym and nnkOpenSymChoice in getName , it can compile
16:49:35FromGitter<alehander42> does this have any cons?
16:53:15Araqalehander42: I doubt that's a complete solution but it doesn't have any cons
16:59:53FromGitter<alehander42> ok
17:00:16*nsf joined #nim
17:07:02*yaiyan quit (Quit: ZNC - 1.6.0 - http://znc.in)
17:09:34*xkapastel joined #nim
17:10:57*smt quit (Ping timeout: 248 seconds)
17:11:49*PMunch quit (Quit: Leaving)
17:14:12*yglukhov quit (Remote host closed the connection)
17:14:45*yglukhov joined #nim
17:20:33*floppydh_ quit (Ping timeout: 248 seconds)
17:30:17*NightMonkey879 joined #nim
17:33:20*NightMonkey879 quit (Remote host closed the connection)
17:44:53*sendell quit (Remote host closed the connection)
17:54:59*smt joined #nim
17:56:41*noonien joined #nim
17:57:53*SenasOzys quit (Ping timeout: 240 seconds)
18:10:03*yglukhov quit (Remote host closed the connection)
18:10:09*dddddd quit (Ping timeout: 256 seconds)
18:10:15*yglukhov joined #nim
18:10:48*dddddd joined #nim
18:13:23*SenasOzys joined #nim
18:20:32*fvs left #nim ("ERC (IRC client for Emacs 25.3.1)")
18:26:06*natrys joined #nim
18:34:00Araqaporia.nim(1186, 37) Error: illegal capture 'currentPage' because 'toggleSingle' has the calling convention: <cdecl>
18:35:42Araqthe compiler is correct, Aporia's code was wrong
18:42:52Araqdom96, alehander42: 'koch temp' produces a stack trace without the annoying verbosity level
18:51:47*SenasOzys quit (Remote host closed the connection)
18:54:43*SenasOzys joined #nim
19:01:30*rbrt joined #nim
19:11:41*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:14:11dom96Araq: hah, you improved the error message just for Aporia? :)
19:14:39Araqtold you I would do it.
19:15:03Araqerror messages and removing crashes are the plan for v1
19:15:49Araqalso other people complained about this error message before
19:15:53dom96so can I make toggleSingle a {.closure.}?
19:15:59*rbrt quit (Quit: Oíche mhaith)
19:16:04dom96or are closures not allowed inside cdecl functions?
19:16:07Araqdidn't try it but yeah, that should work
19:16:19dom96why did it work before then?
19:16:21Araqor maybe remove the .push cdecl and add it where required
19:16:39Araqbefore the compiler silently changed the calling convention from cdecl to closure
19:17:12Araqwhich would be ok for Aporia but resulted in bugs for others
19:18:24dom96i see
19:24:40*miran quit (Quit: Konversation terminated!)
19:29:24*DarkArctic_ joined #nim
19:33:22*DarkArctic quit (Ping timeout: 264 seconds)
19:34:52*sysrqb523 joined #nim
19:36:53*sysrqb523 quit (Remote host closed the connection)
20:02:08*athenot joined #nim
20:04:54*rbrt joined #nim
20:05:18*DarkArctic_ is now known as DarkArctic
20:17:44*PMunch joined #nim
20:27:24shashlickso the nims documentation says only four modules are available - strutils, ospaths, math and distros
20:27:55shashlickare there a test cases for that?
20:27:57shashlickalso, seems like portions of some other modules also work
20:28:20*mrwonko joined #nim
20:28:39Araqshashlick, travis.yml has a nimscript test iirc
20:28:58Araqof course many other things also work if they don't use the FFI
20:29:06mrwonkoHi, what's the proper way to share source snippets here?
20:29:47shashlickhttps://play.nim-lang.org/ gists work well
20:30:40mrwonkookay, nevermind, while trying to figure out a minimal example I realized where I went wrong
20:30:51shashlickaraq: I presume the same restrictions apply to macros also?
20:31:08Araqyup
20:32:01shashlickis there anything to do to enable more modules to work besides ffi enablement?
20:33:22mrwonkoI had a set of a pure enum and accidentally did {SetType.EnumValue}, and the first error I saw was "type mismatch: got <set[range 0..65535(int)]> but expected 'Flags = set[Flag]'", which confused me. But then there were 4 other errors I did not initially see that explained the actual issue.
20:33:38PMunchmrwonko, pretty much any paste site is good. But as shashlick said play.nim-lang.org is probably the best one for Nim specific stuff
20:34:00mrwonkoI was not aware of play.nim-lang.org, so that's good to know for future issues
20:34:29FromGitter<zetashift> play should be featured on the main landing site imho
20:35:20PMunchAgreed
20:36:11PMunchMaybe a "Try online" button next to the code snippet with a hard coded link to that snippet
20:36:42PMunchWe really should get around to making something like this as well: https://tour.golang.org/welcome/1
20:36:48mrwonkofor the record, what I tried was https://play.nim-lang.org/?gist=e609c6c728d4cbf8751f0cf618d4df0e and the errors I got in Visual Studio Code were less helpful than the one on the website.
20:37:11shashlicklooks like nimscript supports a bunch of modules but the docs page is only showing 4
20:38:15shashlickper the test script: algorithm base64 colors hashes lists math options ospaths parseutils deques sequtils strutils subexes tables unicode uri macros
20:38:45shashlickof course, it's just importing those modules to see if it works, no actual usage test cases
20:39:05dom96mrwonko: Flags(1) should work too. 'cast' is unsafe (you can cast anything to anything, even if it definitely incorrect)
20:39:59dom96(Just a side note)
20:40:11mrwonkodom96: interesting. In the original context, my input is a byte array, and without the cast I get "type mismatch: got <byte> but expected 'Flags = set[Flag]'"
20:43:14*tefter quit (Remote host closed the connection)
20:44:07mrwonkoI only just started learning Nim last week, there are a lot of things I already like about it. Some of the error messages aren't quite as clear as I'd hope, but nothing critical so far. Want me to share some my thoughts so far?
20:44:33dom96Always :)
20:44:40*yglukhov quit (Remote host closed the connection)
20:46:25mrwonkoI have a background primarily in C++, although never professionally. For my job I write Go and I have experience with Python and a little Pascal, too, plus some Lua and assorted other bits and bobs. I feel like Nim caters a lot to the C++ audience, which I like.
20:46:54mrwonkoIt means the language is a pretty complex beast, but I enjoy mastering complex languages, and a lot of knowledge transfers.
20:47:22FromGitter<AjBreidenbach> I feel like nim is a pretty good mix of pascal, python, and c++
20:47:58shashlickaraq: is it worth expanding the list of working modules mentioned in nimscript?
20:48:03mrwonkoAgreed, AjBreidenbach, and I'll get to finally write some macros. I never got around to learning a Lisp.
20:50:13mrwonkoI've been wondering about parameter passing, particularly whether it's pass by copy or (immutable) reference. Since changing parameters is disallowed, I assume the compiler may choose to do the latter, but it wasn't quite clear, so my inner control freak is a little worried about performance.
20:51:56mrwonkoI tried to find out how to read environment variables, and the os module states "This module contains basic operating system facilities like retrieving environment variables", but then the actual proc definition was hidden inside ospaths, which took me a while to figure out. I did not realize imports were transitive.
20:54:48mrwonkoI'm implementing a network protocol, so I need to handle byte orders. However the endians module is practically entirely undocumented. I opted to just do manual bitshifting, which is probably easier to read anyway, but wasn't clear on operator precedence between shl and or. I used parens to be safe, which again is probably a good idea regardless.
20:55:31dom96modules can export other modules
20:55:40dom96and yeah, it catches me out still as well
20:55:43dom96it's a recent change
20:56:00dom96The doc gen needs to be fixed for this I think
20:56:09dom96and include links to procs/types that are re-exported
20:57:39mrwonkoOne thing the endians package shares with asyncnet is pointer arguments. I think I can just pass anything there using the `addr` operator, but that feels somewhat unsafe to me. In particular I'm reading into a byte array from a socket with recvInto. Not being able to sizeof an array type is a little weird, though I understand the general restrictions regarding compile-time sizeof on types.
20:58:27mrwonkoI ended up using a constant for the size and defining the array type as type `RawFrameHeader = array[0..frameHeaderSize - 1, byte]`, where I tried using the `0..<frameHeaderSize` syntax to no avail.
20:59:10dom96Anything that uses 'ptr', 'pointer', 'addr', 'cast' is unsafe
20:59:36dom96In fact, I've been meaning to deprecate that asyncnet function and replace it with a safer alternative
20:59:48FromGitter<zetashift> @PMunch, me too! I think this needs to come from us, not sure how to go at it, embed the playground then check if it compiles and asserts correctly?
21:00:10mrwonkoI don't like exceptions for error handling, although the effects system seems to go a long way towards making them type safe, and wrote an Either type instead. Oh, yeah, I have some background in Haskell, too. Mostly from University. I was a little disappointed how rarely the generic types could be inferred…
21:00:11PMunchzetashift, the playground has a simple HTTP interface
21:00:22PMunchSo it's basically just a matter of writing the text
21:00:59PMunchhttps://github.com/zacharycarter/nim-playground/blob/master/src/nim_playground.nim#L114
21:01:18dom96zetashift: PMunch: first point of call will be to simply try copying the Golang tour website, wouldn't be surprised if it's open source ;)
21:02:08FromGitter<zetashift> We could divide it in a "Basics" section, "Advanced" section and probably how Nim deals with concurrency just like in the book
21:02:14dom96Hrm, just got an idea. How about we make the documentation generator separate safe and unsafe procedures?
21:02:21mrwonkoThe documentation made it sound like converting an integer to an enum type fails if the value is out of range, but did not specify what exception it would raise (through experimentation I determined it to be a RangeError) or whether it will also be detected in release builds.
21:02:30dom96So any procedure taking a 'pointer' isn't mixed in with the safe procedures?
21:03:18mrwonkoI really like how the standard library is separated into pure and unpure modules. I want to be able to statically compile my code and put it into a scratch docker image, so I appreciate being able to do that easily (and having an official(?) docker image to cross-compile in)
21:03:59mrwonkoI get compile warnings about a loadLibrary somewhere in system that I can't seem to easily get rid of, but I figure as long as I don't call the corresponding function I'm clear.
21:04:35mrwonkoOh, and I was a little disappointed that the compiler can't generate an == function for case types.
21:05:31PMunchdom96, safe and unsafe?
21:05:45PMunchOh right, I guess that makes sense
21:05:50dom96https://github.com/nim-lang/Nim/issues/7372
21:06:03*DarkArctic_ joined #nim
21:06:21PMunchmrwonko, what do you mean?
21:06:44mrwonkoPMunch: regarding == functions?
21:07:07PMunchYeah
21:08:11mrwonkomy test asserts would not work without this explicit comparison: https://play.nim-lang.org/?gist=d273c0b39e63318db6c95dd52d4462e5
21:09:17mrwonkohmm thinking about it I should probably not mark that as noSideEffect, because I'm calling == on the generic types, artificially restricting them
21:09:27*DarkArctic quit (Ping timeout: 240 seconds)
21:10:03mrwonkoI think noSideEffect automatically propagates anyway, and the explicit annotation is merely a way of making sure?
21:10:05*athenot_ joined #nim
21:10:56*athenot quit (Ping timeout: 255 seconds)
21:11:35PMunchAh right
21:11:38PMunchI see what you mean
21:17:50FromGitter<HonzsSedlomn> Hello. Is there any to how can I reproduce it in Nim? ⏎ ` ⏎ void Matrix::allocSpace() ⏎ { ⏎ ... [https://gitter.im/nim-lang/Nim?at=5ab028fe35dd17022e7a30d4]
21:18:09FromGitter<HonzsSedlomn> *any way
21:19:45FromGitter<HonzsSedlomn> Oh.. I.. eh.. I forgot that there is a "var" option.. :D
21:19:53FromGitter<HonzsSedlomn> Damn python habits
21:20:07FromGitter<HonzsSedlomn> and c++
21:21:16FromGitter<HonzsSedlomn> Am I right that I can work with variables which are not signed with "*" in one file?
21:22:36*rokups quit (Quit: Connection closed for inactivity)
21:22:56mrwonkoI'll continue to play around with Nim, maybe try out the javascript backend. It's very cool that you have that! I've been looking for a language that I can compile to a static, efficient binary in the backend and share code with the frontend (without getting 5MB JS and being a pain to compile (looking at you, GHCJS)) that is fun to work with. Maybe I've found it. :-)
21:23:02*BitPuffin quit (Remote host closed the connection)
21:23:45mrwonkoAfter that, if I still like it, I might try contributing to the compiler, maybe try adding the missing generic type inference I criticized earlier ;)
21:23:46dom96In case you need a good example of this: https://github.com/dom96/snake :)
21:23:52Araqhi, mrwonko, welcome
21:24:13Araqwhat error message is confusing? I happen to work on them
21:25:30shashlickdom96: what's the nimble package structure for a binary with multiple nim source files? my nim CLI editor isn't installing
21:25:31shashlickhttps://github.com/genotrance/snip
21:26:02dom96what error are you getting?
21:26:06shashlickit builds fine but Error: unhandled exception: Is a directory [OSError]
21:26:33dom96That's because it's trying to create a 'snip' binary in 'src'
21:26:44shashlicki suspect on linux, it tries making a binary snip in the src directory whcih already has a snip folder
21:26:51dom96just specify `binDir = "bin"` in your .nimble file
21:27:12*hoijui quit (Ping timeout: 240 seconds)
21:28:05shashlickbut docs say default binDir = root, where nimble file is
21:28:55shashlickanyway, even after setting it, it isn't working - same error
21:28:59mrwonkoAraq: The error I initially mentioned is apparently only in the VSCode integration, the actual compiler is more helpful. Here are the errors VSCode gave me: https://gist.github.com/mrwonko/f99e6ba0356decd0e29a05696f56783f I don't remember the other errors I encountered last week, sadly.
21:30:39PMunchIs there a way to pass an argument to a macro as a pragma, ref: https://nim-lang.org/docs/manual.html#macros-macros-as-pragmas
21:30:49dom96shashlick: that will only solve it if you run `nimble build`
21:31:02PMunchI would want to do something like "proc p() {.m: something.}"
21:31:17*mrwonko quit (Quit: mrwonko)
21:31:22dom96shashlick: IMO this is Nim compiler issue, report it
21:31:32shashlickso what do I need to do to enable install
21:31:43dom96installation should work
21:33:33shashlickweird, i renamed src/snip to src/snippkg and even then I get the same error
21:33:44FromGitter<mrwonko> Anyway, thanks for the help and listening to my thoughts, I think I'll pop in here more often. See you later. :)
21:33:45shashlickhow do I get verbose output during nimble instal
21:33:59dom96--verbose or --debug
21:34:05*Trustable quit (Remote host closed the connection)
21:35:02*nsf quit (Quit: WeeChat 2.0.1)
21:38:27shashlickhere's the actual error
21:38:28shashlickCopying file /snip/bin/snip to ~/.nimble/pkgs/snip-0.1.0/snip
21:38:29shashlickError: unhandled exception: Is a directory [OSError]
21:38:57shashlickfor some reason, it has copied the stuff inside src/snip to the pkgs dir and then finally trying to copy the bin file
21:39:41dom96I guess it still creates the directory even if there is nothing to copy in there
21:39:45dom96that's a bug :(
21:40:04dom96You should be able to work around by writing skipDir = @["snip"] though
21:42:57shashlickworked! well, I had skipExt = @["nim"] but I had some other files in the src as well which were getting copied in
21:43:33shashlickby default, nimble should not copy anything in src if bin = ""
21:43:46dom96agreed
21:43:56dom96It's a breaking change, but I will make it
21:46:12PMunchThoughts? https://github.com/nim-lang/Nim/issues/7369#issuecomment-374390030
21:46:18shashlickcool
21:48:13FromGitter<mratsim> @miran, I’m back
21:48:49FromGitter<mratsim> @mrwonko Welcome to Nim, sizeof of compile time object/arrays is pending a PR.
21:49:41FromGitter<mratsim> Primitive types are passed by copy (int, etc) array and struct are passed by copy if they contain less than 3 primitives type and by immutable reference otherwise
21:52:54FromGitter<mratsim> Endianesss is definitely undocumented, there are some trick to deal with it: use when inside the type to change the order of things at compile-time, example: https://github.com/status-im/mpint/blob/8b8f2a55c41b900c2ebec08bb9019d4fb221f11a/src/uint_type.nim#L12-L15
21:53:30FromGitter<mratsim> Endian independant preocessing: https://github.com/status-im/nim-eth-keys/blob/74bdca4f1c5b8476be0f279aa7a3c66f22f7e47a/src/private/lowlevel_types.nim
21:53:51Araqoh look, Nim is getting borrow checking https://github.com/nim-lang/Nim/issues/7373
21:56:43dom96Why do we need new language feature to fix this issue? :(
21:56:55Araqwe don't
21:57:08Araqmaybe I phrased it poorly
21:57:27Araqthere is no new syntax, the compiler simply gets more restrictive
21:57:43Araqbut the stdlib is not affected
21:58:25FromGitter<mratsim> issue 124, wow
21:58:30dom96Yes, it's a little confusing to see new syntax being proposed so early in that issue message
21:58:46dom96I'd suggest separating it into clear headings
21:58:52FromGitter<mratsim> `var T scope container`. Talk about scary
21:59:10dom96even the title is scary, `lent T`?
21:59:34*Vladar quit (Quit: Leaving)
21:59:55FromGitter<mratsim> he talks about it in the wiki
22:00:03FromGitter<mratsim> it’s inverse-borrowing
22:00:22Araqer
22:00:32Araqhow do I make a heading in a github issue?
22:00:34FromGitter<mratsim> lend -> lent
22:00:38FromGitter<mratsim> ##
22:00:42dom96Araq: it supports markdown
22:00:43FromGitter<mratsim> \#
22:02:40PMunchAnother weird feature request from my wishlist. If a proc has a var parameter (maybe only the first) and no return type add an implicit return on that parameter with discardable
22:03:02PMunchWould make it possible to chain all such procedures
22:03:16Araqto chain, use a macro
22:03:50Araqunless you are talking about some other RFC that turns 'result: var T' void procs into expression procs
22:03:58PMunchBut then you'd have to write a macro..
22:04:07Araqohh poor boy :P
22:04:31PMunchHaha, I said it was a bit of a weird one
22:04:39Araqone macro vs messing up every single proc in order to support "chaining"
22:05:09Araqwhich is something I never need to do for some reason
22:05:18PMunch"proc(x: var something)" should turn into "proc(x: var something): var something" and return x
22:05:30Araqthat's crazy talk
22:05:40PMunchNot really messing them up if the result is discardable
22:05:58FromGitter<cavariux> PMunch, so you would save not typing the return type haha?
22:05:58Araqdiscardable results don't work well with type inference to begin with
22:06:03PMunchAnd I guess chaining is something I've grown to use quite a bit from my functional use
22:06:04Araqthey are not to be embraced
22:06:13FromGitter<mratsim> `iterator mzip(container1: var C1, container2: var C2): (var C1, var C2) =`
22:06:16FromGitter<mratsim> :P
22:06:40PMunchcavariux, well it's easy enough to do in your own code. I was more talking about other code that doesn't do it
22:06:43FromGitter<mratsim> messed up the signatur
22:07:26*tefter joined #nim
22:07:44Araqbah
22:07:47FromGitter<cavariux> Oh well, PMunch I think
22:07:49Araqa good one.
22:08:03Araqiterators support tuples with 'var T' in it
22:08:18Araqbut it's still derived from the first parameter. well
22:08:22FromGitter<cavariux> Araq I whinkt that PMunch refers that you can't chain functions even if they return the arguments example
22:08:40Araqwe could derive it from the first 'var' parameter instead
22:08:56Araqbut proc foo(x: ref T): var X seems quite plausible
22:09:02FromGitter<mratsim> One macro to rule them all and in the darkness bind them
22:09:08PMunchcavariux, oh no. You can if it was defined to return the argument. But most of these procs aren't defined that way
22:09:08FromGitter<cavariux> oh, you can you just have to discard
22:10:42FromGitter<cavariux> then I don't understand what you are tying to achive .-.
22:11:04AraqPMunch smoked too much C++
22:11:12FromGitter<cavariux> Araq, is there any knon bug with the mingw compiler with IOError?
22:11:14*rockcavera quit (Remote host closed the connection)
22:11:33AraqVSCode's integrated terminal produces IOErrors
22:11:53FromGitter<cavariux> Ohhh, thank goodness I thought I was going crazy haha
22:11:57Araqmaybe they will fix it at one day.
22:12:22PMunchHaha Araq, I don't even particularly like C++. I think I got it from functional languages where everything returns something and you don't really have variables.
22:12:38PMunchOh well, I'm off to bed
22:12:40*PMunch quit (Quit: leaving)
22:12:43FromGitter<mratsim> Speaking about C++, am I the only one annoyed but C++ reraising Nim exception? https://github.com/nim-lang/Nim/issues/6512
22:13:01Araqreturning what you already "know" is not very FP like IMO.
22:13:58Araqmratsim: I fixed that for v0.18.
22:14:07Araqnot sure why it's still a problem
22:14:19FromGitter<mratsim> ah, will test, it’s still open though
22:15:06FromGitter<cavariux> Araq, since 0.18 when I try to parse an array to string using $ if I don't manually define the number of the array I get that the function is ambiguos because it can use the system array to string :/
22:15:38FromGitter<mratsim> “You shall not parse"
22:15:54Araqmratsim: works for me
22:16:01FromGitter<mratsim> works for me too
22:16:14FromGitter<mratsim> I think you messed up the commit description that’s why it’s open
22:16:48Araqcavariux: I am not following you
22:17:06Araqis your $ so much better than the builtin one?
22:17:24FromGitter<mratsim> I have found a datarace in Github
22:17:27Araqmratsim: iterator mzip(container1: var C1, container2: var C2): (var C1, var C2) # so what do you propose?
22:17:30FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/jdiq/2018-03-19_23-17-12.png)
22:18:16Araqfirst var T derives from the first parameter, second from the second?
22:18:40Araqand what's wrong with
22:18:57Araqproc getX(c: var Container): var X from c ?
22:18:59FromGitter<cavariux> Well, it just gives it style hahaha, I'm making some vectors for a project but when I do ```proc `$`(v: Vec): string``` Vec[R, T] of type array[R: static int, T]
22:19:09FromGitter<cavariux> It gives me ambiguos call with the system built in array to string
22:19:10FromGitter<mratsim> @Araq I don’t know about the constraints to be honest, what if you want to implement a “flip”
22:19:28FromGitter<mratsim> `from` is definitely better than scope
22:19:30FromGitter<cavariux> I have to manually put ```proc `$`*T (vec: Vec[1, T] | Vec[2, T] | Vec[3, T] | Vec[4, T]): string =```
22:19:31FromGitter<cavariux> so it works
22:20:04FromGitter<mratsim> @cavariux, make your Vec a distinct type or wrap it in an object
22:20:07Araqcavariux: sounds acceptable to me
22:20:49FromGitter<mratsim> actually we probably should put that in a tutorial somewhere (hint to the hash RFC) ;)
22:22:10FromGitter<cavariux> mratsim I have some wrappers Vec1, Vec2, Vec3, Vec4, and they all have their int32, uint32 and float32 variations
22:24:49FromGitter<mratsim> Like in nim-glm? Why can’t you use generics?
22:25:23FromGitter<cavariux> oh, because I'm using it to interact with opengl so I have to use c types
22:25:53FromGitter<cavariux> but I found the solution I just had to add [R, T] instead of only [T]
22:28:50*natrys quit (Quit: natrys)
22:36:01*vlad1777d joined #nim
22:37:46Araqmratsim: so what do you propose?
22:38:25AraqIMO 'var T from parameter' is quite nice for this niche case
22:38:42FromGitter<zacharycarter> hai gais
22:39:14FromGitter<zacharycarter> @cavariux - Nim glm can be tossed to opengl too fyi
22:39:49FromGitter<cavariux> @zacharycarter but I want to build my own T_T
22:40:01FromGitter<cavariux> well I already did, just addig more procedures
22:40:12FromGitter<zacharycarter> cool :)
22:40:21FromGitter<cavariux> yey @zacharycarter aproves hahaha
22:41:11FromGitter<zacharycarter> haha - hey I'm small fries in this community - I have like zero language contributions
22:41:30FromGitter<zacharycarter> I hope to fix that eventually but for now I mostly focus on building things with Nim rather than helping out with it
22:41:57FromGitter<zacharycarter> and nothing I've built so far has been that great - but hopefully I will also remedy that eventually :D
22:42:15FromGitter<AjBreidenbach> I think building stuff indirectly helps
22:42:39FromGitter<zacharycarter> I'm starting to get serious about working on this AWS SDK - I think in order for Nim to be viable in the enterprise, it's going to need a cloud provider SDK
22:42:42FromGitter<cavariux> dude, Frag and Zengine are awesome, it was one of the things that finally made me decide to switch my hobbie proejcts to Nim
22:42:49FromGitter<zacharycarter> thank you :D
22:43:23*arecaceae quit (Remote host closed the connection)
22:43:27FromGitter<zacharycarter> I think as a community - we need to try to focus our efforts on attracting enterprise users
22:43:46*arecaceae joined #nim
22:43:51FromGitter<zacharycarter> that's the key, IMO, to Nim's popularity taking off
22:44:10FromGitter<cavariux> I agree, I think we need the Rails in Ruby of Nim
22:45:02FromGitter<cavariux> (Not literally Ruby on Rails) I mean we need a library or something that calls enterprise attention
22:45:17FromGitter<zacharycarter> well... while I think Nim webdev still has a ways to go especially in terms of DB support and jester improvements, I think that side of things is much better off than being a viable alternative to Goang, Python or NodeJS if you're going to the cloud
22:46:17FromGitter<zacharycarter> for instance - right now, it's not really possible to write code targeting any AWS / GCP / Azure services w/ Nim
22:46:38FromGitter<zacharycarter> if any businesses are going to consider using Nim - that needs to change
22:46:47FromGitter<cavariux> Really? Couldn't you make http calls to their apis?
22:47:05FromGitter<zacharycarter> why would you want to do that when you could write against a SDK in another language?
22:47:16FromGitter<cavariux> Good point
22:47:33FromGitter<zacharycarter> right now I'm writing everything in Go at work and I don't like Go
22:47:46FromGitter<zacharycarter> I like Python better, but I also don't want to maintain Python
22:48:04FromGitter<zacharycarter> especially not with co-workers
22:48:08FromGitter<cavariux> Rust is the only big competitor I see for Nim
22:48:29FromGitter<cavariux> In terms of how good they are, the others are more enterprise needed than anything else
22:48:46FromGitter<zacharycarter> I think Nim can destroy Rust in adoption - if the ecosystem was there
22:49:03FromGitter<zacharycarter> Nim has soooooo much less friction than Rust
22:49:16FromGitter<zacharycarter> lots of people are already familiar with Python
22:49:35FromGitter<zacharycarter> you just teach them Nim is a better / sane Python
22:49:48FromGitter<zacharycarter> the problem is - right now - Nim can't do much because its ecosystem is limited
22:50:14FromGitter<cavariux> What do you mean with that? That Nim needs more libraries and sdks?
22:50:38FromGitter<zacharycarter> so as a community, if we want Nim to succeed - we need to start writing libraries that will attract people to Nim rather than hobbyist stuff - like I've been doing
22:51:05FromGitter<zacharycarter> Nim needs libraries and sdks that will be useful to a corporation that wants to write enterprise software
22:51:40FromGitter<cavariux> That's true, I still have friends that prefer other languages because they already have the lib they need
22:52:01FromGitter<zacharycarter> well like I said earlier - Nim's not even a realistic option if you want to write code targeting any cloud service
22:52:06FromGitter<zacharycarter> and that's what enterprises are doing these days
22:52:44FromGitter<zacharycarter> I just recently was one of two developers launching a new pilot product at carfax - all of our infrastructure for the pilot was self-hosted
22:53:07FromGitter<cavariux> I'm not really familiar with cloud services, if not I would love to help
22:53:17FromGitter<zacharycarter> for the national launch, we'll be entirely on cloud-hosted infrastructure running a kubernetes cluster
22:53:21FromGitter<cavariux> But I'm trying to add useful bindings and rewrite some in pure nim
22:53:32FromGitter<zacharycarter> my choices are - Golang, Python, NodeJS, Java
22:53:48FromGitter<zacharycarter> Rust too I suppose
22:54:08FromGitter<zacharycarter> and C++
22:54:22FromGitter<cavariux> Hmm, tbh I don't know why people keep usin Java other than Android Development
22:54:31FromGitter<zacharycarter> and even then - Kotlin exists
22:54:49FromGitter<zacharycarter> most of the enterprise uses Java tbh
22:55:09FromGitter<zacharycarter> I can't stand the language - but it was taught in college for a long time so
22:55:10FromGitter<cavariux> But, I think mostly because they are legacy systems built on top of Java
22:55:28FromGitter<zacharycarter> even new software is written in Java - most of Netflix's shit is written in Java
22:55:35FromGitter<zacharycarter> and a lot of people hail them as the pinnacle of engineering
22:56:00*FromGitter * zacharycarter shrugs
22:56:22FromGitter<cavariux> hahaha, but that was I think before they went to the micro service idea, that they started building everything with node, and now with golang
22:56:28FromGitter<zacharycarter> nah
22:56:32FromGitter<zacharycarter> they still build a lot of stuff in Java
22:57:15FromGitter<zacharycarter> spinnaker, whatever their container orchestration lib is, etc...
22:57:30FromGitter<cavariux> I really want Nim to become popular
22:57:32FromGitter<zacharycarter> just check out - https://github.com/netflix
22:57:51FromGitter<zacharycarter> well - start writing enterprise-related libraries then :D that's what I'm going to start focusing on I think
22:58:12*gangstacat quit (Ping timeout: 246 seconds)
22:58:18FromGitter<zacharycarter> I'll still be writing frag v2 but I think I need to start pitching in by writing code I don't enjoy writing, but that needs to be written :)
22:58:43FromGitter<cavariux> okay, I will try to write as much as I can in pure nim and if not do bindings for useful stuff
22:58:54FromGitter<cavariux> will go eat something
22:59:03FromGitter<cavariux> see you later @zacharycarter
22:59:20FromGitter<zacharycarter> enjoy the food @cavariux ! will talk soon!
22:59:59*rockcavera joined #nim
23:01:14FromGitter<zacharycarter> @Varriount around by any chance?
23:01:30*jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:01:53FromGitter<Varriount> Yep
23:02:15FromGitter<zacharycarter> ooooo yeah! hey buddy! I hope you're doing well, been a while :)
23:04:15FromGitter<Varriount> I'm well, just been busy with work + school.
23:04:55FromGitter<zacharycarter> I really want to get some traction on this AWS SDK, and I know you're super busy. Is there any possible hand off from what you've already done, or do you think I should just start fresh? I don't know how far you got with generating boto3 stuff, but if you already have something to start from - I'm game for picking up where you left off (or trying to anyway).
23:05:08FromGitter<zacharycarter> and I hope work + school are both going well :)
23:05:57FromGitter<Varriount> I have some code, although I don't know if it still works.
23:06:16FromGitter<Varriount> If you want to start, I'd work from this plan:
23:06:39FromGitter<Varriount> First develop code that can make the basic POST and GET requests to the API
23:07:00FromGitter<Varriount> Next develop code that can decode the various response formats (JSON and XML)
23:07:39FromGitter<Varriount> Then develop code to take in the JSON schema defining the AWS APIs, and generate the appropriate wrapper functions.
23:07:54Araqvarriount: I'm interested in this code too
23:08:29Araqzacharycarter: I'm working on cloud APIs fwiw but I'm not sure how much of it will end up as open source
23:08:42FromGitter<zacharycarter> can you just get me hired? :P
23:08:55Araqit's a very mixed thing, developing a wrapper can take hours or weeks
23:09:12FromGitter<zacharycarter> yeah
23:09:12Araqbased on the encrypted authentification stuff
23:09:12FromGitter<zacharycarter> right
23:09:13Araqover HTTP(S)
23:09:41*NimBot joined #nim
23:09:49FromGitter<Varriount> https://gist.github.com/Varriount/5f99f862393a186665cd454ae6137ff4
23:09:57FromGitter<Varriount> https://gist.github.com/Varriount/9e84c48baa4fd5ea22558031bfab3554
23:10:40Araqgold :-)
23:10:40FromGitter<Varriount> Those two URLs make up most of what I have written/seen that can interface with AWS.
23:11:24FromGitter<zacharycarter> that's awesome thank you :D
23:11:53Araqcan we get the "billing" API for GCE too? :-)
23:12:11FromGitter<Varriount> Haven't worked with GCE, sorry.
23:12:14FromGitter<zacharycarter> GCE is so nice
23:12:21FromGitter<zacharycarter> ughhhh I wish I had GCE
23:12:33FromGitter<Varriount> Azure is nice too, from an automation perspective.
23:12:36FromGitter<zacharycarter> yeah
23:12:41FromGitter<zacharycarter> AWS is the pits
23:12:53FromGitter<Varriount> Azure's resource manager templates blow Cloudformation out of the water in many ways.
23:13:09FromGitter<zacharycarter> this is why kube is the best
23:13:13FromGitter<Varriount> Kube?
23:13:21FromGitter<zacharycarter> kubernetes
23:13:26FromGitter<zacharycarter> k8
23:14:06FromGitter<zacharycarter> you just go to whatever cloud provider offers the best tool for the job
23:14:50FromGitter<zacharycarter> there are alternatives to kubernetes too but I don't know of any that are better yet
23:15:03dom96sooo why not just get a Digital Ocean VPS and run your binary there? :)
23:15:47FromGitter<zacharycarter> because we're talking about enterprise grade infrastructure here :P
23:16:10FromGitter<zacharycarter> and clustered computing
23:16:39FromGitter<zacharycarter> I mean I think digital ocean supports kubernetes - but I wouldn't want to manage my own compute cluster if I was trying to run enterprise grade software
23:16:56FromGitter<zacharycarter> I want something doing it for me
23:17:25FromGitter<zacharycarter> kubernetes kind of lets you orchestrate all that via config, and then just drop it off on whatever cloud provider you want
23:18:34dom96well, without knowing the requirements I can't really imagine why this complexity would be necessary
23:18:55FromGitter<mratsim> @Araq the from is much better yes, I have nothing better to propose
23:19:52FromGitter<mratsim> by the way in macros what’s the difference between result.add foo[0], result.add copyNimNode(foo[0]) and result.add copyNimTree(foo[0])?
23:20:12FromGitter<zacharycarter> dom96: we need to provide a public facing API that can run queries against an elasticsearch instance which is periodically re-indexed with data about car dealerships
23:20:39FromGitter<Araq> @mratsim usually it doesn't matter
23:20:43FromGitter<zacharycarter> so we need our infrastructure to be redundant, we need an elasticsearch cluster, we need mongo / dynamo db & streaming support
23:21:13FromGitter<zacharycarter> some type of queuing mechanism for the job that populates dynamodb /mongo and then another process to handle the stream and indexing of elasticsearch
23:21:43FromGitter<zacharycarter> and we need job scheduling capabiltieis
23:21:55dom96I see
23:21:59FromGitter<zacharycarter> yeah - we could do that with cron jobs probably and single node stuff
23:21:59FromGitter<Araq> @zacharycarter check your private messages
23:22:15FromGitter<zacharycarter> but it won't serve an enterprise-grade API
23:22:51FromGitter<Varriount> @zacharycarter What do you use for configuration management (Salt, Puppet, Ansible, etc)?
23:23:03dom96What are the requirements for an "enterprise-grade" api?
23:23:25*noonien quit (Quit: Connection closed for inactivity)
23:23:46dom96is it just the ability to scale?
23:24:08FromGitter<zacharycarter> also fault-tolerance
23:24:20FromGitter<zacharycarter> which I guess is inferred with ability to scale
23:24:53FromGitter<Araq> Die Cloud klaut. ;-)
23:25:08FromGitter<zacharycarter> security comes into play too, availability of on-premise infrastructure, etc...
23:25:43FromGitter<zacharycarter> there's a ton of shit I'm not trained / qualified to offer an opinion on that I have to try to figure out as well
23:25:55FromGitter<zacharycarter> putting software in the cloud, and having it work with existing infrastructure is non-trivial
23:26:14FromGitter<zacharycarter> @Varriount - we've been using Chef internally, everything seems to be moving to Hashicorp
23:26:40FromGitter<zacharycarter> we're trying to just make decisions inside our own team in terms of what tooling / technology we use - I don't think we've really settled on what we're going to use yet
23:26:49FromGitter<zacharycarter> I pray it's not Terraform
23:26:55FromGitter<Varriount> So Consul?
23:27:26FromGitter<zacharycarter> I haven't heard Consul brought up much yet - I know we use it - but I've never encountered it
23:27:31FromGitter<zacharycarter> I just know Vault, Terraform
23:27:36FromGitter<zacharycarter> Packer
23:28:02dom96lol, sounds like every company is rolling their own by the amount of different names I am seeing here
23:28:08FromGitter<zacharycarter> this is all our devops team though - like we're supposed to be moving to a more team oriented culture where teams are empowered to do their own devops
23:28:27FromGitter<zacharycarter> well dom96: these are all technologies built to deal with the effing mess that is cloud computing
23:28:35FromGitter<zacharycarter> you basically pick your poison and suffer through it
23:28:43FromGitter<zacharycarter> the most sane option I've seen for all of this is Kubernetes
23:29:05FromGitter<Araq> we picked Digital Ocean VPS + Sqlite + Nim ;-)
23:29:07FromGitter<zacharycarter> and then you work with whatever crap your cloud provider of choice offers
23:29:09FromGitter<Varriount> @zacharycarter Do you deal with the government at all?
23:29:14FromGitter<zacharycarter> negative
23:29:29FromGitter<Varriount> I do. It's interesting.
23:29:37FromGitter<zacharycarter> @Araq - yeah but you're not Carfax either :/
23:29:45FromGitter<zacharycarter> in the sense that you're a lot smaller
23:29:50FromGitter<zacharycarter> and can do things like that
23:29:54*FromGitter * Varriount is going to use Carfax to find his next car
23:30:04FromGitter<zacharycarter> :D
23:30:10FromGitter<zacharycarter> please everyone do if you're in the US
23:30:26federico3dom96: yes, it's a mess
23:30:48FromGitter<zacharycarter> @Varriount I don't think I could get a job with the govt
23:31:03FromGitter<Varriount> Well, contracting.
23:31:11FromGitter<zacharycarter> too much 🚰 minus the water
23:31:22FromGitter<zacharycarter> and the able
23:31:48FromGitter<zacharycarter> (hover over the icon and hopefully it will make sense :P)
23:32:06FromGitter<Varriount> But you get the thrill of working with technology that's 10+ years old. :D
23:32:10FromGitter<Araq> @zacharycarter *shrug*, "small but working and we are in control and know how to grow it" is preferrable to me over "omg, we are the next Google, everything MUST SCALE"
23:32:13FromGitter<zacharycarter> yeah!!!!!
23:32:28FromGitter<zacharycarter> @Araq - yeah :/ I don't get to make any of these decisions though
23:32:46FromGitter<zacharycarter> new people that have been there less time than me do :)
23:33:38dom96I am by no means experienced with this stuff, but I can't help but have a feeling that most users of these technologies really don't need them.
23:33:48FromGitter<zacharycarter> @Varriount - yeah!!!!! I just recently polished off the last of the ColdFusion code I'll have to write ever! hopefully...
23:34:03FromGitter<zacharycarter> they do dom96
23:34:13federico3dom96: spot on
23:34:45FromGitter<zacharycarter> they remove devops from the picture
23:35:09FromGitter<zacharycarter> if you're at a business, and you're running a mysql server / cluster - someone has to maintain that shit and upgrade it etc
23:35:18FromGitter<zacharycarter> the cloud provider takes care of all of that for you
23:35:51FromGitter<zacharycarter> so business invest in cloud, because it reduces infrastructure costs to very little
23:36:09FromGitter<zacharycarter> they don't realize the human / developer cost in terms of coming to terms with the ecosystem / being able to develop in it
23:36:28FromGitter<zacharycarter> but don't think for a second that AWS / GCE / Azure, etc... aren't being used in massive capacity - they are
23:36:44FromGitter<zacharycarter> and the fact that Golang is supporting these, and Rust is gaining support, means Nim needs to as well
23:37:00FromGitter<zacharycarter> otherwise - Nim is going to turn into Haskell, and probably not even turn out as well
23:37:08dom96Sure, I don't doubt that there are users out there that do need it
23:37:34dom96But I have a hunch that a lot of people are following the hype of "Google is using this so I should too!"
23:37:58FromGitter<zacharycarter> I mean sure - but at the end of the day - there are business that run 100% on cloud infrastructure
23:38:10FromGitter<zacharycarter> and it's trending in that direction, not decreasing
23:38:32dom96And yeah, I really want to see support for AWS, GCE, Heroku, and whatever else for Nim
23:38:44dom96I'm surprised it's so difficult to get this support
23:38:58FromGitter<zacharycarter> well - I think we really need to stabilize an effort around this
23:39:16FromGitter<zacharycarter> for instance
23:39:27FromGitter<zacharycarter> https://github.com/rusoto/rusoto
23:39:28dom96sure, a good way might be to create a dedicated github org for it
23:39:44FromGitter<zacharycarter> yeah - that is a really good idea
23:40:07dom96I'm happy to tweet out a call for help :)
23:40:20dom96A good first step is a nice readme and some small skeleton project
23:41:05dom96Holy crap, that's a lot of services https://www.rusoto.org/supported-aws-services.html
23:41:50FromGitter<zacharycarter> mmhmm
23:41:56federico3dom96: most of the required glue is pretty small
23:41:56dom96Also, we should start using GitBook a lot more for projects
23:41:59FromGitter<AjBreidenbach> if you want nim on heroku, you can make an npm module from it
23:41:59FromGitter<zacharycarter> but we can use macros / codegen for most of it
23:41:59dom96It's really nice
23:42:32dom96Which services do you guys think are most important?
23:43:10federico3shouldn't people list and vote this stuff on https://github.com/nim-lang/needed-libraries/issues ?
23:43:12FromGitter<zacharycarter> s3, dyanmodb, alot of the IAM stuff (and whatever the auth services are referred to as)
23:43:29FromGitter<Varriount> @dom96 The key to supporting all those services is to have a codegen that takes in the API schema AWS publishes.
23:43:37FromGitter<zacharycarter> ^
23:43:54FromGitter<zacharycarter> federico3: that list is flawed IMO
23:44:05FromGitter<zacharycarter> at least from the perspective of - what does Nim need to make it popular
23:44:20FromGitter<zacharycarter> it's fine in terms of - what do individual users want to see Nim have at its disposal
23:44:42FromGitter<Araq> it's not flawed. there is more to computing than "we need to run in the cloud"
23:45:03dom96feel free to introduce labels to mark priority (which can imply what Nim needs to make it popular)
23:45:31dom96Araq: lies, for all you know we are all living in the Cloud ;)
23:45:44federico3zacharycarter: then we can create items for that, describe why they are important and vote them
23:46:31FromGitter<Araq> today it's the cloud. yesterday it was the REPL and more scientific libraries.
23:46:52FromGitter<Araq> tomorrow it will be a library for currencies
23:46:53federico3the hype of the moment *yawn*
23:47:02FromGitter<zacharycarter> @Araq of course there is more than that - there's scientific computing, gamedev, etc... but I think the enterprise adopting Nim as a programming language, isn't something that's going to happen without a concentrated process
23:47:29FromGitter<zacharycarter> yes all of these needs are transient - but the fact is, corporations have needs and trend towards patterns
23:47:34FromGitter<Araq> then it will be libraries for virtual reality... oh wait, is that over already?
23:47:50FromGitter<zacharycarter> if you don't support these patterns - you'll miss the enterprise
23:48:13FromGitter<Araq> for your specific definition of "the enterprise"
23:48:14dom96Araq: Time to stop. The cloud might not be the most important thing but it is up there.
23:48:16federico3Araq: self driving cars of course
23:48:40FromGitter<Araq> I don't even disagree. but it surely gets tiresome.
23:48:48dom96It's as if you're trying to discourage zacharycarter from working on this great package
23:48:58FromGitter<Araq> is IoT still a thing? we need to make Nim a top scorer for IoT devices
23:49:23FromGitter<Araq> it's not my intention to stop anybody from writing Nim libraries
23:50:13dom96Good, so listen to my advice.
23:50:54FromGitter<Araq> what advice? I should shut up already, got it.
23:51:07FromGitter<Araq> ;-)
23:52:53FromGitter<zacharycarter> Araq - the issue here is (at least from my perspective) - you're focusing on Nim from your own viewpoint and what you think is or might be important to the language vs what I perceive to be. I'm offering you the viewpoint of someone who works for a fairly large company in the US that writes what is considered "enterprise" software, and at the moment can't leverage Nim for that use case.
23:53:13FromGitter<Araq> again, I'm working on the cloud APIs myself
23:54:27dom96Araq: why aren't you on IRC?
23:54:34FromGitter<zacharycarter> okay - so then we can agree that they are at the moment, very relevant APIs and that Nim would benefit from allowing users to leverage Nim in that capacity
23:54:41FromGitter<Araq> of course
23:55:25FromGitter<Araq> but Nim already offers native+JS codegen, for example and I consider SPAs very relevant too
23:55:41FromGitter<zacharycarter> so that's the only real point i was trying to make - I think the community should pursue this goal if we can, if our end-goal is to evangelize / popularize Nim
23:56:20FromGitter<zacharycarter> yeah - but I can't sell my boss on Nim on that
23:56:47FromGitter<zacharycarter> now if I can write code for AWS or GCE or whatever with Nim
23:57:07*leorize joined #nim
23:57:07FromGitter<zacharycarter> or deploy the Nim code I write to those platforms and leverage services on those platforms
23:57:10FromGitter<zacharycarter> that's another story
23:57:28dom96yep
23:57:41FromGitter<zacharycarter> I can't just be like - hey I can replace TypeScript with Nim
23:57:42dom96There is a lot of people who would love to use Nim on AWS/GCE
23:57:45federico3zacharycarter: if there's interest in a client lib for $service people (perhaps including you) will write it. Or are you saying that supporting $service should be part of the "core" language?
23:57:45FromGitter<zacharycarter> and gain any traction
23:58:04FromGitter<zacharycarter> federico3: the former
23:58:48FromGitter<zacharycarter> if I can say - hey, we can write our JS w/ Nim, we can write our AWS deployed services w/ Nim, etc...
23:58:51FromGitter<zacharycarter> then Nim can be sold to my boss
23:59:54FromGitter<zacharycarter> and then you have potentially another 100+ Nim programmers at your door