| 00:03:01 | * | Mat4 left #nim (#nim) |
| 00:08:21 | ekarlso | https://bpaste.net/show/864a99d43f69 < would there be a better way to write / structure that |
| 00:09:56 | BlaXpirit_ | earlier someone told you to use enum |
| 00:10:30 | ekarlso | yea, but how the crap do you map a string to enum ? |
| 00:12:19 | BlaXpirit_ | you should read the manual, once and for all |
| 00:12:21 | BlaXpirit_ | http://nim-lang.org/manual.html#enumeration-types |
| 00:13:44 | BlaXpirit_ | hmm actually this is not very useful |
| 00:16:41 | flaviu | ekarlso: make a table[string, enum] |
| 00:17:29 | flaviu | lol, I tried adding a debugging statement in alloc.nim, but it requires gc'd memory :P |
| 00:20:27 | EXetoC | with cstrings too? |
| 00:20:37 | EXetoC | nvm |
| 00:22:01 | ekarlso | y awesome flaviu ... |
| 00:22:13 | ekarlso | flaviu: that worked very nicely :P |
| 00:22:21 | flaviu | great! |
| 00:23:17 | def- | ekarlso: you can initialize a table with toTable {key1: value1, key2: value2} btw |
| 00:25:31 | ekarlso | def newTable({}) u mean ? |
| 00:26:38 | ekarlso | what would be uber to have would be MyEnum.toTable |
| 00:26:46 | def- | i guess both work |
| 00:27:01 | ekarlso | since if it's a string u can {$enum: enum}... |
| 00:27:10 | ekarlso | so it's kinda funky |
| 00:27:19 | def- | well, write your own toTable proc for that and it works |
| 00:27:24 | ekarlso | heh |
| 00:27:54 | BlaXpirit_ | weird stuff. https://bpaste.net/show/bf8b3e98cc18 |
| 00:28:16 | BlaXpirit_ | that's for ekarlso. indeed that's what you can do |
| 00:28:22 | BlaXpirit_ | seems kinda verbose |
| 00:29:19 | BlaXpirit_ | ekarlso, http://nim-lang.org/strutils.html#parseEnum,string :D |
| 00:29:34 | ekarlso | ... |
| 00:29:48 | def- | yep, looks better |
| 00:29:58 | * | ekarlso throws table code into the hole and flushes |
| 00:30:22 | BlaXpirit_ | ekarlso, https://bpaste.net/show/12e453d10e43 |
| 00:30:23 | def- | at least for small enums and if speed doesn't matter much |
| 00:30:51 | BlaXpirit_ | u get ValueError for free |
| 00:31:03 | BlaXpirit_ | but u can wrap it in try: and throw your own exception, whatever |
| 00:32:27 | * | BlaXpirit_ quit (Quit: Quit Konversation) |
| 00:32:35 | * | brson joined #nim |
| 00:32:44 | flaviu | def-: If you find yourself worrying about speed, just remember that nim isn't interpreted ;) |
| 00:33:07 | def- | flaviu: still pretty slow to create all these strings |
| 00:33:27 | flaviu | def-: If it's a string literal, it's free. |
| 00:34:29 | flaviu | So I'm trying to get the current PFrame, but I think that TLS is making things hard for me and GDB |
| 00:34:29 | def- | $e is a literal here?: https://github.com/Araq/Nim/blob/master/lib/pure/strutils.nim#L486 |
| 00:34:30 | * | yonson quit (Quit: Leaving) |
| 00:34:56 | flaviu | def-: sorry, I misunderstood then. |
| 00:37:07 | EXetoC | ekarlso: will not work for enums with holes though. it's an annoying limitation, which I assume will be dealt with |
| 00:38:41 | EXetoC | so it mostly applies to bindings I guess |
| 00:38:45 | * | Amrykid quit (Changing host) |
| 00:38:45 | * | Amrykid joined #nim |
| 00:39:28 | EXetoC | no wait, it should work, just that it'll iterate through every hole |
| 00:39:53 | def- | EXetoC: i think you can't iterate over enums with holes |
| 00:40:22 | def- | oh, you can |
| 00:40:45 | def- | then the manual is wrong |
| 00:40:53 | def- | It says here that you can't: http://nim-lang.org/manual.html#enumeration-types |
| 00:41:34 | flaviu | def-: A better way of phrasing that is that "iterating over an enum with holes is undefined behavior" |
| 00:43:29 | def- | good night |
| 00:43:41 | ekarlso | someone wanna write a jsonschema library ? :p |
| 00:49:02 | ekarlso | how hard is it to implement b64 ? |
| 00:51:22 | ekarlso | guess i'll have to try it out then .. |
| 00:58:33 | ekarlso | can't a const be a object ? |
| 00:59:24 | EXetoC | not atm |
| 00:59:35 | ekarlso | doh |
| 01:00:55 | * | brson quit (Quit: leaving) |
| 01:09:28 | * | asomesom joined #nim |
| 01:12:49 | * | ARCADIVS joined #nim |
| 01:31:26 | ekarlso | https://bpaste.net/show/26041645d9c4 does that seem fair ? |
| 01:31:41 | ekarlso | only thing to fix is the "pad" part |
| 01:33:52 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 01:39:42 | flaviu | I'm doing some testing on windows, but my user's home directory has spaces in it so things fail. |
| 01:40:26 | flaviu | How have others gotten around that? |
| 01:41:29 | * | brson joined #nim |
| 01:43:59 | asomesom | does nimbot.nim need devel version of nim? I get an error when trying to compile it: https://github.com/nim-lang/nimbot/issues/1 |
| 01:44:37 | flaviu | ekarlso: I know the regular base64 module does that newline nonsense, but it's pointless and directly breaks the spec ("Implementations MUST NOT not add line feeds to base encoded data") |
| 01:46:00 | flaviu | Base64 Content-Transfer-Encoding requires newlines, but that's a niche usecase. |
| 01:46:28 | flaviu | I think the best solution is to turn off newlines by default, and then mention in the doccomment that they MUST NOT be used except for Base64 Content-Transfer-Encoding |
| 01:48:07 | ekarlso | flaviu: would it be possible to get it into std base64 ? |
| 01:48:09 | flaviu | Also, `CharSet* = enum` is a nasty way of using enums. Don't do that please. |
| 01:48:39 | ekarlso | why so flaviu ? |
| 01:49:10 | flaviu | Because that string is supposed to be used for a printable representation. Use two named constants instead. |
| 01:49:40 | ekarlso | uh, o |
| 01:50:15 | flaviu | You have the needle and haystack flipped on encode(Config, string) |
| 01:51:09 | ekarlso | how so ? |
| 01:51:34 | flaviu | Decoding violates RFC 3548 §2.3. |
| 01:51:46 | flaviu | ekarlso: It should be (string, Config) |
| 01:52:08 | ekarlso | uh, ok |
| 01:52:49 | ekarlso | what does that have to do with the order of args ? |
| 01:53:11 | flaviu | ekarlso: The decoding spec violation is unrelated |
| 01:53:56 | flaviu | I would add a switch `ignoreUnknown` to toggle the non-conformant behavior and default it to on, just to make things simpler for the user. |
| 01:54:42 | ekarlso | geh, would be really nice if someone would stab base64 for me.. |
| 01:54:52 | ekarlso | having stuff to do in packages as well :& |
| 01:55:43 | flaviu | ekarlso: Maybe tomorrow, I'm testing the packaging on my new NRE library. |
| 01:56:08 | ekarlso | flaviu: would be awesome if you could or someone else.. |
| 01:58:52 | * | Demos_ joined #nim |
| 01:59:49 | * | Demos__ joined #nim |
| 02:00:33 | ekarlso | flaviu: so decode atm doesnt decode b64url either properly |
| 02:00:38 | ekarlso | without going boom |
| 02:02:28 | * | Demos quit (Ping timeout: 245 seconds) |
| 02:03:39 | * | Demos_ quit (Ping timeout: 264 seconds) |
| 02:25:24 | * | nimnoob joined #nim |
| 02:25:56 | * | Boscop joined #nim |
| 02:27:13 | * | onionhammer quit (Ping timeout: 272 seconds) |
| 02:30:35 | * | hasenj joined #nim |
| 02:31:58 | dtscode | so i stumbled onto perhaps the most important piece of nim code |
| 02:32:18 | dtscode | proc fuckIt[t](t arg) = discard |
| 02:33:24 | hasenj | noob question regarding installation: on osx, I copied bin/nim to ~/bin/ |
| 02:33:38 | hasenj | now I'm trying to compile and install nimble |
| 02:33:57 | dtscode | ok |
| 02:33:58 | hasenj | but I get an error: cannot open file ~/lib/system.nim |
| 02:34:34 | dtscode | add ~/bin to your search path |
| 02:34:40 | hasenj | it is on the search path |
| 02:35:16 | dtscode | hmmmm... so you have nim installed somewhere, and then a symbolic link to it in ~/bin? |
| 02:35:20 | hasenj | http://hastebin.com/lewuwecigo.rb |
| 02:35:31 | hasenj | I copied it, not symlinked it |
| 02:35:36 | hasenj | should I symlink instead? |
| 02:35:40 | dtscode | yes... |
| 02:35:57 | dtscode | its not going to know where the libs are otherwise |
| 02:36:05 | hasenj | ok |
| 02:36:29 | hasenj | I was treating the nim source directory as temporary/disposable |
| 02:39:57 | * | onionhammer joined #nim |
| 02:40:48 | hasenj | got it, thanks |
| 02:41:18 | * | nimnoob quit (Remote host closed the connection) |
| 02:53:17 | * | VinceAddons quit (Read error: Connection reset by peer) |
| 02:53:37 | dtscode | oh no no no |
| 02:53:42 | dtscode | it is very neccesarry |
| 02:56:23 | * | nimnoob joined #nim |
| 03:15:51 | * | darkf joined #nim |
| 03:16:31 | * | brson quit (Quit: leaving) |
| 03:16:57 | * | BitPuffin quit (Ping timeout: 252 seconds) |
| 03:16:58 | * | brson joined #nim |
| 03:19:24 | * | JinShil joined #nim |
| 03:19:56 | * | kapil__ joined #nim |
| 03:24:44 | * | brson quit (Quit: leaving) |
| 03:24:56 | * | brson joined #nim |
| 03:37:03 | * | vendethiel quit (Ping timeout: 245 seconds) |
| 03:38:49 | * | vendethiel joined #nim |
| 03:41:32 | * | EXetoC quit (Ping timeout: 245 seconds) |
| 03:45:51 | * | brson quit (Quit: leaving) |
| 03:54:08 | * | asomesom quit (Quit: Page closed) |
| 04:02:17 | * | fowl joined #nim |
| 04:05:00 | * | jpoirier quit (Quit: Leaving) |
| 04:15:17 | * | BitPuffin joined #nim |
| 04:20:27 | * | BitPuffin quit (Ping timeout: 276 seconds) |
| 04:23:42 | * | vendethiel quit (Ping timeout: 276 seconds) |
| 04:28:23 | * | vendethiel joined #nim |
| 04:29:37 | * | nimnoob quit (Quit: Leaving) |
| 04:44:40 | * | EXetoC joined #nim |
| 04:52:04 | * | vendethiel quit (Ping timeout: 264 seconds) |
| 05:00:05 | * | vendethiel joined #nim |
| 05:23:31 | * | JinShil quit (Quit: Konversation terminated!) |
| 05:30:57 | * | BitPuffin joined #nim |
| 05:36:11 | * | BitPuffin quit (Ping timeout: 265 seconds) |
| 05:40:15 | * | gmpreussner__ quit (Quit: Konversation terminated!) |
| 05:58:05 | dtscode | Mimbus, var foo: table[string, int |
| 05:58:17 | dtscode | .eval var foo: table[string, int] |
| 05:58:21 | Mimbus | dtscode: eval.nim(3, 9) Error: undeclared identifier: 'table' |
| 06:17:24 | * | hasenj quit (Quit: hasenj) |
| 06:28:30 | * | vendethiel quit (Ping timeout: 276 seconds) |
| 06:58:27 | * | vendethiel joined #nim |
| 07:17:22 | * | SplinterOfChaos quit (Ping timeout: 245 seconds) |
| 07:19:39 | * | BitPuffin joined #nim |
| 07:24:23 | * | BitPuffin quit (Ping timeout: 240 seconds) |
| 07:26:52 | * | pc joined #nim |
| 07:30:37 | * | pc left #nim (#nim) |
| 07:31:33 | * | jefus_ joined #nim |
| 07:35:31 | * | jefus quit (Ping timeout: 255 seconds) |
| 07:37:14 | * | JinShil joined #nim |
| 07:37:24 | * | Matthias247 joined #nim |
| 07:42:32 | * | vendethiel quit (Ping timeout: 246 seconds) |
| 07:42:50 | * | BlaXpirit joined #nim |
| 07:44:56 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 07:53:07 | * | vendethiel joined #nim |
| 07:57:15 | gokr | Good morning! |
| 08:00:13 | * | Demos__ quit (Read error: Connection reset by peer) |
| 08:05:37 | * | JinShil quit (Quit: Konversation terminated!) |
| 08:10:01 | * | JinShil joined #nim |
| 08:11:43 | * | gunn_ joined #nim |
| 08:12:03 | * | gunn quit (Ping timeout: 245 seconds) |
| 08:16:07 | * | vendethiel quit (Ping timeout: 245 seconds) |
| 08:22:36 | * | Sphax joined #nim |
| 08:25:47 | * | vendethiel joined #nim |
| 08:33:59 | * | EXetoC quit (Ping timeout: 245 seconds) |
| 08:35:58 | * | Trustable joined #nim |
| 08:37:03 | BlaXpirit | I'm having a really hard time understanding what openarray is |
| 08:37:28 | BlaXpirit | from what i've read, all I can think of is "magic" |
| 08:37:39 | gokr | AFAICT openarray is just a special type that you can *only* use as a param type - and it covers both seq and regular arrays. |
| 08:37:51 | gokr | So yes, definitely an oddball. |
| 08:38:01 | BlaXpirit | as i just find out, it also covers all iterables |
| 08:38:09 | BlaXpirit | which is awesome and I thought it didn't |
| 08:38:13 | gokr | Oh |
| 08:38:38 | BlaXpirit | but it's still kinda weird |
| 08:38:48 | BlaXpirit | it should be something like typeclass or whatever |
| 08:39:25 | gokr | I guess its a pragmatic thing - arrays are in the language itself, seq is... mmm, not sure actually, is it purely in the libs? |
| 08:39:58 | BlaXpirit | seq is definitely part of the language, because it has "magic" (literally this pragma) associated with it |
| 08:40:14 | gokr | Right, ok. |
| 08:40:32 | BlaXpirit | wait.. or does it? i actualy cant find any "magic" |
| 08:40:46 | BlaXpirit | oh yeah magic: "LengthSeq" |
| 08:41:17 | gokr | Mmm, but I am guessing it may have been "meant" to be in the "libs only" and then perhaps magics creeped in. |
| 08:41:29 | BlaXpirit | oh i'm sorry, openarray is not what I thought |
| 08:41:46 | BlaXpirit | I used standard "find" function assuming it would be on openarray. but it actually isnt |
| 08:42:38 | BlaXpirit | does NOT work on iterables. |
| 08:42:47 | gokr | Ok. |
| 08:42:58 | gokr | Actually very few mentions of openarray in the libs |
| 08:43:09 | BlaXpirit | ok then, so now I have a problem with openarray |
| 08:44:48 | BlaXpirit | this beats me https://github.com/Araq/Nim/blob/master/lib/system.nim#L1802 |
| 08:45:11 | BlaXpirit | `find` can operate on anything, then `contains` is based on it but uses openarray |
| 08:46:34 | BlaXpirit | then there is the whole sequtils, with functions that could be completely universal, but accept only seq[T] |
| 08:46:42 | * | JinShil quit (Quit: Konversation terminated!) |
| 08:48:05 | gokr | Its not like the beautiful Collection hierarchy in Smalltalk - but I am guessing it has evolved like this - in order to match efficient C. |
| 08:48:14 | BlaXpirit | "efficient" |
| 08:48:16 | gokr | sequtils on the other hand, we can always make a better one. |
| 08:48:28 | * | JinShil joined #nim |
| 08:48:29 | gokr | s/match/produce |
| 08:48:36 | BlaXpirit | if you have to recreate arrays over and over and over |
| 08:48:54 | * | vendethiel quit (Ping timeout: 276 seconds) |
| 08:48:59 | gokr | I mainly meant the openArray vs seq thingy. |
| 08:49:03 | gokr | Ok, gotta go, later |
| 08:49:07 | BlaXpirit | bye |
| 08:49:28 | * | JinShil quit (Remote host closed the connection) |
| 08:52:08 | * | vendethiel joined #nim |
| 08:54:02 | dtscode | how come there isnt a python to nim translator? |
| 08:54:15 | BlaXpirit | are u trolling |
| 08:54:24 | dtscode | is there one? |
| 08:54:30 | BlaXpirit | there can't be |
| 08:54:36 | dtscode | how so? |
| 08:55:02 | dtscode | is nim not turing complete? |
| 09:00:02 | * | VinceAddons joined #nim |
| 09:05:47 | dtscode | BlaXpirit, no go on... please tell me why it is not possible to compile one turing complete language to another |
| 09:08:25 | * | BitPuffin joined #nim |
| 09:08:34 | gokr | Its not that it can't be done - but a) its huge work if you want it to actually work on larger codebases and b) Nim is different so ... do you really want Python-ish Nim code? and c) please go ahead and write it :) |
| 09:09:09 | BlaXpirit | so there is one Python compiler... it took a huge amount of work, and still depends on CPython |
| 09:09:15 | dtscode | yes |
| 09:09:41 | BlaXpirit | don't forget that we're talking about one of the most popular languages here |
| 09:09:43 | gokr | And further - what is the end goal? Useful Nim sources or "just a lib I can call"? |
| 09:09:57 | dtscode | i knew it could be done. i was just curious why BlaXpirit thought otherwise. and yeah thats why i figured there wasnt one gokr |
| 09:10:06 | gokr | If you just want to be able to "call" Python code - then that's doable in many ways. |
| 09:10:28 | dtscode | the reason i wanted one is because im translating some python to nim, and its going terrible since im having issues manually figuring out the types |
| 09:10:43 | BlaXpirit | oh it's a lot of fun |
| 09:10:53 | BlaXpirit | i just ported a library |
| 09:11:20 | BlaXpirit | luckily the OOP used in it was pure enough, no duck typing really |
| 09:11:36 | dtscode | the code im porting is very much duck typed |
| 09:11:46 | gokr | dtscode: The reason for BlaXpirit's answer was probably since the question made it sound like it was a trivial thing. |
| 09:12:11 | dtscode | oh no i wouldnt call anything of the sort trivial. frankly i was surprised that c2nim existed |
| 09:12:47 | BlaXpirit | "transform C into a language that compiles to C" |
| 09:12:53 | BlaXpirit | nothing surprising if you put it that way |
| 09:13:14 | dtscode | ... |
| 09:13:28 | dtscode | just because it compiles to c doesnt mean compiling backwards is just as easy |
| 09:13:41 | * | BitPuffin quit (Ping timeout: 265 seconds) |
| 09:16:05 | gokr | Well, c2nim ... it's not a full C translator. But it sure is a beast of a tool, quite impressive by looking at its source code. |
| 09:16:36 | dtscode | i need to go through the compiler one of these days... but for now, i will work on irc things, my site, and learning racket |
| 09:35:16 | * | vendethiel quit (Ping timeout: 264 seconds) |
| 09:40:14 | * | vendethiel joined #nim |
| 09:42:14 | ekarlso | so, any of you guys wanna help with getting me a base64 url compliant ting ? :) |
| 09:42:48 | BlaXpirit | ekarlso, but i gave u |
| 09:56:43 | * | despairblue joined #nim |
| 09:58:00 | * | despairblue quit (Client Quit) |
| 09:58:13 | * | davidhq joined #nim |
| 10:00:36 | ekarlso | BlaXpirit: ah, the replace -,,- |
| 10:00:51 | BlaXpirit | it is as good as it gets |
| 10:01:03 | ekarlso | but the newline stuff then ? |
| 10:01:04 | * | vendethiel quit (Ping timeout: 245 seconds) |
| 10:01:10 | BlaXpirit | base64 module is shortsighted, what can i do |
| 10:01:18 | BlaXpirit | replace("\n", ""), big deal |
| 10:01:39 | ekarlso | ah |
| 10:01:44 | BlaXpirit | i tried to find in irc logs when i gave you that code, but couldn't |
| 10:03:45 | BlaXpirit | no, ekarlso, wait |
| 10:03:50 | BlaXpirit | you should just supply newline="" |
| 10:08:16 | ekarlso | great, so nim can't decode eyJzdWIiOjEyMzQ1Njc4OTAsIm5hbWUiOiJKb2huIERvZSIsImFkbWluIjp0cnVlfQ since it's missing == |
| 10:10:52 | BlaXpirit | ekarlso, that's invalid base64 then |
| 10:11:07 | ekarlso | BlaXpirit: nope it's valid b64url.. |
| 10:11:20 | BlaXpirit | ekarlso, but to fix it you can do: while s.len mod 3 > 0: s &= "=" |
| 10:11:26 | BlaXpirit | pretty sure |
| 10:11:56 | BlaXpirit | and don't forget to do the character replacements both ways |
| 10:13:04 | ekarlso | BlaXpirit: u mean in the base64 module ? |
| 10:13:25 | BlaXpirit | ekarlso, no, i'm not saying to edit the base64 module directly |
| 10:13:57 | ekarlso | I just appended == .. |
| 10:14:16 | BlaXpirit | but it's not always going to be two == |
| 10:14:25 | ekarlso | oh |
| 10:14:30 | BlaXpirit | -_- |
| 10:14:35 | ekarlso | that's great :p |
| 10:14:41 | BlaXpirit | [:10:40] <BlaXpirit> ekarlso, but to fix it you can do: while s.len mod 3 > 0: s &= "=" |
| 10:14:46 | ekarlso | ok ok |
| 10:15:30 | BlaXpirit | strange. that string has len mod 3 == 0 |
| 10:15:56 | ekarlso | I wish the base64 module had this fixed instea.d.. |
| 10:16:18 | BlaXpirit | i don't see this last thing as a bug |
| 10:16:33 | ekarlso | the base64url isn't supported atm .. |
| 10:16:44 | ekarlso | rust let's you pass in a "CONFIG" with stuff predefined |
| 10:17:20 | BlaXpirit | ekarlso, i made a mistake. it's supposed to be 4. while s.len mod 4 > 0: s &= "=" |
| 10:17:44 | ekarlso | how the feck u go the other way around then ? |
| 10:17:55 | BlaXpirit | strip("=") |
| 10:17:57 | BlaXpirit | i dunno |
| 10:18:17 | ekarlso | :'( |
| 10:19:02 | BlaXpirit | it's not so bad, man! |
| 10:19:22 | BlaXpirit | ekarlso, do you still have the code for replacements that i gave u? |
| 10:19:28 | ekarlso | ye |
| 10:19:36 | ekarlso | I scoured the irc logs :) |
| 10:19:40 | BlaXpirit | please send it back, then i can assemble a complete solution |
| 10:19:48 | ekarlso | base64.encode(s).replace('+', '-').replace('/', '_') |
| 10:19:53 | BlaXpirit | cool cool |
| 10:20:17 | ekarlso | but really it should be possible to pass in which type of scheme u want |
| 10:20:25 | ekarlso | since there's different ones :| |
| 10:20:50 | * | vendethiel joined #nim |
| 10:20:52 | BlaXpirit | i'm thinking of contributing to base64 later |
| 10:27:43 | BlaXpirit | ekarlso, hmm, Python still gives the "="s with urlsafe_b64encode |
| 10:28:21 | * | gunn_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 10:28:36 | ekarlso | BlaXpirit: hmmms |
| 10:28:46 | ekarlso | http://jwt.io < that has a example |
| 10:34:10 | BlaXpirit | ekarlso, https://gist.github.com/BlaXpirit/4c84e0ee0064e17d5f52 |
| 10:34:14 | BlaXpirit | took me long enough....... |
| 10:34:26 | ekarlso | BlaXpirit: thnx! |
| 10:36:17 | ekarlso | funny that the jwt.io example has a invalid "sub" |
| 10:36:25 | ekarlso | it's supposed to be "stringoruri" |
| 10:37:00 | ekarlso | does nim compile on ARM / Power8 btw? |
| 10:38:13 | * | gunn joined #nim |
| 10:39:21 | Araq | yes |
| 10:41:37 | BlaXpirit | is there any function to separate a string into chunks of some size? |
| 10:41:56 | * | vendethiel quit (Ping timeout: 244 seconds) |
| 10:42:51 | BlaXpirit | "abcde", 2 -> "ab", "cd", "e" |
| 10:46:21 | Araq | I heard re.split with a seperator of length 0 does some wonders here |
| 10:47:00 | Araq | sorry, I'm kidding |
| 10:47:17 | BlaXpirit | well, it IS possible with that awesome new library |
| 10:47:47 | BlaXpirit | ah with old one too |
| 10:47:49 | * | Araq still doesn't get why a splitter of length 0 is supposed to be possible |
| 10:48:10 | BlaXpirit | Araq, let me demonstrate then |
| 10:48:29 | * | Araq by that logic division by 0 should be allowed too |
| 10:48:48 | BlaXpirit | no srsly let me demonstrate... and that analogy is bad |
| 10:49:19 | BlaXpirit | "word word word".split(re"\b") |
| 10:49:35 | BlaXpirit | it is a serious bug that this does not work |
| 10:49:51 | BlaXpirit | this returns 1 string |
| 10:50:02 | Araq | what should it return? |
| 10:50:16 | BlaXpirit | "word", " ", "word" etc |
| 10:51:13 | BlaXpirit | Araq, let me assure you that flaviu's library is majestic. |
| 10:52:09 | Araq | *shrug* that splitter is not "" |
| 10:52:26 | BlaXpirit | but length 0 |
| 10:52:37 | Araq | fair enough |
| 10:52:39 | BlaXpirit | and you just disregard it in that lib |
| 10:52:46 | BlaXpirit | as if it was nothing at all |
| 10:54:52 | * | vendethiel joined #nim |
| 10:57:11 | * | BitPuffin joined #nim |
| 10:59:59 | Araq | so make a PR that fixes it |
| 11:01:48 | BlaXpirit | i'm still having trouble figuring out the process |
| 11:01:53 | * | BitPuffin quit (Ping timeout: 240 seconds) |
| 11:02:36 | BlaXpirit | the first tiny snag is devel branch. i only know how to do things in a fork and pull request through master branch. |
| 11:02:51 | BlaXpirit | but the big one is, i dont know how to test my changes. do i need to build everything or what |
| 11:03:28 | BlaXpirit | well for this case, i could just directly import that one file, obviously building the whole nim wouldnt be needed |
| 11:03:42 | dom96 | Araq: How are channels implemented? Do they use anything that could be put into poll? |
| 11:04:30 | Araq | dom96: I think so, but bbl |
| 11:04:42 | dom96 | This in regards to http://forum.nim-lang.org/t/769 |
| 11:04:46 | dom96 | *THis is |
| 11:05:30 | dom96 | bbl too |
| 11:16:32 | * | BitPuffin joined #nim |
| 11:35:11 | flaviu | ESTP's memory profiler is very useful |
| 11:39:14 | * | Sphax quit (Quit: ZZZZZzzzzz) |
| 11:48:56 | reactormonk | Ok, I'm currently butchering nim with pargmas... how can I get the path of the file generated by the compiler for a specific file? |
| 11:50:31 | reactormonk | preferably at compiletime. |
| 11:51:46 | Araq | you cant |
| 11:54:08 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 11:59:09 | flaviu | reactormonk: You can probably hack around with currentSourcePath() |
| 11:59:55 | reactormonk | flaviu, that's only the source |
| 12:00:49 | reactormonk | Araq, let's see... |
| 12:01:00 | flaviu | reactormonk: Sometimes it's a good enough 90% solution, although I don't know your situation. |
| 12:03:37 | reactormonk | Actually, with a bit of emit, it should be doable with any other butchering |
| 12:09:08 | * | johnsoft quit (Ping timeout: 265 seconds) |
| 12:09:41 | * | johnsoft joined #nim |
| 12:23:53 | * | VinceAddons quit (Read error: Connection reset by peer) |
| 12:35:47 | * | Sphax joined #nim |
| 12:37:07 | * | BitPuffin quit (Ping timeout: 256 seconds) |
| 12:49:29 | * | gokr quit (Quit: Leaving.) |
| 13:25:05 | * | Sphax quit (Quit: ZZZZZzzzzz) |
| 13:26:57 | * | Sphax joined #nim |
| 13:27:39 | ekarlso | Error: internal error: GetUniqueType |
| 13:27:41 | ekarlso | hmmmf |
| 13:31:23 | ekarlso | meh, syntax error :| |
| 13:33:27 | ekarlso | array[0..31, uint8] < is hex the most useful thing to convert that to ? |
| 13:43:06 | * | davidhq joined #nim |
| 13:53:06 | * | Boscop_ joined #nim |
| 13:54:02 | * | Boscop quit (Ping timeout: 245 seconds) |
| 13:54:40 | * | Boscop__ joined #nim |
| 13:58:06 | * | Boscop_ quit (Ping timeout: 246 seconds) |
| 14:03:46 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 14:04:19 | * | davidhq joined #nim |
| 14:08:59 | * | davidhq quit (Client Quit) |
| 14:11:33 | * | karaboose joined #nim |
| 14:15:19 | * | j3rky joined #nim |
| 14:21:46 | * | Demon_Fox joined #nim |
| 14:23:01 | * | ARCADIVS quit (Quit: ARCADIVS) |
| 14:28:27 | * | BitPuffin joined #nim |
| 14:30:13 | * | gokr joined #nim |
| 14:30:14 | * | hasenj joined #nim |
| 14:30:36 | * | Pisuke quit (Quit: WeeChat 1.1-rc1) |
| 14:31:57 | * | hasenj quit (Client Quit) |
| 14:34:18 | * | jlebrech joined #nim |
| 14:34:44 | jlebrech | i'd like to code directly to the canvas on html with nim |
| 14:35:10 | jlebrech | i was thinking of nim+sdl+compile to js. that even possible? |
| 14:39:53 | sillesta | sdl is a c library, don't think so |
| 14:41:57 | ekarlso | flaviu: https://github.com/ekarlso/nim-jwt |
| 14:42:08 | ekarlso | still missing some helpers but most of it is there |
| 14:42:36 | flaviu | Is https://github.com/ekarlso/nim-jwt/blob/master/src/private/utils.nim#L32 correct? |
| 14:42:51 | flaviu | Shouldn't it be s.replace('+', '-').replace('/', '_')? |
| 14:43:01 | ekarlso | flaviu:that's BlaXpirit's code ;) |
| 14:43:09 | ekarlso | just copy paste :p |
| 14:43:16 | BlaXpirit | dang it, i forgot |
| 14:43:22 | BlaXpirit | sorry |
| 14:43:31 | flaviu | ekarlso: Needs a nice fat test suite. |
| 14:43:44 | ekarlso | flaviu: heh, well i've testing some of the stuff but :p |
| 14:43:48 | ekarlso | like basics |
| 14:44:06 | jlebrech | sillesta: nothing like emscripten then? |
| 14:44:37 | ekarlso | Looking for nim (>= 0.9.4)... |
| 14:44:44 | ekarlso | how do you satisfy that ? |
| 14:45:06 | BlaXpirit | cmon... everyone is on 0.10.3 and you're... |
| 14:45:48 | ekarlso | I've got my "packages" on the same directory level as nim |
| 14:46:07 | ekarlso | i'm on devel BlaXpirit |
| 14:46:15 | BlaXpirit | ok, that's 0.10.3 |
| 14:46:18 | BlaXpirit | so what's the problem? |
| 14:46:32 | ekarlso | nimble install in a directory goes bork |
| 14:47:41 | ekarlso | it goes looking for package nim then goes boom |
| 14:51:20 | ekarlso | BlaXpirit: so really not sure why it fails |
| 14:51:39 | BlaXpirit | i havent encountered many problems with this whole system, so i dunno |
| 14:51:50 | ekarlso | BlaXpirit: what directory structure u got ? |
| 14:52:11 | BlaXpirit | structure of what? |
| 14:53:02 | ekarlso | I mean, I got ~/projects/nim/Nimrod < compiler and ~/projects/nim/<package> so dunno if the structure there can foo it |
| 14:59:00 | ekarlso | how can one require "nim" when it's not a package.. |
| 15:01:13 | ekarlso | ok so dont do "nimble install ." .. |
| 15:02:14 | jlebrech | i want a library that outputs to canvas or webgl? |
| 15:02:47 | BlaXpirit | use DOM, whatever |
| 15:03:23 | * | jefus_ is now known as jefus |
| 15:10:50 | Araq | jlebrech: Nim has its own JS backend, which for some things works better than emscripten and for some things worse |
| 15:11:02 | * | JinShil joined #nim |
| 15:12:10 | jlebrech | Araq: i'd like a subset of css or canvas or something to build upon, what do you recommend? |
| 15:14:28 | BlaXpirit | you can use the actual canvas, for one |
| 15:14:49 | jlebrech | oh that's good :D |
| 15:15:01 | Araq | I don't know what's out there, I would wrap the canvas myself and then use that |
| 15:15:14 | jlebrech | i'm thinking of coding something that ditches css really |
| 15:15:40 | jlebrech | or just a subset that's similar to sdl or allegro |
| 15:15:55 | BlaXpirit | what a weird combination |
| 15:16:24 | jlebrech | i mean if i have no choice to use css when it's on the web |
| 15:16:26 | BlaXpirit | if i'm already tied to a crummy browser, why limit myself even more with a compiled language |
| 15:16:54 | jlebrech | yeah, guess you make sense |
| 15:17:16 | sillesta | something that emulates canvas on desktop could be cool |
| 15:17:18 | BlaXpirit | i'd ditch one of them for sure |
| 15:19:09 | jlebrech | sillesta: oh i see neat idea |
| 15:20:02 | BlaXpirit | i can only bet that there already is |
| 15:27:06 | jlebrech | i hate html/css/js and it's my job |
| 15:27:37 | jlebrech | i want complete control over with displays on screen |
| 15:27:41 | jlebrech | what* |
| 15:28:02 | ekarlso | https://github.com/ekarlso/nim-jwt/blob/master/src/jwt.nim < shouldn't I be able to import jwt and then use the toClaims function in private/jose ? |
| 15:29:12 | ekarlso | or do you need to import that explicitly then ? |
| 15:29:22 | * | EXetoC joined #nim |
| 15:30:53 | * | Demon_Fox quit (Quit: Leaving) |
| 15:31:33 | BlaXpirit | toClaims* |
| 15:31:57 | BlaXpirit | hm |
| 15:32:10 | BlaXpirit | you need to export |
| 15:32:32 | BlaXpirit | if you want everything public in a module to be exported in another module, you write export |
| 15:33:45 | ekarlso | BlaXpirit: yeah I added export jose export claims |
| 15:33:48 | ekarlso | no luck |
| 15:34:47 | * | gokr quit (Quit: Leaving.) |
| 15:35:57 | BlaXpirit | is anyone available to accept https://github.com/nim-lang/packages/pull/116 ? |
| 15:42:21 | * | perturbation joined #nim |
| 15:50:17 | * | BitPuffin quit (Read error: Connection reset by peer) |
| 15:50:43 | * | Demon_Fox joined #nim |
| 15:53:06 | * | jpoirier joined #nim |
| 15:57:01 | ekarlso | BlaXpirit: got a clue ? |
| 15:57:05 | BlaXpirit | no |
| 15:58:10 | ekarlso | ok :p |
| 15:58:13 | * | BitPuffin joined #nim |
| 15:58:40 | * | perturbation quit (Ping timeout: 264 seconds) |
| 16:01:36 | * | kapil__ quit (Quit: Connection closed for inactivity) |
| 16:01:55 | * | perturbation joined #nim |
| 16:18:51 | * | Sembei joined #nim |
| 16:32:29 | * | darkf quit (Quit: Leaving) |
| 16:35:02 | * | davidhq joined #nim |
| 16:37:08 | * | davidhq quit (Client Quit) |
| 16:39:14 | * | davidhq joined #nim |
| 16:44:43 | * | davidhq_ joined #nim |
| 16:46:15 | * | davidhq quit (Read error: No route to host) |
| 16:48:17 | * | Matthias247 joined #nim |
| 16:48:36 | * | davidhq joined #nim |
| 16:49:53 | * | davidhq_ quit (Ping timeout: 240 seconds) |
| 16:50:44 | * | davidhq quit (Client Quit) |
| 16:52:06 | * | davidhq joined #nim |
| 16:54:47 | * | davidhq quit (Client Quit) |
| 17:01:18 | * | SplinterOfChaos joined #nim |
| 17:05:30 | * | threewood joined #nim |
| 17:07:49 | * | jlebrech quit () |
| 17:12:30 | ekarlso | .eval @["1", "2"][1] |
| 17:12:34 | Mimbus | ekarlso: eval.nim(3, 11) Error: value of type 'string' has to be discarded |
| 17:12:56 | * | VinceAddons joined #nim |
| 17:21:57 | * | jpoirier quit (Ping timeout: 245 seconds) |
| 17:22:19 | * | yonson joined #nim |
| 17:22:52 | * | karaboose quit (Quit: Page closed) |
| 17:31:40 | * | brson joined #nim |
| 17:35:28 | * | Sphax quit (Quit: CYA!!) |
| 17:39:58 | flaviu | http://forum.nim-lang.org/t/771 |
| 17:43:09 | * | perturbation quit (Ping timeout: 245 seconds) |
| 17:54:21 | * | JinShil quit (Quit: Konversation terminated!) |
| 18:09:22 | * | Demos joined #nim |
| 18:22:55 | ekarlso | flaviu: cool :) |
| 18:23:18 | ekarlso | flaviu: https://nim-pkg.svcs.io:8080 your help in action flaviu and BlaXpirit (: |
| 18:25:10 | flaviu | ekarlso: Nice, it works now! |
| 18:25:29 | EXetoC | such a memorable username |
| 18:26:02 | * | flaviu is now known as fadg44a3w4fe |
| 18:26:09 | fadg44a3w4fe | EXetoC: Happy now? |
| 18:26:45 | * | repax joined #nim |
| 18:26:47 | fadg44a3w4fe | EXetoC: Or do you perfer this name? :P |
| 18:27:21 | * | fadg44a3w4fe is now known as clkqaa0ijri1gkb |
| 18:32:16 | * | gokr_ joined #nim |
| 18:32:46 | * | nande joined #nim |
| 18:33:20 | EXetoC | :p |
| 18:35:40 | * | clkqaa0ijri1gkb is now known as flaviu |
| 18:36:07 | * | sampwing joined #nim |
| 18:36:49 | dtscode | i like clkqaa0ijri1gkb. that is a memorable username, and people will know exactly who you are talking about |
| 18:37:55 | * | dtscode is now known as clkqaa0ijri1gkb |
| 18:38:05 | * | clkqaa0ijri1gkb is now known as dtscode |
| 18:39:09 | EXetoC | unless someone named clkqaa0ijri1gka comes along |
| 18:39:48 | dtscode | fuck that guy. no one likes him |
| 18:43:36 | * | darkf joined #nim |
| 18:43:46 | * | darkf quit (Changing host) |
| 18:43:46 | * | darkf joined #nim |
| 18:46:07 | * | repax_ joined #nim |
| 18:49:39 | * | repax quit (Ping timeout: 246 seconds) |
| 19:09:35 | * | rpag joined #nim |
| 19:09:44 | * | Zekka joined #nim |
| 19:10:01 | * | Zekka left #nim (#nim) |
| 19:21:38 | * | gokr_ quit (Ping timeout: 245 seconds) |
| 19:21:45 | * | Jesin quit (Quit: Leaving) |
| 19:26:48 | * | Jesin joined #nim |
| 19:31:42 | * | jefus_ joined #nim |
| 19:34:49 | * | jefus quit (Ping timeout: 245 seconds) |
| 19:36:25 | * | pouledodue joined #nim |
| 19:37:30 | * | pouledodue left #nim ("Textual IRC Client: www.textualapp.com") |
| 19:42:09 | * | cryzed joined #nim |
| 19:51:22 | Araq | hi cryzed welcome |
| 19:51:39 | cryzed | hello |
| 19:52:12 | * | joecodes2 joined #nim |
| 19:53:28 | * | jpoirier joined #nim |
| 20:00:53 | * | BlaXpirit_ joined #nim |
| 20:05:04 | * | Sphax joined #nim |
| 20:09:42 | * | perturbation joined #nim |
| 20:09:56 | * | matkuki joined #nim |
| 20:11:27 | * | repax_ quit (Quit: repax_) |
| 20:12:28 | matkuki | Why does "var temp: int = 200; echo($temp)" compile and "var temp: int = 200; echo $temp" doesn't? |
| 20:12:40 | def- | matkuki: because of the binding of $ |
| 20:13:02 | def- | echo and temp become the arguments to $, like `$`(echo, temp) |
| 20:13:23 | def- | luckily you don't need the $ here anyway, all arguments to echo are stringified automatically |
| 20:14:06 | matkuki | def-: Oh, didn't know about the automatic stringification. Thanks! |
| 20:18:00 | * | zahary joined #nim |
| 20:19:16 | EXetoC | varargs[expr, `$`] |
| 20:21:00 | * | bjz joined #nim |
| 20:25:27 | * | yonson quit (Ping timeout: 252 seconds) |
| 20:32:39 | ekarlso | flaviu: now what then ? ;) |
| 20:34:54 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 20:53:28 | * | bjz joined #nim |
| 20:55:15 | * | BlaXpirit_ quit (Quit: Quit Konversation) |
| 21:02:06 | * | bjz quit (Max SendQ exceeded) |
| 21:02:27 | * | rpag quit (Quit: Leaving) |
| 21:10:24 | * | bjz joined #nim |
| 21:18:15 | * | bjz quit (Read error: Connection reset by peer) |
| 21:26:52 | * | bjz joined #nim |
| 21:28:41 | def- | Can't reach nim-lang.org and nimrod-lang.org. Known problem? |
| 21:29:54 | def- | Hm, I guess my provider's dns server is broken in some way, works with other ones |
| 21:31:00 | * | kniteli joined #nim |
| 21:32:12 | BlaXpirit | works here for sure |
| 21:33:50 | * | Varriount|Laptop joined #nim |
| 21:35:37 | perturbation | still up for me |
| 21:37:32 | flaviu | It works for me, but it looks like it's in my DNS cache. |
| 21:43:31 | BlaXpirit | uh oh |
| 21:43:56 | BlaXpirit | not sure if this means DNS is completely down for nim-lang.org http://dnscheck.pingdom.com/?domain=nim-lang.org×tamp=1421703617&view=1 |
| 21:44:19 | ldlework | nim-lang.org works here |
| 21:44:23 | ldlework | oh dns cache |
| 21:45:52 | flaviu | Doesn't look good: http://i.imgur.com/33Ylhnp.png |
| 21:46:42 | EXetoC | uh oh |
| 21:47:33 | BlaXpirit | D: not for this many days |
| 21:48:01 | ekarlso | what's that picture ? ^ |
| 21:48:30 | BlaXpirit | but google took a snapshot of nim-lang.org today |
| 21:48:43 | BlaXpirit | (well, it's not like they can't have a cache) |
| 21:51:09 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 21:55:03 | Varriount|Laptop | nim-lang.org is up for me. |
| 21:55:28 | ekarlso | guess next is to add "releases" to it |
| 21:56:20 | BlaXpirit | us all checking it doesnt do much because we've seen it |
| 21:56:22 | EXetoC | flaviu: OS? |
| 21:56:40 | flaviu | Varriount|Laptop: It's up, but I'm not getting an authoritative answer on the location of the domain name |
| 21:56:59 | EXetoC | but the browser caches I guess |
| 21:57:10 | BlaXpirit | just tested on a different computer in my LAN that hasnt visited that website, and it works |
| 21:57:34 | ekarlso | is it parseopt2 again for cmd line options? |
| 21:57:36 | BlaXpirit | now, for proxies |
| 21:57:44 | BlaXpirit | ekarlso, or docopt :p |
| 21:57:51 | ekarlso | BlaXpirit: that working ? ^ |
| 21:57:53 | BlaXpirit | ye |
| 21:57:54 | flaviu | https://gist.github.com/9911303ba8c1b4425368 |
| 21:58:00 | flaviu | see how there is not authoritive answer? |
| 21:58:13 | ekarlso | BlaXpirit: link ? |
| 21:58:31 | BlaXpirit | ekarlso, http://github.com/docopt/docopt.nim |
| 22:00:39 | BlaXpirit | hm, i may have messed up by changing the meaning of `$ |
| 22:01:31 | * | sampwing quit (Ping timeout: 252 seconds) |
| 22:01:47 | * | gokr joined #nim |
| 22:15:47 | ekarlso | BlaXpirit: how you access a string value ? |
| 22:15:53 | BlaXpirit | $ |
| 22:15:54 | ekarlso | I just get that it's a tainted string -,,- |
| 22:16:01 | BlaXpirit | tainted string? :o |
| 22:16:01 | ekarlso | let cfgFile = $args["-c"] |
| 22:16:23 | BlaXpirit | I am not aware of this, please help me identify if this is a bug |
| 22:16:35 | BlaXpirit | maybe better in private message... |
| 22:17:09 | * | Mimbus quit (Remote host closed the connection) |
| 22:18:10 | * | joecodes2 quit (Quit: Page closed) |
| 22:18:18 | * | sampwing joined #nim |
| 22:18:37 | * | joecodes2 joined #nim |
| 22:19:52 | * | flaviu quit (Ping timeout: 245 seconds) |
| 22:24:09 | * | flaviu joined #nim |
| 22:25:02 | Araq | I have the same DNS problems .... :-/ |
| 22:26:29 | ekarlso | how you change port for jester ? |
| 22:28:10 | sillesta | https://github.com/dom96/jester/blob/master/jester.nim#L28 ? |
| 22:29:21 | * | cryzed left #nim ("Leaving") |
| 22:31:31 | joecodes2 | ekarlso: var settings = newSettings(port = Port(1234)) |
| 22:31:59 | ekarlso | .eval var foo = "" if true else "" |
| 22:32:07 | ekarlso | that bot... |
| 22:34:52 | flaviu | ekarlso: Sorry, I just restarted |
| 22:35:10 | * | Mimbus joined #nim |
| 22:43:23 | ekarlso | hmmms |
| 22:43:29 | ekarlso | howto sys.exit(0) ish in nim ? |
| 22:43:51 | EXetoC | see 'quit' |
| 22:44:07 | BlaXpirit | quit() |
| 22:44:30 | flaviu | ekarlso: http://nim-lang.org/theindex.html#ui |
| 22:46:18 | * | perturbation quit (Quit: Leaving) |
| 22:46:19 | BlaXpirit | oh yeah, anchors are messed up |
| 22:46:30 | BlaXpirit | probably someone wanted to get rid of `` |
| 22:55:27 | sillesta | BlaXpirit: does quit() clean up/collect garbage? |
| 22:55:49 | BlaXpirit | i can't guarantee you anything |
| 22:56:00 | BlaXpirit | but i'm almost sure that it's just the same as normal program exit |
| 22:56:51 | Araq | it doesn't perform any "cleanup". it relies on the OS to do that |
| 22:57:07 | * | yonson joined #nim |
| 22:57:40 | Araq | there are some OSes which don't do that, but these are not really "operating systems" but "UNoperating systems" ;-) |
| 22:57:50 | sillesta | hehe |
| 23:02:38 | * | Sphax quit (Quit: CYA!!) |
| 23:19:05 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 23:19:50 | * | matkuki quit (Read error: Connection reset by peer) |
| 23:33:04 | sillesta | is it possible to interface with obj-c and create a osx window using just nim? |
| 23:33:37 | dtscode | well you could create an interface using ffi's. it would still require obj-c though |
| 23:33:48 | dtscode | you might need cocoa bindings as well |
| 23:35:17 | gokr | sillesta: You could also take a look at the Nim QML stuff |
| 23:38:25 | * | JinShil joined #nim |
| 23:39:50 | sillesta | gokr: looks like it's nim -> c interface |
| 23:40:14 | gokr | What I meant is that it enables Nim to integrate with Qt - and Qt supports OSX. |
| 23:40:19 | Araq | sillesta: you can compile to objective-c instead of plain C which lessens the pain somewhat |
| 23:40:29 | sillesta | oh |
| 23:40:35 | sillesta | gotcha |
| 23:41:21 | gokr | sillesta: What are you trying to build? |
| 23:41:27 | Araq | interfacing to objective C still is *not* easy this way, but we're getting there, I made extensions for C++ that will end up benefit objc too |
| 23:41:45 | sillesta | cool |
| 23:42:13 | sillesta | gokr: realized i've never tried "raw" windowing before, i should try it :) |
| 23:42:28 | sillesta | getting late though. good night |
| 23:42:32 | gokr | gnite |
| 23:57:22 | joecodes2 | how to write a proc that returns a seq? this sigsegv's on me: proc t(): seq[tuple[s,e:int]] = result.add( (s:0, e:100) ) |
| 23:58:07 | dtscode | proc t(): seq[tuple[int, int]] = foo |
| 23:58:11 | dtscode | iirc |
| 23:58:23 | EXetoC | yes, because you are not initializing result |
| 23:58:35 | dtscode | oh duh |
| 23:59:13 | EXetoC | there are plans to make 'add' "safe" in this regard (initialize if necessary) |
| 23:59:48 | dtscode | why doesnt it auto initialize if you dont? |
| 23:59:49 | * | Trustable quit (Remote host closed the connection) |
| 23:59:56 | dtscode | like an implicit return 0 in c++? |