00:15:40 | * | vendethiel quit (Ping timeout: 246 seconds) |
00:20:48 | * | dalarmmst quit (Ping timeout: 264 seconds) |
01:15:42 | * | ozra quit (Ping timeout: 246 seconds) |
01:23:03 | * | bjz joined #nim |
01:25:30 | * | X67r quit (Quit: leaving) |
01:31:55 | * | jaco60 quit (Ping timeout: 246 seconds) |
01:41:12 | * | EXetoC quit (Ping timeout: 256 seconds) |
01:42:02 | * | Jehan_ quit (Quit: Leaving) |
01:42:17 | * | Kingsquee joined #nim |
01:53:28 | * | Kingsquee quit (Ping timeout: 244 seconds) |
01:54:50 | * | Kingsquee joined #nim |
01:56:15 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:00:28 | * | bjz joined #nim |
02:01:07 | * | bjz quit (Client Quit) |
02:17:05 | * | Demon_Fox quit (Quit: Leaving) |
02:53:36 | * | zaquest quit (Quit: Leaving) |
03:07:42 | * | vendethiel joined #nim |
03:12:53 | * | darkf joined #nim |
03:23:54 | * | Guest25669 quit (Quit: Leaving) |
03:34:09 | * | JohnS_ joined #nim |
03:35:12 | * | BitPuffin|osx quit (Ping timeout: 264 seconds) |
03:37:37 | JohnS_ | Anyone had any luck calling windows gdi+ functions? |
03:37:50 | JohnS_ | my proc definition looks like this: |
03:37:51 | JohnS_ | proc GetImageEncodersSize(numEncoders: ptr uint, size: ptr uint) : DWORD {.cdecl, dynlib: "gdiplus.dll", importc:"GetImageEncodersSize".} |
03:38:08 | JohnS_ | but i get "could not import: GetImageEncodersSize" |
03:54:39 | reactormonk | JohnS_, from where? the nim compiler? |
03:58:31 | JohnS_ | when running the executable |
04:23:07 | * | vendethiel quit (Ping timeout: 256 seconds) |
04:25:31 | reactormonk | JohnS_, are you able to import it from C? |
04:27:58 | * | xcombelle joined #nim |
04:28:06 | JohnS_ | yeah, something funny's going on, i can call other functions from GDI+. I just tried the straight GdiplusStartup function and that executed fine |
04:28:40 | JohnS_ | i'm going to keep digging around, thanks for the help |
05:52:04 | * | vendethiel joined #nim |
06:13:56 | * | vendethiel quit (Ping timeout: 250 seconds) |
06:39:07 | FedeOmoto | JohnS_: this is the correct C function declaration |
06:39:09 | FedeOmoto | GpStatus __stdcall GdipGetImageEncodersSize( |
06:39:09 | FedeOmoto | [out]unsigned int* numEncoders, |
06:39:09 | FedeOmoto | [out]unsigned int* size); |
06:40:06 | FedeOmoto | you've to use the stdcall CC |
06:43:20 | FedeOmoto | btw, GpStatus is a sdword, not a dword |
06:44:56 | * | FedeOmoto quit (Quit: Leaving) |
06:48:53 | * | vikaton joined #nim |
06:55:29 | * | vikaton quit () |
07:31:42 | * | rainbowism quit () |
07:34:05 | * | tennix joined #nim |
07:45:41 | * | vendethiel joined #nim |
07:46:48 | * | dalarmmst joined #nim |
07:48:57 | * | tennix quit (Remote host closed the connection) |
08:00:00 | * | mnagele joined #nim |
08:00:12 | * | mnagele left #nim ("Textual IRC Client: www.textualapp.com") |
08:02:00 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
08:07:28 | * | vendethiel quit (Ping timeout: 250 seconds) |
08:08:41 | * | vendethiel joined #nim |
08:31:33 | * | Matthias247 joined #nim |
08:41:27 | * | jszymanski joined #nim |
08:48:52 | * | jaco60 joined #nim |
08:54:23 | * | bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
09:12:17 | * | yglukhov_ joined #nim |
09:34:17 | * | bjz joined #nim |
09:49:12 | * | darkf_ joined #nim |
09:50:27 | * | X67r joined #nim |
09:52:14 | * | darkf quit (Ping timeout: 248 seconds) |
09:52:21 | * | darkf_ is now known as darkf |
10:10:00 | * | jszymanski quit (Ping timeout: 264 seconds) |
10:12:39 | * | Matthias247 quit (Read error: Connection reset by peer) |
10:13:33 | * | jszymanski joined #nim |
10:27:44 | * | vasher_ joined #nim |
10:52:49 | * | milosn quit (Read error: Connection reset by peer) |
10:53:40 | * | jszymanski quit (Ping timeout: 246 seconds) |
10:58:24 | * | milosn joined #nim |
11:11:55 | * | bluestreak0 joined #nim |
11:12:35 | * | thales joined #nim |
11:12:58 | * | thales is now known as Guest15779 |
11:13:12 | bluestreak0 | Hi! Is it possible to use the case statement on an enum? I have tried it, but nim complains, "selector must be of an ordinal type, float or string". Any ideas? |
11:15:14 | def- | bluestreak0: works for me: https://gist.github.com/def-/0d9bbeb38890d1733d39 |
11:16:45 | * | jszymanski joined #nim |
11:19:16 | * | wuehlmaus quit (Quit: Lost terminal) |
11:22:56 | Araq | bluestreak0: don't use some half assed C compatible enum with holes ;-) |
11:24:20 | bluestreak0 | Araq: Enums don't have holes unless you specify them to, right? |
11:24:30 | Araq | right |
11:24:36 | bluestreak0 | ok, thanks |
11:26:48 | * | Kingsquee quit (Quit: Konversation terminated!) |
11:30:18 | * | wuehlmaus joined #nim |
11:35:49 | * | EXetoC joined #nim |
11:48:54 | * | vendethiel quit (Ping timeout: 250 seconds) |
11:49:36 | * | vendethiel joined #nim |
11:56:15 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
12:04:39 | * | bjz joined #nim |
12:05:47 | * | bjz quit (Client Quit) |
12:08:26 | * | bjz joined #nim |
12:38:48 | * | vasher_ quit (Quit: Connection closed for inactivity) |
12:44:40 | * | boopsiesisaway is now known as boopsies |
12:50:49 | * | X67r_ joined #nim |
12:54:09 | * | X67r quit (Read error: Connection reset by peer) |
13:18:21 | * | johnsoft joined #nim |
13:23:49 | * | BitPuffin|osx joined #nim |
13:24:29 | * | Pisuke quit (Max SendQ exceeded) |
13:25:39 | * | Pisuke joined #nim |
13:32:45 | * | def- quit (Ping timeout: 264 seconds) |
13:53:28 | * | xcombelle quit (Remote host closed the connection) |
13:55:04 | * | Guest15779 quit (Ping timeout: 252 seconds) |
14:11:00 | * | Matthias247 joined #nim |
14:12:46 | federico3 | when adding a raises: [] pragma to a proc the compilation fails without printing out which line can raise an unlisted exception |
14:19:49 | * | def- joined #nim |
14:21:56 | * | ozra joined #nim |
14:24:34 | * | milosn quit (Read error: Connection reset by peer) |
14:28:38 | * | Demon_Fox joined #nim |
14:30:01 | * | milosn joined #nim |
14:33:53 | * | no_name quit (Remote host closed the connection) |
14:33:53 | * | devzerp quit (Remote host closed the connection) |
14:39:14 | * | no_name joined #nim |
14:39:17 | * | devzerp joined #nim |
14:39:19 | * | no_name quit (Remote host closed the connection) |
14:39:19 | * | devzerp quit (Remote host closed the connection) |
14:39:25 | * | Guest15779 joined #nim |
14:57:13 | * | FedeOmoto joined #nim |
15:06:59 | * | no_name joined #nim |
15:06:59 | * | devzerp joined #nim |
15:17:24 | * | silven quit (Remote host closed the connection) |
15:18:38 | * | no_name quit (Remote host closed the connection) |
15:18:38 | * | devzerp quit (Remote host closed the connection) |
15:21:38 | * | silven joined #nim |
15:22:31 | * | darkf quit (Quit: Leaving) |
15:27:41 | * | no_name joined #nim |
15:27:43 | * | devzerp joined #nim |
16:07:30 | r-ku | Araq: take a look at my coroutine experiments. based on picoro i implemented them in pure nim. but they are still broken. look at https://github.com/r-ku/Nim/blob/coroutines/lib/system/gc_ms.nim#L482 - when i uncomment this and register main app stack with gc test app crashes when first repr of some object is echoed. maybe you have an idea whats going on there? also another thing: |
16:07:31 | r-ku | https://github.com/r-ku/Nim/blob/coroutines/coro.nim#L60 if this unused variable is removed app crashes in popFrame() near the end of app execution. In case you see something obvious there please do tell. and ill continue looking into it |
16:26:46 | * | bcinman joined #nim |
16:44:12 | * | Guest15779 quit (Ping timeout: 244 seconds) |
16:50:31 | * | bluestreak0 quit (Quit: Leaving) |
16:54:11 | * | zaquest joined #nim |
16:56:04 | * | elbow quit (Quit: Leaving) |
17:02:04 | * | zaquest quit (Quit: Leaving) |
17:14:00 | * | vasher_ joined #nim |
17:19:40 | * | arnetheduck quit (Ping timeout: 252 seconds) |
18:09:03 | * | CPAuto joined #nim |
18:09:15 | * | CPAuto quit (Client Quit) |
18:17:18 | * | apense joined #nim |
18:25:19 | * | pregressive joined #nim |
18:53:43 | * | dalarmmst quit (Ping timeout: 252 seconds) |
18:53:58 | * | pregressive quit () |
18:56:18 | * | pregressive joined #nim |
19:00:35 | * | flaviu quit (Ping timeout: 265 seconds) |
19:02:46 | * | pregressive quit () |
19:03:05 | * | flaviu joined #nim |
19:05:23 | * | pregressive joined #nim |
19:19:19 | * | pregressive quit () |
19:21:37 | * | BitR quit (Quit: leaving) |
19:26:12 | * | pregressive joined #nim |
19:28:53 | * | BitR joined #nim |
19:44:46 | * | dalarmmst joined #nim |
19:49:19 | * | yglukhov_ quit (Quit: Be back later ...) |
20:10:13 | * | X67r_ quit (Ping timeout: 246 seconds) |
20:15:54 | * | gokr quit (Ping timeout: 250 seconds) |
20:16:16 | * | X67r joined #nim |
20:17:46 | * | X67r_ joined #nim |
20:18:00 | * | X67r_ quit (Client Quit) |
20:18:00 | * | X67r quit (Client Quit) |
20:18:27 | * | X67r joined #nim |
20:19:36 | * | boopsies quit (Ping timeout: 255 seconds) |
20:24:42 | Araq | r-ku: well you don't scan the registers at all with this version |
20:24:52 | Araq | so no wonder it doesn't work |
20:40:23 | * | jszymanski quit (Quit: computer sleeps...) |
20:57:06 | * | Guest15779 joined #nim |
20:58:23 | * | boopsies joined #nim |
21:03:52 | reactormonk | Araq, urgh, the mget patch fails a shitload of tests - let's see if I fucked up the merge |
21:04:08 | reactormonk | unhandled exception: key not found: gcc.options.always [KeyError] etc. |
21:04:20 | * | Varriount|Mobile joined #nim |
21:04:20 | Araq | did you merge it already? o.O |
21:05:17 | reactormonk | well, locally |
21:06:39 | reactormonk | https://github.com/reactormonk/nim/tree/mget |
21:11:40 | * | Varriount|Phone joined #nim |
21:12:24 | reactormonk | you said you used implicit empty string or something? |
21:13:11 | Araq | yeah |
21:13:32 | reactormonk | well ^^ time for some code rewrite. |
21:13:44 | reactormonk | or just make get return an option or something :-P |
21:14:54 | * | Varriount|Mobile quit (Ping timeout: 248 seconds) |
21:14:56 | reactormonk | So get should return a zero? |
21:14:59 | EXetoC | implicit? |
21:15:35 | reactormonk | with a converter ;-) |
21:15:59 | EXetoC | right |
21:16:38 | reactormonk | so option[var T] -> exception and option[T] -> zero? |
21:17:56 | reactormonk | Araq, can we do this at compiletime? |
21:18:44 | * | johnsoft quit (Ping timeout: 250 seconds) |
21:19:28 | * | johnsoft joined #nim |
21:21:38 | Araq | option[var t] is not a valid type |
21:22:03 | reactormonk | Any way to match for it? |
21:24:26 | Araq | meh, why always so complex? |
21:24:53 | Araq | just comment out the [] accessor, replace it with a new getOrDefault and then re-enable [] |
21:26:37 | reactormonk | huh? |
21:29:06 | Araq | tables.`[]` and strtabs.`[]` are real things that you can comment out |
21:29:25 | reactormonk | the var or non-var version? |
21:33:13 | * | brson joined #nim |
21:37:55 | Araq | the non-var version. |
21:38:28 | Araq | the var-version already raises an exception as it should |
21:38:40 | Araq | you want to patch the non-var version |
21:39:20 | EXetoC | wot will happen to []? |
21:39:24 | reactormonk | Or I could make get return an option and the raise in the var version... >:) |
21:39:48 | reactormonk | Let's see if my idea is slower overall. |
21:43:04 | * | Trustable joined #nim |
21:45:11 | Araq | EXetoC: we will come up with a transition path |
21:45:18 | Araq | already have a couple of ideas |
21:45:54 | Araq | in the end [] will raise an exception for invalid keys and the old [] will be getOrDefault |
21:54:25 | reactormonk | Sounds reasonable to me |
21:55:46 | * | milosn quit (Read error: Connection reset by peer) |
21:55:47 | * | Trustable_2 joined #nim |
21:58:36 | * | Trustable quit (Ping timeout: 255 seconds) |
21:58:48 | * | vasher_ quit (Quit: Connection closed for inactivity) |
21:59:05 | dom96 | wat |
21:59:43 | dom96 | Araq: Are we making tables use Option[T]? |
22:01:10 | Araq | no. |
22:01:39 | * | milosn joined #nim |
22:12:13 | EXetoC | dom96: asyncnet won't get getSocket? |
22:12:38 | dom96 | EXetoC: hrm? |
22:12:49 | dom96 | you mean an accessor to get the fd? |
22:13:14 | EXetoC | like getSocket in asyncio which returns the underlying Socket |
22:14:14 | dom96 | I don't think so. |
22:14:27 | dom96 | It doesn't have an underlying Socket |
22:14:32 | dom96 | You just need to create your own |
22:18:42 | dom96 | EXetoC: What do you need this for? |
22:19:34 | EXetoC | I probably don't |
22:21:08 | EXetoC | aren't there any conveniences for receiving all the data available in a socket? |
22:21:39 | * | Trustable_2 quit (Remote host closed the connection) |
22:22:07 | dom96 | That's an ambiguous request. |
22:22:16 | EXetoC | perhaps by receiving without awaiting |
22:22:18 | dom96 | Do you want to keep receiving data until the server closes the socket. |
22:22:45 | dom96 | or do you want to receive the data that has reached your client only. |
22:23:13 | dom96 | The former is easy, the latter is not (but I don't know why you would want to do it). |
22:25:26 | dom96 | so tell me more, what are you trying to do? |
22:26:31 | EXetoC | the latter, but doesn't what I just said achieve that? it is convenient when developing, because you can just send data, then sleep for a fraction of a second and then just examine all the data that has arrived at the client at that point |
22:26:40 | Araq | there is no convenience in sockets programming because sockets are fundamentally fucked up. There is "no length of paket" information to be found and so each and every protocol needs to hack around this shortcoming. |
22:26:47 | EXetoC | I'll try that and see if it works |
22:27:36 | dom96 | Just keep reading data. |
22:27:42 | dom96 | in an infinite loop then |
22:27:57 | dom96 | while true: let data = await sock.recv(5000) |
22:28:20 | dom96 | You don't need to sleep |
22:30:31 | * | johnsoft quit (Ping timeout: 246 seconds) |
22:32:36 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:36:17 | * | johnsoft joined #nim |
22:39:41 | federico3 | sockets are meant to be streams - it's up to the upper layers to have a concept of "message" |
22:40:12 | * | milosn quit (Read error: Connection reset by peer) |
22:41:16 | dom96 | indeed |
22:41:31 | EXetoC | I was only referring to the local buffer, which holds all the data received at any given time |
22:42:07 | federico3 | I found it really surprising that there isn't a little message passing protocol as part of TCP/IP |
22:45:30 | * | milosn joined #nim |
22:45:57 | dom96 | EXetoC: There is no way to ask the OS for all the data. |
22:46:58 | EXetoC | not even if you specify a large enough buffer, so that you can be certain that the response will fit? |
22:47:48 | EXetoC | in conjunction with MSG_DONTWAIT for example if using bsd sockets |
22:47:58 | * | brson quit (Quit: leaving) |
22:48:11 | EXetoC | I might be wrong, because I haven't actually used it. I was just looking it up now |
22:49:34 | EXetoC | federico3: that would be an optional component I assume |
22:49:52 | federico3 | EXetoC: hum? |
22:50:19 | EXetoC | nevermind |
22:50:57 | dom96 | Sure, but it really doesn't buy you anything |
22:51:08 | dom96 | You get the same results by using the snippet I gave you |
22:52:30 | EXetoC | doesn't it wait for an arbitrarily high duration then? |
22:53:33 | EXetoC | I do know how to do this, but I was just thinking of potential shortcuts |
22:53:53 | dom96 | yes, it does. What do you think recv(10000000000000) does? |
22:54:17 | dom96 | well ok, it can return less than the size you request. |
22:54:40 | * | pregress_ joined #nim |
22:54:45 | EXetoC | but is that only upon disconnect? |
22:55:02 | dom96 | huh |
22:55:12 | dom96 | Just try it |
22:55:30 | dom96 | Use the example in the asyncnet docs |
22:55:38 | * | pregressive quit (Ping timeout: 256 seconds) |
22:55:46 | EXetoC | I'm on it |
22:57:29 | * | pregressive joined #nim |
22:58:36 | * | zulmin quit (Ping timeout: 264 seconds) |
23:00:19 | * | pregress_ quit (Ping timeout: 265 seconds) |
23:01:34 | * | pregressive quit (Ping timeout: 248 seconds) |
23:14:43 | * | milosn quit (Read error: Connection reset by peer) |
23:16:40 | * | Kingsquee joined #nim |
23:20:16 | * | milosn joined #nim |
23:20:50 | Araq | so ... c2nim just got yet another feature |
23:20:56 | Araq | #@ @# blocks |
23:21:35 | Araq | the idea is that you still have to modify the C code to make it behave. but at least you won't ever have to touch the generated nim code |
23:22:40 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:23:58 | * | Guest15779 quit (Quit: Leaving) |
23:28:37 | * | pregressive joined #nim |
23:32:14 | EXetoC | great |
23:32:44 | def- | Araq: nice |
23:34:57 | * | pregressive quit (Ping timeout: 252 seconds) |
23:36:19 | * | vendethiel quit (Ping timeout: 246 seconds) |
23:37:43 | * | pregressive joined #nim |
23:42:19 | Araq | also don't tell ldlework ... but I'm implementing {.noforward.} for types |
23:43:52 | EXetoC | what are the benefits? |
23:44:06 | Araq | easier C++ wrapper generation |
23:44:20 | Araq | C++ code is full of cyclic type dependencies |
23:44:21 | EXetoC | obviously we want that |
23:44:26 | EXetoC | cus, world domination and all that |
23:44:35 | EXetoC | yeah |
23:45:17 | Araq | but it's still restricted to "all type sections in the same module" |
23:45:24 | * | vendethiel joined #nim |
23:45:29 | Araq | actually hrm ... uh oh |
23:45:53 | Araq | damn this will be tough, I want it to work across include files |
23:46:27 | Araq | but what about |
23:46:44 | Araq | when complexDependencyThatRequiresVoodoo: include foo |
23:49:35 | Araq | oh well |
23:50:58 | * | pregressive quit (Read error: Connection reset by peer) |
23:51:01 | * | Varriount|Phone quit (Read error: Connection reset by peer) |
23:51:02 | * | pregress_ joined #nim |
23:51:34 | * | Varriount|Phone joined #nim |
23:55:20 | * | pregress_ quit (Read error: Connection reset by peer) |
23:55:52 | * | pregressive joined #nim |
23:58:04 | EXetoC | "proc update() {.async.} = result = client.sock.send(data) ... proc main() = waitFor update() ... main()" nothing is being sent. what am I doing wrong? |
23:58:25 | reactormonk | dom96, maybe >:) |