00:03:18 | * | Boscop quit (Ping timeout: 258 seconds) |
00:05:08 | enurlyx | yeah, just happend i was searching too XD |
00:05:14 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:05:57 | * | Trustable quit (Quit: Leaving) |
00:07:50 | enurlyx | Also seems 32bit on 64bit is a bit tricky. Cause the pointersize |
00:11:30 | * | starless joined #nim |
00:11:33 | * | enurlyx quit (Quit: Leaving.) |
00:12:51 | * | flaviu joined #nim |
00:24:05 | * | BitPuffin joined #nim |
00:26:23 | Varriount | enurlyx: Yep, there's a whole section in the book I'm reading ("Windows Internals") that covers 32-bit emulation. |
00:26:44 | Varriount | Oh, (s)he's gone... |
00:28:46 | flaviu | poor Varriount, reading about windows internals. |
00:29:03 | Varriount | flaviu: It's quite interesting. Also, a handy sleep aid. |
00:29:35 | flaviu | It's quite unfortunate that I already have a backlog of sleep aids then. |
00:29:42 | ldlework | I have sdl imported but getting app.nim(2, 16) Error: undeclared identifier: 'GetTicks' |
00:29:48 | ldlework | http://nim-lang.org/sdl.html#GetTicks, |
00:30:24 | flaviu | ldlework: gist the first few lines of app.nim |
00:30:46 | Varriount | ldlework: Does the sdl library source actually match up with the documentation? If I recall correctly, that documentation is old. |
00:30:48 | ldlework | https://gist.github.com/dustinlacewell/2c5b9c39ac8632fe9796 |
00:31:17 | ldlework | ah |
00:31:17 | * | ciony quit (Ping timeout: 272 seconds) |
00:31:19 | ldlework | getTicks |
00:31:54 | Varriount | Oh, victim of the renaming and case switch? |
00:32:47 | * | gokr quit (Ping timeout: 264 seconds) |
00:52:45 | * | gokr joined #nim |
01:07:02 | * | brson joined #nim |
01:13:34 | * | cir0x quit (Ping timeout: 245 seconds) |
01:24:12 | * | starless quit (Quit: WeeChat 0.4.2) |
01:34:35 | Varriount | Araq: You still awake? |
01:42:17 | * | flaviu quit (Read error: Connection reset by peer) |
01:45:36 | * | flaviu joined #nim |
01:51:07 | * | rpag quit (Ping timeout: 245 seconds) |
01:52:49 | * | starless joined #nim |
02:01:51 | * | willwillson quit (Ping timeout: 272 seconds) |
02:04:36 | * | quasinoxen quit (Quit: No Ping reply in 180 seconds.) |
02:06:01 | * | quasinoxen joined #nim |
02:31:08 | * | starless quit (Quit: WeeChat 0.4.2) |
02:47:22 | * | BitPuffin quit (Ping timeout: 245 seconds) |
02:53:12 | * | darkf joined #nim |
02:53:18 | * | bitcrusher1 joined #nim |
02:54:51 | * | bitcrusher quit (Ping timeout: 244 seconds) |
03:23:37 | * | flaviu quit (Ping timeout: 245 seconds) |
03:28:05 | * | brson quit (Quit: leaving) |
04:09:51 | * | cir0x joined #nim |
04:14:51 | * | cir0x quit (Ping timeout: 272 seconds) |
04:53:52 | * | EXetoC quit (Quit: WeeChat 1.0.1) |
05:05:22 | * | pwernersbach joined #nim |
05:07:40 | pwernersbach | What's the recommended way to break out bytes from an int? |
05:08:54 | pwernersbach | In C I would cast to a byte pointer and dereference it, but I don't know how to in nim |
05:14:28 | * | johnsoft quit (Ping timeout: 250 seconds) |
05:14:34 | * | johnsoft joined #nim |
05:43:19 | reactormonk | pwernersbach, do you want bits or bytes? |
05:44:14 | * | BitPuffin joined #nim |
05:45:32 | pwernersbach | reactormonk: bytes |
05:48:37 | * | BitPuffin quit (Ping timeout: 250 seconds) |
05:52:13 | reactormonk | pwernersbach, you could just xor it out. Or still cast it. |
05:52:56 | pwernersbach | I'll go the cast route. How do I cast? |
05:54:33 | reactormonk | btw, what do you need the code for? |
05:54:44 | * | boydgreenfield joined #nim |
05:57:38 | reactormonk | pwernersbach, http://nim-lang.org/manual.html#type-casts |
06:01:15 | pwernersbach | reactormonk: Okay, so "var w = cast[ref array[0..3, uint8]](addr(x))"? |
06:01:43 | pwernersbach | Casting to a managed array reference |
06:33:09 | * | pwernersbach left #nim (#nim) |
06:44:38 | * | bjz joined #nim |
07:01:29 | * | bitcrusher1 quit (Read error: Connection reset by peer) |
07:24:48 | * | cir0x joined #nim |
07:26:17 | * | kapil__ joined #nim |
07:26:35 | * | gour joined #nim |
07:35:27 | * | starless joined #nim |
07:56:31 | * | khmm joined #nim |
07:59:19 | * | khmm quit (Remote host closed the connection) |
07:59:35 | * | khmm joined #nim |
08:04:35 | * | cir0x quit (Ping timeout: 264 seconds) |
08:07:50 | * | darkf quit (Ping timeout: 258 seconds) |
08:08:17 | * | darkf joined #nim |
08:18:22 | * | BlaXpirit joined #nim |
08:18:45 | * | wan joined #nim |
08:19:10 | * | wan is now known as Guest92663 |
08:28:05 | * | khmm quit (Ping timeout: 264 seconds) |
08:31:07 | * | khmm joined #nim |
08:36:48 | * | ARCADIVS joined #nim |
08:39:35 | * | cir0x joined #nim |
08:50:09 | * | Trustable joined #nim |
09:04:55 | * | milosn quit (Ping timeout: 272 seconds) |
09:07:25 | * | ciony joined #nim |
09:27:36 | * | milosn joined #nim |
09:28:03 | * | starless quit (Quit: WeeChat 0.4.2) |
09:28:23 | * | starless joined #nim |
09:34:12 | * | cir0x quit (Ping timeout: 260 seconds) |
09:38:53 | * | Guest92663 left #nim ("WeeChat 1.0.1") |
09:38:59 | * | cir0x joined #nim |
09:39:05 | * | wan joined #nim |
09:39:29 | * | wan is now known as Guest85541 |
09:39:37 | * | Guest85541 quit (Client Quit) |
09:39:54 | darkf | hi - I have a: proc findBuffer(client: TClient, name: string): TBuffer where TClient contains a seq[TBuffer], but I want to return a mutable reference/pointer to the TBuffer somehow. I am just doing a linear search over the seq and returning one of the values. I can't say "addr buffer" because the "expression has no address". how should I best do this? |
09:47:59 | * | cir0x quit (Ping timeout: 272 seconds) |
09:52:23 | * | cir0x joined #nim |
09:58:19 | darkf | yeah this is incredibly confusing. all i want to do is take an object, iterate over one of its seq, and return a pointer to one of the items. |
10:09:24 | * | boydgreenfield quit (Quit: boydgreenfield) |
10:13:57 | darkf | is this a bug? https://bpaste.net/show/0f10c62aaf05 seems like weird behavior, iteration variables don't have addresses :/ |
10:14:35 | * | ciony quit (Ping timeout: 272 seconds) |
10:19:49 | * | voldern1 is now known as voldern |
10:24:24 | * | BlaXpirit quit (Quit: Quit Konversation) |
10:31:27 | * | kapil__ quit (Quit: Connection closed for inactivity) |
10:37:58 | * | cir0x quit (Ping timeout: 256 seconds) |
10:38:16 | * | kapil__ joined #nim |
10:41:17 | * | khmm quit (Ping timeout: 264 seconds) |
10:45:27 | * | khmm joined #nim |
10:48:35 | * | ciony joined #nim |
10:51:43 | * | khmm quit (Ping timeout: 265 seconds) |
10:54:12 | * | milosn quit (Ping timeout: 250 seconds) |
10:54:28 | * | khmm joined #nim |
10:56:08 | * | starless quit (Quit: WeeChat 0.4.2) |
10:56:17 | dom96 | darkf: you need to use mitems |
10:58:32 | dom96 | hrm, I could've sworn that existed. |
10:58:41 | * | Ven joined #nim |
11:02:58 | darkf | dom96: maybe you should be the one to add it then :P |
11:07:01 | dom96 | Araq: We definitely need a async await example on the front page. |
11:13:47 | * | cir0x joined #nim |
11:22:03 | * | willwillson joined #nim |
11:31:06 | * | ARCADIVS quit (Quit: ARCADIVS) |
11:32:22 | * | ciony quit (Ping timeout: 245 seconds) |
11:39:47 | * | flaviu joined #nim |
11:41:52 | * | ciony joined #nim |
11:55:33 | * | drewsrem joined #nim |
11:55:42 | * | drewsrem quit (Client Quit) |
11:55:57 | * | drewsrem joined #nim |
11:56:04 | * | flaviu quit (Ping timeout: 255 seconds) |
11:56:12 | * | drewsrem quit (Client Quit) |
11:56:25 | * | drewsrem joined #nim |
11:57:22 | * | repax joined #nim |
11:57:38 | * | repax quit (Client Quit) |
12:14:55 | * | ciony quit (Ping timeout: 272 seconds) |
12:21:37 | * | cir0x quit (Ping timeout: 265 seconds) |
12:22:22 | * | ciony joined #nim |
12:26:18 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:44:03 | * | ciony quit (Ping timeout: 272 seconds) |
12:52:49 | * | ciony joined #nim |
13:34:13 | * | BitPuffin joined #nim |
13:36:15 | * | gokr quit (Quit: Leaving.) |
13:39:00 | * | drewsrem quit (Quit: Leaving) |
13:42:00 | * | gokr joined #nim |
13:42:00 | * | gokr quit (Client Quit) |
13:45:03 | * | EXetoC joined #nim |
13:53:39 | * | gokr joined #nim |
13:55:17 | * | ciony quit (Ping timeout: 240 seconds) |
13:59:56 | * | ciony joined #nim |
14:09:14 | * | enurlyx joined #nim |
14:13:46 | * | gokr just ordered myself a real keyboard, kinda about time... |
14:18:06 | BitPuffin | gokr: which one? |
14:18:33 | gokr | I tried finding a Ducky Shine 3, Tenkeyless but couldn't find it online with Nordic ISO layout |
14:18:50 | gokr | So I ended up ordering a Filco Majestouch 2 |
14:19:15 | gokr | Kinda odd that I knew so little about keyboards :) |
14:19:35 | gokr | What do you use? |
14:20:45 | gokr | I did find the Ducky in Germany, but... I want my å and not ü |
14:21:29 | BitPuffin | I hear majestouch 2 is the best one with cherry switches |
14:21:32 | BitPuffin | so that's a good choice |
14:21:39 | gokr | Picked the brown switches |
14:21:45 | BitPuffin | gokr: currently don't use a good one but I'm gonna order a unicomp keyboard |
14:21:53 | gokr | Ah, springs! :) |
14:22:17 | BitPuffin | yep! |
14:22:30 | gokr | I saw a guy that had both the MJ2 and a Ducky shine 3 on youtube, and... in fact he preferred the ducky. But I guess both are pretty darn good. |
14:22:49 | reactormonk | Not sure why everyone like mechanical keyboards, they tend to have a rather hard keypress. |
14:23:08 | gokr | It depends on the choice of switches, right? |
14:23:22 | reactormonk | Probably I've only used the hard ones |
14:24:26 | gokr | This was the video: https://www.youtube.com/watch?v=vOGVso4xIBU |
14:24:50 | BitPuffin | reactormonk: because you know for sure when the key was pressed |
14:25:01 | BitPuffin | so you don't have to put more force in than necessary or press the key all the way down |
14:25:25 | BitPuffin | with typical cheap ass keyboards you don't know, so chances are that you press harder than you need which causes fatigue |
14:26:29 | gokr | Now that I got so ... interested in this, I will probably just HAVE to get myself a ducky too. Get the itch unscratched. |
14:27:10 | reactormonk | BitPuffin, ah, I tend to have more problems with keyboards which require more keypress. |
14:28:22 | BitPuffin | gokr: AND a unicomp! |
14:28:26 | gokr | Hehe |
14:28:38 | BitPuffin | reactormonk: you mean pressing it further down? |
14:28:48 | BitPuffin | that's a problem mainly with cheapos |
14:32:40 | reactormonk | BitPuffin, ok. |
14:33:31 | BitPuffin | but yeah as gokr pointed out, there are ones that don't require hard keypresses, maybe it's worth finding one :) |
14:34:59 | * | brson joined #nim |
14:37:17 | * | darkf quit (Quit: Leaving) |
14:42:03 | * | willwillson quit (Ping timeout: 250 seconds) |
14:44:27 | reactormonk | BitPuffin, got one from logitec that isn't mechanical, but rather flat and I didn't have any complains yet. The only problem it runs out of battery ^^ |
14:51:26 | BitPuffin | from what I hear it's not until you have typed on a mechanical keyboard that you can't go back :P |
14:51:27 | EXetoC | are you saying that this cheap membrane keyboard of mine isn't a real keyboard? |
14:54:56 | * | ciony quit (Ping timeout: 258 seconds) |
15:07:32 | * | saml joined #nim |
15:31:28 | * | kapil__ quit (Quit: Connection closed for inactivity) |
15:38:50 | * | reloc0 joined #nim |
15:43:34 | * | Ven joined #nim |
16:02:55 | * | quasinoxen quit (Ping timeout: 272 seconds) |
16:04:12 | * | quasinoxen joined #nim |
16:05:41 | * | ciony joined #nim |
16:08:37 | * | khmm quit (Ping timeout: 240 seconds) |
16:12:01 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:18:46 | * | milosn joined #nim |
16:30:27 | * | boydgreenfield joined #nim |
16:41:23 | * | t4nk971 joined #nim |
16:43:38 | reactormonk | BitPuffin, hm. let's see. |
16:52:18 | * | yeye123 joined #nim |
17:13:19 | * | vendethiel joined #nim |
17:13:29 | * | willwillson joined #nim |
17:16:50 | * | gokr_ joined #nim |
17:19:38 | * | enurlyx quit (Quit: Leaving.) |
17:21:32 | * | xcombelle joined #nim |
17:28:27 | * | kniteli joined #nim |
17:29:58 | * | boydgreenfield quit (Quit: boydgreenfield) |
17:34:12 | * | ciony quit (Quit: Nettalk6 - www.ntalk.de) |
17:34:31 | * | yeye123 quit (Ping timeout: 250 seconds) |
17:35:41 | * | Matthias247 joined #nim |
18:00:28 | * | gokr_ quit (Ping timeout: 258 seconds) |
18:02:46 | * | boydgreenfield joined #nim |
18:14:01 | dts|pokeball | var db = open("db.sql", "", "", "") # does this function require the file db.sql to already exist, or is it something created by sqlite for managing databases? |
18:14:35 | dts|pokeball | also, if i wanted to create a database could i do it with that funcion |
18:14:39 | dts|pokeball | ? |
18:17:37 | * | BitPuffin quit (Ping timeout: 240 seconds) |
18:25:56 | ldlework | Is there anyway to reverse a seq? |
18:28:40 | gokr | Yes, aseq.reverse() |
18:28:52 | gokr | sequtils I think |
18:29:02 | gokr | Check my article about seq :) |
18:30:48 | * | yeye123 joined #nim |
18:31:46 | ldlework | okay I do not see reverse in here: http://nim-lang.org/sequtils.html |
18:32:00 | gokr | Hmmm, I was sure it was somewhere... hang on |
18:32:09 | onionhammer | dts|pokeball I would prefix the open() call.. db_sqlite.open() (or whatever the module name is) |
18:32:17 | onionhammer | im guessing it's a direct wrapper of this https://www.sqlite.org/c3ref/open.html |
18:32:54 | dts|pokeball | onionhammer, ok, but what about my question? |
18:32:59 | onionhammer | so if it doesnt exist you want to make sure to pass the SQLITE_OPEN_CREATE flag |
18:33:10 | * | alex____ joined #nim |
18:33:13 | onionhammer | im not sure if it does, you'll have to look at the module source |
18:33:24 | gokr | ldlework: algorithm module |
18:33:29 | onionhammer | dts|pokeball teach a man to fish :P |
18:33:38 | dts|pokeball | onionhammer, good point :/ |
18:34:07 | gokr | ldlework: Or just ctrl-f "reverse" at: http://nim-lang.org/theindex.html |
18:34:29 | gokr | You have both reverse (destructive) and reversed there |
18:34:43 | onionhammer | lib\impure\db_sqlite.nim |
18:35:33 | onionhammer | and that lib uses lib/wrappers/sqlite3.nim |
18:44:29 | * | Sembei quit (Ping timeout: 244 seconds) |
18:52:41 | ldlework | t = t[1..t.high] chops off the first element right? |
18:53:03 | yeye123 | anyone know the gtk2 wrapper, why does this not work? trueArray[13]=get_active(checkbutton) |
18:55:05 | * | milosn quit (Ping timeout: 264 seconds) |
19:00:38 | dts|pokeball | ldlework, it should. high gets the last element right? |
19:02:31 | * | Sembei joined #nim |
19:08:50 | * | yeye123 quit (Quit: Leaving) |
19:27:18 | ldlework | how do you iterate backwards? |
19:30:03 | Araq | countdown + a[i] access |
19:31:50 | * | rpag joined #nim |
19:40:01 | t4nk971 | is it not possible to assign to the items taken from a sequence in a for loop? |
19:41:40 | t4nk971 | if 'list' is a seq[int] and i do "for item in list: item = 1" it says "Error: 'item' cannot be assigned to" |
19:42:41 | * | yeye123 joined #nim |
19:43:01 | Araq | you should use 'mitems' which for some reason never was added to system.nim |
19:43:13 | t4nk971 | oh, ok thanks :) |
19:43:30 | reactormonk | t4nk971, items returns a non-assignable reference. |
19:43:43 | reactormonk | The reference from mitems is assignable. |
19:44:38 | t4nk971 | is mitems a keyword or something i need to import? |
19:47:18 | reactormonk | nah, it's just another method. |
19:47:20 | reactormonk | import sequtils |
19:47:58 | Araq | you need to write it :P |
19:47:58 | Araq | and make a PR |
19:50:58 | * | milosn joined #nim |
19:51:18 | reactormonk | Araq, there's no mitems for seq? |
19:51:41 | Araq | reactormonk: not in system at least |
19:52:14 | reactormonk | Araq, in sequtils? |
19:52:37 | t4nk971 | can't see it in sequtils |
19:54:34 | reactormonk | duh |
19:55:29 | reactormonk | t4nk971, grab the implementation from e.g. tables and combine it with the items implementation from seq |
19:57:29 | * | Stefan_SAlewski joined #nim |
19:59:00 | Stefan_SAlewski | yeye123 asked: gtk2 wrapper, why does this not work? trueArray[13]=get_active(checkbutton) |
19:59:58 | Stefan_SAlewski | yeye: Note that GTK uses GBOOLEAN, which is int. It is diffeent from Nims bool. |
20:03:35 | yeye123 | ahh |
20:08:47 | * | repax joined #nim |
20:12:27 | repax | The move to #nim seems to have taken quite a toll on channel participation |
20:12:36 | yeye123 | so trueArray[13]=bool(get_active(checkbutton)) should work? |
20:13:13 | repax | It doesn't? |
20:13:47 | yeye123 | no, but its getting late so i might be missing something here |
20:14:06 | dts|pokeball | in the times module, there is the format function which takes a TTimeInfo and a format string. do i need to pass an initialized TTimeInfo to format, and if so, what does it need to be initialized with? |
20:14:33 | Araq | yes and dunno |
20:14:47 | dts|pokeball | hmmm |
20:16:46 | Stefan_SAlewski | yeye, you may try something like trueArray[13]=(get_active(checkbutton) == GTRUE) |
20:17:21 | * | Varriount|Busy joined #nim |
20:17:34 | Varriount|Busy | Meep |
20:18:22 | Varriount|Busy | Um, shouldn't the build farm be buildbot.nim-lang.org |
20:19:57 | Stefan_SAlewski | Yeye123: I am currently asking myself how we get the type of an variable in Nim, something like get_active(checkbutton).class ? That would help when trying GTK... |
20:20:37 | repax | yeye123, Stefan_SAlewski: you can define a proc `bool()` for what ever `get_active` returns that converts it to a bool |
20:21:27 | yeye123 | Error: undeclared identifier: 'GTRUE' |
20:21:53 | Stefan_SAlewski | Sure, but currently GTK wrapper is low level still... |
20:22:07 | Varriount|Busy | Stefan_SAlewski: http://nim-lang.org/manual.html#type-operator_toc |
20:22:26 | Varriount|Busy | Or http://nim-lang.org/manual.html#type-operator |
20:23:39 | * | BitPuffin joined #nim |
20:23:55 | Stefan_SAlewski | Yeye, GTRUE should be something like not int(0), please consult the gtk2.nim file or aporia editor, it is a great example. |
20:24:41 | * | dts|pokeball quit (Quit: is a client command Fabtasticwill) |
20:24:52 | * | bjz quit (Read error: Connection reset by peer) |
20:25:08 | * | bjz joined #nim |
20:25:32 | * | bjz quit (Read error: Connection reset by peer) |
20:25:40 | Araq | Varriount|Busy, Stefan_SAlewski type() HAS NO RUNTIME REPRESENTATION |
20:25:44 | * | dts|pokeball joined #nim |
20:26:11 | Araq | repax: no you cannot. you can use a 'converter' though. |
20:26:30 | * | bjz_ joined #nim |
20:26:30 | Araq | proc `bool()` is not at all the syntax for a converter |
20:27:06 | Araq | hrm fixing bug #1715 means I should rewrite parts of the code generator ... |
20:27:09 | Varriount|Busy | Although, it's an interesting syntactical idea. |
20:27:12 | repax | Oh, then I've misused it |
20:27:13 | Araq | with unknown consequences |
20:27:53 | reactormonk | Araq, should I post seq mitems on github as issue? |
20:29:07 | * | bjz_ quit (Read error: Connection reset by peer) |
20:29:15 | * | Stefan_SAlewski quit () |
20:29:22 | * | bjz joined #nim |
20:29:45 | Araq | reactormonk: yup, make a PR please. extra points if you add tests for it and update news.txt |
20:30:06 | * | betawaffle quit (*.net *.split) |
20:30:06 | * | reactormonk quit (*.net *.split) |
20:30:06 | * | acidx quit (*.net *.split) |
20:31:16 | * | betawaffle joined #nim |
20:31:16 | * | reactormonk joined #nim |
20:31:16 | * | acidx joined #nim |
20:32:06 | repax | How does one rebuild the docs? I've tried `koch web` but get this: external program failed, retrying serial work queue for logs! |
20:32:40 | repax | Error: execution of an external program failed |
20:32:51 | repax | Doesn't say which external program |
20:34:28 | Varriount|Busy | Hm. I recall that gradha did some modification to the doc generation routines, to try and parallelize them. |
20:35:01 | Varriount|Busy | reactormonk: 'seq mitems'? |
20:35:03 | Araq | you can use --parallelBuild:1 to get rid of it |
20:35:09 | reactormonk | Varriount|Busy, mitems for seq. |
20:35:15 | reactormonk | Araq, nah, sorry, messing around with monoids |
20:35:29 | Varriount|Busy | reactormonk: And what are/is mitems? |
20:35:55 | reactormonk | Varriount|Busy, an iterator which returns a var instance, one that can be modified |
20:36:34 | Varriount|Busy | Sounds useful. Naming needs a bit of work though. |
20:36:49 | reactormonk | Araq, gotta rename that nimrod repo on github ;-) |
20:36:52 | * | brson quit (Quit: leaving) |
20:36:52 | reactormonk | Varriount|Busy, hum? |
20:36:59 | * | brson joined #nim |
20:37:06 | * | Matthias247 quit (Quit: Matthias247) |
20:37:07 | Araq | no, this is the standard naming convention for 'var T' iterators, Varriount|Busy |
20:37:25 | Varriount|Busy | Oh. |
20:37:26 | Araq | the 'm' stands for 'mutable' or 'modifyable' |
20:37:57 | Varriount|Busy | Well, it's not very obvious... |
20:38:40 | * | bjz quit (Read error: Connection reset by peer) |
20:38:53 | Araq | well yes, now we all know that prefixes are from hell and everybody loves the conciseness of 'mutable.items' instead |
20:38:56 | * | bjz joined #nim |
20:39:01 | reactormonk | Varriount|Busy, nope, but that's the standard. Got a better name? |
20:39:08 | reactormonk | Araq, rein your horses. |
20:39:19 | Varriount|Busy | reactormonk: 'mutableItems'? |
20:39:30 | * | flaviu joined #nim |
20:39:35 | reactormonk | Varriount|Busy, too long. 8-10 chars max imo |
20:40:06 | repax | Araq, that removes the parallel problem. Then it terminates with the following: "lib/wrappers/iup.nim(205, 51) Error: ')' expected" I don't see anything wrong on that line though |
20:40:54 | flaviu | reactormonk: muitms? |
20:40:59 | * | Jesin joined #nim |
20:41:00 | flaviu | ;) |
20:41:02 | repax | Ah , it's the "func" keyword |
20:41:03 | reactormonk | flaviu, ... |
20:41:07 | yeye123 | converter toBool*(gbool: gboolean): bool = return int(gbool) == 1 so its already there? |
20:41:09 | Varriount|Busy | reactormonk: 'varItems'? |
20:41:33 | flaviu | `items`? |
20:41:58 | Araq | repax: already pushed a fix for that |
20:42:50 | reactormonk | Varriount|Busy, varItems sounds good to me. |
20:42:58 | reactormonk | Varriount|Busy, but legacy. :-/ |
20:43:20 | Varriount|Busy | What legacy? |
20:43:49 | flaviu | Why not just overload `items`? |
20:43:51 | reactormonk | Varriount|Busy, mitems is kinda set in place already with all the other code |
20:44:00 | reactormonk | flaviu, it would be return type overloading, can we do that? |
20:44:04 | Varriount|Busy | Do we currently have other iterators that return vars? |
20:44:16 | reactormonk | Varriount|Busy, yup, check the stdlib e.g. tables |
20:44:23 | flaviu | Make `items(var seq[T]): var T`, `items(seq[T]): T` |
20:44:39 | flaviu | shouldn't that work? |
20:45:53 | flaviu | Possible criticism: "what if I want to ensure I don't mutate it accidentally?" |
20:45:53 | flaviu | Solution: Reassign the collection as a non-var |
20:46:25 | reactormonk | Araq, ^ sounds good to me |
20:49:13 | t4nk971 | I tried using an implementation of mitems that starts like "iterator mitems*[T](a: var seq[T]): var T {.inline.} =" and essentially is just "while i < L: yield a[i]" but using it as "for items in <seq>.mitems:" gives me an error in the C: cannot convert to a pointer type link_91222 = &((link91005*) ((*links)->data[i_91226])); |
20:49:15 | EXetoC | that's a high cost for correcteness |
20:50:40 | Araq | t4nk971: are you on devel? |
20:51:09 | yeye123 | trueArray[13]=toBool(get_active(checkbutton)) should do it then but no |
20:54:32 | Varriount|Busy | EXetoC: What is a high cost for correctness? |
20:55:19 | t4nk971 | not on devel, just downloaded the 32 bit windows build from website |
20:56:02 | Araq | t4nk971: report it please |
20:56:06 | flaviu | hmm, the error makes sense, but it shouldn't have happened in the cgen. |
20:56:22 | flaviu | I think it's because a[i] returns a T, not a var T. |
20:57:21 | flaviu | as a workaround, pointer arithmetic might work. |
20:57:37 | EXetoC | Varriount|Busy: nevermind |
20:57:49 | Araq | flaviu: no it should work out of the box |
20:58:18 | Araq | a[i] for builtin types uses "return type overloading". well not really. |
20:58:22 | flaviu | Araq: It should, but how would it? Overload `[]`(var seq[T]): var T? |
20:58:37 | Araq | that's not how [] for seqs is implemented |
21:00:18 | flaviu | yeah, I can't find `[]`(seq[T]): T in the docs |
21:00:59 | * | Puffin joined #nim |
21:01:29 | * | willwillson quit (Ping timeout: 245 seconds) |
21:01:54 | * | BitPuffin quit (Ping timeout: 245 seconds) |
21:02:19 | * | rpag quit (Ping timeout: 245 seconds) |
21:02:44 | * | Araq quit (Ping timeout: 245 seconds) |
21:02:51 | Varriount|Busy | reactormonk: I still dislike 'legacy' as a reason. |
21:02:52 | * | yeye123 quit (Quit: Leaving) |
21:02:57 | * | Araq joined #nim |
21:03:27 | reactormonk | Varriount|Busy, so do I |
21:03:44 | * | willwillson joined #nim |
21:03:44 | * | Mat4 joined #nim |
21:03:53 | Mat4 | hi all |
21:04:01 | Varriount|Busy | In fact, now that we have a deprecation mechanism for old names... |
21:04:08 | Varriount|Busy | ;3 |
21:04:55 | Araq | Varriount|Busy: yeah, sure let's do MOAR bike shedding |
21:04:59 | Varriount|Busy | Still, I think Araq might cut off my fingers if I type anymore, so I'll get back to partitioning this hard drive. |
21:05:14 | Araq | that never harmed any software project, after all |
21:05:42 | Araq | and btw I really like the 'm' solution |
21:06:08 | Varriount|Busy | Araq: Yes, but you already know what it means. What will newcomers think? |
21:06:09 | Araq | I think it's a perfect compromise of clearity and conciseness |
21:06:28 | Araq | maybe newcomers will eventually learn the language |
21:06:42 | flaviu | Varriount|Busy: It better be btrfs :P |
21:07:08 | Varriount|Busy | flaviu: Nah, it's NTFS |
21:08:52 | * | Varriount|Busy runs away from flaviu's rage |
21:13:27 | Varriount|Busy | Anyway, I'll be back on in an hour and a half to argue some more. |
21:13:47 | Araq | no |
21:13:58 | Araq | gimme real test results instead |
21:14:13 | Araq | extra points if I can see them in this millenium |
21:15:20 | * | rpag joined #nim |
21:15:47 | Mat4 | Araq: sorry, what is the 'm' solution ? |
21:16:55 | * | ekarlso- joined #nim |
21:17:29 | * | Jesin quit (Quit: Leaving) |
21:17:52 | * | Varriount|Busy quit (Ping timeout: 246 seconds) |
21:18:03 | Araq | Mat4: please read the logs |
21:19:40 | * | Jesin joined #nim |
21:27:25 | * | Matthias247 joined #nim |
21:28:52 | dts|pokeball | just to make sure i understand these two functions, using inputHandle i can use as the input the program expects and then outputHandle can be used to grab the output of the program? |
21:31:53 | Araq | dts|pokeball: that depends onto how the process you run does its buffering |
21:31:59 | Araq | it's inherently fragile |
21:32:33 | Araq | glueing small programs together only works when you never really try it |
21:32:42 | dts|pokeball | hmmm... im wanting to make a nim eval bot. would those work? |
21:34:34 | * | gour_ joined #nim |
21:35:39 | repax | yeah, let us run arbitrary code on your machine |
21:36:06 | dts|pokeball | only i would be able to use it for now |
21:37:57 | * | gour quit (Ping timeout: 272 seconds) |
21:39:07 | reactormonk | dts|pokeball, you could take a bite off geordi |
21:39:43 | dts|pokeball | i dont understand haskell :/ |
21:39:54 | * | gour_ is now known as gour |
21:39:55 | reactormonk | time to change that |
21:40:23 | dom96 | dts|pokeball: do it |
21:41:04 | dts|pokeball | :( |
21:41:18 | dom96 | dts|pokeball: No, I mean. Create an eval bot. |
21:41:25 | dom96 | dts|pokeball: Research how to sandbox it. |
21:41:31 | dom96 | dts|pokeball: And get it going! |
21:41:37 | dom96 | Would be awesome to have it here. |
21:42:04 | dom96 | If you could integrate it into NimBot then it would be even better. |
21:42:24 | * | xcombelle quit (Ping timeout: 264 seconds) |
21:42:33 | dts|pokeball | i know. i just need to figure out a good damn way of grabbing output from the nim compiler |
21:42:43 | dts|pokeball | also, i need it to only output one error at a time |
21:43:07 | Araq | nah, just pipe it to some temp file and parse that |
21:43:31 | Araq | there is a feature request for proper buffer flushing for the compiler, but that just proves my point |
21:43:32 | dts|pokeball | hmmm... i guess i might just have to do that |
21:44:08 | Araq | dts|pokeball: you can use the pegs the tester uses to parse compiler output |
21:44:09 | dts|pokeball | whats the best proc to start another process? |
21:44:30 | dts|pokeball | Araq, yeah. i was just hoping for something a little more elegant |
21:44:45 | Araq | the proc that doesn't makes you mess with streams |
21:45:26 | dts|pokeball | execShellCmd |
21:45:38 | dts|pokeball | im thinking this and just running bash |
21:45:52 | * | t4nk971 quit (Ping timeout: 246 seconds) |
21:46:08 | Araq | now that's a particularly bad idea |
21:46:18 | dts|pokeball | how so? |
21:48:30 | ldlework | EXetoC: http://www.angusj.com/delphi/clipper.php |
21:51:56 | Araq | dts|pokeball: use osproc.execCmdEx |
21:52:35 | dts|pokeball | ok. ty |
21:53:17 | EXetoC | ldlework: gonna use it for the game? |
21:53:34 | EXetoC | oh, no C |
21:53:47 | dts|pokeball | someone should make man pages for the nim standard library... |
21:56:08 | dts|pokeball | what type is tainted string/ |
22:01:18 | willwillson | it is an alias of string unless you compile with --taintMode:on (I think) |
22:01:24 | * | StefanSalewski joined #nim |
22:01:46 | StefanSalewski | yeye wrote: trueArray[13]=toBool(get_active(checkbutton)) should do it then but no |
22:02:10 | StefanSalewski | yeye, when you still have problems... |
22:02:16 | * | dts|pokeball quit (Quit: Leaving) |
22:02:39 | * | dts|pokeball joined #nim |
22:02:47 | StefanSalewski | You can send me a larger part of your code, I will try to proof it. |
22:04:21 | StefanSalewski | Your statements makes it not really clear what the problem is. Try assigning to a plain variable, not an array. |
22:05:07 | StefanSalewski | Do you have a valid widget/button as your checkbutton? |
22:09:44 | flaviu | repax: Why not? Docker exists, just do it all in the container and clear it once a day or so. |
22:13:46 | repax | flaviu, it was just a well-intended precautionary remark. |
22:14:33 | ldlework | Docker is not a security product |
22:15:35 | flaviu | repax: Sorry, my tone was not intended to be rude. |
22:15:52 | milosn | maw maw |
22:15:53 | milosn | :D |
22:16:15 | flaviu | ldlework: Regardless, lots of people are using it as such. Anyway, if someone tries something too stupid, an OP can just ban them. |
22:16:28 | repax | flaviu, np |
22:16:32 | repax | Please do write an eval bot if you are confident that you can contain it |
22:17:10 | * | t4nk535 joined #nim |
22:17:15 | repax | ("you" as in anyone) |
22:17:19 | flaviu | repax: I would, but I don't have the resources to keep it running. |
22:17:48 | flaviu | dom96: Mind dumping the irclogs database somewhere? |
22:18:54 | * | brson quit (Ping timeout: 244 seconds) |
22:19:23 | repax | A bot could also try to match questions to answers found in the logs. There's another project ;) |
22:20:18 | flaviu | Yes, that would be interesting. Someone writing that could make a paper out of it. |
22:21:02 | flaviu | Has anyone seen what they do in #archlinux? They have a bot that the program with common FAQs, which they can trigger whenever. |
22:22:16 | repax | I think I've seen it in ##C++ as well |
22:23:27 | t4nk535 | hi, just wanted to say i found the problem I had earlier with a version of mitems. As far as I can tell I was getting the cgen error because the var T being returned from mitems didn't work with a seq of tuples. As soon as I replaced it with a seq of object it compiled ok. |
22:23:30 | repax | I like it when people thank the bot |
22:24:33 | flaviu | t4nk535: ref object, or just object? |
22:26:00 | StefanSalewski | converters are indeed interesting -- I was not aware that after defining one we can write "if i:" with i being an integer expression! Nice. |
22:27:05 | flaviu | StefanSalewski: I don't really have strong thoughts on this, but is that really a good idea? |
22:28:23 | StefanSalewski | Its fine for glib with gboolean beeing int -- nice solution there! |
22:29:53 | EXetoC | maybe make it a distinct bool type |
22:30:41 | * | Johz joined #nim |
22:33:12 | Johz | Heya, I'm getting an error, and I was wondering if it was something I was doing wrong. |
22:33:30 | StefanSalewski | In current glib2 gboolean is a destinct cint with converters to/from Nim bool. I think that is fine, I will copy that for my GTK3 stuff. |
22:33:53 | t4nk535 | flaviu: where I'm trying to iterate through a seq[Link], I did have Link as a tuple made of two objects, which perhaps wasn't the best approach anyway. Now I have seq[Link] defined as "Link = object" so not a ref afaict. Thinking about it, it makes more sense to define this as an object with two others inside it, than a tuple with objects inside. I'm not sure of the internals of tuple though and whether this should have worked or not. |
22:34:03 | Johz | I'm nesting a template within a template, because I want things the block passed to the outer template to have access to the templates within the outer template. |
22:34:21 | Johz | The simplest possible thing that I can get to fail looks a bit like this: https://gist.github.com/MrJohz/fe55bf4da00203cbf66e |
22:35:24 | Johz | The traceback with nim in non-release mode looks a bit like this: https://gist.github.com/MrJohz/fe55bf4da00203cbf66e#file-traceback |
22:37:33 | * | BillsPC joined #nim |
22:37:34 | * | brson joined #nim |
22:37:38 | dts|pokeball | ,part #nim |
22:37:39 | * | BillsPC left #nim (#nim) |
22:37:42 | * | BillsPC joined #nim |
22:37:47 | dts|pokeball | ,part #nim test |
22:37:47 | * | BillsPC left #nim (#nim) |
22:37:50 | dts|pokeball | damn |
22:37:54 | * | BillsPC joined #nim |
22:38:05 | dts|pokeball | ,eval echo("Hello, world!") |
22:38:06 | BillsPC | dts|pokeball: /bin/sh: 1: ./irc.freenode.net.dts: not found |
22:38:42 | dts|pokeball | oh damn |
22:39:03 | * | dts|pokeball is now known as dts |
22:39:19 | dts | ,eval echo("Hello, world!") |
22:39:20 | BillsPC | dts: /bin/sh: 1: ./irc.freenode.net.dts.nim: Permission denied |
22:39:33 | * | alex____ quit (Quit: Page closed) |
22:40:33 | * | BillsPC quit (Remote host closed the connection) |
22:40:33 | * | brson quit (Client Quit) |
22:41:03 | * | BillsPC joined #nim |
22:41:14 | dts | ,eval echo("Hello, world!") |
22:41:15 | BillsPC | dts: /bin/sh: 1: ./irc.freenode.net.dts.: not found |
22:41:20 | * | brson joined #nim |
22:44:19 | * | t4nk535 quit (Ping timeout: 246 seconds) |
22:48:10 | * | Johz quit (Ping timeout: 246 seconds) |
22:50:15 | flaviu | dts: btw, you can join any channel, even one like #A4fIx4r to test the bot. |
22:51:14 | ldlework | EXetoC: this shit is soooooooo complicated |
22:51:56 | EXetoC | ldlework: don't you just move along the axes? |
22:52:40 | * | t4nk583 joined #nim |
22:54:14 | dom96 | dts: Please test it in #nim-offtopic |
22:54:17 | dom96 | flaviu: What for? |
22:54:52 | flaviu | dom96: Just to have fun with. I can't be bothered to write a second scraper. |
22:55:31 | dom96 | flaviu: It's saved as JSON. I can make it accessible if you want. |
22:55:42 | flaviu | Sure, please do. |
22:55:46 | ldlework | EXetoC: the complication isn't in moving the character around |
22:56:08 | ldlework | EXetoC: its to do with testing points in polygons, cutting polygons iwth a line, determining the clockwise order of a polygon, etc etc |
22:56:47 | EXetoC | Paul Bourke's resources to the rescue? |
22:57:09 | EXetoC | I often stumble upon those |
22:57:18 | * | gour quit (Quit: Konversation terminated!) |
22:57:26 | ldlework | (polyX[i]+(y-polyY[i])/(polyY[j]-polyY[i])*(polyX[j]-polyX[i])<x) |
22:57:33 | ldlework | Do we agree that the order of operations here are |
22:57:55 | ldlework | subtraction, subtraction, division, multiplication, addition, less-than |
22:57:57 | ldlework | this is C |
22:58:09 | ldlework | that's three subtractions* |
22:59:28 | EXetoC | so compact :p |
23:03:00 | ldlework | Its so frustrating |
23:03:13 | ldlework | I have this algorithm that claims to find whether a point is inside or outside of a complex polygon |
23:03:28 | ldlework | As my polygon becomes more complex, the results get more and more unreliable :( |
23:04:16 | EXetoC | does it only handle convex polygons for example? |
23:04:51 | ldlework | EXetoC: nope |
23:05:03 | ldlework | its supposed to even be able to detect twisted polys |
23:05:25 | Araq | ldlework: sounds like floating point fun |
23:05:58 | gokr | The ray casting algo? |
23:07:23 | gokr | Like one of these: http://geomalgorithms.com/a03-_inclusion.html |
23:08:10 | ldlework | gokr: yes |
23:08:12 | ldlework | that one |
23:08:58 | gokr | Wrote a really cool optimization tool many years ago, implemented several fun algos. |
23:09:36 | ldlework | I suck |
23:12:03 | Araq | dom96: what about the showstoppers? |
23:12:19 | Araq | you know "showstopper" means "blocks the release" |
23:12:21 | dts | flaviu, ok. dom96 sorry didnt know that channel existed |
23:12:56 | dts | ,join #nim-offtopic |
23:13:40 | dom96 | Araq: kk |
23:14:18 | Araq | ping Varriount |
23:14:55 | dts | how come module files cant have other .'s in the name? |
23:14:58 | ldlework | EXetoC: here is my implementation: https://gist.github.com/dustinlacewell/1e10bf9210892642c7c5 |
23:16:55 | Mat4 | Idlework: have you considered rounding errors as reason ? |
23:18:59 | * | BillsPC quit (Remote host closed the connection) |
23:19:05 | Araq | dts: because a module has a Nim identifier representation |
23:19:06 | ldlework | Mat4: I have but I would have no idea how to fix it |
23:19:14 | Araq | and '.' must not be part of Nim identifier either |
23:19:38 | Araq | how come nobody gets the module system and hacks around it? |
23:20:34 | Mat4 | Idlework: Use saturated fixpoint arithmetic and choose a well matching scale |
23:20:53 | dts | Araq, ah |
23:21:12 | * | repax quit (Quit: repax) |
23:21:19 | gokr | ldlework: When I worked with polys etc we used Smalltalk which has support for "infinite" integers and uses fractions. |
23:21:52 | * | repax joined #nim |
23:22:02 | gokr | So like Mat4 said, we used a scale. |
23:23:43 | StefanSalewski | For polygons I used successfully this one, maybe only for convex ones: http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html |
23:24:17 | EXetoC | people manage in games and such. are these numbers really small or something? |
23:25:46 | * | dts is now known as BillsPC |
23:26:56 | Araq | EXetoC: doens't really matter if really small or really big, it only matters that you don't mix really small with really big. Or something like that. |
23:28:05 | repax | Also, errors grow as values are combined |
23:28:41 | * | BillsPC is now known as dts|pokeball |
23:28:55 | Triplefox | for floats in games the main things are: near zero(performance loss from denormalization), extreme values(low accuracy)...and equality tests(use an error range) |
23:31:00 | repax | A fractional type could be handy in this situation |
23:32:14 | ldlework | why do I sometimes get: type mismatch: got (tuple[x: int, y: int], ref Poly) |
23:32:24 | ldlework | but expected one of: |
23:32:26 | ldlework | qix.inPoly(self: Point, poly: Poly): bool |
23:32:35 | ldlework | Point is defined as tuple[x, y: int] |
23:32:41 | ldlework | and I'm passing it a Point |
23:33:49 | ldlework | oh its the ref |
23:34:21 | EXetoC | wait until there are 10 or so arguments :> |
23:47:06 | dom96 | Araq: I set up a redirect from nimrod-lang.org to nim-lang.org btw |
23:47:28 | Araq | dom96: ok. |