<< 26-04-2018 >>

00:00:01skrylari guess i'll just table this for the moment
00:02:52*smt quit (Read error: Connection reset by peer)
00:03:13*jrbrt quit (Quit: jrbrt)
00:03:35*smt joined #nim
00:03:54skrylarwill probably just have to have it assume all things are indexed except a couple obvious exceptions
00:05:39skrylarflat buffers have some weird crap where some data is "inline" which just means its jammed up next to the vtable and then other data that is "somewhere" in the stream
00:07:45*jrbrt joined #nim
00:15:47*jrbrt quit (Quit: jrbrt)
00:28:24*CodeVantage quit (Read error: Connection reset by peer)
00:29:40*codevantage joined #nim
00:31:46*codevantage quit (Client Quit)
00:32:43*codevance1 joined #nim
00:42:29skrylarbut expression 'string' is of type: string
00:42:33skrylar:hmm:
00:43:37*xet7 quit (Read error: Connection timed out)
00:44:07*xet7 joined #nim
00:50:04skrylarso this works proc add* [X:Primitive](self: var Vtable; T: typedesc[X]) =
00:50:21skrylarbut when you add a specialization for string, it just complains that strings aren't strings
00:52:22*skrylar quit (Remote host closed the connection)
01:05:51*yglukhov joined #nim
01:06:30*codevance1 quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
01:06:49*CodeVantage joined #nim
01:08:24*CodeVantage quit (Client Quit)
01:08:27*CodeVance1 joined #nim
01:08:28*CodeVance1 quit (Remote host closed the connection)
01:08:40*CodeVance1 joined #nim
01:08:46*CodeVance1 quit (Remote host closed the connection)
01:09:08*CodeVance1 joined #nim
01:17:11*endragor joined #nim
01:17:57*endragor quit (Remote host closed the connection)
01:26:25*yglukhov quit (Read error: Connection reset by peer)
01:27:41*yglukhov joined #nim
01:28:28*xet7 quit (Read error: Connection timed out)
01:29:06*xet7 joined #nim
01:32:57*dddddd quit (Remote host closed the connection)
01:35:38*skrylar joined #nim
01:35:41*CodeVance1 is now known as CodeVance
01:35:41*CodeVance quit (Remote host closed the connection)
01:36:01*CodeVance1 joined #nim
01:49:38skrylarzacharycarter: meh. got it working, but its ugly
01:49:58skrylarinstead of consulting a neat, user providable specialization of a generic, it just checks the type name on a hash table at compile time for a few primitives
01:50:01*xet7 quit (Read error: Connection timed out)
01:50:36*xet7 joined #nim
02:06:25skrylarthat just leaves the recursive bits to actually shove objects in to bits
02:11:15*g-glitch joined #nim
02:11:27*wishi_ joined #nim
02:11:32*shashlick1 joined #nim
02:12:28*petersjt014[m]1 joined #nim
02:12:46FromGitter<ephja> bits are nice
02:12:50*petersjt014[m] quit (Ping timeout: 256 seconds)
02:12:50*stisa quit (Ping timeout: 256 seconds)
02:12:50*shashlick quit (Ping timeout: 256 seconds)
02:12:50*briank quit (Ping timeout: 256 seconds)
02:12:51*planetis[m] quit (Ping timeout: 256 seconds)
02:12:52*unclechu quit (Ping timeout: 256 seconds)
02:12:52*wishi quit (Ping timeout: 256 seconds)
02:12:52*stisa joined #nim
02:12:54*stisa quit (Changing host)
02:12:54*stisa joined #nim
02:16:22*pqflx3[m] quit (Ping timeout: 240 seconds)
02:16:28*TheManiac quit (Ping timeout: 246 seconds)
02:16:42*libman[m] quit (Ping timeout: 255 seconds)
02:16:43*solitudesf quit (Ping timeout: 255 seconds)
02:16:44*macsek1911[m] quit (Ping timeout: 240 seconds)
02:16:49*byteflame quit (Ping timeout: 246 seconds)
02:16:49*petersjt014[m]1 quit (Ping timeout: 256 seconds)
02:16:50*dyce[m] quit (Ping timeout: 256 seconds)
02:16:52*Miguelngel[m] quit (Ping timeout: 245 seconds)
02:16:52*krux02[m] quit (Ping timeout: 240 seconds)
02:17:05*notdekka[m] quit (Ping timeout: 276 seconds)
02:17:05*zielmicha[m] quit (Ping timeout: 276 seconds)
02:17:07*amp907[m] quit (Ping timeout: 260 seconds)
02:17:07*survivorm[m] quit (Ping timeout: 260 seconds)
02:17:07*narimiran[m] quit (Ping timeout: 260 seconds)
02:17:07*Demos[m] quit (Ping timeout: 260 seconds)
02:17:08*mgdelacroix[m] quit (Ping timeout: 240 seconds)
02:17:09*hohlerde quit (Ping timeout: 255 seconds)
02:17:23*Abnegation quit (Ping timeout: 256 seconds)
02:17:30*stisa quit (Ping timeout: 256 seconds)
02:21:03*CodeVance1 quit (Quit: Leaving)
02:23:00*Guest98328 quit (Ping timeout: 255 seconds)
02:24:11*Guest98328 joined #nim
02:25:12*xet7 quit (Read error: Connection timed out)
02:25:36*xet7 joined #nim
02:36:37*skrylar quit (Remote host closed the connection)
02:36:49*skrylar joined #nim
02:42:06*Snircle joined #nim
03:00:53*xet7 quit (Read error: Connection timed out)
03:01:36*xet7 joined #nim
03:05:42*endragor joined #nim
03:18:24skrylari see protobuf stuff already in nimble. neat. wonder how well they work
03:32:54*Guest98328 quit (Quit: WeeChat 2.0.1)
03:33:34*Guest62709 joined #nim
03:33:57*Guest62709 quit (Client Quit)
03:34:35*skrzyp1 joined #nim
03:56:13*yglukhov quit (Read error: Connection reset by peer)
03:57:22*yglukhov joined #nim
04:00:49*skrylar quit (Remote host closed the connection)
04:08:17*yglukhov_ joined #nim
04:08:45*leorize quit (Ping timeout: 264 seconds)
04:09:12*yglukhov quit (Ping timeout: 255 seconds)
04:26:40*smt quit (Read error: Connection reset by peer)
04:27:01*smt joined #nim
04:36:22*skrzyp1 quit (Quit: WeeChat 2.0.1)
04:37:00*Guest84222 joined #nim
04:48:54*Guest84222 quit (Quit: WeeChat 2.0.1)
04:49:34*skrzyp1 joined #nim
04:55:33*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:57:11*yglukhov_ quit (Ping timeout: 256 seconds)
05:51:42*xkapastel quit (Quit: Connection closed for inactivity)
06:02:43*miran joined #nim
06:06:55*nsf joined #nim
06:11:58*leorize joined #nim
06:12:33*miran quit (Ping timeout: 256 seconds)
06:13:10*insomniac_lemon joined #nim
06:27:50FromGitter<matrixbot> `ehmry` excellent, I'm not a fan of protobufs but that is good news
06:36:53FromGitter<honewatson> is lexbase unlikely to work at compile time?
06:38:18insomniac_lemonHas there been any discussion on creating a beginner-to-programming guide yet? Even a general outline of the order that big concepts should be learned in (one that someone could USE to make a guide) may be useful for someone to get started.
06:40:10FromGitter<survivorm> Is there a common way to use something similar to compile-time warning in runtime?
06:40:13insomniac_lemonTaking it a step further would be listing any ways that nim differs in its implementation of said concepts/technologies. That'd then just leave the footwork of finding good explanations/tutorials.
06:43:05FromGitter<narimiran> > Has there been any discussion on creating a beginner-to-programming guide yet? ⏎ ⏎ insomniac_lemon: i'm working on it
06:43:38FromDiscord<claude> some guy on reddit said they were making something
06:43:53FromGitter<narimiran> i'm that guy from reddit ;)
06:43:56FromDiscord<claude> oh
06:44:22FromGitter<narimiran> it is harder than i thought it would be, and it is going much slower than i expected/wanted
06:44:40insomniac_lemonnarimiran yeah It's me again some other guy on Reddit who has asked. You said you weren't doing a full overview sort of thing, remember?
06:45:56insomniac_lemonAlthough I guess I didn't mention the idea as a general outline which would be easier.
06:46:29FromGitter<narimiran> what i had in mind is: basic datatypes, control flow, loops, procedures
06:46:45FromGitter<narimiran> this should be enough to start and to dive deeper on your own
06:47:06FromGitter<narimiran> it is not meant to be "one tutorial to rule them all"
06:47:43insomniac_lemonIt'd still be best to have an outline, even if it was literally a bulleted list that could be scribbled on a bar napkin.
06:50:02FromGitter<alehander42> yeah, the goto ~= go was very interesting viewpoint
06:54:36insomniac_lemonnarimiran I guess one way of putting it is that I'm suggesting for a trail of breadcrumbs to something that should give people a foothold of knowledge, rather than giving someone a meal and hoping they know where to look for more
06:57:05insomniac_lemonMaybe dom96 start the outline. That is unless the ordering of concepts would differ by individual/goal, especially with varying degrees of ability to think like a true beginner.
07:03:15insomniac_lemonWell, granularity might be an issue. Learning in an order that doesn't require you know 5 other things that require knowing other things etc. I get that might be a guarantee, but hopefully getting past that isn't too hard.
07:05:36*rockcavera quit (Remote host closed the connection)
07:08:31*PMunch joined #nim
07:16:38*Arrrr joined #nim
07:16:38*Arrrr quit (Changing host)
07:16:38*Arrrr joined #nim
07:22:22*xet7 quit (Read error: Connection timed out)
07:23:07*xet7 joined #nim
07:25:08*yglukhov joined #nim
07:28:50Araqnarimiran: why are you different from tut1?
07:28:55Araqlol
07:29:08Araqnarimiran: what do you do differently from tut1?
07:36:33FromGitter<narimiran> Araq: my aim is to be more beginner-friendly and to go into a bit more detail - aimed at people with no or minimal previous programming experience
07:40:28insomniac_lemonAraq yeah, that's something I've said. I feel like anyone setting out to make a single "beginner tutorial" is just making the same sort of tutorial nim has a few of. Which doesn't help beginners-to-programming know where to start.
07:40:53insomniac_lemonIt's like teaching them how to cook by showing them how to make salad.
07:42:12FromGitter<narimiran> insomniac_lemon: based on your repeated comments here and on reddit - i've got the feeling that whatever is or will be done - you will not be satisfied
07:45:36insomniac_lemonnarimiran, maybe. But then again some think nim's existing tutorials are good (even the one focused on Brainfuck). So everyone's idea of beginning is different.
07:45:42insomniac_lemonAt least an outline is much less writing, likely even compared to your tutorial.
07:49:54ArrrrIt is good to experiment
07:50:20*xet7 quit (Read error: Connection timed out)
07:51:07*xet7 joined #nim
07:54:55Araqnarimiran: your audience is "beginners-to-programming". that's good.
07:56:10AraqI would focus on a "Nim with X" tutorial where X would SDL2 or a comparable library, preferably an idiomatic wrapper
07:56:33Araqbeginners often want to get into programming because they want to program games.
07:57:10insomniac_lemonAraq the nim bindings for Godot might be another option, possibly better.
07:57:25AraqGodot is too messy to setup.
07:57:34insomniac_lemonThat's what I want to get into.
07:57:40Araqyou lose your users at the installation instructions.
07:57:53AraqGodot is far too heavy for real beginners.
07:58:42insomniac_lemonDidn't seem messy to me, although I just did a command. Not sure how it is on Windows.
07:59:32FromGitter<narimiran> Araq: i have no experience with games (so i can't make that tutorial), but i agree that such a tutorial (or series of "making X with Nim) might be the way to go!
07:59:49insomniac_lemonI mean Godot offers features making it more convienent than spinning your own engine.
08:00:16Araqpacman install godot && pacman install nim && pacman install nimble && nimble install godot # many things can wrong here :P
08:00:47Araq"spinning your own engine", sure, but beginners do not write game engines
08:01:18FromGitter<narimiran> the problem with my "beginners-to-programming" tutorial is - i'm not sure how basic should i go, and that's why it takes me so long to finish/publish what i have written so far....
08:02:33Araqnarimiran: well come up with an X :-)
08:03:00insomniac_lemonAraq I mean you're likely not gonna get much with SDL2. So there'd likely be a lot of stuff you'd be adding yourself. Even when using a more robust framework. It'd be like an OpenGL tutorial.
08:03:20FromGitter<narimiran> "doing linear algebra with nim" doesn't sound like an interesting topic to the most people :D :D
08:03:45Araqyep.
08:03:50insomniac_lemonnarimiran, not sure if I've mentioned it but I've programmed before but only high-level. Not much technical, but I know about loops and a bit about data types. I just don't know where to start on the technical side.
08:04:02insomniac_lemonWith Nim that is.
08:04:52FromGitter<narimiran> you start with the official tut1, and you translate to nim whatever have you written before in that high-level language
08:05:09Araqinsomniac_lemon: you'd be surprised how effective you can be without an engine.
08:05:18Araqespecially for teaching.
08:05:38Araqan engine comes with its own abstractions that have to be learned
08:06:26FromGitter<survivorm> @narimiran Maybe it's my point of view, but i'd start with simple localhost web server, some in-memory db mapped to disk (preferably, easily installed) and something like own blog with login
08:06:43FromGitter<survivorm> Or even chat-like platform
08:07:08FromGitter<survivorm> I think it might be interesting topic for the beginners
08:07:30FromGitter<narimiran> @survivorm do it ;)
08:07:35insomniac_lemonnarimiran, I mean even higher level (or just generally worse) than Python. Really it was mostly tinkering and stuff I don't have access to anymore. Tut1 or really any existing nim tutorial does not help me with the sheer amount of research I'd need to do to know even the basics.
08:07:36FromGitter<survivorm> And also touching many different sub-systems
08:08:15PMunchHmm, is the playground still down?
08:08:58FromGitter<survivorm> @narimiran no, surely i won't have the drive to do that much. I can only do simple things or things related to what i'm doing for myself, i'm an egoist :P
08:09:41*yglukhov quit (Read error: Connection reset by peer)
08:09:43FromGitter<narimiran> simple things are exactly what we're looking for ;)
08:10:10Araq"using Nim to write a Minecraft extension" -- instant success right here.
08:10:16Araq:-)
08:10:17*yglukhov joined #nim
08:10:31*floppydh joined #nim
08:10:47Araqassuming Minecraft extensions are a thing...
08:11:44PMunchWell, there are mods
08:11:45FromGitter<narimiran> my (other) plan is to write a blogpost how i sped-up my python calculations by using nim. not aimed at beginners, just something that could be "sold" to python developers in the similar situations....
08:11:48PMunchBut they are written in Java..
08:12:42Araq"use Nim to write an SC2 AI that plays in your style so that you can do finally do something else in your spare time..."
08:12:57*Arrrr quit (Ping timeout: 240 seconds)
08:13:22Araq"use Nim to write an IRC bot so that you can finally do something productive in your spare time..."
08:13:27insomniac_lemonAraq does an outline seem like something you could do? Or is there really no good starting point because all of the concepts are interwoven?
08:14:16FromGitter<narimiran> insomniac_lemon: https://nim-lang.org/docs/tut1.html - look at the left column - isn't that an outline?
08:16:17insomniac_lemonnarimiran No. As I've said that's basic pieces/syntax stuff, not concepts. Not assembling a program, no proper multithreading, not GC or other technologies etc.
08:16:37*xet7 quit (Read error: Connection timed out)
08:16:57PMunchinsomniac_lemon, I always check https://learnxinyminutes.com/docs/nim/ when I want to get a quick overview of a language
08:17:07*xet7 joined #nim
08:17:20PMunchThe code shows off some nice examples of things, while the comments typically explain what's going on
08:18:12insomniac_lemonSame exact issue there, PMunch. It's assuming you're coming over from another language (like Python) where you had high understanding.
08:19:21PMunchOf course
08:19:45PMunchBut if you used that as an outline, taking your time to explain in much greater detail what's going on
08:20:25PMunchWriting beginner programming classes are hard though
08:20:53Araqhttp://abz.inf.ethz.ch/wp-content/uploads/unterrichtsmaterialien/primarschulen/logo_heft_en.pdf translate this to Nim
08:20:54PMunchI used to teach a beginner C course for people who had never programmed before at University
08:21:16PMunchYou just sorta forget that all the things you take for granted are completely new and foreign to them..
08:22:24*Arrrr joined #nim
08:22:24*Arrrr quit (Changing host)
08:22:24*Arrrr joined #nim
08:22:46FromGitter<narimiran> PMunch: well said! btw, are you still interested in "beta-testing" this tutorial of mine? (once i get it to some semi-done state)
08:23:45Araqand write in Nim's variant of RST with its awesome :test: feature
08:24:27insomniac_lemonPMunch, my point was the problem wasn't the linked tutorial being too difficult, but that it doesn't give a good enough starting point to find and understand more advanced concepts.
08:25:15PMunchnarimiran, yeah, I'm looking forward to see what you've got
08:25:31*natrys joined #nim
08:25:34FromGitter<narimiran> insomniac_lemon: sometimes (often-times) there won't be a guiding hand, and you need to explore the world on your own
08:25:48PMunchinsomniac_lemon, well it's intended for beginners
08:26:03PMunchSo just teaching them if, when, while, for, and case is already a lot
08:26:32PMunchOh, and procs
08:30:46insomniac_lemonMy point is this style of tutorial leaves true beginners in the dark. The documentation is the same way. There is no info on what you need to know, and even if you scrounge it from other languages, it may not apply 1:1 to nim.
08:31:39PMunchinsomniac_lemon, yes again. You asked for an outline, that page could easily be used as an outline.
08:34:08insomniac_lemonPMunch, No... it doesn't. Syntax/basic pieces isn't an outline of programming concepts/technologies.
08:34:51FromGitter<narimiran> insomniac_lemon: can you show us an example of the things you want to see?
08:34:52PMunchIt's an outline of progression. If you actually wrote what each piece was doing, how and why it was working, while tying it into a bigger picture it would work just fine.
08:38:07FromGitter<narimiran> Araq: that logo tutorial is quite nice for beginners! does nim have something like python's turtle module?
08:38:19Araqno, it needs it :-)
08:39:09FromGitter<narimiran> oh, another thing i would like to do, but a day has only 24 hours....
08:39:23Araqyou can probably use terminal.nim to "draw" some Unicode Teenage Mutant Ninja Turtle
08:39:39AraqI'm sure that is part of Unicode now...
08:42:13insomniac_lemonnarimiran, as I've said the general idea is I want to know what I need to know. Things like how the compiler works, metaprogramming, how to structure things with GC, etc.
08:42:15insomniac_lemonAll of the existing things show things and how to use them, but often don't say what they are or why I'd want to use them etc.
08:44:48PMunchOh, so not really a beginners tutorial then, which is what I and narimiran is talking about.
08:44:50insomniac_lemonI know everything available has some 'required reading' but it's a chore to sift through everything when you don't know where to start especially with the big concepts.
08:44:57PMunchAs in programming beginner
08:46:03insomniac_lemonPMunch, I've been saying beginner-to-programmer and making it clear syntax and loops/conditions etc isn't the issue
08:47:45*pqflx3[m] joined #nim
08:48:56*yglukhov_ joined #nim
08:49:00*salewski joined #nim
08:49:46yglukhov_Araq: given an nkStmtListExpr, how do i get a typ for a var sym to assign to it? is it just `n.typ`?
08:50:19Araqyep
08:50:46Araqand n[^1].typ should be the same
08:50:58Araqthe expression's type is the type of the last expression
08:51:01*yglukhov quit (Ping timeout: 256 seconds)
08:51:04Araqof the list
08:51:11salewskiinsomniac_lemon, there are some fine C++ beginner books, for example from Stroustrup or Lippman, you may follow that stayle:
08:51:23salewskihttps://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
08:51:57salewskiBut that is of course an effort for a few years :-)
08:52:00PMunchinsomniac_lemon, so you want to have a beginner-to-programming tutorial that talks about GC, metaprogramming, and compiler internals?
08:52:43yglukhov_Araq: thanks!
08:53:05PMunchNone of those words even mean anything to a beginner-to-programming..
08:53:14insomniac_lemonPMunch, no. As I've said I want to know where to stare, especially in the general sense of things. That's why I mentioned a basic outline.
08:53:22*xet7 quit (Read error: Connection timed out)
08:53:36insomniac_lemon*I want to know where to start
08:54:07*xet7 joined #nim
08:54:26FromGitter<narimiran> start by not worrying about the stuff you mentioned ;)
08:54:51FromGitter<narimiran> i have no idea about most of them, and i'm able to use nim quite comfortabl
08:55:30insomniac_lemonPMunch, and also I know I won't be a master of anything like that, but at very least knowing what they/very basic usage/what not to do etc
08:57:32PMunchHmm, I guess a "here be dragons" section telling you what to avoid until you learn more by reading X, Y, and Z might be a good idea
08:57:50PMunchThe classic "Just do this, but don't worry about how it works just yet"
08:58:03PMunchOh well, I'm off to lunch
08:59:09insomniac_lemonnarimiran, so just ignore everything useful or offering decent/good performance? Until nim becomes a larger language I assume...
08:59:29FromGitter<narimiran> i didn't say that
09:01:32insomniac_lemonI just don't see learning it otherwise without even having a starting point.
09:01:46salewski>ignore everything useful or offering decent/good performance?
09:02:11salewskiThat would make not much sense, because then people can leran Python
09:02:38*Abnegation joined #nim
09:02:38*mgdelacroix[m] joined #nim
09:02:38*solitudesf joined #nim
09:02:38*unclechu joined #nim
09:02:39*dyce[m] joined #nim
09:02:39*Miguelngel[m] joined #nim
09:02:39*Demos[m] joined #nim
09:02:44*stisa joined #nim
09:02:44*narimiran[m] joined #nim
09:02:45*libman[m] joined #nim
09:02:45*survivorm[m] joined #nim
09:02:45*krux02[m] joined #nim
09:02:45*planetis[m] joined #nim
09:02:45*macsek1911[m] joined #nim
09:02:45*petersjt014[m] joined #nim
09:02:45*TheManiac joined #nim
09:02:46*byteflame joined #nim
09:02:46*amp907[m] joined #nim
09:02:46*notdekka[m] joined #nim
09:02:47*zielmicha[m]1 joined #nim
09:02:47*hohlerde joined #nim
09:03:13FromGitter<narimiran> it took me a while to figure out what's going on here, but now i think i can see it - you're just trolling us, and i'm a fool to fall for it
09:04:58insomniac_lemonnarimiran, No, I genuinely want to learn nim.
09:05:41*ehmry1 joined #nim
09:05:44*ehmry1 left #nim (#nim)
09:06:19Araqso ask more concrete questions, don't make narimiran write a tutorial for an audience that consists of you and only you.
09:06:40FromGitter<narimiran> and you have the resources to do that, you can immediately start with learning and learn a lot along the way, but no - you need some outline, you need to know how compiler works, how to deal with GC, etc.
09:07:37FromGitter<narimiran> i'll repeat once again - you don't need that stuff to start with nim, and that's NOT "ignore everything useful or offering decent/good performance"
09:08:19FromGitter<narimiran> write some toy programs, share the code with us, and we'll help you to write better code and explain what and why to change
09:08:49FromGitter<narimiran> until you do that, i'll think that you're trolling us.
09:16:37insomniac_lemonnarimiran, I don't think that'd work, but I don't really want to need to get help for every project. I wouldn't mind doing a ton of reading if I could eventually break through into not being totally lost.
09:17:27insomniac_lemonI'm not the sort of person that could get programming by tinkering like many are. I tried it with Java (actually following a few tutorials) and that didn't work
09:22:38salewskiinsomniac_lemon, I just remembered the Tony Gaddis book: Starting Out with C++ from Control Structures to Objects
09:23:02salewskiIt has a nice introducting chapter for beginners.
09:23:43salewskiMaybe you could follow such a layout for your Nim beginner course?
09:23:56salewskiBye.
09:24:23*salewski quit (Quit: WeeChat 2.0.1)
09:25:10*noonien joined #nim
09:25:57*xkapastel joined #nim
09:33:45enthus1astalso encurage your beginners to read other peoples code
09:37:12FromGitter<krux02> 12345 commits
09:37:13FromGitter<krux02> party
09:38:47*Miguelngel[m] quit (Ping timeout: 240 seconds)
09:38:50*unclechu quit (Ping timeout: 255 seconds)
09:38:59*floppydh_ joined #nim
09:39:03*Demos[m] quit (Ping timeout: 255 seconds)
09:39:10*hohlerde quit (Ping timeout: 240 seconds)
09:39:12*floppydh quit (Ping timeout: 240 seconds)
09:39:17*libman[m] quit (Ping timeout: 260 seconds)
09:39:18*notdekka[m] quit (Ping timeout: 255 seconds)
09:39:18*TheManiac quit (Ping timeout: 255 seconds)
09:39:22*dyce[m] quit (Ping timeout: 245 seconds)
09:39:23*narimiran[m] quit (Ping timeout: 256 seconds)
09:39:24*solitudesf quit (Ping timeout: 256 seconds)
09:39:30*amp907[m] quit (Ping timeout: 255 seconds)
09:39:30*survivorm[m] quit (Ping timeout: 255 seconds)
09:39:30*krux02[m] quit (Ping timeout: 256 seconds)
09:39:31*planetis[m] quit (Ping timeout: 256 seconds)
09:39:31*macsek1911[m] quit (Ping timeout: 256 seconds)
09:39:31*mgdelacroix[m] quit (Ping timeout: 256 seconds)
09:39:34*pqflx3[m] quit (Ping timeout: 240 seconds)
09:39:44*zielmicha[m]1 quit (Ping timeout: 276 seconds)
09:39:47*stisa quit (Ping timeout: 265 seconds)
09:39:52*Abnegation quit (Ping timeout: 260 seconds)
09:40:16*petersjt014[m] quit (Ping timeout: 265 seconds)
09:40:23*byteflame quit (Ping timeout: 276 seconds)
09:48:43PMunchinsomniac_lemon, what about reading dom96's book?
09:49:55Araqkrux02: I pinged you
09:50:22insomniac_lemonPMunch, aside from lack of money, it says this in the about of the book: "It assumes that you know at least one other programming language and have experience writing software in it."
09:52:31insomniac_lemonMaybe it would be helpful, maybe it wouldn't. I'm not sure if it goes over general things or just goes into specifics
09:54:04*ftsf joined #nim
09:54:57FromGitter<krux02> Araq: I ponged you
09:56:06PMunchinsomniac_lemon, well it definitely assumes you know how programming work. But it's pretty simple to follow
09:56:20PMunchI think the first chapter (or maybe even the two first) are free
09:56:45PMunchAh chapter 1 and 8 are free
09:59:30*salewski joined #nim
09:59:37*xet7 quit (Read error: Connection timed out)
10:00:07*xet7 joined #nim
10:01:41*xet7 quit (Max SendQ exceeded)
10:01:41salewskiinsomniac_lemon, when you want to learn computer science, maybe cs50 from harward is a good free resource for you:
10:01:45salewskihttps://online-learning.harvard.edu/course/cs50-introduction-computer-science
10:02:04*xet7 joined #nim
10:04:48salewskiBut, as recently someone wrote in an amazon comment to doms book: Only very few people will start learning programming with Nim.
10:06:22salewskiAs not many people will lern driving with a Porsche or Ferrari.
10:07:43*leorize quit (Quit: WeeChat 2.1)
10:08:15PMunchIt's still nice to have that resource for those that want to start with Nim
10:11:53salewskiWell, that comment was on anazon.de, from user uta:
10:11:57salewskihttps://www.amazon.de/Nim-Action-Dominik-Picheta/dp/1617293431/ref=sr_1_1?ie=UTF8&qid=1524737404&sr=8-1&keywords=nim+in+action
10:13:02salewskiFirst I did not agree, but maybe Uta is right indeed. Most beginners may tend to start with a more "popular" language.
10:14:16ArrrrWhat people may learn coming from other languages is how managed memory works
10:14:32ArrrrIf they come from python
10:14:52*yglukhov_ quit (Ping timeout: 260 seconds)
10:16:42PMunchYeah I wrote a primer on that for a reddit question
10:16:54*yglukhov joined #nim
10:17:03PMunchhttps://peterme.net/nim-types-originally-a-reddit-reply.html
10:17:26salewskiPMunch, yes I saw that. Nice!
10:17:30PMunchTalks about objects, ref objects, heap vs. stack, and pointer vs. ref
10:18:02*pqflx3[m] joined #nim
10:20:49*salewski quit (Quit: WeeChat 2.0.1)
10:29:52*codevance1 joined #nim
10:33:01*Miguelngel[m] joined #nim
10:33:01*Abnegation joined #nim
10:33:02*dyce[m] joined #nim
10:33:02*solitudesf joined #nim
10:33:02*mgdelacroix[m] joined #nim
10:33:03*unclechu joined #nim
10:33:03*Demos[m] joined #nim
10:33:08*macsek1911[m] joined #nim
10:33:08*stisa joined #nim
10:33:08*byteflame joined #nim
10:33:08*survivorm[m] joined #nim
10:33:08*TheManiac joined #nim
10:33:08*narimiran[m] joined #nim
10:33:09*libman[m] joined #nim
10:33:09*amp907[m] joined #nim
10:33:09*zielmicha[m] joined #nim
10:33:09*hohlerde joined #nim
10:33:09*planetis[m] joined #nim
10:33:09*petersjt014[m] joined #nim
10:33:10*notdekka[m] joined #nim
10:33:10*krux02[m] joined #nim
10:38:57*xet7 quit (Read error: Connection timed out)
10:39:35*xet7 joined #nim
10:47:15*leorize joined #nim
10:50:06*dddddd joined #nim
10:51:18*insomniac_lemon quit (Quit: Leaving)
10:59:35*xet7 quit (Read error: Connection timed out)
11:00:06*xet7 joined #nim
11:05:52*nc-x joined #nim
11:14:54*nc-x quit (Ping timeout: 260 seconds)
11:24:58*leorize quit (Ping timeout: 264 seconds)
11:28:57*insomniac_lemon joined #nim
11:29:55*alpha1220 joined #nim
11:30:08alpha1220Araq: is this anywhere on the roadmap? https://github.com/nim-lang/Nim/issues/6024#issuecomment-312213197
11:30:51insomniac_lemon@mratsim Going over Gitter I see you were replying to me... I wasn't ignoring you, but your messages don't seem to be carrying over to IRC.
11:34:56alpha1220Also, looking at github, there are many issues tagged "Language design". What is their priority? Because many of them may break code, so better to do them as soon as possible or it may be too late?
11:35:24*xkapastel quit (Quit: Connection closed for inactivity)
11:36:25*alpha1220 quit (Quit: Page closed)
11:39:25*alpha1220 joined #nim
11:40:51*Arrrr1 joined #nim
11:40:51*Arrrr quit (Disconnected by services)
11:41:19alpha1220Another thing, I read somewhere (don't remember where) that it is usually faster to have a main() proc than global statements. Then why not restrict executable code to definitely have a main() proc like other languages do? What advantages do globally exectuable statements provide?
11:41:52*Arrrr1 quit (Client Quit)
11:42:27*alpha1220 quit (Client Quit)
11:44:06*xkapastel joined #nim
11:44:59insomniac_lemonAraq, taking a second look at the docs they are better at describing things than the other tutorials. I guess I really am looking for a sort of "required reading" sort of general overview intro to help with comprehension.
11:45:35insomniac_lemonI'll try to give it (and other resources) a fair swing, though. Noting if I have troubles
11:46:47*alpha1220 joined #nim
11:49:49*Zevv joined #nim
11:51:45insomniac_lemonAbove goes to @narimiran too
11:52:25ZevvHi #nim. How would I read the outputStream() of a process in an async way?
11:52:38alpha1220Well regarding the topic of programming books and tutorials, IMO the world needs more books on how to write huge programs with proper abstractions. Most books teach just syntax. For a beginner the biggest stumbling block is -
11:52:43alpha12201) To find a project idea that is easy enough to implement but challenging enough to satisfy their ego 2) Writing code bigger than a few hundred lines, because after that they don't understand how the code is supposed to be structured.
11:54:02ZevvI'm not really concerned about portability to windows, unix-specific is fine with me
11:54:51alpha1220Going from writing code that uses all global variables and very few functions to a real program (that is not a toy) with (mostly) proper abstractions is very satisfying but challenging as none of the books/tutorials teach that.
11:55:45*Vladar joined #nim
11:56:24alpha1220insomniac_lemon: Anything can be programmed by using the basic building blocks like functions and loops etc. You do not need to learn macros, or compiler internals or worry about the gc stuff unless you are at a very experienced stage.
11:56:55alpha1220For beginners, it is just better to try and get comfortable with writing non-toy stuff.
11:57:32alpha1220insomniac_lemon: So learn basic stuff, then try to code something.
11:57:40PMunchZevv, you could have a look at this: https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncproc.nim
11:57:49FromGitter<tim-st> @Araq in vmgen.nim there is in `rawGenLiteral` `internalAssert result < 0x7fff` this breaks compilation for me what is the limitation for?
11:58:05insomniac_lemonalpha1220, structure (like the sort of thing you mentioned) is the sort of thing I was thinking of.
11:58:20insomniac_lemonWell, one of them
11:58:49insomniac_lemonalpha1220, but like I said I'll give it a shot
11:59:20alpha1220There may be very few "Write X in Nim" style tutorials but you can follow most tutorials written for other languages very easily in Nim (the basic syntax of most mainstream or aspiring to be mainstream languages) is similar enough.
12:00:50insomniac_lemonYeah I'm aware, but was just worried about small ways things may differ. Even with Python.
12:01:08alpha1220Some interesting ones are - http://craftinginterpreters.com/contents.html and https://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html
12:01:23dom96salewski: I really wish Amazon made it easier to reply to reviewers...
12:01:35dom96I replied to one and it's not visible unless you specifically open the review
12:07:52*alpha1220 quit (Quit: Page closed)
12:10:29*xet7 quit (Read error: Connection timed out)
12:11:07*xet7 joined #nim
12:11:16*leorize joined #nim
12:18:59*insomniac_lemon quit (Quit: Leaving)
12:19:50ZevvPMunch: Thanks, will take a look
12:20:01*alpha1220 joined #nim
12:21:06alpha1220Something is wrong with the irc bridge
12:21:15alpha1220Some messages are not being relayed from gitter to irc
12:21:34alpha1220https://irclogs.nim-lang.org/ Check the log for @mratsim recent message
12:22:15*alpha1220 quit (Client Quit)
12:29:03*xet7 quit (Read error: Connection timed out)
12:29:36*xet7 joined #nim
12:33:07FromGitter<arnetheduck> I guess no one in here noticed that markdown won, and rst is dead 😲 it's so hard to make nim forum posts these days...
12:38:46FromGitter<krux02> @arnetheduck I learned about rst from the nim forum.
12:39:13FromGitter<krux02> so it's not dead, it is in active use in the nim forum
12:41:00FromGitter<krux02> but I would have preferred markdown
12:41:19FromGitter<krux02> but rst is also used for nim doc commets
12:41:54*Snircle joined #nim
12:52:47*athenot joined #nim
13:05:46FromGitter<arnetheduck> forum uses some bastardized rst/md mix - at least that's what the help at the bottom says
13:06:50FromGitter<diegogub> hi guys, Im trying to run a process in the background using spawn but I'm getting this error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ae1ceea270d7d37080b1ec8]
13:07:16FromGitter<diegogub> any idea how can I solve it? I need one variable to be global..as I'm using it as repository
13:12:56FromDiscord<claude> use threadvars
13:14:36Araqarnetheduck: the only important thing that is missing is the link syntax
13:16:00FromGitter<arnetheduck> I mostly get caught by it requiring two quote chars to get inline code formatting.. been doing lots of md lately so it's in my fingers to put only one :)
13:18:28*yglukhov quit (Remote host closed the connection)
13:19:01*yglukhov joined #nim
13:20:18Araqtim-st: either a bug or you use too many different constants
13:20:24Araqnot sure. :-)
13:23:27*yglukhov quit (Ping timeout: 240 seconds)
13:26:23*yglukhov joined #nim
13:32:31ZevvPMunch: I got it working by putting the outputHandle in an Asyncfile and making it nonblocking with fcntl
13:32:49*alpha1220 joined #nim
13:33:29*athenot_ joined #nim
13:33:53alpha1220Araq: can you please look at https://irclogs.nim-lang.org/26-04-2018.html#11:30:08, https://irclogs.nim-lang.org/26-04-2018.html#11:34:56, https://irclogs.nim-lang.org/26-04-2018.html#11:41:19
13:33:57*alpha1220 quit (Client Quit)
13:34:05*pwntus quit (Remote host closed the connection)
13:34:56*athenot quit (Ping timeout: 276 seconds)
13:35:22Araqtop level statements: conceptual clarity. no magic 'main' proc the outer world runs.
13:35:35*smt` joined #nim
13:35:55Araqlanguage design: depends on the concrete problem.
13:36:45Araq'import' and 'importPattern' -- consider it done.
13:37:17*smt quit (Ping timeout: 260 seconds)
13:37:27PMunchZevv, code snippet?
13:37:30FromGitter<gogolxdong> Is there any OAuth2 implementation in Nim?
13:37:51*alpha1220 joined #nim
13:38:06PMunchhttps://github.com/CORDEA/oauth
13:38:39alpha1220Araq: 👍
13:40:00*yglukhov quit (Remote host closed the connection)
13:40:35*pwntus joined #nim
13:43:33*alpha1220 quit (Quit: Page closed)
13:45:24*xkapastel quit (Quit: Connection closed for inactivity)
13:47:59*pwntus quit (Changing host)
13:47:59*pwntus joined #nim
13:49:01FromGitter<gogolxdong> Does this work?
13:51:14*nixfreak joined #nim
13:51:16FromGitter<gogolxdong> I remember we tried this.
13:53:29PMunchgogolxdong, don't know. Never tried it
13:55:50*skelett quit (Ping timeout: 276 seconds)
13:57:12*leru joined #nim
13:58:03leruHow come loadHtml is sometime GC unsafe but mostly save according to the compiler?
14:06:12Araqit should be GC safe.
14:12:41*nsf quit (Quit: WeeChat 2.0.1)
14:13:16lerui encountert it a few times. but the weird thing is, i could compile the same code a second time without the error coming up
14:15:13PMunchHmm, that definitely sounds like a bug
14:17:37leruhuh. ok. i think it's a NimLime bug
14:19:24*nixfreak quit (Remote host closed the connection)
14:20:00leruso, when there is a bug somewhere else, the cli tells me this, but NimLime pops up and tells theres another error in the loadHtml line
14:20:21Araqmaybe it's some --threads:on/off issue
14:20:38*nixfreak joined #nim
14:29:03*athenot joined #nim
14:32:36*vivus joined #nim
14:32:47*athenot_ quit (Ping timeout: 276 seconds)
14:33:27*yglukhov joined #nim
14:39:58ZevvPMunch: http://paste.debian.net/1022159/
14:43:12PMunchHmm, interesting
14:59:08*codevance1 quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
15:00:30lerui can't find how the get the attribute from an XmlNode as a string. .attrs["summary"] gives me a "<XmlAttributes, string>"
15:00:32*endragor quit (Remote host closed the connection)
15:00:39lerucan anyone help me out?
15:01:31*CodeVance joined #nim
15:03:49*mal`` quit (Quit: Leaving)
15:04:31PMunchProbably $
15:04:41*endragor joined #nim
15:04:44PMunchThe universal toString proc in Nim
15:05:49PMunchOr wait
15:07:13PMunchHmm, do you have a code snippet leru?
15:08:51*endragor quit (Ping timeout: 240 seconds)
15:09:13leruPMunch: it's basically this: echo loadHtml("toparse.html").findAll("table")[0].attrs["summary"]
15:13:07*smt_ joined #nim
15:13:15*miran joined #nim
15:14:57FromDiscord<claude> try .attr("summary")
15:17:09*smt` quit (Ping timeout: 264 seconds)
15:17:09*mal`` joined #nim
15:18:21*athenot quit (Ping timeout: 240 seconds)
15:19:00leruclaude: this worked. thanks
15:19:23lerui was looking at this btw: https://nim-lang.org/docs/htmlparser.html#example-transforming-hyperlinks
15:19:28leruis this deprecated, too?
15:22:02PMunchWait, that worked for you?
15:22:30leruthe .attr("summary") worked
15:22:32PMunchCause it didn't work for me
15:23:38lerui thought i tried it about an hour ago and it didn't work, but now it does
15:25:20FromGitter<data-man> @leru: Change href to HREF
15:26:51PMunchAh, import strtabs
15:27:12FromGitter<data-man> Hmm, it's worked for some html files only :(
15:27:14PMunchleru, this works for me: http://ix.io/18C1/
15:29:01FromDiscord<claude> is this a varargs[`$` bug?
15:30:01PMunchNot really
15:30:41PMunchattrs returns a String -> String table from strtabs
15:30:56PMunchSo you need to import strabs in order to use it
15:31:14PMunchAs that's what defines this: https://nim-lang.org/docs/strtabs.html#[],StringTableRef,string
15:33:10*xkapastel joined #nim
15:33:12FromGitter<data-man> No, I think that https://github.com/nim-lang/Nim/blob/devel/lib/pure/htmlparser.nim#L1980 must be ```newStringTable(modeCaseInsensitive)```
15:34:59*Trustable joined #nim
15:35:21PMunchYeah
15:35:27PMunchAttributes are meant to be case insensitive
15:36:16FromGitter<data-man> So PRed this tiny change :)
15:38:16*yglukhov_ joined #nim
15:39:12*nsf joined #nim
15:41:04*yglukhov quit (Ping timeout: 260 seconds)
15:41:15FromGitter<data-man> And for https://github.com/nim-lang/Nim/blob/devel/lib/pure/xmlparser.nim#L73 too
15:47:00leruso. strtabs doesn't help with .attrs[] and writing in all caps neither. also the attribute is in lower case
15:50:55PMunchleru, did you see the snippet I sent?
15:51:11PMunchThat's a modified version of what you said you had, but with imports that make it work
15:53:07*darithorn joined #nim
15:53:19*PMunch quit (Quit: Leaving)
15:53:55*rockcavera joined #nim
15:55:52leruoh, yes. i see now. i just replaced the () with [], but theres an s
15:55:58leruthank you!
15:56:35*yglukhov_ quit (Ping timeout: 240 seconds)
15:57:40*rockcavera quit (Remote host closed the connection)
15:58:25*yglukhov joined #nim
15:58:42lerucoming from java i feel quite unsafe with nim
15:59:58FromGitter<xmonader> after doing `pacman -S crystal` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ae1f77e6d7e07082b38ae7e]
16:00:44FromDiscord<claude> coming from java i feel like i lost weight
16:02:13*rockcavera joined #nim
16:05:45*Pisuke joined #nim
16:05:51*MyMind quit (Ping timeout: 256 seconds)
16:07:33*yglukhov quit (Read error: Connection reset by peer)
16:08:24*yglukhov joined #nim
16:31:56FromGitter<krux02> claude: yea I know that feeling, I used Scala in the past.
16:32:45FromGitter<krux02> Scala feels like Java but finally without the handcuffs and you can do stuff.
16:33:04FromGitter<krux02> The language is not getting in your way.
16:33:23FromGitter<krux02> and Nim is like that unleached feeling, when you are coming from c++.
16:33:50*xet7 quit (Read error: Connection timed out)
16:34:35*xet7 joined #nim
16:39:51*athenot joined #nim
16:43:38federico3unsafe?
16:43:40CodeVanceIs it alright to use template/macros when writing something for the nim stdlib?
16:47:01FromGitter<krux02> no
16:47:11FromGitter<krux02> templates yes, marcos, not really
16:47:19FromGitter<krux02> system.nim should stay free of macros
16:47:38FromGitter<krux02> when a module does not import macros, it should stay that way.
16:47:50FromGitter<krux02> but templates are fine
16:47:54*craigger quit (Quit: bye)
16:50:00*craigger joined #nim
16:50:18Araqhuh? macros are subject to the code review process like everything else
16:50:29Araqthey are not banned in the stdlib
16:51:43CodeVanceIf my program simply fails when I use templates. How am I supposed to go about analysing that?
16:51:51CodeVanceIt prints a stack trace
16:52:06CodeVancebut the stack trace is for the nim file after it's been expanded
16:52:18CodeVanceAnd I don't know how to analyse that
16:53:15FromGitter<geotre> CodeVance: post some code?
16:54:45*peanut_ joined #nim
16:55:51CodeVanceNo way to expand the code?
16:56:52*nsf quit (Quit: WeeChat 2.0.1)
16:57:12FromGitter<alehander42> good question, I usually write it as a macro and echo result.repr and when I am ready, I go back to template
16:57:24FromGitter<alehander42> but there must be another way
16:59:41CodeVancehmm oh well
16:59:48FromGitter<alehander42> i've been wrong the whole time :D there is getAst
16:59:50FromGitter<alehander42> https://nim-lang.org/docs/macros.html#getAst,untyped
17:00:19FromGitter<alehander42> so you can invoke it with your template invocation and echo repr of the expanded code
17:01:12*DarkArctic_ joined #nim
17:01:28FromGitter<alehander42> I always forget those helpers exist
17:01:38*DarkArctic quit (Read error: Connection reset by peer)
17:01:41CodeVancerepr meaning $?
17:02:03FromGitter<alehander42> well `.repr` if you want the code
17:02:12FromGitter<alehander42> or `.treerepr` if you want to see the nodes
17:02:50FromGitter<alehander42> afaik `$` should replace fully `.repr` one day, @Araq why do we still have no `$` <=> repr :?
17:03:02CodeVancelisprepr treerepr astgenrepr?
17:03:24FromGitter<alehander42> yeah lisprepr is similar to treerepr, but with lisp style format
17:03:28*DarkArctic__ joined #nim
17:04:00FromGitter<alehander42> wow I didn't know about astGenRepr :D
17:04:32*DarkArctic__ quit (Client Quit)
17:04:41FromGitter<alehander42> well I typically use treerepr as its output seems most clean to me
17:04:52*DarkArctic joined #nim
17:05:01FromGitter<alehander42> but astGenRepr can be useful if you write a macro
17:07:13*DarkArctic_ quit (Ping timeout: 248 seconds)
17:07:25CodeVancehttps://pastebin.com/wLpAiDEU
17:07:33*SenasOzys quit (Remote host closed the connection)
17:08:30FromGitter<data-man> @alehander42: Nobody reads the documentation :)
17:08:55FromGitter<alehander42> yeah I think I often find stuff in peoples code
17:08:56FromGitter<alehander42> :D
17:09:23FromGitter<alehander42> but I should review some of the stdlibs
17:09:32FromGitter<alehander42> research*
17:09:57FromGitter<data-man> Review is preferable! :)
17:12:24FromGitter<alehander42> :D
17:14:14*jrbrt joined #nim
17:18:53*yglukhov quit (Read error: Connection reset by peer)
17:19:06*yglukhov_ joined #nim
17:21:04*endragor joined #nim
17:25:19*jjido joined #nim
17:25:34*endragor quit (Ping timeout: 264 seconds)
17:27:35*SenasOzys joined #nim
17:31:06*jrbrt quit (Quit: jrbrt)
17:33:50darithornis it possible to cross compile from linux to windows?
17:35:06Araqyeah, with the right GCC toolchain.
17:35:08*CodeVance quit (Quit: Leaving)
17:37:07darithorni'm probably doing it wrong. i've been trying to use mingw but nim complains about vccexe. i tried using wine but that was a mess
17:37:44Araqchange your config
17:40:40darithornas in, amd64.windows.gcc? there's not a lot of documentation for the config file nim uses
17:41:11*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:42:19Araqfor example.
17:44:29FromGitter<tim-st> @Araq yes, it had too many entries in a Table, declaring it as `var` instead of `const` solved it.
17:49:34*Trustable quit (Remote host closed the connection)
17:53:33*SenasOzys quit (Remote host closed the connection)
17:53:45FromGitter<xmonader> is there a takewhile function in nim?
17:54:05FromGitter<xmonader> I found couple of functional pattern ones in sequtils, but can't find a takewhile?
18:03:44yglukhov_darithorn: in nimx repo `nake windows` will build windows binary, it depends on mxe cross compiler
18:03:57yglukhov_* if you're not on windows ofc =)
18:07:09*jrbrt joined #nim
18:07:42*NimBot joined #nim
18:07:58*natrys quit (Quit: natrys)
18:08:27miranxmonader: shameless self-promotion: https://github.com/narimiran/itertools
18:09:02FromGitter<xmonader> @miran thanks!
18:13:08FromGitter<xmonader> i can destructure a sequence into variables?
18:13:14*SenasOzys joined #nim
18:13:25miranunpacking? unfortunately no :(
18:13:31FromGitter<xmonader> :(
18:13:40miranthere's only tuple unpacking
18:14:54*jjido joined #nim
18:16:14*Snircle quit (Excess Flood)
18:17:01*Snircle joined #nim
18:17:53*ftsf quit (Ping timeout: 256 seconds)
18:27:01Araqjust write a macro for that
18:27:20*skelett joined #nim
18:27:30*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:30:05*peanut_ quit (Ping timeout: 260 seconds)
18:31:33*rockcavera quit (Read error: Connection reset by peer)
18:31:49*rockcavera joined #nim
18:31:49*rockcavera quit (Changing host)
18:31:49*rockcavera joined #nim
18:32:28*leru_ joined #nim
18:33:51*leru quit (Ping timeout: 240 seconds)
18:37:11AraqYardanico: are you working on the deprecated things?
18:38:02FromGitter<xmonader> guys ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ im getting invalid var sects for DMISections? [https://gitter.im/nim-lang/Nim?at=5ae21c8a15c9b031143c729f]
18:38:05FromGitter<xmonader> any idea?
18:42:23FromGitter<xmonader> also tried this and doesn't work ⏎ ⏎ ``` sects = initTable[string, Section]() ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5ae21d8f6d7e07082b398569]
18:44:36*codevance1 joined #nim
18:49:16FromGitter<xmonader> do i need to define hash on ref objects to be used in a table?
18:49:36FromGitter<xmonader> doesn't make sense to me, only keys needs to be hashable right?
18:52:31*ieatnerds joined #nim
18:53:05ieatnerdsHey! If possible could someone explain the difference between a template and a proc?
18:54:57*codevance1 quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
18:55:17FromDiscord<claude> templates embed AST, procs are called at runtime
18:55:37*CodeVance joined #nim
18:56:27FromDiscord<claude> so when you have `template a = b`, when you write `a` it's expanded to `b`
18:58:11ieatnerdsGotcha, thank you!
19:01:16*freddy92 joined #nim
19:04:09*Vladar quit (Quit: Leaving)
19:04:27*fredrik92 quit (Ping timeout: 240 seconds)
19:25:34*CodeVance quit (Ping timeout: 264 seconds)
19:27:03*noonien quit (Quit: Connection closed for inactivity)
19:29:33*xet7 quit (Read error: Connection timed out)
19:30:06*xet7 joined #nim
19:36:09*shashlick1 quit (Ping timeout: 260 seconds)
19:40:08*jjido joined #nim
19:42:51*arecaceae quit (Remote host closed the connection)
19:43:14*arecaceae joined #nim
19:46:41*jrbrt quit (Quit: jrbrt)
19:47:34*DarkArctic quit (Read error: Connection reset by peer)
19:51:12*rockcavera quit (Remote host closed the connection)
19:54:53*shashlick joined #nim
19:59:27*shashlick quit (Client Quit)
20:01:12*shashlick joined #nim
20:03:09*SenasOzys quit (Remote host closed the connection)
20:10:08FromGitter<xmonader> @mratsim can you help with an example?
20:13:56shashlickis it possible to use readthedocs.org for nim generated docs?
20:18:08*ieatnerds quit (Quit: Leaving)
20:26:40shashlickfederico3 ^^^ - I see you submitted nim-httpauth but it has no actual docs
20:33:22shashlicklooks like ziotom78 pulled it off somehow: http://nimcfitsio.readthedocs.io/
20:33:27*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:36:44*CodeVance joined #nim
20:37:40CodeVanceplease forgive my ignorance but why does this say it's a horrible example? https://github.com/zah/grip-lang/blob/master/examples/c%2B%2Biface/irrlichtex.nim
20:38:47AraqCodeVance: .link command platform specific
20:39:00Araqmanual namespace emits.
20:39:50CodeVanceBut it's not like nim has a method to interface with C++?
20:40:24CodeVanceSo if you got rid of those factors it would be a non-horrible example?
20:40:53*rockcavera joined #nim
20:43:01CodeVanceOh I see the docs says its better to use the namespace::identifier notation
20:43:07shashlickis there a recommended place to put nimble package documentation? generating the html with nim doc is super easy but hosting?
20:43:28CodeVanceshashlick, isn't github easy enough?
20:44:18CodeVanceSomeone asked if there was some way to upload generated docs to readthedocs
20:44:39shashlicki could use github pages but it's not as straightforward for nimgen wrapped projects
20:45:08shashlickya looks like zio_tom78 figured it out years ago, wonder if his python script still works - https://forum.nim-lang.org/t/678
20:45:24shashlickbut i'm more curious about the nim way of doing htis
20:45:25shashlickthis
20:45:45CodeVanceshashlick, how do you get nimgen working on stable nim
20:46:00*xet7 quit (Read error: Connection timed out)
20:46:06shashlickI need to figure that out - what version are you on
20:46:36*xet7 joined #nim
20:46:40CodeVance1.18.0
20:46:51CodeVanceis this version broken?
20:47:29shashlickit should work with 0.18.0
20:48:26CodeVanceyes it asks you to redownload nim from git
20:48:44*SenasOzys joined #nim
20:48:50CodeVanceoh but it was c2nim that caused that
20:49:32FromGitter<xmonader> to be honest, this is frustrating, 2 hours with Table, and TableRefs for what's supposed to be simple thing
20:49:35shashlickya I could make nimgen just point to the older version of c2nim but will have to retest the wrappers I have
20:50:17CodeVanceI should just not call nimble install nimgen
20:50:24CodeVancejust download from the net
20:50:25CodeVancecopy pasta
20:50:32Araqxmonader: 'import tables' ?
20:50:47shashlickya but you *might* still run into issues
20:51:09Araqwe have plenty of table usages everywhere, (nim)grep for it
20:51:11shashlicksince when you try to nimble install nimbass for example, it will check for nimgen which *might* check for c2nim again, I'm not sure
20:51:33Araqfrom your snippet it was impossible to say what you're doing wrong.
20:51:45shashlickaraq: is there a recommended way for nimble packages to host docs?
20:52:06Araqshashlick: there was nimble.io but I don't know how ready it is
20:52:26CodeVancedoesn't nimble.directory already have hosted docs?
20:52:42FromGitter<xmonader> @Araq I'm trying to port some library i wrote in python to parse dmidecode output into nim
20:53:23Araqah, nimble.directory then
20:53:58FromGitter<xmonader> https://gist.github.com/xmonader/577afbd179a00cef664e5b192c7e07e2
20:54:05*miran quit (Ping timeout: 256 seconds)
20:54:22FromGitter<xmonader> and this is my original python project https://github.com/xmonader/dmiparse/blob/master/dmiparse/__init__.py
20:55:01FromGitter<xmonader> I'm stuck with Tables, I really think the docs should get more love for such important data structure..
20:55:05shashlickI guess I need to check with federico3, it does show a 'hosted docs' section but unclear how to get stuff to show up when you click
20:55:44federico3uh?
20:56:19Araqxmonader: your code does compile for me
20:56:25Araqso what's the question?
20:56:28CodeVanceshashlick, https://nimble.directory/pkg/nimgame2 it has a hosted docs button on the side
20:57:15federico3shashlick: the main page at https://nimble.directory/ goes " Nim Package Directory generates and hosts documentation for packages.". If you think it's unclear I'll refrase it
20:57:19FromGitter<xmonader> @Araq It does compile but when ran against a sample i get illegal access ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ae23d2f62316e050503719e]
20:57:49federico3perhaps I should add a footer to every page that explains that
20:58:10shashlickno I'm trying to understand what I need to do as a packager to make sure your directory shows the docs
20:58:11FromGitter<xmonader> my guess is the props field needs to be called with initTable, isn't that done automatically with zero values?
20:58:28FromGitter<xmonader> or i need to define custome constructor to initialize it.. that's if it even the problem
20:59:37FromGitter<xmonader> @mratsim according to the docs it's okay no? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ae23db9270d7d37080d79ec]
20:59:59FromGitter<xmonader> for sections i use initTablestring, Section ()
21:02:12FromGitter<xmonader> Aha, let me try thank a ton
21:03:41FromGitter<xmonader> ```this solved it``` [https://gitter.im/nim-lang/Nim?at=5ae23ead5d7286b43a70582b]
21:04:48CodeVanceshashlick, nimgame2 just has a folder called docs with html inside :|
21:05:08shashlickfederico3: ok looks like you have an older version of nimble, can you please verify? there was an issue where nimble wasn't installing dependencies: https://nimble.directory/ci/badges/nimbass/nimdevel/output.html
21:06:23shashlickCodeVance: ya that's on github, but federico3 is generating the docs and showing those: https://nimble.directory/docs/nimgame2/
21:06:26federico3nimble v0.8.10 compiled at 2018-04-11 22:46:28
21:06:36CodeVanceoh ya
21:06:39shashlickalso doesn't seem like the docs are cached - it seems to generate every time
21:06:39federico3shipped with Nim 0.18.0
21:07:10federico3thanks for the hints - I'm going to add a footer with some info
21:08:34shashlickfederico3: does directory generate teh docs every time someone visits the site? or does it cache info?
21:09:13federico3it's supposed to cache but it might invalidate the cache if something is not working right
21:11:14shashlickok looks like my fix isn't delivered into nimble yet: https://github.com/nim-lang/nimble/issues/280, https://github.com/nim-lang/nimble/pull/464
21:14:44*jrbrt joined #nim
21:25:15shashlickso in order to get nimgen wrapper docs online, I need to get that fix into nimble, get the release into nimble.directory and then ensure the docs are generated as expected - is anything easy :| cc @mratsim
21:25:52*xet7 quit (Read error: Connection timed out)
21:26:35*xet7 joined #nim
21:26:48CodeVancebtw, is nimble and c2nim part of nim's repo or are they seperate... I want to know whare to make a commit if I actually do something
21:26:59shashlickboth are separate
21:29:00*CodeVance quit (Read error: Connection reset by peer)
21:31:57*yglukhov_ quit (Ping timeout: 240 seconds)
21:32:52*yglukhov joined #nim
21:50:14*xet7 quit (Read error: Connection timed out)
21:50:35*xet7 joined #nim
21:52:17FromGitter<xmonader> my first nim project https://github.com/xmonader/nim-dmidecode please review :)
21:53:01Araquse the 'result' variable.
21:53:47shashlicknice work - smbios guy
21:57:56dom96xmonader: nice! .md files support Nim syntax highlighting :)
21:59:47dom96It seems many people don't realise they can write ```nim
21:59:57dom96Most new packages have plain black and white Nim code in their readmes
22:01:39*endragor joined #nim
22:03:49dom96Surely there is a better way? https://github.com/nim-lang/Nim/pull/7694
22:04:00dom96Why is every distro adding it's own damn suffix?
22:04:35Araqwe shouldn't use even cleverer wildcards here
22:04:44Araqso this PR is fine.
22:04:46AraqIMO.
22:04:56Araqmaybe we can remove older versions though.
22:05:36FromGitter<xmonader> Thanks guys! I'd like to sum up my experience in a blogpost or somethig or maybe even a tutorial how to create a library in nim?
22:05:41FromGitter<xmonader> What do you guys think?
22:06:21*endragor quit (Ping timeout: 264 seconds)
22:06:45shashlickdom96: nimble test is still failing
22:07:02shashlickany chance of pulling in my PR?
22:07:16*smt_ quit (Read error: Connection reset by peer)
22:07:34*smt_ joined #nim
22:07:42dom96shashlick: which PR?
22:07:55shashlickhttps://github.com/nim-lang/nimble/pull/464
22:08:34*xet7 quit (Read error: Connection timed out)
22:09:06*xet7 joined #nim
22:09:06dom96is this related to 'nimble test' failing?
22:10:10dom96IIRC I decided to verify this PR properly because the last fix for this issue was wrong
22:10:17*CodeVance joined #nim
22:10:17*CodeVance quit (Client Quit)
22:10:27*CodeVance joined #nim
22:10:31dom96But I've got Uni exams now so maybe after those are done :)
22:11:56shashlicksure no worries, I forgot that it never made it in, nimble.directory doesn't work for nimgen wrappers so that's when I remembered
22:12:16dom96I see
22:12:56shashlicktester for #428 is failing: https://github.com/nim-lang/nimble/issues/428
22:13:03dom96Unfortunately Nimble development is a little bumpy :)
22:13:14dom96as is the development of most of my projects
22:13:26FromGitter<xmonader> @dom96 thanks for the md tip!
22:14:11shashlickno worries, we all have lives
22:15:29shashlickit seems the build might be working again, based the travis history, although the test does fail on my local machine
22:16:36*jjido joined #nim
22:20:23shashlicknope, the test case for issue #428 still fails
22:22:27*leru_ quit (Ping timeout: 240 seconds)
22:27:40*tfff1 joined #nim
22:28:22tfff1does anyone know whether nim currently supports TLSv1.2?
22:29:15tfff1I might just be doing something wrong, but when I try to connect to Discords' API I get: " error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number"
22:37:20*leru_ joined #nim
22:38:51*nixfreak quit (Ping timeout: 240 seconds)
22:42:34CodeVanceSomeone should write an article about making package managers ...
22:42:39CodeVanceEveryone uses them
22:43:17CodeVancetfff1, I think you're using the wrong api version?
22:44:57*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:45:10*jrbrt quit (Quit: jrbrt)
22:46:41*endragor joined #nim
22:51:21*endragor quit (Ping timeout: 264 seconds)
22:52:58tfff1@CodeVance I've got the context configured as with the default protVersion
22:53:06tfff1do I need to specify one in particular?
22:53:31tfff1I get the same error with protVersion=protTLSv1
22:54:11tfff1that error above is with TLS specified
22:54:15tfff1with the default I get:
22:54:25tfff1 error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
23:02:47CodeVancefile:///C:/Users/Alterna/Documents/nim-0.18.0/doc/html/net.html
23:02:51CodeVanceis says something about ssl
23:02:59CodeVancetfff1,
23:03:45tfff1thanks
23:04:02CodeVanceoops
23:04:07tfff1I've been having a look in there, but it doesn't specifically mention which version of TLSv1 it uses
23:04:08CodeVanceThat's my internal docs XD
23:04:17tfff1:)
23:04:19CodeVancerun nim with -d:ssl
23:04:22tfff1https://nim-lang.org/docs/net.html
23:05:00tfff1I am
23:05:10tfff1maybe I've got the wrong version of OpenSSL
23:05:33CodeVancehttps://nim-lang.org/docs/httpclient.html#ssl-tls-support
23:06:29*xet7 quit (Read error: Connection timed out)
23:07:06*xet7 joined #nim
23:07:38CodeVanceit says ## OpenSSL support
23:07:38CodeVance##
23:07:38CodeVance## When OpenSSL is dynamically linked, the wrapper provides partial forward and backward
23:07:38CodeVance## compatibility for OpenSSL versions above and below 1.1.0
23:10:07tfff1my build command atm is: nim c -r -d:ssl --stacktrace:on enchat.nim
23:10:21CodeVanceI think nim uses ssl 1.1 that's the dll they have in their bin folder
23:10:29tfff1I assume it's found openssl somewhere because it compiles
23:10:39CodeVanceI think you can override the dll used for openssl
23:10:49CodeVanceIt's inside nim's bin folder
23:12:00tfff1there aren't any dlls in my bin folder
23:12:23tfff1just the nim exe (plus nimble, nimgrep, nimsuggest, vccexe)
23:12:47CodeVanceyeah I'm on windoz
23:13:06FromGitter<Varriount> @Varriount ⏎ Araq: Isn't the current getCustomPragma procedure somewhat ambiguous? ⏎ If I have `getCustomPragma(someVar.someProc)`, and the proc takes no arguments, that could either be a request to retrieve the pragma of the procedure, or the pragma of the returned value.
23:13:06tfff1same
23:13:06*gangstacat quit (Quit: Ĝis!)
23:13:26tfff1hmm
23:13:32*leru_ quit (Remote host closed the connection)
23:14:55CodeVancevarriount, I thought templates don't use the value of the proc just the proc itself
23:15:23CodeVancetfff1, libssl-1_1.dll
23:18:12tfff1I think it must be missing
23:18:28*gangstacat joined #nim
23:18:30tfff1once I try to statically link to openssl the compilation fails
23:19:57CodeVancedid u download nim from the website?
23:25:28tfff1I've been installing using choosenim
23:25:59*CodeVance shrugs
23:26:23tfff1where exactly should I put the dlls?
23:28:07CodeVanceI don't know how choosenim works
23:29:01tfff1where do I place them in a normal install?
23:29:18CodeVanceYou shouldn't have to
23:29:21CodeVancein the bin folder
23:32:59*xet7 quit (Read error: Connection timed out)
23:33:35*xet7 joined #nim
23:36:24tfff1thanks @CodeVance
23:36:34tfff1the SSL tests run perfectly now
23:36:55tfff1unfortunately I'm still getting the SSL Error
23:37:04tfff1unfortunately I'm still getting the SSL Error when trying to connect
23:40:02enthus1asttfff1: https://github.com/nim-lang/Nim/blob/master/lib/wrappers/openssl.nim#L310 maybe (or something nerby)?
23:40:09enthus1astnear
23:41:21*Pisuke quit (Ping timeout: 248 seconds)
23:48:39tfff1how would I disable older SSL versions altogether?
23:48:48tfff1based on this: http://openssl.6102.n7.nabble.com/quot-SSL3-GET-RECORD-wrong-version-number-quot-td8310.html
23:49:09tfff1it looks like they might be refusing the handshake because of such an old version?
23:49:49*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
23:50:21*Lord_Nightmare joined #nim
23:50:26enthus1asti had this once where my code refuses to talk to the remote because of older version
23:53:18tfff1if it makes any difference, I'm trying to use this through the websocket.nim (https://github.com/niv/websocket.nim/) library
23:54:55enthus1asthttps://github.com/niv/websocket.nim/blob/master/websocket/client.nim#L37
23:56:14enthus1astmaybe try other values for `newContext(protTLSv1, verifyMode = CVerifyNone)`
23:56:50tfff1I've tried using the defaults
23:56:57tfff1but the same thing happens
23:58:22enthus1astalso tried protSSLv23 ?
23:59:41*Snircle quit (Read error: Connection reset by peer)
23:59:47*Snircle_ joined #nim