00:00:32 | * | endragor joined #nim |
00:03:28 | * | yglukhov quit (Remote host closed the connection) |
00:09:10 | * | gokr quit (Ping timeout: 260 seconds) |
00:16:03 | * | devdri quit () |
00:17:00 | * | fredrik92 quit (Quit: Client Disconnecting) |
01:03:07 | * | MJCaley quit (Quit: MJCaley) |
01:05:58 | * | vivus joined #nim |
01:16:47 | * | xet7 quit (Ping timeout: 248 seconds) |
01:30:14 | FromGitter | <honewatson> Do concepts work in the js backend? |
01:31:38 | * | MJCaley joined #nim |
01:32:54 | * | xet7 joined #nim |
01:33:20 | dom96 | honewatson: They're just generics, so probably |
02:07:42 | * | vivus quit (Quit: Leaving) |
02:23:53 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:25:07 | * | vlad1777d quit (Ping timeout: 268 seconds) |
03:00:26 | * | chemist69 quit (Ping timeout: 255 seconds) |
03:14:08 | * | chemist69 joined #nim |
03:21:05 | * | demi- quit (Quit: Server shutdown in 3... 2... 1...) |
03:54:39 | * | wurui joined #nim |
03:55:10 | * | marenz_ joined #nim |
03:59:09 | * | marenz__ quit (Ping timeout: 264 seconds) |
04:00:37 | * | wurui quit (Remote host closed the connection) |
04:01:37 | * | endragor quit (Remote host closed the connection) |
04:02:06 | * | endragor joined #nim |
04:10:44 | * | MJCaley quit (Quit: MJCaley) |
05:40:38 | * | yglukhov joined #nim |
05:45:08 | * | yglukhov quit (Ping timeout: 255 seconds) |
05:57:11 | FromGitter | <data-man> @dom96: Print on a flyer an example from recently merged #6936 (Thanks, @Araq!) β I can be wrong, but I suppose that there is no such feature in any language (in a standard library) :) |
05:59:28 | FromGitter | <data-man> @PMunch: Should drawille.nim also be printed? ;) |
06:00:40 | * | Amrykid joined #nim |
06:09:14 | * | Amrykid quit (Ping timeout: 276 seconds) |
06:09:27 | * | kier quit (Ping timeout: 240 seconds) |
06:11:50 | * | dddddd quit (Remote host closed the connection) |
06:25:51 | * | nsf joined #nim |
06:49:02 | * | xet7 quit (Ping timeout: 255 seconds) |
06:50:11 | * | marenz_ quit (Ping timeout: 276 seconds) |
07:01:58 | * | xet7 joined #nim |
07:22:00 | * | xet7 quit (Ping timeout: 260 seconds) |
07:23:00 | * | gokr joined #nim |
07:33:50 | * | devdri joined #nim |
07:36:42 | * | xet7 joined #nim |
07:39:34 | * | gokr quit (Ping timeout: 256 seconds) |
07:50:23 | * | arnetheduck quit (Ping timeout: 248 seconds) |
07:52:05 | * | yglukhov joined #nim |
07:54:13 | * | arnetheduck joined #nim |
07:55:25 | * | gokr joined #nim |
07:57:14 | * | yglukhov quit (Ping timeout: 276 seconds) |
07:57:48 | * | devdri quit () |
08:10:18 | * | Vladar joined #nim |
08:12:30 | * | devdri joined #nim |
08:28:07 | * | Jipok[m] quit (Ping timeout: 248 seconds) |
08:28:47 | * | trincyolo quit (Ping timeout: 265 seconds) |
08:35:56 | * | devdri quit () |
08:39:32 | * | xkapastel quit (Quit: Connection closed for inactivity) |
08:39:35 | * | floppydh joined #nim |
08:42:09 | * | Jipok[m] joined #nim |
08:43:09 | * | trincyolo joined #nim |
08:48:41 | * | sendell joined #nim |
09:05:20 | * | PMunch joined #nim |
09:08:21 | * | yglukhov joined #nim |
09:08:41 | * | yglukhov quit (Remote host closed the connection) |
09:08:57 | * | yglukhov joined #nim |
09:10:58 | PMunch | data-man, didn't you see my proposed game of life implementation? It includes Drawille :) |
09:12:58 | FromGitter | <data-man> Which a link is last? |
09:14:08 | PMunch | http://ix.io/EkC/ |
09:15:17 | FromGitter | <data-man> Yes, I saw. But Drawille not included. :-) |
09:15:27 | PMunch | What do you mean not included? |
09:16:26 | PMunch | The more I thought about it though the more I like @alehander42's idea of having multiple versions. Nim just has too much to show off :) I'm thinking maybe one example showing macro usage (Simple jester server with JSON perhaps?), a JS-backend example creating a website (maybe pulling data from the Jester example, or a deployed sample server implementing the same thing), and the game of life example. It would be cool to also get a macro implementation but I |
09:16:26 | PMunch | can't think of anything you'd be able to fit in that size with an example.. |
09:16:33 | FromGitter | <data-man> Drawille.nim has a 284 lines |
09:17:48 | PMunch | You want to print out the entire thing? :P |
09:19:42 | * | vlad1777d joined #nim |
09:20:00 | FromGitter | <data-man> No, just don't use. |
09:20:01 | * | GaveUp quit (Ping timeout: 248 seconds) |
09:20:36 | PMunch | Oh you want me to not use Drawille? |
09:21:26 | PMunch | You could implement this like dom96 did with a regular ASCII character, but with much lower resolution |
09:24:26 | FromGitter | <data-man> Yes, to not use on a flyers, because the implementation details are not visible. |
09:30:27 | * | kier joined #nim |
09:31:50 | * | GaveUp joined #nim |
10:09:44 | PMunch | Well this works: http://ix.io/Emh/ |
10:14:24 | * | yglukhov quit (Ping timeout: 268 seconds) |
10:14:33 | FromGitter | <data-man> π― :) |
10:19:18 | PMunch | Or if you want to get really crazy about it: http://ix.io/Emi/ |
10:24:26 | FromGitter | <data-man> Maybe to put "Nim" to a board? |
10:26:32 | FromGitter | <data-man> os not needed |
10:26:54 | livcd | what are you guys trying to do ? |
10:27:24 | PMunch | data-man, yeah I had os there to use sleep. But I removed it for those precious lines :P |
10:27:46 | PMunch | livcd, dom96 wanted a sample to put on the back of the Nim flyers for FOSDEM |
10:28:10 | PMunch | So we're miniaturizing a game of life example to fit |
10:28:49 | livcd | ah :D |
10:28:51 | livcd | nice |
10:29:55 | PMunch | But I don't think it can get much smaller now and still be readable :P |
10:37:00 | Araq | you need useful helpers |
10:38:31 | Araq | game of life can written shorter and more precise with "for all board fields" count("probe positions environment without bound errors") |
10:41:43 | PMunch | Well that is pretty much what this is doing |
10:42:25 | PMunch | But you want to split it off into helper procedures? Not sure how that would be shorter.. |
10:42:33 | PMunch | Unless you pull a go and hide everything in a libaryr |
10:42:35 | PMunch | :P |
10:45:13 | FromGitter | <data-man> @Araq: I implemented some useful procs for lists: isEmpty, len, count, peekFirst, peekLast, popFirst, popLast and append for SinglyLinkedList (popXXX/peekXXX returns a value). β To create a PR? |
10:46:52 | Araq | PMunch: yep, hide it in another library |
10:46:57 | Araq | :P |
10:47:10 | Araq | these primitives might be generally useful though |
10:47:36 | Araq | so it's not a fake library. however, we need a DSL for that to show off :P |
10:48:00 | Araq | data-man: lists? ugh |
10:48:40 | FromGitter | <data-man> lists.nim in collections :) |
10:49:01 | PMunch | Yeah it's hard to show off all the cool parts in such a short example |
10:49:14 | PMunch | That's why I'm starting to like alehander42's suggestion more and more |
10:50:26 | PMunch | Just create 3-4 different versions of the flyer with different code samples. For example a web-dev might be more interested in the JS backend and HTML stuff, while a server person might be interested in seeing Jester (plus it's a good example of DSLs), and then a general game of life example just to show some "regular" syntax. |
10:50:28 | dom96 | I'm starting to wonder whether it would be better to have a larger example |
10:51:13 | dom96 | So that it's easier for the reader to understand the code |
10:51:38 | dom96 | and as a side effect it would show off procedures/types as wlel |
10:51:39 | dom96 | *well |
10:51:48 | dom96 | Something along these lines? https://gist.github.com/dom96/31f17b06874569a00108311a4c7a9139 |
10:52:50 | Araq | procs and types are boring though |
10:53:32 | dom96 | not to people unfamilliar with the language |
10:55:03 | FromGitter | <andreaferretti> Yeah, looks boring |
10:55:12 | FromGitter | <andreaferretti> Does not really show the potentiality of the language |
10:56:28 | PMunch | Well it shows how types can be pretty complex |
10:57:07 | PMunch | But I agree that the increase in size doesn't really lead to a large increase in wow-factor |
10:57:16 | PMunch | Just looks like you need more boilerplate :P |
10:58:11 | PMunch | If we did multiple flyers it would be possible to have one that was like something you would find on https://learnxinyminutes.com/docs/Nim just showing off some cool features without any real purpose |
11:01:20 | * | yglukhov joined #nim |
11:01:50 | Araq | then people need to collect flyers |
11:01:59 | Araq | to see all examples. |
11:02:14 | Araq | we need more flyers then and should start to sell them. |
11:02:54 | Araq | and every flyer should be in an envelope so people can't see what version they are buying |
11:03:18 | Araq | Nim Pokemon. |
11:03:18 | FromGitter | <data-man> Just to print https://github.com/def-/nim-units/blob/master/units.nim :) |
11:03:32 | PMunch | Haha, great idea Araq! |
11:03:52 | PMunch | Then we can design the examples to work together and "win" over each other :P |
11:05:24 | Araq | "my allocation free game of life implementation beats your implementation that uses 'seqs'" |
11:05:42 | PMunch | data-man, what is this sorcery?! |
11:06:40 | FromGitter | <data-man> This is Nim's magic |
11:06:56 | * | arnetheduck quit (Ping timeout: 276 seconds) |
11:07:33 | PMunch | I know, it's just really cool! |
11:07:41 | PMunch | Never seen that file before |
11:08:07 | dom96 | A Nim trading card game could actually be a pretty innovative way to teach people Nim :P |
11:08:22 | dom96 | I think we should think about that separately |
11:09:12 | dom96 | I still like the initial idea I had: a quick start guide at the back (Step 1. Install Nim via choosenim. Step 2. Compile hello world. Step 3. Learn Nim) |
11:09:27 | dom96 | Step 1 would have the beautiful choosenim one-liner |
11:09:36 | dom96 | step 2 would have `nim c -r hello.nim` |
11:09:42 | dom96 | and step 3 would have links to the tutorial and docs |
11:11:13 | Araq | dom96: why not cheat sheet instead? |
11:11:33 | Araq | "keep this next to your computer" |
11:11:53 | dom96 | We can do that too |
11:11:59 | dom96 | Although my book already contains a cheat sheet :P |
11:13:11 | FromGitter | <data-man> @PMunch: https://github.com/jlp765/units |
11:14:31 | Araq | dom96: the better, then we don't have to come up with one |
11:14:33 | PMunch | dom96, but you won't be handing out your book at FOSDEM :P |
11:14:47 | Araq | and not everybody who gets a flyer also buys your book |
11:24:32 | * | skelett quit (Ping timeout: 256 seconds) |
12:00:58 | * | vlad1777d quit (Ping timeout: 265 seconds) |
12:13:16 | * | Yardanico joined #nim |
12:13:45 | Yardanico | good day/night/afternoon/morning everyone |
12:14:54 | PMunch | Good mid-day to you too Yardanico |
12:15:13 | Yardanico | yeah, I have mid-day here too, forgot about it :P |
12:15:16 | miran | good afternoon Yardanico |
12:24:40 | Yardanico | dom96, about game of life for a flyer - we can probably change four lines after setCursorPos(stdout, x, y) into one - stdout.write(if board[x][y]: "β" else: "") ? I don't think that this removes readability |
12:24:49 | Yardanico | (I took the code from your deepCopy issue) |
12:25:00 | * | PMunch_ joined #nim |
12:25:38 | Yardanico | stdout.write if board[x][y]: "β" else: "" will also work, but it looks worse IMO :) |
12:26:08 | * | earenndil quit (Ping timeout: 248 seconds) |
12:26:40 | * | kunev quit (Ping timeout: 248 seconds) |
12:26:40 | * | oprypin quit (Ping timeout: 248 seconds) |
12:27:25 | * | oprypin joined #nim |
12:27:28 | Yardanico | in fact if board[x][y]: x else: y is already used on line 12 |
12:27:38 | * | earenndil joined #nim |
12:27:43 | * | PMunch quit (Ping timeout: 248 seconds) |
12:27:44 | * | gmpreussner quit (Ping timeout: 248 seconds) |
12:28:54 | * | Ven`` joined #nim |
12:28:56 | * | gokr quit (Ping timeout: 276 seconds) |
12:29:03 | * | kunev joined #nim |
12:29:05 | * | gmpreussner joined #nim |
12:31:01 | livcd | dom96: where is the cheat sheet ? :-| |
12:32:58 | dom96 | livcd: the inside covers |
12:33:40 | dom96 | we need to decide what to put on the back cover soon... |
12:33:44 | dom96 | Not much time left guys |
12:33:49 | * | xet7 quit (Remote host closed the connection) |
12:41:37 | Yardanico | dom96, so the idea with game of life is still here? |
12:41:52 | dom96 | yeah |
12:41:56 | livcd | ah lol the mini cheatsheet |
12:41:56 | livcd | ok |
12:42:01 | dom96 | but many other ideas have been put forward |
12:43:59 | * | PMunch_ is now known as PMunch |
12:44:34 | * | gokr joined #nim |
12:44:51 | PMunch | I like the idea of multiple examples. But if that is not feasible then either GOL or cheatsheet is good |
12:47:44 | FromGitter | <data-man> https://github.com/nim-lang/Nim/blob/devel/tests/generics/tthread_generic.nim is a good example |
12:52:02 | * | xet7 joined #nim |
13:00:56 | * | skelett joined #nim |
13:12:05 | FromGitter | <tim-st> Does anyone know if it's possible to save a `RuneEnumeration` used in `case ... of RuneEnumeration` to use it later again in a deeper case? (Where RuneEnumeration is something like `Rune('a')..Rune('z'), Rune('.')` |
13:14:27 | * | svennidal joined #nim |
13:19:26 | FromGitter | <tim-st> Ok, I got it working, I have to use brackets in the declaration |
13:20:30 | * | dddddd joined #nim |
13:21:46 | FromGitter | <tim-st> Hm, seems compiler doesnt accept const "Slices of Rune" for case check |
13:25:42 | FromGitter | <alehander42> @Araq might be kidding but this "collecting flyers" thing is exactly what I had in mind :D |
13:25:57 | * | gokr quit (Quit: Leaving.) |
13:26:31 | FromGitter | <alehander42> anyway, just a GOL example seems bad to me, as @andreaferretti said, it doesn't really demonstrate interesting stuff |
13:26:36 | FromGitter | <alehander42> enough* |
13:27:15 | FromGitter | <alehander42> (it demonstrates syntax & cool libs as drawille, but there is much more) |
13:31:23 | * | marenz_ joined #nim |
13:35:55 | Yardanico | but how you would but everything on a small flyer? :) |
13:36:29 | dom96 | Nim Flyers! Gotta catch 'em all! |
13:36:50 | dom96 | we can't demonstrate cool stuff effectively on a flyer |
13:37:11 | FromGitter | <alehander42> that's why you have 3-4 variants of flyers, c'mon, *diversity* |
13:37:17 | FromGitter | <alehander42> :D |
13:37:42 | FromGitter | <alehander42> yeah, btw, do people do workshops or something like that? |
13:38:33 | FromGitter | <alehander42> something like introducing groups of people for 30 minutes would be pretty cool |
13:39:04 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzzβ¦) |
13:39:22 | dom96 | They probably do |
13:39:27 | dom96 | but we just have a stand at this one |
13:40:12 | dom96 | and we do plan to have laptops with something on them |
13:40:29 | * | gangstacat quit (Quit: Δis!) |
13:40:51 | dom96 | and maybe some embedded devices (any new ideas on that federico3?) |
13:41:06 | dom96 | People in general will be able to talk to us for as long as they want |
13:42:16 | federico3 | something that blinks, something with a display and if I could find the time a little sensor + oled |
13:43:20 | * | Vladar quit (Quit: Leaving) |
13:44:04 | * | arecaceae quit (Remote host closed the connection) |
13:44:23 | * | arecaceae joined #nim |
13:45:01 | dom96 | awesome |
13:45:40 | dom96 | alehander42: if you want 3-4 variants then please come up with what should be on those variants :) |
13:46:20 | FromGitter | <alehander42> that's fair, I'll try to think of something this week |
13:46:48 | dom96 | okay, I'll probably print some sort of flyers ahead of that |
13:46:59 | FromGitter | <alehander42> ofc |
13:52:07 | FromGitter | <Quelklef> How bad is it to render JSON manually rather than by the json module? |
13:52:42 | FromGitter | <Quelklef> I feel like it's not a big deal but OTOH maybe it's not as simple as I thnk |
13:53:32 | dom96 | why not just render it using the json module? |
13:54:02 | FromGitter | <Quelklef> Adds a dependency and seems like a pain |
13:54:20 | dom96 | it's the very opposite of a pain |
13:54:21 | * | Snircle joined #nim |
13:54:24 | FromGitter | <Quelklef> But mostly feels like overkill, maybe? Which is why I'm asking |
13:54:28 | dom96 | formatting a JSON string yourself is a pain |
13:54:44 | FromGitter | <RedBeard0531> JSON is pretty simple. The only real annoying bit is having to do the utf16-style surrogate pare escaping in strings. |
13:55:16 | FromGitter | <Quelklef> Ah, there we go. Thanks @RedBeard0531, hadn't thought of that |
13:55:17 | dom96 | The only dependencies that are worth worrying about is C library dependencies |
13:55:38 | FromGitter | <Quelklef> Really? |
13:56:01 | * | gangstacat joined #nim |
13:56:12 | FromGitter | <Quelklef> Oh right only procs that are actually called are compiled, right? |
13:56:28 | dom96 | yes |
13:57:15 | * | rokups joined #nim |
14:01:57 | * | Snircle quit (Ping timeout: 246 seconds) |
14:02:06 | * | Vladar joined #nim |
14:05:11 | * | Snircle joined #nim |
14:05:21 | * | Jesin quit (Quit: Leaving) |
14:07:03 | FromGitter | <RedBeard0531> Are closure iterators supposed to work on the js backend? |
14:07:42 | Araq | no, they are not implemented |
14:08:42 | FromGitter | <RedBeard0531> Ok, I was getting a weird error "jsiter.nim(5, 9) Error: internal error: symbol has no generated name: iter" and I couldn't tell if I was doing something wrong or not |
14:09:12 | * | Yardanico quit (Remote host closed the connection) |
14:10:54 | * | Yardanico joined #nim |
14:12:09 | * | Amrykid joined #nim |
14:18:47 | * | Yardanico quit (Remote host closed the connection) |
14:25:26 | * | Yardanico joined #nim |
14:26:58 | * | Snircle_ joined #nim |
14:28:52 | * | Snircle quit (Ping timeout: 265 seconds) |
14:33:16 | FromGitter | <data-man> ```code paste, see link``` β β How get a high index for T? [https://gitter.im/nim-lang/Nim?at=5a6201acce68c3bc74da087c] |
14:33:43 | * | juanfra joined #nim |
14:34:55 | FromGitter | <Yardanico> ?? |
14:34:58 | FromGitter | <Yardanico> maybe for "v1" ? |
14:35:22 | Yardanico | Did you try v1[^1] ? :) |
14:35:30 | Yardanico | and v[^1] |
14:39:06 | FromGitter | <data-man> I'm trying to add support for arrays and tuples to scanf macro |
14:51:13 | FromGitter | <data-man> Current implementation https://gist.github.com/data-man/5b80bdec995d01164beccd80ddf0bcfe |
14:52:14 | FromGitter | <data-man> ```code paste, see link``` β β A test code [https://gitter.im/nim-lang/Nim?at=5a62061e517037a212c9218c] |
14:56:04 | * | miran left #nim (#nim) |
14:56:33 | FromGitter | <data-man> Is a bad idea? :) |
15:02:43 | * | nsf quit (Quit: WeeChat 2.0.1) |
15:07:51 | * | xkapastel joined #nim |
15:08:07 | * | MJCaley joined #nim |
15:14:56 | FromGitter | <krux02> I have non deterministic crashes in the compiler |
15:14:58 | FromGitter | <krux02> yay |
15:15:15 | FromGitter | <krux02> it crashes reproducably, but not reproducable at the same position |
15:17:05 | dom96 | interesting, macro problems? |
15:17:10 | FromGitter | <krux02> yes |
15:17:26 | FromGitter | <krux02> the vm is hell in Nim |
15:17:41 | FromGitter | <krux02> undebuggable and a mess in the codebase |
15:18:15 | FromGitter | <krux02> SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
15:18:41 | FromGitter | <krux02> that is the error when I compile with 'koch test run ...' |
15:18:53 | FromGitter | <krux02> but when I compile with nim_temp, then the error message is much different |
15:19:22 | FromGitter | <krux02> first of all it fails much earlier |
15:20:13 | FromGitter | <krux02> and then it has the error message: ``` |
15:20:15 | FromGitter | <krux02> ####bar #### β β nim.nim(121) nim β nim.nim(77) handleCmdLine β main.nim(172) mainCommand ... [https://gitter.im/nim-lang/Nim?at=5a620cafce68c3bc74da5082] |
15:21:28 | FromGitter | <krux02> system.nim 2833 is the sysFaltal proc |
15:21:45 | FromGitter | <krux02> and vm.nim(1257) is a local variable of type int |
15:21:50 | FromGitter | <krux02> not a node or anything |
15:22:37 | * | vivus joined #nim |
15:28:28 | FromGitter | <krux02> nope it is of type TRegister |
15:28:40 | Araq | what's messy about it? |
15:29:35 | FromGitter | <krux02> why do I always have to asskick the compiler before it tells me anything useful about what went wrong? |
15:30:35 | FromGitter | <naelt> Hello, i try nim's ffi for a c library function crypt_newhash on openbsd. The signature of the c function is: |
15:31:07 | Araq | krux02: so you get a stack trace pointing to the bug. I wouldn't call this "undebuggable" |
15:33:52 | FromGitter | <krux02> I am stuck and there not a single instance of `intVal` in the stack |
15:34:00 | FromGitter | <krux02> at least I did not find it yeat |
15:34:52 | FromGitter | <krux02> currently i fail at implementing `resolveAlias` |
15:35:21 | FromGitter | <krux02> Araq: do you understand the problem with `getTypeImpl` and `getTypeInst`? |
15:35:49 | Araq | I guess, but it's stupid |
15:35:57 | FromGitter | <krux02> why is it stupid? |
15:36:13 | Araq | there are multiple ways to spell a type and you only accept a single spelling |
15:36:33 | FromGitter | <krux02> what do you mean? |
15:36:40 | Araq | you're after some canonical form that is not specified anywhere |
15:37:13 | FromGitter | <krux02> is there a problem with that? |
15:38:14 | FromGitter | <krux02> I specify the type that I want to accept |
15:38:56 | Araq | well since it's not specified, of course it's problematic |
15:39:31 | Araq | you want the Vec4[float] from 'type Vec4f = Vec4[float]' iirc |
15:39:51 | * | miran joined #nim |
15:40:18 | Araq | but the compiler doesn't even have an obligation to keep this information, nowhere does the spec say the compiler is obliged to keep temporary instantiations around for getType() |
15:40:22 | FromGitter | <naelt> Hello, i try nim's ffi for a c library function crypt_newhash on openbsd. The signature of the c function is: β β ```code paste, see link``` β β I get a bus error when i try read the hash variable, which must be the password in hashed form. The return value of my wrapper is 0, which indicate a successful return. Has sombody a experience with it? Thanks [https://gitter.i |
15:40:22 | FromGitter | ... m/nim-lang/Nim?at=5a6211655a9ebe4f75aa4062] |
15:40:24 | FromGitter | <krux02> no I want the Vec[4,float32], but good enough I guess |
15:41:30 | FromGitter | <krux02> then what should I do? pattern match the object implementation? |
15:42:14 | Araq | that's one solution, I would match against the Vec4f alias, but that has the same problem I'm complaining about ;-) |
15:42:59 | FromGitter | <dom96> @naelt: char * == cstring, not 'ptr cstring' |
15:43:19 | FromGitter | <krux02> I guess you know what I try to do |
15:44:15 | FromGitter | <krux02> I want to translate a block of nim code `let x = vec4(1,2,3,4)` to glsl `ivec4 x = ivec4(1,2,3,4)` in a macro |
15:44:29 | FromGitter | <krux02> but for that I need to know the type of each node and map it to glsl |
15:45:00 | FromGitter | <krux02> and there are a lot of names for the same type as you already |
15:45:02 | FromGitter | <krux02> said |
15:45:19 | FromGitter | <krux02> meaning I need to normalize the types to one form |
15:45:31 | FromGitter | <krux02> the only form that I get, is getTypeImpl |
15:45:39 | FromGitter | <krux02> but then I loose the name of the type |
15:45:55 | FromGitter | <krux02> meaning any type with the same implementation would match, too |
15:45:57 | FromGitter | <krux02> I don't like that |
15:50:26 | FromGitter | <krux02> Araq: If you could tell me an alternative how I can do it, I can agree that what I want is stupid. But as long as I don't get any idea on how to do it otherwise I try my best at punching `resolveAlias` through |
15:50:40 | FromGitter | <krux02> because I don't see an alternative |
15:51:18 | FromGitter | <krux02> as I see it, the type is some sort of list internally |
15:51:20 | FromGitter | <naelt> @dom96 thank you, i removed ptr and addr. now i receive SIGSEGV: Illegal storage access |
15:52:10 | dom96 | check what crypto_newhash returns |
15:52:14 | dom96 | maybe it gives an error? |
15:52:25 | FromGitter | <krux02> @naelt: when you made changes show them. Otherwise we can't help. |
15:53:39 | * | MJCaley quit (Quit: MJCaley) |
15:53:39 | euantor | @dom96 He said it returned 0 which is success |
15:53:42 | Araq | naelt: pass it a valid buffer |
15:54:02 | euantor | I think `size_t` should be `cint` rather than `uint16` too, right? |
15:54:21 | Araq | return value of 0 is irrelevant when you have a corruption |
15:54:36 | euantor | and do `var hash: cstring = cstring(newString(127))` |
15:54:48 | FromGitter | <krux02> Araq: what was the argument to koch, so it builds the compiler in debug mode |
15:54:59 | Araq | koch temp c foo.nim |
15:55:08 | FromGitter | <krux02> when I run koch temp it misses debug information |
15:56:17 | FromGitter | <krux02> so how do I have a debug build that allows me to use a debugger on it? |
15:58:12 | FromGitter | <naelt> many thanks `var hash: cstring = cstring(newString(127))` do it :) |
15:58:33 | * | MJCaley joined #nim |
16:00:24 | FromGitter | <krux02> Araq: how do I add the debug symbols to the compiler? |
16:03:41 | Araq | --debugger:native |
16:03:50 | Araq | koch temp --debugger:native c foo.nim |
16:04:00 | Araq | see you in a couple of days |
16:04:10 | FromGitter | <krux02> then what is--debuginfo? |
16:04:53 | Araq | --debugger:native is --debuginfo --lineDir:on |
16:04:56 | Araq | bye |
16:06:59 | * | Amrykid quit (Ping timeout: 265 seconds) |
16:10:08 | * | MJCaley quit (Quit: MJCaley) |
16:13:48 | * | MJCaley joined #nim |
16:19:28 | * | azur_kind joined #nim |
16:24:02 | * | azur_kind quit (Client Quit) |
16:36:28 | * | endragor quit (Remote host closed the connection) |
16:36:38 | * | rokups quit (Quit: Connection closed for inactivity) |
16:36:57 | * | endragor joined #nim |
16:39:24 | * | endragor_ joined #nim |
16:40:54 | * | Snircle_ quit (Read error: Connection reset by peer) |
16:41:27 | * | endragor quit (Ping timeout: 240 seconds) |
16:41:58 | * | Snircle joined #nim |
16:43:53 | * | endragor_ quit (Ping timeout: 256 seconds) |
16:51:37 | * | Snircle quit (Read error: Connection reset by peer) |
16:51:39 | * | floppydh quit (Quit: WeeChat 2.0.1) |
16:52:20 | * | Snircle joined #nim |
16:54:51 | * | Jesin joined #nim |
16:57:51 | FromGitter | <dandevelo> Anyone else getting unhandled exception: Unknown IO Error [IOError] when trying to compile? |
17:01:01 | FromGitter | <dandevelo> It seems this started happening after updating my Windows 10 VM to the latest and greatest update. Curios if anyone else experienced this and how did you solve it |
17:01:13 | FromGitter | <dandevelo> It seems like it works eventually if I try it multiple times |
17:02:00 | FromGitter | <dandevelo> I found a similar report here: https://forum.nim-lang.org/t/3367 |
17:05:21 | FromGitter | <zetashift> Do you also use VSCode? |
17:05:41 | FromGitter | <dandevelo> Yes |
17:07:05 | * | PMunch quit (Ping timeout: 240 seconds) |
17:08:51 | FromGitter | <Bennyelg> x_session = requests.Session() β x_session.verify = '/Applications/abc.crt' β auth={'auth':requests.auth.HTTPBasicAuth(okta_user,okta_password)} β conn = presto.connect(host="xxx.com", port=8443, protocol='https', β requests_kwargs=auth, requests_session=x_session) [https://gitter.im/nim-lang/Nim?at=5a6226236117191e61886b4e] |
17:09:04 | FromGitter | <Bennyelg> Any way to do it with nim httpclient ? |
17:11:54 | FromGitter | <Yardanico> yes but IDK what is presto |
17:12:23 | FromGitter | <Yardanico> httpclient supports basic auth and you can use custom ssl certs: https://nim-lang.org/docs/ssl.html |
17:12:33 | FromGitter | <Yardanico> well not with this module |
17:12:46 | FromGitter | <Bennyelg> just a connector not much, |
17:12:53 | FromGitter | <Yardanico> https://nim-lang.org/docs/net.html |
17:12:54 | FromGitter | <Bennyelg> it's python sample |
17:13:04 | dom96 | httpclient doesn't handle session management for you |
17:13:15 | dom96 | You'll have to store the handle the HTTP headers yourself |
17:13:36 | FromGitter | <Bennyelg> I c |
17:14:39 | FromGitter | <Bennyelg> Thanks. |
17:15:40 | Yardanico | does I c means "I see"? |
17:15:50 | FromGitter | <Bennyelg> Yes :D |
17:18:34 | * | svennidal quit (Quit: leaving) |
17:19:06 | * | yglukhov quit (Remote host closed the connection) |
17:19:41 | * | yglukhov joined #nim |
17:25:19 | * | yglukhov quit (Ping timeout: 248 seconds) |
17:29:35 | * | devdri joined #nim |
17:29:41 | FromGitter | <dandevelo> For anyone else experiencing that IO Error issue when using VS Code with the latest Windows 10 update, I wrote here about a workaround I just found out: https://forum.nim-lang.org/t/3367 |
17:33:19 | FromGitter | <dandevelo> I guess the forum is moderated and the replies will only be visible after being approved |
17:33:28 | * | sendell quit (Remote host closed the connection) |
17:33:56 | dom96 | yeah, approved you |
17:34:44 | dom96 | This is odd |
17:34:46 | dom96 | It should be an issue |
17:36:04 | FromGitter | <dandevelo> Thanks @dom96 |
17:36:07 | dom96 | https://github.com/nim-lang/Nim/issues/7111 |
17:36:23 | dom96 | I don't have Windows 10 sadly. It would be helpful if someone could investigate this. |
17:38:54 | * | zahary_ quit (Quit: Connection closed for inactivity) |
17:42:04 | * | Trustable joined #nim |
17:43:27 | FromGitter | <dandevelo> It seems like it only happens when using VS Code |
17:43:40 | FromGitter | <dandevelo> If I try compiling from the command line then it seems to work |
17:43:45 | * | couven92 quit (Quit: Client disconnecting) |
17:44:10 | Yardanico | yes it was happening for me too |
17:44:32 | Yardanico | I needed to run the command like 5 times to actually run it fully :) |
17:44:55 | * | Arrrr joined #nim |
17:44:59 | * | Arrrr quit (Changing host) |
17:44:59 | * | Arrrr joined #nim |
17:48:25 | * | Jesin quit (Quit: Leaving) |
17:51:30 | FromGitter | <dandevelo> Seems like this is the root cause: https://github.com/Microsoft/vscode/issues/36630#issuecomment-350063413 |
17:56:32 | GitDisc | <treeform> Hey Araq, remember we talked about packed json thing, were instead of using pointers to everything you use relative pointers or sizes in a single buffer? I have implemented some thing like this. I do not need full json, i just need Table[string, string], i benched my packed string table vs regular tables and regular tables win at smaller scales, but when you get 10000+ of these dictionaries my packed buffers start to win out, i suspect due to ma |
17:56:32 | GitDisc | <treeform> loc and pointer walking and cache misses becomes to much when you have this many objects. |
17:58:08 | GitDisc | <treeform> https://gist.github.com/treeform/4914bbbb7082e0e620085610ce22566a |
17:58:28 | GitDisc | <treeform> Its interesting that this idea does not win outright, but does win out at larger volumes. |
17:59:11 | GitDisc | <treeform> I called it kiwi, because it kind of sounds like "kv" which short key value store. |
18:00:07 | * | yglukhov joined #nim |
18:02:18 | * | wishi quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
18:04:43 | * | yglukhov quit (Ping timeout: 256 seconds) |
18:06:13 | * | Vladar quit (Quit: Leaving) |
18:36:52 | * | couven92 joined #nim |
19:14:23 | * | skelett quit (Ping timeout: 255 seconds) |
19:16:19 | * | yglukhov joined #nim |
19:20:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
19:44:37 | * | xkapastel quit (Quit: Connection closed for inactivity) |
19:49:46 | * | miran quit (Remote host closed the connection) |
19:54:38 | * | couven92 quit (Ping timeout: 265 seconds) |
19:55:52 | * | couven92 joined #nim |
19:58:11 | * | devdri quit () |
20:00:39 | * | yglukhov_ joined #nim |
20:02:45 | * | wishi joined #nim |
20:29:35 | * | couven92 quit (Ping timeout: 240 seconds) |
20:32:43 | * | jxv joined #nim |
20:35:54 | * | Arrrr quit (Ping timeout: 256 seconds) |
20:41:09 | * | couven92 joined #nim |
20:42:13 | * | Yardanico quit (Remote host closed the connection) |
20:55:10 | * | jxv quit (Quit: zzzβ¦) |
20:55:39 | * | Arrrr joined #nim |
20:55:52 | * | jxv joined #nim |
21:00:25 | * | jxv quit (Client Quit) |
21:04:24 | FromGitter | <RSDuck> is this behavior normal, or is it a bug? |
21:04:37 | FromGitter | <RSDuck> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a625d659cdc721e4fa2fa2b] |
21:06:15 | FromGitter | <Quelklef> What's the behavior |
21:06:28 | FromGitter | <RSDuck> that it throws an error |
21:06:37 | FromGitter | <RSDuck> sorry, I should have made that more clear |
21:06:47 | FromGitter | <Quelklef> What's the error |
21:06:54 | FromGitter | <Quelklef> oh, i see |
21:06:59 | FromGitter | <Quelklef> that's your comments. My bad |
21:08:19 | FromGitter | <RSDuck> another noteworthy thing here is that after changing the name of close to something else(even to the name of another already defined proc) it works |
21:08:32 | FromGitter | <RSDuck> I only tested it on latest devel |
21:11:39 | FromGitter | <Quelklef> Dunno, but my guess is that close() is a proc/template/whatever defined in system.nim and that's messing with stuff |
21:12:25 | FromGitter | <RSDuck> yeah, that's what I thought too, eventhough close in system.nim looks like nothing special |
21:15:23 | * | vivus_ joined #nim |
21:16:37 | FromGitter | <Quelklef> See if there's already an issue created for this |
21:16:50 | FromGitter | <Quelklef> and if you can't find anything about it, probably create one. |
21:17:28 | * | vivus_ quit (Client Quit) |
21:17:35 | FromGitter | <RSDuck> I already did, there's currently no issue with this problem reported |
22:02:51 | * | xkapastel joined #nim |
22:11:57 | Calinou | how do I use async procs in Nim? |
22:12:04 | Calinou | https://nim-lang.org/docs/httpclient.html |
22:12:13 | Calinou | an {.async.} proc causes an error here |
22:13:22 | dom96 | import asyncdispatch? |
22:18:00 | Calinou | I see, thanks |
22:19:02 | Calinou | "You will need to run asynchronous examples in an async proc otherwise you will get an Undeclared identifier: 'await' error." -> does this mean, I need *two* async procs? |
22:19:06 | Calinou | one for progress reporting, one for HTTP request? |
22:19:10 | Calinou | or can I use one for both? |
22:20:25 | dom96 | yes, you need two |
22:23:10 | * | Amrykid joined #nim |
22:32:29 | Calinou | hmm, I'm getting this when running `nimble build` now: https://paste.ee/p/lfMJQ |
22:32:39 | Calinou | the last commit to NimYAML was in November, and it worked fine 3 days ago |
22:32:45 | Calinou | (I didn't update Nim in between) |
22:34:44 | dom96 | that's a weird error |
22:35:16 | Calinou | can I cleanup all dependencies in some way? |
22:35:19 | Calinou | (to force a rebuild or something) |
22:35:47 | dom96 | You can try reinstalling yaml |
22:35:49 | dom96 | I would open /home/hugo/.nimble/pkgs/yaml-#head/yaml/private/internal.nim |
22:35:55 | dom96 | and see what's on line 9 |
22:36:02 | dom96 | and try to figure out why this error occurs |
22:37:47 | dom96 | maybe you were compiling in release mode last time? |
22:37:59 | dom96 | nimble c -d:release godotup? |
22:38:50 | dom96 | although actually 'build' should be building in release mode implicitly |
22:38:57 | Calinou | that command works |
22:39:07 | Calinou | I'm doing local development right now |
22:39:12 | Calinou | so, building in debug mode is advisable |
22:39:20 | dom96 | so nimble build doesn't work but nimble c does? |
22:39:25 | Calinou | yeah |
22:39:34 | dom96 | check what command each is running |
22:39:35 | Calinou | "nimble c godotup" |
22:39:40 | Calinou | oh wait |
22:39:48 | Calinou | it works *only* in release mode, not in debug mode |
22:39:49 | * | MJCaley quit (Quit: MJCaley) |
22:40:11 | dom96 | That makes sense: https://github.com/flyx/NimYAML/blob/devel/yaml/private/internal.nim#L8 |
22:40:24 | * | vlad1777d joined #nim |
22:40:28 | Calinou | release: https://paste.ee/p/yLU3Z (disregard the error, it's on my side) |
22:40:32 | Calinou | debug: https://paste.ee/p/N7ymv |
22:41:58 | * | Trustable quit (Remote host closed the connection) |
22:42:09 | dom96 | It's also pointing here: https://github.com/flyx/NimYAML/blob/devel/yaml/serialization.nim#L1060 |
22:42:55 | * | cspar__ joined #nim |
22:43:01 | dom96 | seems like a yaml bug to me |
22:43:05 | dom96 | flyx: ^ |
22:43:25 | dom96 | Maybe putting `untyped` as the return type to this https://github.com/flyx/NimYAML/blob/devel/yaml/private/internal.nim#L7 |
22:43:29 | dom96 | Might help |
22:44:30 | dom96 | or even s/template/proc/ |
22:45:10 | dom96 | don't see why this is a template |
22:45:59 | * | cspar_ quit (Ping timeout: 256 seconds) |
22:46:35 | dom96 | Calinou: can you try that? |
22:49:11 | Calinou | dom96: it works now :P |
22:49:21 | Calinou | I still get the "Hint" which doesn't prevent building |
22:49:44 | Calinou | can I send a PR to flyx? |
22:50:25 | dom96 | sure |
22:54:11 | GitDisc | <Lite5h4dow> i dont know what im looking for in the documentation, does nim have an equivalent to try in python? |
22:54:20 | GitDisc | <Lite5h4dow> if so what is it called? |
22:54:57 | GitDisc | <Lite5h4dow> if not how can i emulate it |
22:55:43 | GitDisc | <Lite5h4dow> nevermind, i found it π |
22:55:57 | GitDisc | <Lite5h4dow> hiding in the intro instead of the documentation |
22:55:59 | GitDisc | <Lite5h4dow> my bad |
22:56:39 | Calinou | I love https://hub.github.com/'s pull request feature |
22:57:19 | Calinou | https://github.com/flyx/NimYAML/pull/52 |
22:57:56 | GitDisc | <Lite5h4dow> im actually wondering if the documentation is ever going to be made easier to use? |
22:58:12 | GitDisc | <Lite5h4dow> or is it pretty much finished as it is |
22:58:24 | GitDisc | <Lite5h4dow> since its a little difficult to find things sometimes |
23:10:20 | * | yglukhov_ quit (Remote host closed the connection) |
23:10:54 | * | yglukhov joined #nim |
23:14:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
23:15:42 | FromGitter | <dom96> Lite5h4dow: definitely not finished |
23:22:11 | * | Arrrr quit (Read error: Connection reset by peer) |
23:22:47 | FromGitter | <ZarsBranchkin> Uhh, I'm having a hard time finding documentation on the basic File type. Wanted to see what procedures are there by default |
23:27:35 | FromGitter | <dom96> Did you try https://nim-lang.org/docs/theindex.html ? |
23:29:27 | FromGitter | <ZarsBranchkin> Yeah, hoped that there will be a place where all the file procs would be collected. Was bit lost on what would be a better way to read a file int by int, or at least word by word where space starts next word |
23:30:42 | FromGitter | <ZarsBranchkin> Ah okay, all the basic File procs are in system module, right |
23:31:14 | FromGitter | <dom96> Yeah. You can also sort by type in the system module docs. |
23:32:13 | FromGitter | <ZarsBranchkin> Oh wow, hadn't noticed that feature |
23:34:51 | * | MJCaley joined #nim |
23:45:12 | * | MJCaley quit (Quit: MJCaley) |