00:14:41 | * | vlad1777d_ joined #nim |
00:19:39 | * | skaruts quit (Quit: Page closed) |
00:53:56 | * | Jesin quit (Quit: Leaving) |
00:56:53 | FromDiscord_ | <SychoRyn> Oh my GOD |
00:56:53 | FromDiscord_ | <SychoRyn> |
00:56:53 | FromDiscord_ | <SychoRyn> https://cdn.discordapp.com/attachments/371759389889003532/591431297813970944/unknown.png |
00:57:22 | * | Jesin joined #nim |
01:00:20 | * | Tyresc quit (Quit: WeeChat 2.5-dev) |
01:26:25 | * | stefanos82 quit (Quit: Quitting for now...) |
02:11:48 | * | vlad1777d_ quit (Ping timeout: 272 seconds) |
02:32:02 | * | dddddd quit (Remote host closed the connection) |
02:36:30 | * | laaron quit (Remote host closed the connection) |
02:37:27 | * | laaron joined #nim |
04:13:31 | * | nsf joined #nim |
05:38:26 | * | narimiran joined #nim |
05:52:02 | FromGitter | <rokups> Nim is done. Time to switch to Y lang. https://github.com/SanderMertens/y |
05:52:11 | FromGitter | <rokups> Who is with me?! |
05:53:53 | Araq | that did get old very quickly |
05:55:36 | laaron | time even would not come to "y" |
05:56:13 | FromDiscord_ | <SychoRyn> Okay who made this this is the funniest thing I've ever seen |
06:01:14 | * | laaron quit (Remote host closed the connection) |
06:06:21 | * | laaron joined #nim |
06:08:31 | Araq | here, Z is even better. its interface happens to be an RTS but it is Turing complete, https://www.youtube.com/watch?v=AQq3xp9NPrc |
06:21:42 | FromGitter | <AmberSaber> 真可怕,26个字母都被你们用完了 |
06:25:10 | FromGitter | <gogolxdong> 你好 |
06:27:33 | * | solitudesf joined #nim |
06:28:10 | FromGitter | <AmberSaber> 你好 |
06:29:42 | FromGitter | <gogolxdong> It would be more friendly to speak in English. :) |
06:31:20 | FromGitter | <gogolxdong> Seems like it's not the first time to see you. What can I help you? |
06:31:40 | FromGitter | <rokups> its english, just encrypted |
06:47:53 | * | PMunch joined #nim |
06:49:10 | * | uptime is now known as sargeant_uptime |
06:51:49 | FromGitter | <rokups> as for my macro it is probably best to stick with `untyped` and instead of `new` for refs and `init` for values just use `init` for all types and ref/value result is determined by type constructor is invoked on. `TableRef[int, int].init({1: 2, 3: 4})` would make a TableReft then. |
06:52:20 | FromGitter | <rokups> just one tiny usability downside... if there is no alias to ref type then user would have to `(ref Table[int, int]).init({1: 2, 3: 4})` which sucks |
06:52:43 | livcd | is not that Y lang a mock of V lang ? |
06:53:11 | FromGitter | <rokups> seems to me its a mock of all those new languages gamedev community is pooping out |
06:53:27 | FromGitter | <rokups> and people go crazy about them because gamedevs know best what gamedevs need |
06:53:38 | FromGitter | <rokups> ignoring the fact that making language is anything but trivial.... |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:57 | PMunch | rokups, you can do the reverse of what I did, and have an untyped macro that expands to a call to another untyped macro which takes one of it's parameters from a typed macro |
07:01:01 | PMunch | I think that should work.. |
07:01:33 | FromGitter | <rokups> PMunch i tried but didnt seem to work |
07:02:25 | PMunch | Hmm, yeah it can be a bit tricky to get right.. |
07:04:23 | * | dwdv joined #nim |
07:04:37 | * | gmpreussner joined #nim |
07:04:55 | FromGitter | <rokups> this is what i tried http://ix.io/1MmC/nim |
07:08:51 | * | Trustable joined #nim |
07:10:22 | PMunch | Yeah that won't work |
07:10:26 | FromGitter | <rokups> it seems to me that isnt even possible. typed macro operates on symbols of parent macro |
07:10:29 | PMunch | You need to return a call to the proc |
07:10:35 | PMunch | macro* |
07:11:01 | FromGitter | <rokups> im not sure what you mean |
07:11:14 | PMunch | Exactly, and besides, what you're doing there is expanding the macro within the macro |
07:11:30 | PMunch | So it will get the AST for prc[3][0] as it's input |
07:12:47 | FromGitter | <rokups> and indeed it does. so how exactly is it supposed to be done? ^_^ |
07:13:42 | * | tjmac joined #nim |
07:14:11 | PMunch | A little something like this: http://ix.io/1MmG/nim |
07:14:29 | PMunch | But note that currently you get an error that A isn't defined |
07:14:46 | PMunch | Not entirely sure how to fix that.. |
07:16:59 | FromGitter | <rokups> thanks ^_^ |
07:17:38 | * | Elronnd quit (Quit: So long, and thanks for all the fish <3) |
07:30:04 | Zevv | rayman22201: good work with the RFC! |
07:33:23 | FromGitter | <AmberSaber> There are too many scripting language grammars in some of the new static languages, which are very convenient to use. But it is not consistent with the object-oriented philosophy. Very discordant |
07:35:10 | FromGitter | <AmberSaber> For example, v language, he also made a vote on the grammar of array operations on Twitter. |
07:39:08 | FromGitter | <rokups> what new language is convenient to use? all i see is people making different syntax for the sake of being different. it renders our previous knowledge useless in learning new language while giving little to no benefit |
07:39:40 | FromGitter | <rokups> if people are making a new language they should really stick with a tried syntax unless they have a very solid explanation why change is needed |
07:39:55 | FromGitter | <AmberSaber> These languages are hard to say very rigorous |
07:40:14 | FromGitter | <rokups> nowdays we see languages full of `~-*-~-*-~-*-~-*-~` because magic symbols make developers feel good about themselves |
07:40:18 | PMunch | Zevv, link? |
07:40:58 | FromGitter | <rokups> nim thankfully does not suffer from crazy syntax too much, though it has it's fair share of non-obvious operators |
07:41:03 | lqdev[m] | I'd just like to point out that Nim has a lot of new syntax, albeit borrowed from other languages |
07:41:29 | narimiran | PMunch: https://forum.nim-lang.org/t/4952 |
07:41:31 | FromGitter | <rokups> borrowed is good because it is familiar already. if its good it does not need to be changed |
07:41:36 | PMunch | rokups, the worst are the "but it's easier to type" arguments. It normally only holds for American layouts, and requires some finger-gymnastics to type on anything else |
07:41:38 | Zevv | PMunch: https://forum.nim-lang.org/t/4952 you guys should team up I guess |
07:42:14 | FromGitter | <rokups> PMunch yes! and also we type maybe 20% of time or less and read code the rest of time. it should be optimized for reading, not for typing |
07:42:20 | FromGitter | <rokups> but hey - nobody cares :| |
07:42:28 | lqdev[m] | PMunch: I still prefer short names, like `proc` over `procedure` |
07:42:51 | PMunch | lqdev[m], oh yeah thats fine |
07:42:58 | lqdev[m] | I'm not a great typist, so it matters to me |
07:43:04 | FromGitter | <rokups> hey at least its not `fn` :D |
07:43:14 | lqdev[m] | oh man, not the fn |
07:43:17 | PMunch | But ¤ instead of proc would be super annoying for people not on a Scandinavian layout |
07:43:33 | FromGitter | <rokups> rust keywords encourage use of abbreviations. planes crashed due to use of abbreviations.... :\ |
07:43:44 | FromGitter | <rokups> or was it a space rocket or something, i dont even recall |
07:44:24 | PMunch | Well I still like being able to type my code reasonably fast |
07:44:32 | PMunch | Thing is, I'm really fast at typing normal text |
07:44:36 | FromGitter | <rokups> PMunch `¤` is terrible. i mean scandinavians would still find it ok. i believe you can do better and find a symbol that isnt on any keyboard layout used on the planet :trollface: |
07:44:40 | lqdev[m] | in my code, I only abbreviate common names which are annoying to type often, like `Graphics` -> `Gfx`, `TilemapWorld` -> `TmWorld` |
07:44:53 | PMunch | But typing crazy characters, even though it's fewer keystrokes, slows me down |
07:45:16 | narimiran | i just copy-paste code from stack overflow, no typing |
07:45:26 | lqdev[m] | but, for instance, I didn't call the `AudioDecoder` `AudioDec` because it's not that common |
07:45:44 | PMunch | Haha, narimiran here living in 2059 |
07:45:54 | PMunch | lqdev[m], that makes sense |
07:46:15 | PMunch | At some point I just get lazy and name things "f" or "c".. |
07:46:24 | PMunch | Naming things is hard.. |
07:46:51 | PMunch | rokups, yeah, just find some obscure UTF rune |
07:47:04 | lqdev[m] | that's my naming convention for algorithms I can't explain well (yet I understand how they work) |
07:47:09 | PMunch | Plenty of characters no-one have on their keyboard |
07:47:14 | FromGitter | <rokups> zero-width space sounds like a good candidate! :D |
07:47:56 | PMunch | But ¤ got a special place in my heart, it's on Shift+4 on Scandinavian keyboard, `$` is on AltGr+4. And we don't use it for anything, 99% of people don't even know what it's for. |
07:49:00 | PMunch | rokups, I actually found a key combination once that created nbsp.. |
07:49:07 | lqdev[m] | Linux users on X.org have easy access to arrows, ß, TM, (R), (C), π, and other crazy characters. Let's make devs switch to Linux by making use of them |
07:49:07 | PMunch | Trying to debug that was kinda hard |
07:49:44 | narimiran | var Ħ: Table |
07:49:55 | FromDiscord_ | <djazz> Can emojis be used for variable names? |
07:49:57 | lqdev[m] | π is nicer than PI, to me. |
07:50:01 | lqdev[m] | yes |
07:50:04 | FromDiscord_ | <djazz> Yay |
07:50:13 | lqdev[m] | not yay |
07:50:40 | PMunch | ·þ¥ªç®ßðı€×µ < a collection of the symbols I can get with AltGr + letter keys on my keyboard :P |
07:50:51 | narimiran | PMunch: i too use colemak layout ;) |
07:50:54 | FromDiscord_ | <djazz> Emoji operators? :D |
07:51:01 | PMunch | narimiran, I use Dvorak :) |
07:51:05 | FromGitter | <rokups> π may be nicer but if some smartass forced such variable on to me he would be cursed for the rest of his life |
07:51:27 | lqdev[m] | PMunch: don't forget you can press shift and get even more cool stuff |
07:51:45 | narimiran | PMunch: ah, here is my altgr+ number row ¡ºª¢€ħðþ‘’× and the same with shift ¹²³£¥ĦÐÞ“”÷ |
07:51:54 | lqdev[m] | rokups: that's why I think it should only be an alias and not an enforcement |
07:52:02 | PMunch | lqdev[m], yeah but we're talking about ergonomic shortcuts here! :P |
07:52:21 | PMunch | ¡@£$½¾{[]}± |
07:52:35 | PMunch | That's my number row with AltGr (yes the Norwegian layout is dumb) |
07:52:45 | narimiran | here is the full list: https://colemak.com/Multilingual |
07:52:46 | lqdev[m] | pi is alt gr+q on X.org for me, so it's not terrible |
07:53:15 | PMunch | lqdev[m], hmm, that only creates a `q` for me |
07:54:16 | lqdev[m] | maybe it's my keyboard layout |
07:54:44 | PMunch | Pet peeve: american editors that bind stuff to things like shift+[. I already need to hit AltGr to get to [, and AltGr+Shift+[ seldom actually works |
07:55:11 | PMunch | lqdev[m], my keyboard is all kinds of messed up, so it might be something that I've done at some point |
07:55:59 | FromDiscord_ | <djazz> Im swede but I use an ANSI keyboard with US layout mostly. I miss the AltGr combos. I know there is a way to enable them in Xorg somehow.. |
07:56:29 | FromDiscord_ | <djazz> Right now its just "Right Alt" |
07:56:46 | PMunch | djazz, you can just dump your xmodmap to a file, then add whatever you want, and then tell X to load your keymap from that file |
07:57:34 | lqdev[m] | I use the Polish QWERTY keyboard layout, I know it's not specific to this layout though because my friend uses US QWERTY and it's still here |
07:58:34 | lqdev[m] | I never changed any settings in xmodmap, so this just might be the default |
07:59:16 | * | Vladar joined #nim |
07:59:40 | PMunch | Could be, maybe the Norwegian Dvorak layout just doesn't have Pi for some reason |
08:00:25 | PMunch | Or I've managed to delete it at some point :P |
08:01:00 | narimiran | PMunch: ii think it is the difference between qwerty and dvorak/colemak. i also don't have it |
08:07:56 | FromGitter | <rokups> anything other than US keyboard layout is suboptimal yeah.. |
08:08:16 | FromGitter | <rokups> i used to make my custom layout for lithuanian letters so ą would be gr+a and so on |
08:08:22 | FromGitter | <rokups> too much trouble to maintain though |
08:08:44 | FromGitter | <rokups> standard lt keyboard aint worst. ą = gr+1 |
08:29:41 | * | Tanger quit (Quit: Leaving) |
08:31:35 | PMunch | How is that too much to maintain? X doesn't change that often, so you just need to keep your .xmodmap file around :P |
08:32:25 | FromGitter | <rokups> i was modifying keyboard layout file in /usr/share and updates nuke it sometimes |
08:32:39 | FromGitter | <rokups> .xmodmap would affect all layouts too, no? |
08:38:30 | PMunch | Yes |
08:38:40 | PMunch | It basically is a layout |
08:41:19 | * | floppydh joined #nim |
08:51:00 | FromGitter | <rokups> is there a way to limit `T` to a types that are subtypes of something? |
08:57:45 | PMunch | Well you can limit T, but I'm not sure if "subtype of X" is a constraint you can express easily |
08:58:36 | FromGitter | <mratsim> you can |
08:58:40 | FromGitter | <mratsim> T: Someinteger |
08:58:57 | FromGitter | <rokups> but `SomeInteger` must be defined as a list of types |
08:59:04 | FromGitter | <rokups> thats fine for integers, not so much for user classes |
08:59:16 | FromGitter | <rokups> i would like to limit T to anything that derives from Exception |
08:59:29 | FromGitter | <mratsim> you can use a concept or a inherited type root |
08:59:30 | FromGitter | <rokups> naturally i cant have a list of user types that may be defined by the user |
08:59:53 | FromGitter | <rokups> oh so `T: Exception` would accept say `IndexError`? |
08:59:54 | FromGitter | <mratsim> I'm pretty sure if you do T: Exception, user defined exceptions will work |
09:00:20 | FromGitter | <mratsim> that's the whole point of inehritance ;) |
09:08:59 | * | tjmac left #nim ("-bye") |
09:47:04 | * | vlad1777d_ joined #nim |
09:47:55 | * | laaron quit (Remote host closed the connection) |
09:49:02 | leorize | narimiran: my tests with tfloatrange doesn't seem to yield any reason for why it's flaky on azure & travis windows |
09:49:17 | leorize | so if you want to merge the azure-pipelines config, I may have to disable that test |
09:49:35 | narimiran | ok |
09:50:30 | narimiran | i need to talk to others about azure, probably on monday |
09:51:39 | * | laaron joined #nim |
09:54:59 | leorize | do I need to tag the commits with `[other]`? |
09:55:30 | narimiran | asking generally or for something you already sent a PR? |
09:56:03 | narimiran | generally - it would be nice; if you have a PR without it - we can add it when merging |
09:56:21 | * | abm joined #nim |
09:56:37 | livcd | ot: sorbet.rb the typechecker for ruby got open sourced today |
09:58:00 | leorize | narimiran: for that azure PR. I'd prefer to have it rebase-merged because the history makes sense :p |
10:00:48 | narimiran | leorize: that means we'll need to remember to use our non-default merge. i wouldn't count on that :D :D |
10:00:52 | leorize | narimiran: also, the link to the `widestr` module from https://nim-lang.github.io/Nim/system.html is broken |
10:03:21 | narimiran | leorize: what do we have to do to enable azure on our end? add a webhook in github settings? something else? |
10:03:44 | leorize | install the azure app from github marketplace |
10:04:02 | leorize | make a nim-lang organization there |
10:04:24 | narimiran | re widestr: ah, it is widestr*s* |
10:05:00 | leorize | then go to pipelines -> add pipelines |
10:05:09 | leorize | the rest is self-explainatory |
10:08:19 | * | neceve joined #nim |
10:24:27 | * | dddddd joined #nim |
10:43:58 | * | leorize quit (Quit: WeeChat 2.3) |
10:51:51 | * | natrys joined #nim |
10:59:22 | * | envoyt quit (Ping timeout: 258 seconds) |
10:59:28 | * | stefanos82 joined #nim |
11:07:30 | * | leorize joined #nim |
11:19:25 | * | natrys quit (Ping timeout: 268 seconds) |
11:26:49 | * | natrys joined #nim |
11:41:35 | Calinou | livcd: thanks for mentioning it :) (link for those who need it, https://sorbet.org/) |
11:43:30 | * | envoyt joined #nim |
11:43:36 | FromGitter | <kaushalmodi> I am pretty delighted.. I think I have grokked this issue: https://github.com/nim-lang/Nim/issues/11552#issuecomment-504396129 |
11:43:37 | FromGitter | <kaushalmodi> :) |
11:45:30 | narimiran | kaushalmodi what if you used uint in your example? then once again you have a similar problem, no? |
11:46:11 | Zevv | If I do this: http://ix.io/1MnB, where does the [int] go? |
11:46:25 | FromGitter | <kaushalmodi> narimiran: no |
11:46:34 | FromGitter | <kaushalmodi> because low(uint) would be 0 |
11:47:37 | FromGitter | <kaushalmodi> the *total number of values for `int64`* == *total number of values for `uint64`* == `high(uint64)` |
11:48:42 | narimiran | (btw, there's no `high(uint64)` currently ;)) |
11:48:51 | FromGitter | <kaushalmodi> huh, really? |
11:48:59 | FromGitter | <kaushalmodi> may be then that's the root cause |
11:49:19 | FromGitter | <kaushalmodi> but I hope my point is valid based on bit theory |
11:50:01 | * | envoyt quit (Ping timeout: 246 seconds) |
11:50:19 | * | envoyt joined #nim |
11:52:45 | FromGitter | <kaushalmodi> narimiran: so this needs to work first: https://play.nim-lang.org/index.html#ix=1MnD |
11:53:22 | FromGitter | <kaushalmodi> fixed.. this: https://play.nim-lang.org/index.html#ix=1MnE |
11:54:50 | narimiran | i'm not sure that's correct |
11:55:23 | * | AndChat|624225 joined #nim |
11:55:24 | narimiran | `-2 * low(int)` is still an int, and it overflows |
11:56:40 | * | envoyt quit (Ping timeout: 246 seconds) |
11:56:44 | FromGitter | <kaushalmodi> trying to play with it.. this also doesn't work: https://play.nim-lang.org/index.html#ix=1MnL |
11:56:52 | FromGitter | <kaushalmodi> `*` isn't implemented for uint? |
11:57:17 | narimiran | -2 --> int |
11:57:21 | narimiran | low(int) --> int |
11:57:50 | narimiran | https://play.nim-lang.org/index.html#ix=1MnM |
11:58:17 | FromGitter | <kaushalmodi> this works: https://play.nim-lang.org/index.html#ix=1MnN |
11:59:24 | FromGitter | <kaushalmodi> this works too (same, without the extra type specifiers): https://play.nim-lang.org/index.html#ix=1MnO |
11:59:32 | FromGitter | <kaushalmodi> now let's add that in :) |
12:00:32 | * | qwertfisch quit (Remote host closed the connection) |
12:02:26 | * | Trustable quit (Remote host closed the connection) |
12:07:12 | * | natrys quit (Ping timeout: 258 seconds) |
12:11:50 | * | fredrik92 joined #nim |
12:12:26 | * | couven92 quit (Disconnected by services) |
12:12:35 | * | fredrik92 is now known as couven92 |
12:12:54 | * | fredrik92 joined #nim |
12:14:26 | * | natrys joined #nim |
12:15:55 | * | neceve quit (Read error: Connection reset by peer) |
12:15:59 | * | Kaivo joined #nim |
12:22:32 | * | abm quit (Ping timeout: 258 seconds) |
12:23:09 | * | abm joined #nim |
12:25:04 | * | nsf quit (Quit: WeeChat 2.4) |
12:33:24 | * | laaron- joined #nim |
12:33:24 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
12:38:01 | * | Snircle joined #nim |
12:58:02 | * | AndChat|624225 quit (Read error: Connection reset by peer) |
12:58:23 | * | envoyt joined #nim |
13:04:43 | PMunch | @kaushalmodi, new feature of the playground, you don't need index.html any longer ;) |
13:08:40 | FromGitter | <kaushalmodi> PMunch: After "Share to ix", I just do Ctrl+L Ctrl+C to copy the link |
13:08:47 | FromGitter | <kaushalmodi> that includes the index.html automatically |
13:09:10 | PMunch | Only if you started by being at play.nim-lang.org/index.html |
13:09:36 | PMunch | If you start from play.nim-lang.org/ it should only append #ix=<code> to it |
13:09:38 | FromGitter | <kaushalmodi> ah, got it.. may be my browser history always took me there first |
13:09:38 | FromGitter | <kaushalmodi> thanks |
13:09:46 | PMunch | Yeah probably :) |
13:10:33 | PMunch | I mean it doesn't do anything different if you're just copy pasting it, but I thought I'd mention it in case you wrote them by hand for some reason :P |
13:11:10 | FromGitter | <kaushalmodi> PMunch: I confirm what you said, simply deleted all play.nim-lang.org history |
13:13:00 | * | jokul quit (Ping timeout: 272 seconds) |
13:13:19 | * | envoyt quit (Ping timeout: 246 seconds) |
13:14:00 | * | envoyt joined #nim |
13:17:40 | PMunch | Is there an easy way to blank an array? |
13:18:32 | PMunch | Ah reset |
13:22:25 | FromGitter | <kaushalmodi> PMunch: can you add a redirect from play.nim-lang.org/index.html to play.nim-lang.org/ ? |
13:24:42 | PMunch | Hmm, yeah I guess I could |
13:28:27 | PMunch | There |
13:28:58 | PMunch | Only issue now is that it redirects index.html#ix=<code> to / and not to /#ix=<code>.. |
13:29:12 | laaron- | PMunch, so you are the `play.nim-lang.org` admin? |
13:29:18 | PMunch | laaron-, yes :) |
13:29:59 | laaron- | PMunch, nice, good work |
13:30:06 | PMunch | Thanks |
13:30:25 | PMunch | The server was mostly done my zacharycarter |
13:30:40 | PMunch | I just fixed some bugs and tweaked it a bit |
13:30:50 | PMunch | But the front-end is completely redesigned |
13:32:12 | laaron- | i know, still nice |
13:34:38 | * | jokul joined #nim |
13:36:13 | PMunch | There, now it should redirect properly for index.html#ix=<code> links as well |
13:36:19 | PMunch | (Plus the #tour= links of course) |
13:36:32 | PMunch | laaron-, glad you like it :) |
13:39:02 | * | NimBot joined #nim |
13:42:49 | FromGitter | <kaushalmodi> PMunch: yeah, it should have retained the stuff after # after redirecting |
13:43:04 | FromGitter | <kaushalmodi> I have experience only with Netlify.. |
13:43:24 | PMunch | kaushalmodi, it should do that now |
13:43:39 | FromGitter | <kaushalmodi> and it does |
13:43:41 | FromGitter | <kaushalmodi> awesome! |
13:43:44 | FromGitter | <kaushalmodi> thanks PMunch |
13:43:52 | PMunch | No problem :) |
13:44:31 | * | narimiran quit (Remote host closed the connection) |
13:44:56 | FromGitter | <kaushalmodi> as an aside.. it's crazy.. I wouldn't have know how to suggest to fix this using redirect had I not started tinkering with Hugo 2 yrs back |
13:45:15 | noonien | hello folks |
13:45:15 | FromGitter | <kaushalmodi> I didn't know what a "redirect" was back then |
13:46:43 | noonien | is there an easy way of getting just part of a sequence in the stdlib? for example, i've got @[1, 2, 3, 4], and i want @[2, 3, 4] |
13:48:32 | FromGitter | <kaushalmodi> seqVar[1 .. seqVar.len()-1] |
13:48:42 | noonien | oh, nice |
13:49:30 | FromGitter | <Vindaar> or `seqVar[1 .. seqVar.high]` or `seqVar[1 .. ^1]` :) |
13:49:49 | FromGitter | <kaushalmodi> yes, that ^ |
13:49:57 | noonien | yeah, i ended up going with seqVar[1 .. ^1] |
13:50:08 | noonien | i just didn't know you could slice sequences like that :D |
13:50:11 | noonien | thanks! |
13:51:05 | * | dddddd quit (Ping timeout: 258 seconds) |
13:51:56 | FromGitter | <kaushalmodi> slice is awesome :) https://nim-lang.github.io/Nim/system.html#..%2CT |
13:52:53 | * | beatmox quit (Remote host closed the connection) |
13:55:14 | * | beatmox joined #nim |
14:03:15 | * | ehmry quit (Remote host closed the connection) |
14:05:18 | * | krux02 joined #nim |
14:05:52 | * | Cthalupa quit (Ping timeout: 248 seconds) |
14:06:24 | FromGitter | <rokups> whats the trick to get proper variables list in vscode instead of this junk? https://i.imgur.com/JiyG3Jz.png |
14:06:53 | * | Cthalupa joined #nim |
14:11:17 | FromGitter | <mratsim> debugger:native maybe |
14:11:22 | FromGitter | <rokups> already using that |
14:11:59 | FromGitter | <rokups> `-d:debug --debuginfo --lineDir:on --debugger:native` - im trying hard here :D |
14:12:09 | FromGitter | <mratsim> no idea then, GDB is directly using the nim source code when I use that |
14:12:22 | FromGitter | <mratsim> not sure if VScode adds additional logic on top |
14:12:39 | FromGitter | <mratsim> if you launch gdb on that does it steps through the Nim code or the C code? |
14:13:46 | FromGitter | <rokups> nim code of course. and i even set up vscode to use nim-gdb script. changed nothing it seems |
14:14:14 | FromGitter | <mratsim> no idea then, I never tried to make it work :p |
14:14:46 | PMunch | Hmm, ran into this strange issue again.. |
14:15:00 | PMunch | I have an array of ref objects |
14:15:19 | PMunch | And trying to access an element in it fails with a SIGSEGV |
14:15:41 | PMunch | Not trying to access a field in it, but just trying to do for i in myobjects fails |
14:16:05 | PMunch | I can do myobjects.len, but trying to loop over them fails.. |
14:16:19 | FromGitter | <rokups> this is terrible though. visual studio until very recently was quite a crappy IDE, but everyone loved it mainly because of stellar debugging experience. nim being unable to show a simple list of variable will not leave a good first impression on people\ |
14:24:57 | * | PMunch quit (Remote host closed the connection) |
14:26:02 | * | nsf joined #nim |
14:33:04 | * | envoyt quit (Ping timeout: 248 seconds) |
14:47:32 | * | solitudesf quit (Ping timeout: 245 seconds) |
14:49:57 | * | floppydh quit (Quit: WeeChat 2.5) |
15:02:22 | * | dddddd joined #nim |
15:03:43 | noonien | hmm, can i execute async futures in paralel? |
15:03:48 | noonien | not just concurrently |
15:03:57 | noonien | async procedures* |
15:04:42 | noonien | or, actually, i just need them to execute "in the background", so the current code can continue executing |
15:04:51 | noonien | i don't care if it's paralel or not |
15:05:12 | noonien | do i just do `asyncCheck`? |
15:10:10 | * | Vladar quit (Remote host closed the connection) |
15:18:18 | leorize | the entire idea of async proc is that they're executed in the background :p |
15:18:45 | FromGitter | <dom96> Yes. Precisely, just use asyncCheck |
15:23:23 | FromGitter | <waghanza> hi @/all, do someone have a way to setup a cool `nim` version on `bionic` ? the stable one is too old `0.17.2` and I could not install `nimpretty` in https://travis-ci.com/the-benchmarker/web-frameworks/jobs/209986126 |
15:27:39 | leorize | @waghanza: use choosenim to install it |
15:27:44 | leorize | should work on travis |
15:27:57 | leorize | and the latest choosenim should have nimpretty support now |
15:28:10 | FromGitter | <waghanza> choosine is not inetrractive only ? |
15:29:50 | leorize | @dom96 ^ |
15:31:10 | leorize | @waghanza: https://github.com/nim-lang/Nim/wiki/BuildServices#building-nim-projects-on-travis-ci |
15:34:05 | FromGitter | <waghanza> oh I need to pick other CI them |
15:34:35 | FromGitter | <waghanza> my `.travis.yml` is already over complicated https://travis-ci.com/the-benchmarker/web-frameworks/jobs/209986126/config |
15:34:38 | FromGitter | <waghanza> 😛 |
15:37:24 | * | natrys quit (Ping timeout: 272 seconds) |
15:40:06 | * | nsf quit (Quit: WeeChat 2.4) |
15:41:46 | * | natrys joined #nim |
15:45:29 | * | laaron- quit (Remote host closed the connection) |
15:48:45 | * | laaron joined #nim |
15:51:38 | * | neceve joined #nim |
15:55:09 | * | Jesin quit (Quit: Leaving) |
15:55:41 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
15:56:25 | * | laaron joined #nim |
15:56:33 | leorize | @waghanza: it should be simple enough, assuming that you have docker on your ci :p |
16:01:54 | FromGitter | <alehander42> @rokups @bobeff managed to make it work in vscode |
16:02:10 | FromGitter | <alehander42> but it needed a settings check, it must be somewhere on github |
16:03:15 | FromGitter | <alehander42> buut the paste service doesnt have it anymore |
16:03:56 | FromGitter | <alehander42> basically you need to get the build or debug settings correct and to load krux02's nim-gdb.py |
16:04:02 | FromGitter | <alehander42> which is in the nim repo |
16:27:52 | * | PrimHelios_ joined #nim |
16:27:57 | * | PrimHelios quit (Ping timeout: 245 seconds) |
16:28:28 | Calinou | see also https://github.com/Calinou/clr/blob/master/.travis.yml for an example |
16:30:26 | * | envoyt joined #nim |
16:35:51 | FromGitter | <rokups> @alehander42 I copied configs from GitHub issue. Might be from same person. No workie |
16:38:29 | * | solitudesf joined #nim |
17:01:24 | * | qwertfisch joined #nim |
17:16:48 | * | envoyt quit (Ping timeout: 248 seconds) |
17:17:30 | * | envoyt joined #nim |
17:24:08 | * | Jesin joined #nim |
17:29:39 | * | leorize quit (Ping timeout: 256 seconds) |
17:31:47 | * | leorize joined #nim |
18:02:09 | FromGitter | <aaveidt> Hi all, can nim import and use binary module? |
18:07:17 | * | abm quit (Quit: Leaving) |
18:13:27 | * | narimiran joined #nim |
18:15:57 | leorize | binary module? |
18:17:45 | Araq | DLL |
18:23:14 | * | nsf joined #nim |
18:26:33 | * | ehmry joined #nim |
18:29:34 | * | rockcavera quit (Remote host closed the connection) |
18:37:59 | rayman22201 | @Zevv, @Pmunch, late reply, was sleeping. Thanks for kind words about the RFC. |
19:02:31 | * | neceve quit (Read error: Connection reset by peer) |
19:03:47 | Zevv | What is the proper syntax for declaring a type for a generic proc? This is not ok: invalid indentation |
19:03:50 | Zevv | SomeFn = proc[T](s: string, state: T) |
19:04:22 | Zevv | oh wait, SomeFn[T] = ... of course |
19:15:48 | dom96 | hello everyone |
19:19:47 | Zevv | oi |
19:22:53 | dom96 | How's things? Working on something in Nim? :) |
19:23:56 | Zevv | Yeah, breaking my brain over generic macros. Please tell me, how do I do this? |
19:23:57 | Zevv | http://ix.io/1Mr4 |
19:24:17 | Zevv | I need to pass a generic type through a macro into a template |
19:25:29 | dom96 | Hm, not sure macros can take generics like that |
19:25:44 | dom96 | You can pass a typedesc to a macro though, would that be okay for your usecase? |
19:27:14 | Zevv | hmm let me see |
19:30:20 | Zevv | it seems that there's an other underlying reason |
19:30:50 | Zevv | this also does not work: http://ix.io/1Mrb |
19:30:57 | Zevv | and there's no type passed through the macro |
19:31:13 | FromGitter | <Vindaar> this works: http://ix.io/1Mrc/nim |
19:31:16 | FromGitter | <Vindaar> gotta go :) |
19:31:30 | Zevv | quote do, wth |
19:31:49 | Zevv | well, thanks, but I'll have to read up why and how this works :) |
19:34:30 | Zevv | what is this, and where is it documented? |
19:35:14 | * | dwdv quit (Quit: quit) |
19:36:17 | Zevv | wow. quasi-quoting. TIL |
19:41:41 | FromGitter | <kayabaNerve> If my system uses GCC 7.4, yet has GCC 8.3 installed, and I want Nim to use GCC 8, what command line args should I pass? |
19:49:26 | leorize | --gcc.exe: and --gcc.linkerexe: |
19:50:30 | * | Trustable joined #nim |
20:00:55 | FromGitter | <aaveidt> yes, if i compile a nim module to binary |
20:01:07 | FromGitter | <aaveidt> then import it, can i use it normally? |
20:02:49 | Araq | read about DLL generation |
20:13:04 | FromDiscord_ | <SychoRyn> I left hopson’s server |
20:13:08 | FromDiscord_ | <SychoRyn> Too toxic |
20:13:26 | FromDiscord_ | <SychoRyn> Now this is the only programming server I’m on, so yo yo |
20:15:00 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
20:15:32 | * | laaron joined #nim |
20:24:56 | FromGitter | <kayabaNerve> Thanks leorize. My recent package upgrade, GUI suggested, broke my GCC. |
20:25:32 | FromGitter | <kayabaNerve> Generally, linking fails with an error, but I've had ld say to report crashes and even had gcc segfault on me. |
20:26:07 | FromGitter | <kayabaNerve> Right now, I'm running a dist upgrade off LTS to try to fix it system wide. |
20:33:34 | lqdev[m] | TIL about https://github.com/nim-lang/Nim/blob/devel/lib/prelude.nim |
20:38:03 | * | Trustable quit (Remote host closed the connection) |
20:45:53 | noonien | hmm, can i convert any FD to an AsyncFile with asyncfile.newAsyncFile? |
20:46:34 | FromGitter | <kayabaNerve> Interesting collection of modules. I have something similar in my project, yet I use import. |
20:46:55 | noonien | i tried doing this with a pipe FD returned by osproc.outputHandle, and doing `await asyncfile.readBuffer` seems to hang |
20:49:57 | dom96 | noonien, you can't do that. You need to use https://github.com/cheatfate/asynctools |
20:50:04 | * | narimiran quit (Ping timeout: 258 seconds) |
20:50:05 | noonien | should i fnctl the fd to make sure it's nonblocking? |
20:50:51 | noonien | yeah, i was reading thought the source of that module, that's basically what it does as far as i can tell |
20:54:41 | noonien | yeah, that appears to be the case |
20:55:58 | * | shadowbane quit (Quit: Konversation terminated!) |
21:03:44 | * | nsf quit (Quit: WeeChat 2.4) |
21:16:12 | rayman22201 | I know the stdlib is supposed to be getting smaller, but I am starting to think that cheatfaces's asynctools is a good candidate for merging or adapting into the stdlib.... just saying.... |
21:25:27 | dom96 | You volunteering to maintain this module if it's in the stdlib? ;) |
21:27:31 | dom96 | So TIL Chrome needs me to tell it "please render this canvas element quickly" with a CSS property |
21:27:32 | dom96 | otherwise it renders at a dog-slow pace of 10 FPS |
21:27:46 | dom96 | Silly Google |
21:28:58 | * | rayman22201 kindly shuts up when asked to maintain things |
21:29:29 | * | vlad1777d__ joined #nim |
21:30:15 | * | vlad1777d_ quit (Ping timeout: 244 seconds) |
21:32:45 | dom96 | for real though, I think you're right, it would be nice to have it in stdlib |
21:37:07 | Araq | I think we should create a "Nim cold fusion" distribution that bundles superior Nimble packages with Nim |
21:37:51 | lqdev[m] | where did that name come from!? |
21:38:11 | Araq | from me. |
21:38:16 | Araq | why? |
21:39:51 | lqdev[m] | "cold fusion" is the process of fusing atoms at room temperatures, afaik |
21:40:03 | lqdev[m] | don't know how you came up with that idea |
21:40:57 | * | couven92 quit (Quit: Client Disconnecting) |
21:41:29 | Araq | what's better than "batteries included"? "cold fusion". |
21:42:06 | lqdev[m] | makes sense |
21:42:09 | Araq | and also we fuse Nim with good Nimble packages |
21:42:29 | Araq | without asking their autors :P (hence "cold") |
21:42:34 | lqdev[m] | at room temperatures |
21:42:46 | lqdev[m] | lol |
21:42:55 | Araq | and yeah, I know what "cold fusion" is, thanks. ;-) |
21:42:58 | dom96 | Araq has all sorts of names up his sleeve |
21:43:04 | dom96 | What was that other bundle called? Gamera? |
21:43:15 | Araq | ah the Gamera edition |
21:43:47 | * | lqdev[m] cries because he can't come up with good names |
21:44:00 | Araq | we only had one of these iirc. |
21:44:23 | dom96 | lqdev[m], take inspiration from Greek/Egyptian/Norse gods :) |
21:44:56 | lqdev[m] | people already did that, see: elementary OS, Odin, (insert other things here) |
21:46:16 | dom96 | Names don't have to be unique :P |
21:46:39 | lqdev[m] | the thought process behind my names is always weird, eg. the name `rapid` came from me playing RCT2 and somehow memorizing the River Rapids ride |
21:48:50 | Araq | what did we watch? https://www.youtube.com/watch?v=ynl2abx1baI not this one... |
21:49:56 | lqdev[m] | recently I also wrote a little program that made executables from videos, so that you could display them in a terminal. it was hard to come up with a name, so I thought "what's this project about?—it's an **A**udio**v**isual **to**y **ge**nerator—avtoge" |
21:50:48 | lqdev[m] | I never got to open-source it, by the way. just used it a few times to prank my friends |
21:51:40 | * | solitudesf quit (Ping timeout: 246 seconds) |
21:53:48 | * | vlad1777d__ quit (Ping timeout: 245 seconds) |
21:54:50 | lqdev[m] | great, Nimble destroyed its source code |
21:55:02 | dom96 | wut |
21:55:58 | lqdev[m] | I put `avtoge.nim` in a `src` directory because I wanted to create a Nimble package for it (and open-source it), I ran `nimble init` and it overwrote `avtoge.nim` with its template |
21:56:09 | lqdev[m] | well that sucks |
21:56:44 | lqdev[m] | at least I still have the executable |
21:57:23 | dom96 | wtf, that's a really bad bug |
21:57:33 | dom96 | sorry about that |
21:57:37 | dom96 | Can you create an issue on github? |
21:57:38 | lqdev[m] | I'll go report it |
21:57:46 | lqdev[m] | sure |
21:59:04 | lqdev[m] | it's already been reported: https://github.com/nim-lang/nimble/issues/581 |
21:59:29 | dom96 | :'( |
21:59:48 | lqdev[m] | it's fine, the script wasn't anything complicated |
22:00:03 | dom96 | up for making a PR to fix this? |
22:00:07 | dom96 | It should be pretty simple |
22:00:23 | lqdev[m] | I can give it a shot |
22:06:35 | FromGitter | <mohamedmoussa89> Whats the correct way of implementing the `[]` operator for distinct arrays? Borrowing doesn't seem to work. (github.com/nim-lang/Nim/issues/3564) |
22:07:46 | dom96 | Tried converting your distinct array into an array and then using `[]` on it? |
22:07:52 | FromGitter | <mohamedmoussa89> yes |
22:08:01 | FromGitter | <mohamedmoussa89> but then I cannot implement `+=` |
22:08:06 | FromGitter | <mohamedmoussa89> it complains that the LHS is immutable |
22:08:14 | dom96 | make it return a 'var T' |
22:08:26 | dom96 | *make that the return type I should say |
22:09:12 | lqdev[m] | are there any commit name conventions for Nimble? |
22:09:28 | FromGitter | <mohamedmoussa89> like this? ⏎ proc `[]`*(v: Vector, i: SomeInteger): var float = ⏎ array3,float (v)[i] |
22:09:37 | FromGitter | <mohamedmoussa89> ah how do i post code in here |
22:09:40 | dom96 | Not really, `Fixes #xxx. Nimble init will no longer overwrite` is fine |
22:09:53 | lqdev[m] | okay |
22:10:48 | dom96 | mohamedmoussa89: use markdown |
22:10:54 | dom96 | (or a pastebin service) |
22:11:52 | FromGitter | <mohamedmoussa89> https://pastebin.com/raw/Yb4kmEZp |
22:12:05 | FromGitter | <mohamedmoussa89> This is what i'm trying to get to compile |
22:12:30 | FromGitter | <mohamedmoussa89> with var float, it says expression has no address.. |
22:12:57 | lqdev[m] | dom96: done https://github.com/nim-lang/nimble/pull/670 |
22:13:44 | lqdev[m] | staying on the topic of nimble init |
22:13:45 | lqdev[m] | https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/init.nim#L45 |
22:13:54 | lqdev[m] | have you guys ever noticed this? |
22:14:27 | dom96 | mohamedmoussa89: https://play.nim-lang.org/#ix=1Msj |
22:14:55 | FromGitter | <mohamedmoussa89> Interesting, thank you |
22:14:55 | dom96 | lqdev[m], hah, nope |
22:16:22 | dom96 | lqdev[m], I don't suppose I could entice you to write a test for this as well? :) |
22:16:32 | dom96 | also, please output a warning |
22:16:42 | dom96 | when the file already exists and it hasn't been overwritten |
22:16:49 | dom96 | or actually, maybe an info-level message would be enough |
22:20:54 | lqdev[m] | hm, regarding that test: how can I control Nimble from the test's code? just write to the process's stdin? |
22:21:54 | dom96 | just pass the `-y` flag |
22:22:19 | lqdev[m] | that makes it use default settings for everything? |
22:24:50 | dom96 | yeah |
22:25:07 | dom96 | in fact, if you use the same functions that other tests use you should get that flag by default |
22:25:10 | lqdev[m] | also, what settings should I use in `display()`? I'd guess low priority message, with category "Info:" |
22:27:08 | * | vlad1777d__ joined #nim |
22:37:14 | lqdev[m] | turns out I can't just pass -y since I need to select binary/library/hybrid |
22:41:27 | * | FromGitter quit (Ping timeout: 264 seconds) |
22:41:48 | * | oprypin quit (Ping timeout: 252 seconds) |
22:42:56 | dom96 | lqdev[m], feel free to make binary the default |
22:43:01 | dom96 | to make this work |
22:43:06 | dom96 | messing with stdin will be painful |
22:43:25 | dom96 | lqdev[m], also, go with high priority |
22:43:38 | dom96 | otherwise it'll be hidden by default |
22:43:57 | * | oprypin joined #nim |
22:44:25 | * | FromGitter joined #nim |
22:55:57 | * | natrys quit (Quit: natrys) |
23:15:09 | lqdev[m] | finishing the test now, I'll commit once it's done |
23:18:56 | lqdev[m] | everything's done: https://github.com/nim-lang/nimble/pull/670 |
23:32:58 | dom96 | Thanks! Approved, will merge once tests apss |
23:33:00 | dom96 | *pass |
23:50:29 | * | krux02_ joined #nim |
23:51:05 | * | damosan joined #nim |
23:53:18 | * | krux02 quit (Ping timeout: 252 seconds) |