<< 06-01-2019 >>

00:02:28*Ven`` joined #nim
00:15:33*cspar_ joined #nim
00:16:18*cspar quit (Ping timeout: 245 seconds)
00:19:49FromGitter<timotheecour> @dom96 how familiar are you with osenv.nim ? there’s some design aspect that causes issues and wondering if we can change it. namely the fact that `environment`is being tracked makes multithreaded use of this module very buggy
00:23:01xacedoes choosenim have a command to clean up unnecessary files or remove old versions? or should I just go in and remove it manually?
00:24:16xaceis it safe to delete the c_code directory? or is it used by nim?
00:24:57FromGitter<dom96> Not all that familiar I'm afraid
00:26:46*Trustable quit (Remote host closed the connection)
00:27:40xacebased on https://github.com/dom96/choosenim/issues/98 I guess it's safe to remove the c_code directory
00:55:24*zachk quit (Quit: Leaving)
01:10:41*wildlander joined #nim
01:23:31*theelous3_ quit (Ping timeout: 260 seconds)
01:23:32*zyklon quit (Read error: Connection reset by peer)
01:35:42*PMunch quit (Remote host closed the connection)
01:41:21*zyklon joined #nim
02:26:56*cspar joined #nim
02:27:28*Geezus42 quit (Ping timeout: 250 seconds)
02:28:47*cspar_ quit (Ping timeout: 240 seconds)
02:29:13*Geezus42 joined #nim
02:36:18*cspar quit (Ping timeout: 258 seconds)
02:41:54*Tyresc quit (Quit: WeeChat 2.4-dev)
03:00:34*banc quit (Quit: Bye)
03:17:38*banc joined #nim
04:11:15*wildlander quit (Quit: Konversation terminated!)
04:33:32*cspar joined #nim
04:40:39*kapil____ joined #nim
05:17:42*vlad1777d quit (Ping timeout: 246 seconds)
05:45:27*leorize quit (Ping timeout: 268 seconds)
06:23:49*sheerluck joined #nim
06:46:53*dddddd quit (Remote host closed the connection)
07:37:50*nsf joined #nim
07:47:20shashlickI'm working on a pr to implement that xace
08:07:08*narimiran joined #nim
08:07:25*narimiran quit (Remote host closed the connection)
08:09:32*narimiran joined #nim
08:13:28*cspar_ joined #nim
08:14:38*Vladar joined #nim
08:15:39*cspar quit (Ping timeout: 244 seconds)
08:39:58*leorize joined #nim
08:48:55Araqtimotheecour: how is it buggy? it uses thread local storage and only on Windows iirc
09:22:09*stefanos82 joined #nim
09:22:41*zyklon quit (Read error: Connection reset by peer)
09:24:31*cspar joined #nim
09:27:01*cspar_ quit (Ping timeout: 246 seconds)
09:31:09*cspar quit (Ping timeout: 268 seconds)
09:37:48*zyklon joined #nim
09:40:27*Senketsu joined #nim
09:41:16*Senketsu quit (Client Quit)
10:33:30Araqhttps://nim-lang.org/araq/quirky_exceptions.html I did it again, wrote an article over the holidays
10:33:33Araqbbl
11:09:06ZevvIs injecting also trivial with nested calls like f(g())?
11:09:35*kapil____ quit (Quit: Connection closed for inactivity)
11:12:16Zevvwell, that's of course the same as in your "OMG?! That's terrible" section
11:14:12*Vladar quit (Remote host closed the connection)
11:59:42ZevvThins thing seems so simple and logical, it makes you wonder why this is not how it always worked.
12:13:04sheerluckIn Nim I miss f-strings from Python: I like "Name is {p.name}, he is {p.age} years old" more than "Name is " & p.name & ", he is " & $p.age & " years old"
12:13:31Zevvit's there
12:13:40Zevvsrtformat
12:14:00Zevvecho &"Name is {p.name}, hi is {p.age} years old"
12:14:25Zevvhttps://nim-lang.org/docs/strformat.html
12:14:27FromGitter<xmonader> wasn't it fmt"{varname}" ?
12:15:02ZevvThere's fmt and & with slightly different semantics
12:15:17sheerluckoh thank you
12:17:43*Notkea quit (Read error: Connection reset by peer)
12:18:30*Notkea joined #nim
12:19:41*prohyon joined #nim
12:33:35*cspar joined #nim
12:34:04*theelous3_ joined #nim
12:43:13*prohyon quit (Read error: Connection reset by peer)
13:06:01*Ven`` quit (Read error: Connection reset by peer)
13:13:07*theelous3_ quit (Ping timeout: 240 seconds)
13:22:54*dddddd joined #nim
13:23:37AraqZevv, "trivial" or not, some Java-to-C compilers do that
13:26:34*cspar quit (Ping timeout: 250 seconds)
13:31:34ZevvI dared call it 'trivial' after seeing the size of your changes in Git :)
13:31:55FromGitter<arnetheduck> nice, @Araq - good article! makes me think of the fpu which works pretty much this way.. really good when, as you point out, continuing execution makes no permanent damage to the state / say, is inside a transaction or stopped because the system / fwrite prevents you - assuming you can plug the leaks
13:32:46*cspar joined #nim
13:34:09FromGitter<arnetheduck> re string formatting, is there any *one* formatter people prefer over the others?
13:35:06Araq&"" works much better because it does the right thing for &"\n"
13:35:46Zevvwill throwing a second exception just overwrite currentException, or will throw also check and warn?
13:44:09Araqin practice it seems better to stack them
14:25:38leorizeAraq: have you posted your blog post anywhere other than IRC? :P
14:26:42*kobi7 joined #nim
14:27:18narimiranleorize: i think it is better to wait for monday for some promotion. sunday is a very slow day and bad for this
14:27:58kobi7Hi guys, how do I unquote html entities in an html file? what 'htmlparser.entityToUtf8' does to a single character.
14:35:36kobi7is there a hash table of entities and their utf8 repr, so I can multireplace the text?
14:36:05Araqcertainly, but it might not be exported :P
14:36:53*Vladar joined #nim
14:38:21Araqarnetheduck: maybe it's just escape analysis at work here. Don't store state from a raising proc into escaping memory
14:39:54Araqleorize, I posted it here for some early feedback before we "release" it into the wild
14:44:42*sagax quit (Ping timeout: 246 seconds)
14:54:53Zevvkobi7: it seems there is no table, entityToUtf8 uses entityToRune which is a proc with a large case
14:55:38kobi7so for this use case, implement my own?
15:04:41*lritter joined #nim
15:04:42Araqkobi7, you can parseHtml your string
15:05:00Araqthe lack of HTML tags shouldn't matter, it's a forgiving parser
15:10:22kobi7htmlparser is fine, but the text is a little mess, even some tags were encoded, for example / became &#x2F;
15:10:36kobi7sorry
15:10:37kobi7bbl
15:10:40*kobi7 quit (Quit: Leaving)
15:16:49*sagax joined #nim
15:19:42*Ven`` joined #nim
15:19:57dom96narimiran: I think worrying about what day to submit things on is going too far :)
15:20:08narimiranhaha, might be
15:20:37*dom96 submits
15:21:48narimirandom96: while i have you here: do you want to take a look at https://github.com/nim-lang/packages/pull/979 ?
15:22:05dom96Sure
15:22:14dom96Araq: Your forum's posts need a unique <title> ;)
15:22:27*vegax87 quit (Ping timeout: 252 seconds)
15:22:29narimiransince it is my PR i didn't want to be the one who also merges it
15:22:52dom96narimiran: Looks good :)
15:22:55narimirannow that was fast :)
15:23:00dom96And yeah, best to get someone to take a look
15:25:36*thumbs_scum quit (Read error: Connection reset by peer)
15:25:40dom96Sooo, who's coming to FOSDEM?
15:47:54FromGitter<zacharycarter> I wish...
15:48:18FromGitter<zacharycarter> I'm pretty sure @alehander42 was asking about it a few weeks ago
15:51:22*vegax87 joined #nim
15:53:36*leorize quit (Ping timeout: 252 seconds)
15:58:25*Ven`` quit (Ping timeout: 268 seconds)
15:59:27*aziz joined #nim
16:02:31Zevvdom96: i might if my wifes schedule allowes. If I go, bring me a Nim shirt :)
16:05:02dom96heh okay, I'll try
16:11:41*dom96_w joined #nim
16:12:24*sheerluck quit (Quit: Leaving)
16:20:50FromGitter<kaushalmodi> I cannot go to FOSDEM, but where do I get the official Nim t-shirt?
16:20:58*endragor joined #nim
16:22:00*dom96_w quit (Ping timeout: 258 seconds)
16:22:29Zevvhttps://teespring.com/nimlang1#pid=374&cid=100046&sid=front
16:23:53FromGitter<kaushalmodi> cool! thanks
16:33:08*leorize joined #nim
16:41:12FromGitter<alehander42> @dom96 @zacharycarter yeah, I was asking if there is a meetup / anything scheduled for fosdem
16:55:39dom96alehander42 what time will you arrive in Brussels?
17:00:38*aziz quit (Ping timeout: 250 seconds)
17:04:35Calinouhmm, I could buy a Nim t-shirt
17:04:43Calinouneed to check how much shipping costs to France though
17:09:45*lukd joined #nim
17:10:20*xet7 quit (Quit: Leaving)
17:12:21*endragor quit (Remote host closed the connection)
17:13:45*wildlander joined #nim
17:13:52*endragor joined #nim
17:14:41*aziz joined #nim
17:15:53*lukd quit (Quit: WeeChat 2.3)
17:23:54*endragor quit (Remote host closed the connection)
17:30:23*Ven`` joined #nim
17:38:08*endragor joined #nim
18:01:44*aziz quit (Ping timeout: 250 seconds)
18:11:02FromGitter<alehander42> @dom96 1 feb around 2-3 pm probably
18:14:25*endragor quit (Remote host closed the connection)
18:15:35*aziz joined #nim
18:20:21*endragor joined #nim
18:24:12*endragor quit (Remote host closed the connection)
18:26:43*dddddd quit (Ping timeout: 245 seconds)
18:27:02*theelous3_ joined #nim
18:30:02*qwertfisch quit (Ping timeout: 252 seconds)
18:33:03*dddddd joined #nim
18:38:22dom96alehander42: Ahh, I'll probably be there around 7pm
18:43:02*Ven` joined #nim
18:57:55*qwertfisch joined #nim
19:02:06*aziz quit (Ping timeout: 268 seconds)
19:15:12*aziz joined #nim
19:15:12*zyklon quit (Read error: Connection reset by peer)
19:16:24*aziz quit (Client Quit)
19:24:19*DesDeux joined #nim
19:32:28*zyklon joined #nim
19:39:32*Ven`` quit (Read error: Connection reset by peer)
19:40:34*Ven` quit (Ping timeout: 258 seconds)
19:44:16FromGitter<rayman22201> @araq great article. I love the name "quirky exceptions" lol. Small English grammar error : "judging from the limited amount of experiments that I have been able to pursuit" - pursuit should be pursue
19:44:36*Ven`` joined #nim
19:45:36FromGitter<rayman22201> I would love to go to Fossdem but flights to Europe from the US are annoyingly expensive.
19:52:48FromGitter<alehander42> @dom96 well, I planned travelling somewhere on 1st anyway, I supposed a nim meeting would be in the weekend
19:54:05FromGitter<alehander42> @rayman22201 maybe if we had low cost supersonic airflights, this could work
19:54:18FromGitter<alehander42> no idea, but I hate i missed concord
19:54:44*rect0x51 joined #nim
19:55:28*Ven`` quit (Ping timeout: 245 seconds)
19:57:20rect0x51what's the difference between `(ref IOError)(getCurrentException())` and `cast[ref IOError](getCurrentException())`?
19:58:43*Trustable joined #nim
20:00:16*nsf quit (Quit: WeeChat 2.3)
20:00:46leorizerect0x51: one use the object conversion
20:00:52leorizeone `cast`
20:01:05leorizethe former got error checking
20:02:20rect0x51the former is safer but can only used for references?
20:02:51*troido joined #nim
20:05:55*DesDeux quit (Quit: Page closed)
20:07:51rect0x51leorize: nvm
20:23:24*xet7 joined #nim
20:24:41FromGitter<rayman22201> @alehander42
20:24:42*endragor joined #nim
20:25:07FromGitter<rayman22201> Lol the concord was a marvel of engineering but was not cheap!
20:27:57Araqrayman22201; ah ok thanks, I used a new word :P
20:28:52*endragor quit (Ping timeout: 246 seconds)
20:34:28*Geezus42 quit (Quit: WeeChat 2.3)
20:35:36FromGitter<rayman22201> NP. English is a weird language
20:36:52Calinoudom96: I just ordered a Nim t-shirt :p
20:37:21FromGitter<zacharycarter> English is totally normal - because I only know one language.
20:37:49FromGitter<zacharycarter> Unless you call my horrible Spanish, knowledge ;P
20:38:15FromGitter<alehander42> @rayman22201 yeah, but if they continued to fly, maybe competition would spin up some competitors and cheaper airlines using them, no idea :D
20:38:17FromGitter<zacharycarter> I wish the t-shirt place wasn't just a giant middleman
20:38:38FromGitter<zacharycarter> because if you order a t-shirt AND a mug - you're paying for shipping, twice, even to the same destination
20:38:57FromGitter<zacharycarter> I ordered like four or five hoodies through that site once and the shipping was almost as much, if not as much or more, than the actual merchandise
20:39:09FromGitter<alehander42> well, you'll have to drink tea from your tshirt
20:39:16Calinouit's €4 here
20:39:18FromGitter<zacharycarter> :P
20:39:19Calinou(for the shipping)
20:39:40FromGitter<zacharycarter> I think the shipping fee varies depending on where the printing is fulfilled
20:39:51Zevvyou can also just upload the nim logo to some local shop and have it printed on a shirt an a mug
20:39:53FromGitter<zacharycarter> I mean - yes - I agree 4 Euros is not bad for shipping
20:40:11Calinouit's alright, it's similar to Redbubble where I ordered a few other shirts
20:40:17FromGitter<zacharycarter> but if you order five plus items and they all have at least that shipping fee
20:40:27FromGitter<zacharycarter> I - personally - wouldn't be happy
20:40:49FromGitter<zacharycarter> Zevv: very true
20:41:13ZevvI'm a bit picky with shirt qualities, and you never know what you'll get from these shops
20:41:20FromGitter<zacharycarter> they do tend to suck
20:41:45FromGitter<zacharycarter> the Nim t-shirt I got wasn't printed very well - there wasn't enough ink
20:42:21FromGitter<zacharycarter> and the shirt is a gildan shirt - so are their hoodies
20:42:28FromGitter<zacharycarter> which, aren't great to begin with
20:42:56*Ven`` joined #nim
20:44:04ZevvAraq: can you explain in a few words why Peg is an invalid type for const, or is that very complex stuff?
20:44:35Araqit contains a 'case' and/or a ref
20:45:07Zevvits a variant type indeed
20:51:30*endragor joined #nim
20:52:34FromGitter<Varriount> @zacharycarter I can speak some German...
20:53:38FromGitter<sheerluck> @Varriount I speak russian
20:55:47FromGitter<alehander42> i can speak both horrible german and horrible russian
20:56:21FromGitter<alehander42> we really need a learning-deustch-slash-nim channel, but it will lead Araq to a herz attack
20:56:51*Ven`` quit (Ping timeout: 258 seconds)
20:57:03FromGitter<zacharycarter> @Varriount that's infinitely more useful in the Nim world :P Also - happy new year buddy!
21:07:59*Ven`` joined #nim
21:14:16*Ven`` quit (Ping timeout: 244 seconds)
21:17:02*Trustable quit (Remote host closed the connection)
21:18:45*zyklon quit (Read error: Connection reset by peer)
21:22:11*Ven`` joined #nim
21:31:21*endragor quit (Remote host closed the connection)
21:34:14*zyklon joined #nim
21:36:43*Geezus42 joined #nim
21:54:48*narimiran quit (Quit: Leaving)
21:54:48*zyklon quit (Read error: Connection reset by peer)
22:03:36*Vladar quit (Remote host closed the connection)
22:06:51*vendethiel- joined #nim
22:10:55*zyklon joined #nim
22:11:19*Tyresc joined #nim
22:26:06*endragor joined #nim
22:30:10FromDiscord_<exelotl> when I import the unicode module with --os:standalone, I get the following error
22:30:15FromDiscord_<exelotl> `msys32\home\geckojsc\nim\nim-0.19.0\lib\pure\unicode.nim(252, 3) Error: type mismatch: got <seq[char]> but expected 'string'`
22:31:08*endragor quit (Ping timeout: 272 seconds)
22:31:44Araqwe know.
22:31:56FromDiscord_<exelotl> I'm not intending to use it at runtime but I would like to parse JSON at compile time. Is such a thing possible?
22:31:57Araq--os:standalone means you're on your own
22:32:18Araqah bah
22:32:54Araqthe old compiletime vs runtime problem. maybe use staticExec
22:33:27Araqbut don't use --os:standalone, it's stupid
22:33:57FromDiscord_<exelotl> well I kinda need to because I'm targeting the GBA xD
22:34:29FromDiscord_<exelotl> at least I couldn't see any other way to make things work
22:34:48*NimBot joined #nim
22:35:23FromDiscord_<exelotl> but yeah that's fair enough, I can just split my codebase into a couple of different programs
22:38:16AraqGBA?
22:38:30FromDiscord_<exelotl> gameboy advance
22:38:42Araqdoes it lack libc?
22:40:17FromDiscord_<exelotl> the toolchain has a fair chunk of the standard library, probably not all of it
22:42:53Araqtread it like --os:linux --cpu:i386
22:45:06FromDiscord_<exelotl> hmm it's missing sys/mman.h
22:51:55FromDiscord_<exelotl> but yeah looking at the outputted stdlib_system.c, I think this approach is too heavy for the GBA, it's better to treat it like an embedded system
22:52:35FromDiscord_<exelotl> that said it would be nice to still use high-level nim features at compile time
22:54:09rect0x51how do you run anything on GBA?
22:57:46FromDiscord_<exelotl> well my approach is quick and dirty but I took one of the devkitARM example projects and made it so that Nim generates the source directory
23:00:01FromDiscord_<exelotl> I've been writing nim bindings for the libraries provided by https://www.coranac.com/tonc/ because I think they're better than the 'libgba' that comes with devkitARM (more consistent, better documented, literally has a book to go with it)
23:01:53FromDiscord_<exelotl> and then yeah I just run make and it works
23:02:14rect0x51how do you physically load the code into the device?
23:02:25rect0x51(just curious)
23:03:51FromDiscord_<exelotl> there's a couple of GBA flashcarts available these days, EZFlash Omega and Everdrive GBA both let you play roms from a micro SD card
23:05:50rect0x51I see, expected something like that. Well, --os:standalone seems mandatory for GBA...
23:05:58FromDiscord_<exelotl> also it's possible to do it without a flashcard if you have a multiboot <-> USB cable, but I think you have to make one yourself with soldering and stuff, idk
23:06:40rect0x51also for your string error... there is cstring which is seq[char], string is different I think,
23:07:17*d10n-work joined #nim
23:07:20*zyklon quit (Read error: Connection reset by peer)
23:07:47rect0x51nvm
23:08:57rect0x51is GBA 16bit or what?
23:09:41FromDiscord_<exelotl> It's 32-bit
23:10:07rect0x51interesting
23:11:09FromDiscord_<exelotl> the error is weird cause I'm not actually using the module, it just complains as soon as I import it... but looking at the source, I fail to see how the line is related to the error
23:11:58rect0x51unicode.nim probably relies on standard library
23:12:03rect0x51so that's why
23:13:05rect0x51just don't import it? :P
23:17:01rect0x51"Use the standalone target (--os:standalone) for a bare bones standard library that lacks any OS features."
23:17:27rect0x51that "bare bones standard library" probably doesn't support unicode.
23:19:21FromDiscord_<exelotl> yeah, I guess what I was hoping was that I might be able to use --os:standalone for the output code but still have nice things like JSON parsing at compile time only
23:22:19rect0x51So you want to use the json library but it imports unicode, I see
23:23:22rect0x51It would be nice if it was documented exactly what you can use with --os:standalone
23:24:37*zyklon joined #nim
23:25:46rect0x51dom's sample might help you https://github.com/dom96/nimkernel
23:25:52Araqnothing. There, documented.
23:27:06rect0x51haha, then what does "bare bones standard library" mean?
23:32:15rect0x51oh btw Araq, is there a list of all pragmas? If not I think it's almost trivial to make and convenient to have, so can write them down and make a nim doc.
23:32:33rect0x51would that be cool?
23:38:08FromGitter<timotheecour> hi @araq all comments addressed in https://github.com/nim-lang/Nim/pull/10183 ; any more concern or is `merge_when_passes_CI` ok?
23:38:36FromGitter<timotheecour> (i have other PR’s that depend on it)
23:39:53FromGitter<timotheecour> @rect0x51 how about adding that list of pragmas to `nim dump --dump.format:json`
23:41:21rect0x51timotheecour: Sure, good idea!
23:43:04FromGitter<timotheecour> I’d also wanna add to it all the magic procs the compiler adds in `registerCallback` which are non-trivial (you can’t grep for them since the symbols are assembled at CT , see compiler/vmops.nim)
23:51:22rect0x51I see. So we can just add those too. For the pragmas what I had in mind is a nice doc that lists them all and explains each one of them briefly. Something we could add at https://nim-lang.org/documentation.html
23:55:26rect0x51timotheecour: astToStr(op) what is `op`?
23:55:48rect0x51does it produce different symbols depending on OS or what
23:57:42Araqomg no
23:58:06Araq'nim dump' is not a dumping ground for everything
23:58:22Araqpragmas are documented in the manual and in the compiler guide, read them
23:58:27Araqgood night.
23:58:37rect0x51gn
23:58:49FromGitter<timotheecour> @rect0x51 `op` resolves to the op, eg `wrap1f_math(sqrt)` => stdlib.math.sqrt , as u can see by adding echo under `registerCallback`